From d19a522ff87f2f0b5d440d910306df070163860e Mon Sep 17 00:00:00 2001 From: Travis Shirk Date: Thu, 29 Dec 2005 03:49:57 +0000 Subject: [PATCH] Hashed out a bit more of the MessageControl interface --- Makefile | 2 +- src/chat.py | 4 ++-- src/chat_control.py | 4 +++- src/message_window.py | 13 ++++++++++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b4dd5c595..a739002ec 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION ?= 0.9.1 +VERSION ?= 0.10 GAJIM_AP = 0 # do we build Autopackage? diff --git a/src/chat.py b/src/chat.py index ae9fd99dd..87532c370 100644 --- a/src/chat.py +++ b/src/chat.py @@ -255,8 +255,8 @@ class Chat: color.blue = int((color.blue * p) + (mask * (1 - p))) nickname.modify_fg(gtk.STATE_ACTIVE, color) elif self.widget_name == 'groupchat_window': - nickname = hb.get_children()[0] - close_button = hb.get_children()[1] + nickname = hb.get_children()[1] + close_button = hb.get_children()[2] has_focus = self.window.get_property('has-toplevel-focus') current_tab = (self.notebook.page_num(child) == self.notebook.get_current_page()) diff --git a/src/chat_control.py b/src/chat_control.py index f7f6f9a51..3b4a9c537 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -32,11 +32,13 @@ GTKGUI_GLADE = 'gtkgui.glade' #################### class ChatControl(MessageControl): - '''A MessageControl of standard 1-1 chat''' + '''A MessageControl for standard 1-1 chat''' def __init__(self, contact): MessageControl.__init__(self, 'chat_child_vbox', contact); self.always_compact_view = gajim.config.get('always_compact_view_chat') + def draw_widgets(self): + MessageControl.draw_widgets(self) # FIXME: Move this to a muc_control.py class MultiUserChatControl(MessageControl): diff --git a/src/message_window.py b/src/message_window.py index c6b35748b..2f76af02d 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -146,7 +146,18 @@ class MessageControl(gtk.VBox): def __init__(self, widget_name, contact): gtk.VBox.__init__(self) - self.widget_name = widget_name self.contact = contact + self.compact_view = False + + self.widget_name = widget_name self.xml = gtk.glade.XML(GTKGUI_GLADE, widget_name, APP) self.widget = self.xml.get_widget(widget_name) + + self.draw_widgets() + + def draw_banner(self): + # TODO + pass + def draw_widgets(self): + self.draw_banner() + # NOTE: Derived classes should implement this