[gnome-software] trivial: Add a self test for incompatible applications



commit 721547d0811eb72824830359d21293d9e4f7288a
Author: Richard Hughes <richard hughsie com>
Date:   Sun Apr 17 09:39:41 2016 +0100

    trivial: Add a self test for incompatible applications

 src/gs-self-test.c            |    8 ++++++++
 src/plugins/gs-plugin-dummy.c |    4 +++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 73dbe18..2ba9d5d 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -404,6 +404,14 @@ main (int argc, char **argv)
                "    <category>Player</category>\n"
                "    </categories>\n"
                "  </component>\n"
+               "  <component type=\"desktop\">\n"
+               "    <id>mate-spell.desktop</id>\n"
+               "    <name>Spell</name>\n"
+               "    <summary>A spelling application for MATE</summary>\n"
+               "    <pkgname>mate-spell</pkgname>\n"
+               "    <icon type=\"stock\">drive-harddisk</icon>\n"
+               "    <project_group>MATE</project_group>\n"
+               "  </component>\n"
                "  <component type=\"addon\">\n"
                "    <id>zeus-spell.addon</id>\n"
                "    <extends>zeus.desktop</extends>\n"
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index 20acc29..946cb14 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -55,7 +55,8 @@ gs_plugin_initialize (GsPlugin *plugin)
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-       if (g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0 ||
+       if (g_strcmp0 (gs_app_get_id (app), "mate-spell.desktop") == 0 ||
+           g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0 ||
            g_strcmp0 (gs_app_get_id (app), "zeus-spell.addon") == 0)
                gs_app_set_management_plugin (app, plugin->name);
 }
@@ -256,6 +257,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
 {
        /* default */
        if (g_strcmp0 (gs_app_get_id (app), "chiron.desktop") == 0 ||
+           g_strcmp0 (gs_app_get_id (app), "mate-spell.desktop") == 0 ||
            g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0) {
                if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
                        gs_app_set_state (app, AS_APP_STATE_INSTALLED);


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