From 103ee6e6bc7239c94c2ab93f86cffa3c2c67e893 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Fri, 22 Apr 2005 14:00:35 +0000 Subject: [PATCH] tab missed a var change. gajim didnt work --- src/chat.py | 11 ++++++++--- src/groupchat_window.py | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/chat.py b/src/chat.py index d83293c78..02a35ba34 100644 --- a/src/chat.py +++ b/src/chat.py @@ -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, diff --git a/src/groupchat_window.py b/src/groupchat_window.py index e9e46cc39..38231f7ae 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -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()