[gnome-bluetooth/wip/hadess/lib-changes: 14/18] lib: Make row's "proxy" property construct-only




commit 7bf78f8f68112f37110f90c82e18652872fc50ab
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 29 13:00:53 2021 +0100

    lib: Make row's "proxy" property construct-only

 lib/bluetooth-settings-row.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/bluetooth-settings-row.c b/lib/bluetooth-settings-row.c
index e7fbeac4..e8831b62 100644
--- a/lib/bluetooth-settings-row.c
+++ b/lib/bluetooth-settings-row.c
@@ -189,7 +189,7 @@ bluetooth_settings_row_set_property (GObject        *object,
 
        switch (property_id) {
        case PROP_PROXY:
-               g_clear_object (&self->proxy);
+               g_assert (!self->proxy);
                self->proxy = g_value_dup_object (value);
                break;
        case PROP_DEVICE:
@@ -254,7 +254,7 @@ bluetooth_settings_row_class_init (BluetoothSettingsRowClass *klass)
        g_object_class_install_property (object_class, PROP_PROXY,
                                         g_param_spec_object ("proxy", NULL,
                                                              "The D-Bus object path of the device",
-                                                             G_TYPE_DBUS_PROXY, G_PARAM_READWRITE));
+                                                             G_TYPE_DBUS_PROXY, G_PARAM_READWRITE | 
G_PARAM_CONSTRUCT_ONLY));
        g_object_class_install_property (object_class, PROP_DEVICE,
                                         g_param_spec_object ("device", NULL,
                                                              "a BluetoothDevice object",


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