Use IconTheme for some icons

This commit is contained in:
Philipp Hörist 2018-01-29 20:02:30 +01:00
parent bb9b949fa1
commit c5c717ddd1
3 changed files with 9 additions and 6 deletions

View File

@ -1319,7 +1319,7 @@ class AboutDialog(Gtk.AboutDialog):
self.add_credit_section('Thanks', thanks)
self.set_translator_credits(_('translator-credits'))
self.set_logo(gtkgui_helpers.get_icon_pixmap('org.gajim.Gajim', 128))
self.set_logo_icon_name('org.gajim.Gajim')
self.connect(
'response', lambda dialog, *args: Gtk.AboutDialog.do_close(dialog))

View File

@ -984,12 +984,11 @@ class GroupchatControl(ChatControlBase):
return (label_str, color)
def get_tab_image(self, count_unread=True):
# Set tab image (always 16x16)
tab_image = None
if app.gc_connected[self.account][self.room_jid]:
tab_image = gtkgui_helpers.load_icon('muc_active')
tab_image = gtkgui_helpers.get_iconset_name_for('muc-active')
else:
tab_image = gtkgui_helpers.load_icon('muc_inactive')
tab_image = gtkgui_helpers.get_iconset_name_for('muc-inactive')
return tab_image
def update_ui(self):

View File

@ -483,13 +483,15 @@ class MessageWindow(object):
pass # keep default icon
elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_PERTYPE:
if self.type_ == 'gc':
icon = gtkgui_helpers.load_icon('muc_active')
icon = gtkgui_helpers.get_iconset_name_for('muc-active')
else:
# chat, pm
icon = gtkgui_helpers.load_icon('online')
icon = 'org.gajim.Gajim'
if icon:
if isinstance(icon, GdkPixbuf.Pixbuf):
self.window.set_icon(icon)
elif isinstance(icon, str):
self.window.set_icon_name(icon)
else:
self.window.set_icon(icon.get_pixbuf())
@ -685,6 +687,8 @@ class MessageWindow(object):
status_img.set_from_animation(tab_img.get_animation())
else:
status_img.set_from_pixbuf(tab_img.get_pixbuf())
elif isinstance(tab_img, str):
status_img.set_from_icon_name(tab_img, Gtk.IconSize.MENU)
else:
status_img.set_from_surface(tab_img)