[gnome-software] Never show 'Unknown' in the package history listbox
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Never show 'Unknown' in the package history listbox
- Date: Tue, 24 Sep 2013 11:26:55 +0000 (UTC)
commit ea74b2121012d41c34390dd58393605dc86ff680
Author: Richard Hughes <richard hughsie com>
Date: Tue Sep 24 12:26:44 2013 +0100
Never show 'Unknown' in the package history listbox
src/plugins/gs-plugin-packagekit-history.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-history.c b/src/plugins/gs-plugin-packagekit-history.c
index 164b629..6060d64 100644
--- a/src/plugins/gs-plugin-packagekit-history.c
+++ b/src/plugins/gs-plugin-packagekit-history.c
@@ -113,9 +113,17 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
gs_app_set_state (history, GS_APP_STATE_UPDATABLE);
break;
default:
+ ret = FALSE;
break;
}
+ /* we have nothing useful to show for this item */
+ if (!ret) {
+ g_debug ("ignoring history kind: %s",
+ pk_info_enum_to_string (info_enum));
+ goto out;
+ }
+
/* set the history time and date */
ret = g_variant_lookup (dict, "timestamp", "t", ×tamp);
g_assert (ret);
@@ -128,10 +136,11 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
/* add the package to the main application */
gs_app_add_history (app, history);
- g_object_unref (history);
/* use the last event as approximation of the package timestamp */
gs_app_set_install_date (app, timestamp);
+out:
+ g_object_unref (history);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]