From 541311ebdeb9b885dee854ce94f3767340a6bc61 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 21 Jul 2020 05:53:51 +0000 Subject: [PATCH] #2841 use get_icon_filename to deal with missing icon extension tranparently, but do specify the extension when we know it (ie: splash screen) git-svn-id: https://xpra.org/svn/Xpra/trunk@27002 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/client/gtk3/splash_screen.py | 2 +- src/xpra/gtk_common/gtk_util.py | 4 ++-- src/xpra/gtk_common/gui.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xpra/client/gtk3/splash_screen.py b/src/xpra/client/gtk3/splash_screen.py index e749ed0398..9384296432 100644 --- a/src/xpra/client/gtk3/splash_screen.py +++ b/src/xpra/client/gtk3/splash_screen.py @@ -37,7 +37,7 @@ def __init__(self): self.set_type_hint(Gdk.WindowTypeHint.SPLASHSCREEN) vbox = Gtk.VBox() hbox = Gtk.HBox(homogeneous=False) - icon = get_icon_pixbuf("xpra") + icon = get_icon_pixbuf("xpra.png") if icon: self.set_icon(icon) hbox.pack_start(Gtk.Image.new_from_pixbuf(icon), False, False, 20) diff --git a/src/xpra/gtk_common/gtk_util.py b/src/xpra/gtk_common/gtk_util.py index d920fb5b74..9cf45feacd 100644 --- a/src/xpra/gtk_common/gtk_util.py +++ b/src/xpra/gtk_common/gtk_util.py @@ -651,8 +651,8 @@ def menuitem(title, image=None, tooltip=None, cb=None) -> Gtk.ImageMenuItem: def get_icon_pixbuf(icon_name): if not icon_name: return None - from xpra.platform.paths import get_icon_dir - icon_filename = os.path.join(get_icon_dir(), icon_name) + from xpra.platform.paths import get_icon_filename + icon_filename = get_icon_filename(icon_name) if os.path.exists(icon_filename): return GdkPixbuf.Pixbuf.new_from_file(icon_filename) return None diff --git a/src/xpra/gtk_common/gui.py b/src/xpra/gtk_common/gui.py index 5d4bc5fe93..6d8b125ee0 100644 --- a/src/xpra/gtk_common/gui.py +++ b/src/xpra/gtk_common/gui.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # This file is part of Xpra. -# Copyright (C) 2018-2019 Antoine Martin +# Copyright (C) 2018-2020 Antoine Martin # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. @@ -84,7 +84,7 @@ def hide(*_args): self.set_resizable(True) self.set_decorated(True) self.set_position(Gtk.WindowPosition.CENTER) - icon = get_icon_pixbuf("xpra") + icon = get_icon_pixbuf("xpra.png") if icon: self.set_icon(icon) add_close_accel(self, self.quit) @@ -258,7 +258,7 @@ def __init__(self): self.set_title("Start Xpra Session") self.set_position(Gtk.WindowPosition.CENTER) self.set_size_request(640, 300) - icon = get_icon_pixbuf("xpra") + icon = get_icon_pixbuf("xpra.png") if icon: self.set_icon(icon) self.connect("delete-event", self.close)