Skip to content

Commit

Permalink
#2841 use get_icon_filename to deal with missing icon extension tranp…
Browse files Browse the repository at this point in the history
…arently, 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
  • Loading branch information
totaam committed Jul 21, 2020
1 parent 85968c5 commit 541311e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/xpra/client/gtk3/splash_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/gtk_common/gtk_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/xpra/gtk_common/gui.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# This file is part of Xpra.
# Copyright (C) 2018-2019 Antoine Martin <[email protected]>
# Copyright (C) 2018-2020 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 541311e

Please sign in to comment.