diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-12-08 16:59:49 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-12-15 17:25:08 +0100 |
commit | 927ae148878abf01c63081e9670f6823a289cd4a (patch) | |
tree | 62d6cd506bd63ac068caf5b318c978848b3a114a /lib | |
parent | d5e6cf050c39f45c6bafa7466f89b530f638211d (diff) | |
download | gnome-bluetooth-927ae148878abf01c63081e9670f6823a289cd4a.tar.gz |
settings: Make proxy replaceable
When bluetoothd is restarted, it's possible that the proxy will need to
be changed as the owner changed.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bluetooth-settings-row.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bluetooth-settings-row.c b/lib/bluetooth-settings-row.c index b07f0a74..12ce79d5 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_assert (!self->proxy); + g_clear_object (&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 proxy object of the device", - G_TYPE_DBUS_PROXY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_TYPE_DBUS_PROXY, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_DEVICE, g_param_spec_object ("device", NULL, "a BluetoothDevice object", @@ -341,7 +341,8 @@ bluetooth_settings_row_new_from_device (BluetoothDevice *device) "connected", "address", "type", - "legacy-pairing" + "legacy-pairing", + "proxy" }; guint i; @@ -349,7 +350,6 @@ bluetooth_settings_row_new_from_device (BluetoothDevice *device) g_object_get (G_OBJECT (device), "proxy", &proxy, NULL); row = g_object_new (BLUETOOTH_TYPE_SETTINGS_ROW, - "proxy", proxy, "device", device, NULL); |