From 86177e8536a627b9f586cded235cef32c5b295f5 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Tue, 21 Aug 2007 22:58:19 +0000 Subject: [PATCH] Rework zeroconf menu. --- .../glade/zeroconf_contact_context_menu.glade | 123 +++++++++++------- src/roster_window.py | 8 +- 2 files changed, 82 insertions(+), 49 deletions(-) diff --git a/data/glade/zeroconf_contact_context_menu.glade b/data/glade/zeroconf_contact_context_menu.glade index 4ad215baa..e69c42668 100644 --- a/data/glade/zeroconf_contact_context_menu.glade +++ b/data/glade/zeroconf_contact_context_menu.glade @@ -9,7 +9,7 @@ Start _Chat True - + True gtk-jump-to 1 @@ -18,74 +18,103 @@ - - _Rename + + True + Send _File True - + True - gtk-refresh + gtk-save 1 - - - Edit _Groups - True - - True - + True - Send _File + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Manage Contact True - - + + True - gtk-missing-image + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + _Rename + True + + + True + gtk-refresh + 1 + + + + + + + Edit _Groups + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-edit + 1 + + + + + + + Assign Open_PGP Key + True + + + + True + gtk-dialog-authentication + 1 + + + + + + + True + Add Special _Notification + True + + + True + gtk-info + 1 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-properties 1 - - Assign Open_PGP Key - True - - - - True - gtk-missing-image - 1 - - - - - - - True - True - Add Special _Notification - True - - - True - gtk-info - 1 - - - - - - + True @@ -101,7 +130,7 @@ _History True - + True gtk-justify-fill 1 diff --git a/src/roster_window.py b/src/roster_window.py index ea26cd858..0a3f940df 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1984,7 +1984,6 @@ class RosterWindow: above_information_separator = xml.get_widget( 'above_information_separator') - # skip a separator information_menuitem = xml.get_widget('information_menuitem') history_menuitem = xml.get_widget('history_menuitem') @@ -2014,7 +2013,7 @@ class RosterWindow: if contact.resource: send_file_menuitem.connect('activate', self.on_send_file_menuitem_activate, account, contact) - else: # if we do not have resource we cannot send file + else: # if we do no have resource we cannot do much send_file_menuitem.set_sensitive(False) rename_menuitem.connect('activate', self.on_rename, iter, tree_path) @@ -2675,6 +2674,11 @@ class RosterWindow: status_menuitem.set_image(icon) status_menuitems.append(status_menuitem) menu.append(send_custom_status_menuitem) + + # there is no singlemessage and custom status for zeroconf + if gajim.config.get_per('accounts', account, 'is_zeroconf'): + send_custom_status_menuitem.set_sensitive(False) + send_group_message_item.set_sensitive(False) if not group in helpers.special_groups: item = gtk.SeparatorMenuItem() # separator