From aecbf2ffc0aa7e579e8c07ef743c11d7b82d3040 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Fri, 22 Jul 2005 22:32:45 +0000 Subject: [PATCH] EditGroupsDialog no longer uses gtkdialog.run() but an emulation so we do not run another mainloop and leave the main mainloop waiting [which results in disconnection] rest will follow --- src/dialogs.py | 9 ++++++--- src/gtkgui.glade | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 02e566b41..c11ccd7de 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -53,17 +53,20 @@ class EditGroupsDialog: _("Contact's name: %s") % user.name) self.xml.get_widget('jid_label').set_markup( _('JID: %s') % user.jid) + self.xml.signal_autoconnect(self) - self.dialog.show_all() self.init_list() def run(self): - self.dialog.run() - self.dialog.destroy() + self.dialog.show_all() if self.changes_made: gajim.connections[self.account].update_contact(self.user.jid, self.user.name, self.user.groups) + def on_edit_groups_dialog_response(self, widget, response_id): + if response_id == gtk.RESPONSE_CLOSE: + self.dialog.destroy() + def update_contact(self): self.plugin.roster.remove_contact(self.user, self.account) self.plugin.roster.add_contact_to_roster(self.user.jid, self.account) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 14dd2c111..2cefa01a7 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -10611,7 +10611,7 @@ Status message Edit Groups GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE - False + True 260 True False @@ -10621,6 +10621,7 @@ Status message GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True +