[gnome-software: 3/10] gs-loading-page: Rename a variable to make its units clearer




commit 904388960628c59714f971a44fe543066809e57d
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Jan 27 19:15:24 2022 +0000

    gs-loading-page: Rename a variable to make its units clearer
    
    Also increase its width, as durations (in seconds) are conventionally
    stored in `guint64`s, by GLib convention.
    
    This introduces no functional changes.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 src/gs-loading-page.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-loading-page.c b/src/gs-loading-page.c
index 00764a318..a35418cc9 100644
--- a/src/gs-loading-page.c
+++ b/src/gs-loading-page.c
@@ -115,7 +115,7 @@ gs_loading_page_load (GsLoadingPage *self)
        GsLoadingPagePrivate *priv = gs_loading_page_get_instance_private (self);
        g_autoptr(GsPluginJob) plugin_job = NULL;
        g_autoptr(GSettings) settings = NULL;
-       guint64 cache_age;
+       guint64 cache_age_secs;
 
        /* Ensure that at least some metadata of any age is present, and also
         * spin up the plugins enough as to prime caches. If this is the first
@@ -128,12 +128,12 @@ gs_loading_page_load (GsLoadingPage *self)
        settings = g_settings_new ("org.gnome.software");
        if (g_settings_get_boolean (settings, "first-run")) {
                g_settings_set_boolean (settings, "first-run", FALSE);
-               cache_age = 60 * 60 * 24;  /* 24 hours */
+               cache_age_secs = 60 * 60 * 24;  /* 24 hours */
        } else
-               cache_age = G_MAXUINT;
+               cache_age_secs = G_MAXUINT64;
 
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFRESH,
-                                        "age", cache_age,
+                                        "age", cache_age_secs,
                                         NULL);
        gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
                                        priv->cancellable,


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