diff --git a/gajim/chat_control_base.py b/gajim/chat_control_base.py index 9bcc143171a84cfc637497964d6a6e55ba20b088..e557c59fdffce7e14e66528ba7a3330257d8f0f0 100644 --- a/gajim/chat_control_base.py +++ b/gajim/chat_control_base.py @@ -474,17 +474,16 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): return state def set_encryption_menu_icon(self): - for child in self.encryption_menu.get_children(): - if isinstance(child, Gtk.Image): - image = child - break - + image = self.encryption_menu.get_image() + if image is None: + image = Gtk.Image() + self.encryption_menu.set_image(image) if not self.encryption: - icon = gtkgui_helpers.get_icon_pixmap( - 'channel-insecure-symbolic', color=[Color.BLACK]) + image.set_from_icon_name('channel-insecure-symbolic', + Gtk.IconSize.MENU) else: - icon = gtkgui_helpers.get_icon_pixmap('channel-secure-symbolic') - image.set_from_pixbuf(icon) + image.set_from_icon_name('channel-secure-symbolic', + Gtk.IconSize.MENU) def set_speller(self): if not app.HAVE_SPELL or not app.config.get('use_speller'): diff --git a/gajim/data/gui/chat_control.ui b/gajim/data/gui/chat_control.ui index 613eba6e62b5b9c12242c5ee3a83533c7e2fc62a..43223d675ddfb7bcc21b835fb762fa0838c4541b 100644 --- a/gajim/data/gui/chat_control.ui +++ b/gajim/data/gui/chat_control.ui @@ -801,11 +801,7 @@ audio-mic-volume-low</property> <property name="tooltip_text" translatable="yes">Choose an encryption</property> <property name="relief">none</property> <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">channel-secure-symbolic</property> - </object> + <placeholder/> </child> <style> <class name="chatcontrol-actionbar-button"/> diff --git a/gajim/data/gui/groupchat_control.ui b/gajim/data/gui/groupchat_control.ui index eb58e2c200f660437ce44e9a48fd3b117d380a4a..9e15ec0145d7a88c9784f2c235ff05b5a75296bb 100644 --- a/gajim/data/gui/groupchat_control.ui +++ b/gajim/data/gui/groupchat_control.ui @@ -280,11 +280,7 @@ <property name="tooltip_text" translatable="yes">Choose an encryption</property> <property name="relief">none</property> <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">channel-secure-symbolic</property> - </object> + <placeholder/> </child> <style> <class name="chatcontrol-actionbar-button"/>