[gnome-software] trivial: Show the full update details when using gnome-software-cmd
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Show the full update details when using gnome-software-cmd
- Date: Wed, 30 Oct 2013 19:44:53 +0000 (UTC)
commit 556f3a987475a6499b9b2893a3a3f2bd8dbffa41
Author: Richard Hughes <richard hughsie com>
Date: Wed Oct 30 17:26:44 2013 +0000
trivial: Show the full update details when using gnome-software-cmd
src/gs-app.c | 12 +++++++++---
src/gs-cmd.c | 10 ++++++++++
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 658882f..685ef03 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -203,8 +203,10 @@ gs_app_to_string (GsApp *app)
str = g_string_new ("GsApp:\n");
g_string_append_printf (str, "\tkind:\t%s\n",
gs_app_kind_to_string (priv->kind));
- g_string_append_printf (str, "\tid-kind:\t%s\n",
- gs_app_id_kind_to_string (priv->id_kind));
+ if (priv->id_kind != GS_APP_ID_KIND_UNKNOWN) {
+ g_string_append_printf (str, "\tid-kind:\t%s\n",
+ gs_app_id_kind_to_string (priv->id_kind));
+ }
g_string_append_printf (str, "\tstate:\t%s\n",
gs_app_state_to_string (priv->state));
if (priv->id_full != NULL)
@@ -221,6 +223,10 @@ gs_app_to_string (GsApp *app)
g_string_append_printf (str, "\tupdate-version:\t%s\n", priv->update_version);
if (priv->update_version_ui != NULL)
g_string_append_printf (str, "\tupdate-version-ui:\t%s\n", priv->update_version_ui);
+ if (priv->update_details != NULL) {
+ g_string_append_printf (str, "\tupdate-details:\t%s\n",
+ priv->update_details);
+ }
if (priv->summary != NULL)
g_string_append_printf (str, "\tsummary:\t%s\n", priv->summary);
if (priv->description != NULL)
@@ -250,7 +256,7 @@ gs_app_to_string (GsApp *app)
g_string_append_printf (str, "\tlicence:\t%s\n", priv->licence);
if (priv->summary_missing != NULL)
g_string_append_printf (str, "\tsummary-missing:\t%s\n", priv->summary_missing);
- if (priv->menu_path != NULL)
+ if (priv->menu_path != NULL && priv->menu_path[0] != '\0')
g_string_append_printf (str, "\tmenu-path:\t%s\n", priv->menu_path);
if (priv->rating != -1)
g_string_append_printf (str, "\trating:\t%i\n", priv->rating);
diff --git a/src/gs-cmd.c b/src/gs-cmd.c
index 95fbad9..52ff393 100644
--- a/src/gs-cmd.c
+++ b/src/gs-cmd.c
@@ -36,14 +36,24 @@ static void
gs_cmd_show_results_apps (GList *list)
{
GList *l;
+ GPtrArray *related;
GsApp *app;
+ GsApp *app_rel;
gchar *tmp;
+ guint i;
for (l = list; l != NULL; l = l->next) {
app = GS_APP (l->data);
tmp = gs_app_to_string (app);
g_print ("%s\n", tmp);
g_free (tmp);
+ related = gs_app_get_related (app);
+ for (i = 0; i < related->len; i++) {
+ app_rel = GS_APP (g_ptr_array_index (related, i));
+ tmp = gs_app_to_string (app_rel);
+ g_print ("\t%s\n", tmp);
+ g_free (tmp);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]