[gnome-software] Move missing codec icon loading to GsApp
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Move missing codec icon loading to GsApp
- Date: Mon, 16 Feb 2015 12:01:15 +0000 (UTC)
commit ae39962ea7633bde24be84cbdb6b9e5c3ce9d0ba
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Feb 16 12:37:03 2015 +0100
Move missing codec icon loading to GsApp
src/gs-app.c | 8 ++++++++
src/gs-plugin-loader.c | 6 ------
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 655dd5d..39e7505 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -819,6 +819,14 @@ gs_app_get_pixbuf (GsApp *app)
NULL);
}
+ if (app->priv->pixbuf == NULL && gs_app_get_kind (app) == GS_APP_KIND_MISSING) {
+ app->priv->pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+ "dialog-question-symbolic", 96,
+ GTK_ICON_LOOKUP_USE_BUILTIN |
+ GTK_ICON_LOOKUP_FORCE_SIZE,
+ NULL);
+ }
+
return app->priv->pixbuf;
}
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 0250698..dfd9e5f 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1504,7 +1504,6 @@ gs_plugin_loader_convert_unavailable_app (GsApp *app, const gchar *search)
const gchar *keyword;
guint i;
_cleanup_string_free_ GString *tmp = NULL;
- _cleanup_object_unref_ AsIcon *icon = NULL;
/* is the search string one of the codec keywords */
keywords = gs_app_get_keywords (app);
@@ -1528,11 +1527,6 @@ gs_plugin_loader_convert_unavailable_app (GsApp *app, const gchar *search)
gs_app_set_summary_missing (app, tmp->str);
gs_app_set_kind (app, GS_APP_KIND_MISSING);
gs_app_set_size (app, GS_APP_SIZE_MISSING);
- icon = as_icon_new ();
- as_icon_set_kind (icon, AS_ICON_KIND_STOCK);
- as_icon_set_name (icon, "dialog-question-symbolic", -1);
- gs_app_set_icon (app, icon);
- gs_app_load_icon (app, 1, NULL);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]