[gnome-software] Revert "Revert "trivial: Use new libappstream-glib to build the ID""



commit 2a0f56590f4c86550c8603e1de5a97e57426ff2a
Author: Kalev Lember <klember redhat com>
Date:   Tue Mar 13 13:08:39 2018 +0100

    Revert "Revert "trivial: Use new libappstream-glib to build the ID""
    
    We've now fixed the appstream generator to match the generated ID in
    https://github.com/hughsie/appstream-glib/commit/1f7ff84a04c227bccb60c76f461f3dccbe372f7a
    
    This reverts commit c9dbd646c3f7d23699685f320baefcb12198298f.

 plugins/shell-extensions/gs-plugin-shell-extensions.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c 
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index 8edee560..f55eb2fb 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -105,12 +105,6 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
        }
 }
 
-static gchar *
-gs_plugin_shell_extensions_id_from_uuid (const gchar *uuid)
-{
-       return g_strdup_printf ("%s.shell-extension", uuid);
-}
-
 static AsAppState
 gs_plugin_shell_extensions_convert_state (guint value)
 {
@@ -143,7 +137,7 @@ gs_plugin_shell_extensions_parse_installed (GsPlugin *plugin,
        g_autoptr(AsIcon) ic = NULL;
        g_autoptr(GsApp) app = NULL;
 
-       id = gs_plugin_shell_extensions_id_from_uuid (uuid);
+       id = as_utils_appstream_id_build (uuid);
        app = gs_app_new (id);
        gs_app_set_metadata (app, "GnomeSoftware::Creator",
                             gs_plugin_get_name (plugin));
@@ -540,7 +534,7 @@ gs_plugin_shell_extensions_parse_app (GsPlugin *plugin,
        tmp = json_object_get_string_member (json_app, "uuid");
        if (tmp != NULL) {
                g_autofree gchar *id = NULL;
-               id = gs_plugin_shell_extensions_id_from_uuid (tmp);
+               id = as_utils_appstream_id_build (tmp);
                as_app_set_id (app, id);
                as_app_add_metadata (app, "shell-extensions::uuid", tmp);
        }


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