Set enryption icon correctly
This commit is contained in:
parent
c983b1f50d
commit
749fcc1b48
|
@ -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'):
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Loading…
Reference in New Issue