tab missed a var change. gajim didnt work

This commit is contained in:
Nikos Kouremenos 2005-04-22 14:00:35 +00:00
parent 656b05078a
commit 103ee6e6bc
2 changed files with 12 additions and 7 deletions

View File

@ -37,6 +37,8 @@ class Chat:
"""Class for chat/groupchat windows"""
def __init__(self, plugin, account, widget_name):
self.xml = gtk.glade.XML(GTKGUI_GLADE, widget_name, APP)
self.window = self.xml.get_widget(widget_name)
self.widget_name = widget_name
self.notebook = self.xml.get_widget('chat_notebook')
self.notebook.remove_page(0)
self.plugin = plugin
@ -51,8 +53,11 @@ class Chat:
self.print_time_timeout_id = {}
self.names = {} # what is printed in the tab (eg. user.name)
self.childs = {}
self.window = self.xml.get_widget(widget_name)
self.widget_name = widget_name
if self.widget_name == 'groupchat_window':
self.subject_entry = self.xml.get_widget('subject_entry')
self.conversation_textview = self.xml.get_widget(
'conversation_textview')
print 'FIXME: this is None!!', self.conversation_textview
def update_tags(self):
for jid in self.tagIn:
@ -634,7 +639,7 @@ class Chat:
self.after_nickname_symbols = gajim.config.get('after_nickname')
format = self.before_nickname_symbols + name \
+ self.after_nickname_symbols + ' '
self.print_with_tag_list(conversation_buffer, format, end_iter, tags)
self.print_with_tag_list(buffer, format, end_iter, tags)
# detect urls formatting and if the user has it on emoticons
index = self.detect_and_print_special_text(text, jid,

View File

@ -60,6 +60,7 @@ class Groupchat_window(chat.Chat):
self.on_configure_button_clicked)
self.xml.signal_connect('on_groupchat_window_key_press_event', \
self.on_groupchat_window_key_press_event)
self.conversation_textview.grab_focus() #FIXME: so this tracebacks
def on_groupchat_window_delete_event(self, widget, event):
"""close window"""
@ -90,8 +91,7 @@ class Groupchat_window(chat.Chat):
if self.childs[jid] == new_child:
new_jid = jid
break
self.xml.get_widget('subject_entry').set_text(\
self.subjects[new_jid])
self.subject_entry.set_text(self.subjects[new_jid])
chat.Chat.on_chat_notebook_switch_page(self, notebook, page, page_num)
def get_role_iter(self, room_jid, role):
@ -183,7 +183,7 @@ class Groupchat_window(chat.Chat):
iter = model.get_iter(path)
return model.get_value(iter, 2)
def udpate_pixbufs(self):
def update_pixbufs(self):
for room_jid in self.list_treeview:
model = self.list_treeview[room_jid].get_model()
role_iter = model.get_iter_root()
@ -228,7 +228,7 @@ class Groupchat_window(chat.Chat):
def set_subject(self, room_jid, subject):
self.subjects[room_jid] = subject
self.xml.get_widget('subject_entry').set_text(subject)
self.subject_entry.set_text(subject)
def on_set_button_clicked(self, widget):
room_jid = self.get_active_jid()