Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-09-22 17:44:07 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-09-22 17:44:07 +0300
commit9785f314155853d85f1f4a70f3b7482bea308ae3 (patch)
tree1e02b6479c7f5c6a9bf88a0d366a898d3d157cbd
parentb60fe02680f34011b9cd6ae854ba690ae9a38be6 (diff)
Set lock_image from icon name instead of filepath
Fixes #8673
-rw-r--r--gajim/chat_control.py10
-rw-r--r--gajim/groupchat_control.py10
2 files changed, 10 insertions, 10 deletions
diff --git a/gajim/chat_control.py b/gajim/chat_control.py
index 57a4493ee..8631c0796 100644
--- a/gajim/chat_control.py
+++ b/gajim/chat_control.py
@@ -856,18 +856,18 @@ class ChatControl(ChatControlBase):
self._show_lock_image(**encryption_state)
- def _show_lock_image(self, visible, enc_type='',
- authenticated=False):
+ def _show_lock_image(self, visible, enc_type='', authenticated=False):
"""
Set lock icon visibility and create tooltip
"""
if authenticated:
authenticated_string = _('and authenticated')
- img_path = gtkgui_helpers.get_icon_path('security-high')
+ self.lock_image.set_from_icon_name(
+ 'security-high', Gtk.IconSize.MENU)
else:
authenticated_string = _('and NOT authenticated')
- img_path = gtkgui_helpers.get_icon_path('security-low')
- self.lock_image.set_from_file(img_path)
+ self.lock_image.set_from_icon_name(
+ 'security-low', Gtk.IconSize.MENU)
tooltip = _('%(type)s encryption is active %(authenticated)s.') % {'type': enc_type, 'authenticated': authenticated_string}
diff --git a/gajim/groupchat_control.py b/gajim/groupchat_control.py
index 92bda930b..39f4121bf 100644
--- a/gajim/groupchat_control.py
+++ b/gajim/groupchat_control.py
@@ -785,18 +785,18 @@ class GroupchatControl(ChatControlBase):
self._show_lock_image(**encryption_state)
- def _show_lock_image(self, visible, enc_type='',
- authenticated=False):
+ def _show_lock_image(self, visible, enc_type='', authenticated=False):
"""
Set lock icon visibility and create tooltip
"""
if authenticated:
authenticated_string = _('and authenticated')
- img_path = gtkgui_helpers.get_icon_path('security-high')
+ self.lock_image.set_from_icon_name(
+ 'security-high', Gtk.IconSize.MENU)
else:
authenticated_string = _('and NOT authenticated')
- img_path = gtkgui_helpers.get_icon_path('security-low')
- self.lock_image.set_from_file(img_path)
+ self.lock_image.set_from_icon_name(
+ 'security-low', Gtk.IconSize.MENU)
tooltip = _('%(type)s encryption is active %(authenticated)s.') % {
'type': enc_type, 'authenticated': authenticated_string}