From 577c7221f68cf2749a2f301f85c219e1d67df5bc Mon Sep 17 00:00:00 2001 From: Daniel Aleksandersen Date: Mon, 14 Jan 2013 20:18:55 +0100 Subject: [PATCH] =?UTF-8?q?Use=20the=20icon=20sizing=20solution=20from=20t?= =?UTF-8?q?icket=20#6839=20for=20all=20dialogs.=20History=20manager?= =?UTF-8?q?=E2=80=99s=20icon=20was=2016px=20in=20Unity=20launcher.=20Fixes?= =?UTF-8?q?=20#7290?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gajim.py | 10 ++++++++-- src/history_manager.py | 11 ++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 64f7f8c4d..d2e65a8b5 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -394,8 +394,14 @@ if pid_alive(): if (show_remote_gajim_roster()): print("Gajim is already running, bringing the roster to front...") sys.exit(0) - pix = gtkgui_helpers.get_icon_pixmap('gajim', 48) - Gtk.Window.set_default_icon(pix) # set the icon to all newly opened wind + pixs = [] + for size in (16, 32, 48, 64, 128): + pix = gtkgui_helpers.get_icon_pixmap('gajim', size) + if pix: + pixs.append(pix) + if pixs: + # set the icon to all windows + Gtk.Window.set_default_icon_list(*pixs) pritext = _('Gajim is already running') sectext = _('Another instance of Gajim seems to be running\nRun anyway?') dialog = dialogs.YesNoDialog(pritext, sectext) diff --git a/src/history_manager.py b/src/history_manager.py index 5bd4b05a9..f8195dba0 100644 --- a/src/history_manager.py +++ b/src/history_manager.py @@ -109,9 +109,14 @@ import sqlite3 as sqlite class HistoryManager: def __init__(self): - pix = gtkgui_helpers.get_icon_pixmap('gajim') - # set the icon to all newly opened windows - Gtk.Window.set_default_icon(pix) + pixs = [] + for size in (16, 32, 48, 64, 128): + pix = gtkgui_helpers.get_icon_pixmap('gajim', size) + if pix: + pixs.append(pix) + if pixs: + # set the icon to all windows + Gtk.Window.set_default_icon_list(*pixs) if not os.path.exists(LOG_DB_PATH): dialogs.ErrorDialog(_('Cannot find history logs database'),