[gnome-software] Use a constant to represent an unknown install date
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Use a constant to represent an unknown install date
- Date: Thu, 12 Sep 2013 10:44:12 +0000 (UTC)
commit e11f98cd038c971eef39e83a946f80cca9751ed8
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 12 11:41:53 2013 +0100
Use a constant to represent an unknown install date
src/gs-app.h | 2 ++
src/plugins/gs-plugin-packagekit-history.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app.h b/src/gs-app.h
index ac03b91..0b6d918 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -73,6 +73,8 @@ typedef enum {
GS_APP_STATE_LAST
} GsAppState;
+#define GS_APP_INSTALL_DATE_UNKNOWN 1 /* 1s past the epoch */
+
GQuark gs_app_error_quark (void);
GType gs_app_get_type (void);
diff --git a/src/plugins/gs-plugin-packagekit-history.c b/src/plugins/gs-plugin-packagekit-history.c
index 32a5718..6c31a5e 100644
--- a/src/plugins/gs-plugin-packagekit-history.c
+++ b/src/plugins/gs-plugin-packagekit-history.c
@@ -178,7 +178,7 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
* trying to call GetPackageHistory */
for (l = list; l != NULL; l = l->next) {
app = GS_APP (l->data);
- gs_app_set_install_date (app, 1);
+ gs_app_set_install_date (app, GS_APP_INSTALL_DATE_UNKNOWN);
}
} else {
ret = FALSE;
@@ -198,7 +198,7 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
if (!ret) {
g_debug ("no history for %s, setting timestamp nonzero",
gs_app_get_source (app));
- gs_app_set_install_date (app, 1);
+ gs_app_set_install_date (app, GS_APP_INSTALL_DATE_UNKNOWN);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]