diff --git a/src/dialogs.py b/src/dialogs.py index c0571475a..4eb197821 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -386,7 +386,7 @@ class About_dialog: dlg.set_logo(gtk.gdk.pixbuf_new_from_file('../data/pixmaps/logo.png')) dlg.set_translator_credits(_('translator_credits')) - rep = dlg.run() # this run doesn't crash threads.. interesting.. + rep = dlg.run() dlg.destroy() class Confirmation_dialog: @@ -474,7 +474,8 @@ class Join_groupchat_window: self.account = account if gajim.connections[account].connected < 2: Error_dialog(_('You must be connected to join a groupchat')) - return + raise RuntimeError, 'You must be connected to join a groupchat' + self.xml = gtk.glade.XML(GTKGUI_GLADE, 'join_groupchat_window', APP) self.window = self.xml.get_widget('join_groupchat_window') self.xml.get_widget('server_entry').set_text(server) @@ -506,6 +507,7 @@ class Join_groupchat_window: def on_join_groupchat_window_destroy(self, widget): '''close window''' del self.plugin.windows[self.account]['join_gc'] # remove us from open windows + print 'destory' def on_join_groupchat_window_key_press_event(self, widget, event): if event.keyval == gtk.keysyms.Escape: # ESCAPE @@ -564,10 +566,6 @@ class New_message_dialog: self.xml.signal_autoconnect(self) self.window.show_all() - def on_delete_event(self, widget, event): - '''close window''' - del self.plugin.windows['new_message'] - def on_cancel_button_clicked(self, widget): '''When Cancel button is clicked''' self.window.destroy() diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 9efe87d7f..8f4f18086 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -266,6 +266,19 @@ class Groupchat_window(chat.Chat): room_jid = self.get_active_jid() gajim.connections[self.account].request_gc_config(room_jid) + def on_subject_entry_focus_out_event(self, widget): + print 'FIXME: focus out' + return + new_child = notebook.get_nth_page(page_num) + new_jid = '' + for jid in self.xmls: + if self.childs[jid] == new_child: + new_jid = jid + break + subject = self.subjects[new_jid] + self.subject_entry.set_text(subject) + self.subject_entry_tooltip.set_tip(self.subject_entry, subject) + def on_message_textview_key_press_event(self, widget, event): """When a key is pressed: if enter is pressed without the shit key, message (if not empty) is sent diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 9d45eedec..757650c2f 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -7687,6 +7687,7 @@ Custom True * True + 0 @@ -9548,7 +9549,6 @@ Custom GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST False - diff --git a/src/roster_window.py b/src/roster_window.py index ef797c762..86c4c298a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -963,7 +963,10 @@ class Roster_window: if self.plugin.windows[account].has_key('join_gc'): self.plugin.windows[account]['join_gc'].window.present() else: - self.plugin.windows[account]['join_gc'] = dialogs.Join_groupchat_window(self.plugin, account) + try: + self.plugin.windows[account]['join_gc'] = dialogs.Join_groupchat_window(self.plugin, account) + except RuntimeError: + pass def on_new_message_menuitem_activate(self, widget, account):