From a2caafa72c45d3563df310abd7eec4cf9e40e03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com> Date: Wed, 14 Feb 2018 20:09:34 +0100 Subject: [PATCH] Dont show avatars as Window icon Avatars are now Surfaces, Gtk.Window has no method yet to add Surfaces as icons. Transforming them back to pixbufs is not viable because pixbufs cant hold the scale information, and we have no way to set it. This was only used with single chat windows, which is a mode that came out of style and is probably not used often anymore. Fixes #8895 --- gajim/message_window.py | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/gajim/message_window.py b/gajim/message_window.py index ed3f0bf674..99746185bd 100644 --- a/gajim/message_window.py +++ b/gajim/message_window.py @@ -469,31 +469,13 @@ class MessageWindow(object): def show_icon(self): window_mode = app.interface.msg_win_mgr.mode - icon = None - if window_mode == MessageWindowMgr.ONE_MSG_WINDOW_NEVER: - ctrl = self.get_active_control() - if not ctrl: - return - icon = ctrl.get_tab_image(count_unread=False) - elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS: - pass # keep default icon - elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER: - pass # keep default icon - elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_PERACCT: - pass # keep default icon - elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_PERTYPE: + icon = 'org.gajim.Gajim' + if window_mode in (MessageWindowMgr.ONE_MSG_WINDOW_PERTYPE, + MessageWindowMgr.ONE_MSG_WINDOW_NEVER): if self.type_ == 'gc': icon = gtkgui_helpers.get_iconset_name_for('muc-active') - else: - # chat, pm - 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()) + + self.window.set_icon_name(icon) def show_title(self, urgent=True, control=None): """ -- GitLab