[gnome-software] Never show components without AppData files



commit ccdda12701cb5618b6594f0d8899cc69e96460fe
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 17 12:06:49 2017 +0000

    Never show components without AppData files
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778755 and several more.

 src/gs-plugin-loader.c        |    6 ++++++
 src/plugins/gs-plugin-dummy.c |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 8d7eb13..9c335ef 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -992,6 +992,12 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
                break;
        }
 
+       /* do not show components without AppData files */
+       if (gs_app_get_description (app) == NULL) {
+               g_debug ("Ignoring %s as no AppData file", gs_app_get_id (app));
+               return FALSE;
+       }
+
        /* ignore this crazy application */
        if (g_strcmp0 (gs_app_get_id (app), "gnome-system-monitor-kde.desktop") == 0) {
                g_debug ("Ignoring KDE version of %s", gs_app_get_id (app));
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index 4f34db7..74e9b64 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -541,6 +541,14 @@ gs_plugin_refine_app (GsPlugin *plugin,
                        gs_app_add_icon (app, ic);
                }
        }
+       if (g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0) {
+               if (gs_app_get_name (app) == NULL)
+                       gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Zeus");
+               if (gs_app_get_summary (app) == NULL)
+                       gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Zeus");
+               if (gs_app_get_description (app) == NULL)
+                       gs_app_set_description (app, GS_APP_QUALITY_NORMAL, "Zeus!");
+       }
 
        /* description */
        if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]