From 999594a56f86cfd2f6383bd223c03445b0e2e561 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 9 Apr 2018 12:58:59 +0200 Subject: [PATCH] auth-manager: drop unused property getter for NM_AUTH_MANAGER_POLKIT_ENABLED We need the setter, because we want that the property is set only once during creation of the instance. Nobody cares about the GObject property getter otherwise. --- src/nm-auth-manager.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/nm-auth-manager.c b/src/nm-auth-manager.c index 441c971f56..26bdc3174b 100644 --- a/src/nm-auth-manager.c +++ b/src/nm-auth-manager.c @@ -44,13 +44,13 @@ enum { static guint signals[LAST_SIGNAL] = {0}; typedef struct { - gboolean polkit_enabled; #if WITH_POLKIT guint call_id_counter; GCancellable *new_proxy_cancellable; GSList *queued_calls; GDBusProxy *proxy; #endif + bool polkit_enabled:1; } NMAuthManagerPrivate; struct _NMAuthManager { @@ -490,21 +490,6 @@ nm_auth_manager_get () /*****************************************************************************/ -static void -get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) -{ - NMAuthManagerPrivate *priv = NM_AUTH_MANAGER_GET_PRIVATE ((NMAuthManager *) object); - - switch (prop_id) { - case PROP_POLKIT_ENABLED: - g_value_set_boolean (value, priv->polkit_enabled); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { @@ -614,7 +599,6 @@ nm_auth_manager_class_init (NMAuthManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = get_property; object_class->set_property = set_property; object_class->constructed = constructed; object_class->dispose = dispose; @@ -622,7 +606,7 @@ nm_auth_manager_class_init (NMAuthManagerClass *klass) obj_properties[PROP_POLKIT_ENABLED] = g_param_spec_boolean (NM_AUTH_MANAGER_POLKIT_ENABLED, "", "", FALSE, - G_PARAM_READWRITE | + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);