@@ -3091,17 +3091,21 @@ class Dock(object):
3091
3091
stock_size , None )
3092
3092
dock_app .icon_filename = "STOCK_EXECUTE"
3093
3093
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
+
3101
3106
else :
3102
3107
icon_info = self .icontheme .choose_icon_for_scale ([dock_app .icon_name , None ],
3103
3108
icon_size , scale_factor , 0 )
3104
-
3105
3109
if icon_info is not None :
3106
3110
dock_app .icon_filename = icon_info .get_filename ()
3107
3111
try :
@@ -3110,7 +3114,7 @@ class Dock(object):
3110
3114
# default to a stock icon if we couldn't load the app icon
3111
3115
pixbuf = self .applet .render_icon (Gtk .STOCK_EXECUTE , stock_size ,
3112
3116
None )
3113
- dock_app .icon_filename = "STOCK_EXECUTE"
3117
+ dock_app .icon_filename = "STOCK_EXECUTE"
3114
3118
3115
3119
if dock_app .icon_filename is None :
3116
3120
# the default theme has no icon for the app, so there are a few
0 commit comments