diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2015-03-14 15:44:54 -0700 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2015-03-14 17:31:07 -0700 |
commit | f812e9be7dede591bba082ffb8c141373f9ec6c0 (patch) | |
tree | 48a211e9d18ee2f785c03101cbac440dfa40075e /src | |
parent | c7185d597b001b908450b6dd50298444793d7334 (diff) | |
download | gnome-shell-f812e9be7dede591bba082ffb8c141373f9ec6c0.tar.gz |
ShellApp: use st_icon_set_fallback_icon_name() to specify app fallback
We can now safely pass a NULL GIcon to st_icon_set_gicon(), and specify
a more generic fallback using the new API we just introduced.
https://bugzilla.gnome.org/show_bug.cgi?id=746219
Diffstat (limited to 'src')
-rw-r--r-- | src/shell-app.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/shell-app.c b/src/shell-app.c index abea69ffa..9c03a4ad8 100644 --- a/src/shell-app.c +++ b/src/shell-app.c @@ -216,18 +216,10 @@ shell_app_create_icon_texture (ShellApp *app, ret = st_icon_new (); st_icon_set_icon_size (ST_ICON (ret), size); + st_icon_set_fallback_icon_name (ST_ICON (ret), "application-x-executable"); icon = g_app_info_get_icon (G_APP_INFO (app->info)); - if (icon != NULL) - { - st_icon_set_gicon (ST_ICON (ret), icon); - } - else - { - icon = g_themed_icon_new ("application-x-executable"); - st_icon_set_gicon (ST_ICON (ret), icon); - g_object_unref (icon); - } + st_icon_set_gicon (ST_ICON (ret), icon); return ret; } |