[gnome-software: 9/21] gs-plugin-loader: Add additional property flags




commit abe010d02ae310ec8950a5e101ede15c95a9f44b
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Mar 30 13:19:12 2022 +0100

    gs-plugin-loader: Add additional property flags
    
    These avoid copies of the property name/summary/description (which are
    unnecessary), and leave notification of property changes entirely in the
    control of gnome-software code.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/gs-plugin-loader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index ad1c25e59..1e0754ec7 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -2739,7 +2739,7 @@ gs_plugin_loader_class_init (GsPluginLoaderClass *klass)
        obj_props[PROP_EVENTS] =
                g_param_spec_string ("events", NULL, NULL,
                                     NULL,
-                                    G_PARAM_READABLE);
+                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
 
        /**
         * GsPluginLoader:allow-updates:
@@ -2752,7 +2752,7 @@ gs_plugin_loader_class_init (GsPluginLoaderClass *klass)
        obj_props[PROP_ALLOW_UPDATES] =
                g_param_spec_boolean ("allow-updates", NULL, NULL,
                                      TRUE,
-                                     G_PARAM_READABLE);
+                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
 
        /**
         * GsPluginLoader:network-available:
@@ -2764,7 +2764,7 @@ gs_plugin_loader_class_init (GsPluginLoaderClass *klass)
        obj_props[PROP_NETWORK_AVAILABLE] =
                g_param_spec_boolean ("network-available", NULL, NULL,
                                      FALSE,
-                                     G_PARAM_READABLE);
+                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
 
        /**
         * GsPluginLoader:network-metered:
@@ -2776,7 +2776,7 @@ gs_plugin_loader_class_init (GsPluginLoaderClass *klass)
        obj_props[PROP_NETWORK_METERED] =
                g_param_spec_boolean ("network-metered", NULL, NULL,
                                      FALSE,
-                                     G_PARAM_READABLE);
+                                     G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
 
        g_object_class_install_properties (object_class, G_N_ELEMENTS (obj_props), obj_props);
 


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