[gnome-bluetooth/wip/hadess/lib-changes: 16/19] lib: Make row's "proxy" property construct-only
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/lib-changes: 16/19] lib: Make row's "proxy" property construct-only
- Date: Tue, 30 Nov 2021 11:18:22 +0000 (UTC)
commit a8fb0ab7d54eb62b32b91cf3da9fbd3fd350a0d1
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]