Changeset 8724 for branches/gajim_0.11.1/src/roster_window.py
- Timestamp:
- 09/05/07 13:44:05 (15 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11.1/src/roster_window.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/roster_window.py
r8719 r8724 871 871 872 872 connected_accounts = gajim.get_number_of_connected_accounts() 873 874 connected_accounts_with_private_storage = 0 875 873 876 if connected_accounts > 1: # 2 or more accounts? make submenus 874 877 add_sub_menu = gtk.Menu() … … 894 897 895 898 # join gc 899 if gajim.connections[account].private_storage_supported: 900 connected_accounts_with_private_storage += 1 896 901 label = gtk.Label() 897 902 label.set_markup('<u>' + account.upper() +'</u>') … … 901 906 gc_item.connect('state-changed', 902 907 gtkgui_helpers.on_bm_header_changed_state) 908 gc_item = gtk.MenuItem(_('using account %s') % account, False) 903 909 gc_sub_menu.append(gc_item) 904 910 905 911 self.add_bookmarks_list(gc_sub_menu, account) 906 907 # the 'manage gc bookmarks' item is shown908 # below to avoid duplicate code909 912 910 913 # add … … 918 921 disco_item.connect('activate', 919 922 self.on_service_disco_menuitem_activate, account) 920 921 923 922 924 add_new_contact_menuitem.set_submenu(add_sub_menu) … … 931 933 if gajim.account_is_connected(account): # THE connected account 932 934 # gc 935 if gajim.connections[account].private_storage_supported: 936 connected_accounts_with_private_storage += 1 933 937 self.add_bookmarks_list(gc_sub_menu, account) 938 gc_sub_menu.show_all() 934 939 # add 935 940 if not self.add_new_contact_handler_id: … … 975 980 item.set_sensitive(False) 976 981 982 if connected_accounts_with_private_storage > 0: 983 # At least one account with private storage support 977 984 # show the 'manage gc bookmarks' item 978 985 newitem = gtk.SeparatorMenuItem() # separator 979 986 gc_sub_menu.append(newitem) 987 988 newitem = gtk.ImageMenuItem(_('_Manage Bookmarks...')) 989 img = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES, 990 gtk.ICON_SIZE_MENU) 991 newitem.set_image(img) 992 newitem.connect('activate', 993 self.on_manage_bookmarks_menuitem_activate) 994 gc_sub_menu.append(newitem) 995 gc_sub_menu.show_all() 980 996 981 997 connected_accounts_with_vcard = [] … … 1009 1025 profile_avatar_menuitem.set_sensitive(True) 1010 1026 1011 newitem = gtk.ImageMenuItem(_('_Manage Bookmarks...'))1012 img = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES,1013 gtk.ICON_SIZE_MENU)1014 newitem.set_image(img)1015 newitem.connect('activate',1016 self.on_manage_bookmarks_menuitem_activate)1017 gc_sub_menu.append(newitem)1018 gc_sub_menu.show_all()1019 1020 1027 # Advanced Actions 1021 1028 if len(gajim.connections) == 0: # user has no accounts … … 4034 4041 def on_drop_in_contact(self, widget, account_source, c_source, account_dest, 4035 4042 c_dest, was_big_brother, context, etime): 4036 if not gajim.connections[account_source]. metacontacts_supported or not\4037 gajim.connections[account_dest]. metacontacts_supported:4043 if not gajim.connections[account_source].private_storage_supported or not\ 4044 gajim.connections[account_dest].private_storage_supported: 4038 4045 dialogs.WarningDialog(_('Metacontacts storage not supported by your ' 4039 4046 'server'),
