[gnome-software] Use correct boolean type for GsPluginJob interactive property.



commit 0dc6e3da5ffe322c9271ee5b4b0502db8b40e0f0
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Oct 18 10:32:18 2018 +1300

    Use correct boolean type for GsPluginJob interactive property.
    
    It previously used a uint64 which would fail on 32 bit architectures that would
    set TRUE and FALSE as 32 bit values.
    
    This was introduced in fca34d6e8e001ab94e393feb7bde0e857447c98c

 lib/gs-plugin-job.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/lib/gs-plugin-job.c b/lib/gs-plugin-job.c
index 930a2759..4254194c 100644
--- a/lib/gs-plugin-job.c
+++ b/lib/gs-plugin-job.c
@@ -475,7 +475,7 @@ gs_plugin_job_get_property (GObject *obj, guint prop_id, GValue *value, GParamSp
                g_value_set_uint64 (value, self->dedupe_flags);
                break;
        case PROP_INTERACTIVE:
-               g_value_set_uint64 (value, self->interactive);
+               g_value_set_boolean (value, self->interactive);
                break;
        case PROP_SEARCH:
                g_value_set_string (value, self->search);
@@ -535,7 +535,7 @@ gs_plugin_job_set_property (GObject *obj, guint prop_id, const GValue *value, GP
                gs_plugin_job_set_dedupe_flags (self, g_value_get_uint64 (value));
                break;
        case PROP_INTERACTIVE:
-               gs_plugin_job_set_interactive (self, g_value_get_uint64 (value));
+               gs_plugin_job_set_interactive (self, g_value_get_boolean (value));
                break;
        case PROP_SEARCH:
                gs_plugin_job_set_search (self, g_value_get_string (value));
@@ -625,9 +625,10 @@ gs_plugin_job_class_init (GsPluginJobClass *klass)
                                     G_PARAM_READWRITE);
        g_object_class_install_property (object_class, PROP_DEDUPE_FLAGS, pspec);
 
-       pspec = g_param_spec_uint64 ("interactive", NULL, NULL,
-                                    0, G_MAXUINT64, 0,
-                                    G_PARAM_READWRITE);
+       pspec = g_param_spec_boolean ("interactive", NULL, NULL,
+                                     FALSE,
+                                     G_PARAM_READWRITE);
+
        g_object_class_install_property (object_class, PROP_INTERACTIVE, pspec);
 
        pspec = g_param_spec_string ("search", NULL, NULL,


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