From 38b47fc6db4973503677be72939f373d2a1bcf31 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Sun, 9 Apr 2006 18:14:59 +0000 Subject: [PATCH] Remove some right click on account menuitem as nk said Really send a single when right click on account -> single (can't change the string as string are freezed and good string that is in systray doesn't have '...' at the end) Add missing funcion call --- src/gtkgui.glade | 137 ++----------------------------------------- src/roster_window.py | 36 +++--------- 2 files changed, 13 insertions(+), 160 deletions(-) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 00f5753c2..9240c8829 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -16751,32 +16751,6 @@ Maybe I'll refactor later - - - True - _Modify Account... - True - - - - True - gtk-preferences - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - - - True @@ -16816,13 +16790,7 @@ Maybe I'll refactor later - - - - True - - - + True @@ -16842,17 +16810,17 @@ Maybe I'll refactor later - + - + True - _Discover Services... + _Modify Account... True - + True - gtk-find + gtk-preferences 1 0.5 0.5 @@ -16862,99 +16830,6 @@ Maybe I'll refactor later - - - - True - Ad_vanced Actions - True - - - - True - gtk-dialog-warning - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - - True - _XML Console... - True - - - - True - gtk-execute - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - - - - - - True - Set Message of the Day - Set MOTD - True - - - - - - - True - Update Message of the Day - Update MOTD - True - - - - - - - True - Delete Message of the Day - Delete MOTD - True - - - - - True - gtk-clear - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - diff --git a/src/roster_window.py b/src/roster_window.py index a7d56cf91..7f0d7a67d 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1485,19 +1485,10 @@ class RosterWindow: childs = account_context_menu.get_children() status_menuitem = childs[0] - edit_account_menuitem = childs[1] - # we skip the separator childs[2] - #FIXME : new_message open a new chat. So what do we want ? - new_message_menuitem = childs[3] - join_group_chat_menuitem = childs[4] - # we skip the separator childs[5] - add_contact_menuitem = childs[6] - service_discovery_menuitem = childs[7] - # skip advanced_actions_menuitem, childs[8] - xml_console_menuitem = xml.get_widget('xml_console_menuitem') - set_motd_menuitem = xml.get_widget('set_motd_menuitem') - update_motd_menuitem = xml.get_widget('update_motd_menuitem') - delete_motd_menuitem = xml.get_widget('delete_motd_menuitem') + new_message_menuitem = childs[1] + join_group_chat_menuitem = childs[2] + add_contact_menuitem = childs[3] + edit_account_menuitem = childs[4] sub_menu = gtk.Menu() status_menuitem.set_submenu(sub_menu) @@ -1523,9 +1514,6 @@ class RosterWindow: if gajim.connections[account].connected < 2: item.set_sensitive(False) - item = gtk.SeparatorMenuItem() - sub_menu.append(item) - uf_show = helpers.get_uf_show('offline', use_mnemonic = True) item = gtk.ImageMenuItem(uf_show) icon = state_images['offline'] @@ -1533,17 +1521,7 @@ class RosterWindow: sub_menu.append(item) item.connect('activate', self.change_status, account, 'offline') - xml_console_menuitem.connect('activate', - self.on_xml_console_menuitem_activate, account) - set_motd_menuitem.connect('activate', self.on_set_motd_menuitem_activate, - account) - update_motd_menuitem.connect('activate', - self.on_update_motd_menuitem_activate, account) - delete_motd_menuitem.connect('activate', - self.on_delete_motd_menuitem_activate, account) edit_account_menuitem.connect('activate', self.on_edit_account, account) - service_discovery_menuitem.connect('activate', - self.on_service_disco_menuitem_activate, account) add_contact_menuitem.connect('activate', self.on_add_new_contact, account) gc_sub_menu = gtk.Menu() # gc is always a submenu @@ -1554,8 +1532,7 @@ class RosterWindow: # make some items insensitive if account is offline if gajim.connections[account].connected < 2: - for widget in [set_motd_menuitem, update_motd_menuitem, - delete_motd_menuitem, service_discovery_menuitem, add_contact_menuitem, + for widget in [add_contact_menuitem, join_group_chat_menuitem, new_message_menuitem]: widget.set_sensitive(False) @@ -1987,6 +1964,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) # after user chooses "Change status message" menuitem # we can return to this show self.previous_status_combobox_active = active + connected_accounts = gajim.get_number_of_connected_accounts() if status == 'invisible': bug_user = False for acct in accounts: @@ -2251,7 +2229,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) pass def on_new_message_menuitem_activate(self, widget, account): - dialogs.NewMessageDialog(account) + dialogs.SingleMessageWindow(account, action = 'send') def on_contents_menuitem_activate(self, widget): helpers.launch_browser_mailer('url', 'http://trac.gajim.org/wiki')