[gnome-software] trivial: Move OS update icon loading to GsApp
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Move OS update icon loading to GsApp
- Date: Wed, 24 Jun 2015 14:48:11 +0000 (UTC)
commit 2d9341ffc4f0e89f0efb069c79a35c6221b53f62
Author: Kalev Lember <klember redhat com>
Date: Wed Jun 24 16:25:33 2015 +0200
trivial: Move OS update icon loading to GsApp
src/gs-app.c | 6 ++++++
src/gs-plugin-loader.c | 13 -------------
2 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 9a79866..8a37f2a 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -865,6 +865,12 @@ gs_app_get_pixbuf (GsApp *app)
GTK_ICON_LOOKUP_USE_BUILTIN |
GTK_ICON_LOOKUP_FORCE_SIZE,
NULL);
+ } else if (APP_PRIV (app)->pixbuf == NULL && gs_app_get_kind (app) == GS_APP_KIND_OS_UPDATE) {
+ APP_PRIV (app)->pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+ "software-update-available-symbolic", 64,
+ GTK_ICON_LOOKUP_USE_BUILTIN |
+ GTK_ICON_LOOKUP_FORCE_SIZE,
+ NULL);
} else if (APP_PRIV (app)->pixbuf == NULL && gs_app_get_kind (app) == GS_APP_KIND_MISSING) {
APP_PRIV (app)->pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"dialog-question-symbolic", 16,
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index c32abbd..af52f67 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -816,19 +816,6 @@ gs_plugin_loader_add_os_update_item (GList *list)
gs_app_add_related (app_os, app_tmp);
}
- /* load icon */
- pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
- "software-update-available-symbolic",
- 64,
- GTK_ICON_LOOKUP_USE_BUILTIN |
- GTK_ICON_LOOKUP_FORCE_SIZE,
- &error);
- if (pixbuf == NULL) {
- g_warning ("Failed to find software-update-available-symbolic: %s",
- error->message);
- } else {
- gs_app_set_pixbuf (app_os, pixbuf);
- }
return g_list_prepend (list, app_os);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]