Hashed out a bit more of the MessageControl interface

This commit is contained in:
Travis Shirk 2005-12-29 03:49:57 +00:00
parent 44c8d901f9
commit d19a522ff8
4 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,4 @@
VERSION ?= 0.9.1
VERSION ?= 0.10
GAJIM_AP = 0 # do we build Autopackage?

View File

@ -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())

View File

@ -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):

View File

@ -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