Skip to content

Commit f7db78b

Browse files
committed
Fix for issues #152 - Icons of wine applications aren't displayed
1 parent e4fd718 commit f7db78b

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/dock.in

+13-9
Original file line numberDiff line numberDiff line change
@@ -3091,17 +3091,21 @@ class Dock(object):
30913091
stock_size, None)
30923092
dock_app.icon_filename = "STOCK_EXECUTE"
30933093

3094-
elif dock_app.has_desktop_file():
3095-
# look up the icon filename using Gtk
3096-
dai = Gio.DesktopAppInfo.new_from_filename(dock_app.desktop_file)
3097-
the_icon = dai.get_icon()
3098-
if the_icon is Gio.ThemedIcon:
3099-
icon_info = self.icontheme.choose_icon_for_scale(the_icon.get_names(),
3100-
icon_size, scale_factor, 0)
3094+
else:
3095+
if dock_app.has_desktop_file():
3096+
# look up the icon filename using Gtk
3097+
dai = Gio.DesktopAppInfo.new_from_filename(dock_app.desktop_file)
3098+
the_icon = dai.get_icon()
3099+
if the_icon is Gio.ThemedIcon:
3100+
icon_info = self.icontheme.choose_icon_for_scale(the_icon.get_names(),
3101+
icon_size, scale_factor, 0)
3102+
else:
3103+
icon_info = self.icontheme.choose_icon_for_scale([dock_app.icon_name, None],
3104+
icon_size, scale_factor, 0)
3105+
31013106
else:
31023107
icon_info = self.icontheme.choose_icon_for_scale([dock_app.icon_name, None],
31033108
icon_size, scale_factor, 0)
3104-
31053109
if icon_info is not None:
31063110
dock_app.icon_filename = icon_info.get_filename()
31073111
try:
@@ -3110,7 +3114,7 @@ class Dock(object):
31103114
# default to a stock icon if we couldn't load the app icon
31113115
pixbuf = self.applet.render_icon(Gtk.STOCK_EXECUTE, stock_size,
31123116
None)
3113-
dock_app.icon_filename = "STOCK_EXECUTE"
3117+
dock_app.icon_filename = "STOCK_EXECUTE"
31143118

31153119
if dock_app.icon_filename is None:
31163120
# the default theme has no icon for the app, so there are a few

0 commit comments

Comments
 (0)