changeset fba5f172650b in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=fba5f172650b
description: hide 'bookmark_ button' if private storage not supported.part 2

diffstat:

 src/groupchat_control.py |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 39d2f5181210 -r fba5f172650b src/groupchat_control.py
--- a/src/groupchat_control.py  Tue Nov 20 11:29:13 2012 +0400
+++ b/src/groupchat_control.py  Tue Nov 20 13:00:57 2012 +0400
@@ -328,10 +328,11 @@
             if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'):
                 img = self.xml.get_object('image7')
                 img.set_from_icon_name('bookmark-new', gtk.ICON_SIZE_MENU)
-            if not gajim.connections[self.account].private_storage_supported:
-                widget.hide()
-            else:
-                widget.show()
+            widget.set_sensitive(
+                gajim.connections[self.account].private_storage_supported or \
+                (gajim.connections[self.account].pubsub_supported and \
+                
gajim.connections[self.account].pubsub_publish_options_supported))
+            widget.show()
 
         widget = self.xml.get_object('list_treeview')
         id_ = widget.connect('row_expanded', 
self.on_list_treeview_row_expanded)
@@ -843,7 +844,9 @@
         if self.contact.jid in gajim.config.get_per('accounts', self.account,
         'minimized_gc').split(' '):
             minimize_menuitem.set_active(True)
-        if not gajim.connections[self.account].private_storage_supported:
+        conn = gajim.connections[self.account]
+        if not conn.private_storage_supported and (not conn.pubsub_supported 
or \
+        not conn.pubsub_publish_options_supported):
             bookmark_room_menuitem.set_sensitive(False)
         if gajim.gc_connected[self.account][self.room_jid]:
             c = gajim.contacts.get_gc_contact(self.account, self.room_jid,
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to