changeset afea66b4f4b5 in /home/hg/repos/gajim-plugins

author: Bahtiar `kalkin-` Gadimov <[email protected]>
branches: 
details:gajim-plugins?cmd=changeset;node=afea66b4f4b5
description: Fix hiding OMEMO controls in muc

        - This reverts commit 85e09c60befb4de69fb6559c8dc895dc8c655917.
        - Uses `chat_control` instead of `chat_control_base` as 
`gui_extension_point`.

diffstat:

 omemo/__init__.py |   2 +-
 omemo/ui.py       |  10 +++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

diffs (41 lines):

diff -r c6b1b4ed02c0 -r afea66b4f4b5 omemo/__init__.py
--- a/omemo/__init__.py Thu Jan 07 18:40:32 2016 +0100
+++ b/omemo/__init__.py Thu Jan 07 18:56:48 2016 +0100
@@ -54,7 +54,7 @@
             (ged.PRECORE, self.handle_outgoing_msgs),
         }
         self.config_dialog = None
-        self.gui_extension_points = {'chat_control_base':
+        self.gui_extension_points = {'chat_control':
                                      (self.connect_ui, None)}
         SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
 
diff -r c6b1b4ed02c0 -r afea66b4f4b5 omemo/ui.py
--- a/omemo/ui.py       Thu Jan 07 18:40:32 2016 +0100
+++ b/omemo/ui.py       Thu Jan 07 18:56:48 2016 +0100
@@ -22,8 +22,6 @@
 
 import gtk
 
-from message_control import TYPE_CHAT
-
 log = logging.getLogger('gajim.plugin_system.omemo')
 
 # from plugins.helpers import log
@@ -104,13 +102,11 @@
         self.toggle_omemo(available)
 
         self.checkbox.set_active(plugin.is_omemo_enabled(contact))
-
         self.chat_control = chat_control
 
-        if chat_control.TYPE_ID == TYPE_CHAT:
-            _add_widget(self.prekey_button, chat_control)
-            _add_widget(self.checkbox, chat_control)
-            _add_widget(self.clear_button, chat_control)
+        _add_widget(self.prekey_button, chat_control)
+        _add_widget(self.checkbox, chat_control)
+        _add_widget(self.clear_button, chat_control)
 
     def toggle_omemo(self, available):
         if available:
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to