[gnome-software] Do not show software sources in the updates panel
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show software sources in the updates panel
- Date: Fri, 14 Feb 2014 10:45:47 +0000 (UTC)
commit 089e71924ab309bcd9e1d4adf29801439530741d
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 14 10:45:35 2014 +0000
Do not show software sources in the updates panel
src/gs-plugin-loader.c | 7 +++++++
src/plugins/gs-plugin-appstream.c | 5 ++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index b2baa70..2ff3976 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -432,6 +432,13 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
return FALSE;
}
+ /* don't show sources */
+ if (gs_app_get_kind (app) == GS_APP_KIND_SOURCE) {
+ g_debug ("app invalid as source %s",
+ gs_plugin_loader_get_app_str (app));
+ return FALSE;
+ }
+
/* don't show unknown kind */
if (gs_app_get_kind (app) == GS_APP_KIND_UNKNOWN) {
g_debug ("app invalid as kind unknown %s",
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index f399337..9c24cbd 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -524,8 +524,11 @@ gs_plugin_refine_item (GsPlugin *plugin,
/* is an app */
if (gs_app_get_kind (app) == GS_APP_KIND_UNKNOWN ||
gs_app_get_kind (app) == GS_APP_KIND_PACKAGE) {
- if (gs_app_get_state (app) != GS_APP_STATE_LOCAL)
+ if (appstream_app_get_id_kind (item) == APPSTREAM_APP_ID_KIND_SOURCE) {
+ gs_app_set_kind (app, GS_APP_KIND_SOURCE);
+ } else {
gs_app_set_kind (app, GS_APP_KIND_NORMAL);
+ }
}
/* set id */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]