[gnome-software] snap: Show revision number in version field



commit f332167b104aa001739affe5199e6610d5db1476
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Nov 23 13:52:22 2017 +1300

    snap: Show revision number in version field

 plugins/snap/gs-plugin-snap.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index c582a0b..5db7243 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -698,6 +698,8 @@ gs_plugin_refine_app (GsPlugin *plugin,
        if (local_snap != NULL) {
                const gchar *name;
                g_autofree gchar *description = NULL;
+               g_autofree gchar *version = NULL;
+
                if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
                        gs_app_set_state (app, AS_APP_STATE_INSTALLED);
                name = snapd_snap_get_title (local_snap);
@@ -709,7 +711,8 @@ gs_plugin_refine_app (GsPlugin *plugin,
                if (description != NULL)
                        gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description);
                gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (local_snap));
-               gs_app_set_version (app, snapd_snap_get_version (local_snap));
+               version = g_strdup_printf ("%s (%s)", snapd_snap_get_version (local_snap), 
snapd_snap_get_revision (local_snap));
+               gs_app_set_version (app, version);
                gs_app_set_size_installed (app, snapd_snap_get_installed_size (local_snap));
                gs_app_set_install_date (app, g_date_time_to_unix (snapd_snap_get_install_date (local_snap)));
                gs_app_set_developer_name (app, snapd_snap_get_developer (local_snap));
@@ -726,6 +729,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
                GPtrArray *screenshots;
                const gchar *name;
                g_autofree gchar *description = NULL;
+               g_autofree gchar *version = NULL;
 
                if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
                        gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
@@ -739,7 +743,8 @@ gs_plugin_refine_app (GsPlugin *plugin,
                if (description != NULL)
                        gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description);
                gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (store_snap));
-               gs_app_set_version (app, snapd_snap_get_version (store_snap));
+               version = g_strdup_printf ("%s (%s)", snapd_snap_get_version (store_snap), 
snapd_snap_get_revision (store_snap));
+               gs_app_set_version (app, version);
                gs_app_set_size_download (app, snapd_snap_get_download_size (store_snap));
                gs_app_set_developer_name (app, snapd_snap_get_developer (store_snap));
                if (icon_url == NULL) {


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