From 45fcf1e08fda23f4ed80ab172731237d7db753ab Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 9 Oct 2005 21:08:13 +0000 Subject: [PATCH] on middle click on an account row, open change status message dialog --- src/roster_window.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index d9ae9d7cb..96b7477e2 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1004,7 +1004,7 @@ class RosterWindow: return event_button - def change_status_message(self, widget, account): + def on_change_status_message_activate(self, widget, account): show = gajim.SHOW_LIST[gajim.connections[account].connected] dlg = dialogs.ChangeStatusMessageDialog(self.plugin, show) message = dlg.run() @@ -1062,7 +1062,7 @@ class RosterWindow: img.set_from_file(path) item.set_image(img) sub_menu.append(item) - item.connect('activate', self.change_status_message, account) + item.connect('activate', self.on_change_status_message_activate, account) if gajim.connections[account].connected < 2: item.set_sensitive(False) @@ -1233,6 +1233,11 @@ _('If "%s" accepts this request you will know his status.') %jid) self.new_chat(c, account) self.plugin.windows[account]['chats'][jid].set_active_tab(jid) self.plugin.windows[account]['chats'][jid].window.present() + elif type == 'account': + account = model[iter][C_ACCOUNT] + show = gajim.connections[account].connected + if show > 1: # We are connected + self.on_change_status_message_activate(widget, account) return True if event.button == 1: # Left click