diff --git a/gajim/chat_control_base.py b/gajim/chat_control_base.py
index 9bcc14317..e557c59fd 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 613eba6e6..43223d675 100644
--- a/gajim/data/gui/chat_control.ui
+++ b/gajim/data/gui/chat_control.ui
@@ -801,11 +801,7 @@ audio-mic-volume-low
Choose an encryption
none
-
+