Merge lp:~larsu/unity-settings-daemon/lp1436861 into lp:unity-settings-daemon

Proposed by Lars Karlitski on 2015-10-21
Status: Merged
Approved by: Sebastien Bacher on 2015-10-21
Approved revision: 4110
Merged at revision: 4110
Proposed branch: lp:~larsu/unity-settings-daemon/lp1436861
Merge into: lp:unity-settings-daemon
Diff against target: 26 lines (+8/-1)
1 file modified
plugins/power/gsd-power-manager.c (+8/-1)
To merge this branch: bzr merge lp:~larsu/unity-settings-daemon/lp1436861
Reviewer Review Type Date Requested Status
Sebastien Bacher 2015-10-21 Approve on 2015-10-21
Review via email: mp+275149@code.launchpad.net

Commit message

power: disconnect from device's "notify" signals

Description of the change

power: disconnect from device's "notify" signals

To post a comment you must log in.
4110. By Lars Karlitski on 2015-10-21

power: disconnect from device's "notify" signals

Sebastien Bacher (seb128) wrote :

that makes sense and seems to work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/power/gsd-power-manager.c'
2--- plugins/power/gsd-power-manager.c 2015-09-16 21:06:41 +0000
3+++ plugins/power/gsd-power-manager.c 2015-10-21 10:49:10 +0000
4@@ -3430,6 +3430,9 @@
5 void
6 gsd_power_manager_stop (GsdPowerManager *manager)
7 {
8+ GPtrArray *devices;
9+ int i;
10+
11 g_debug ("Stopping power manager");
12
13 if (manager->priv->inhibit_lid_switch_timer_id != 0) {
14@@ -3481,8 +3484,12 @@
15 g_clear_object (&manager->priv->logind_proxy);
16 g_clear_object (&manager->priv->rr_screen);
17
18- g_ptr_array_unref (manager->priv->devices_array);
19+ devices = manager->priv->devices_array;
20+ for (i = 0; i < devices->len; i++)
21+ g_signal_handlers_disconnect_by_data (g_ptr_array_index (devices, i), manager);
22+ g_ptr_array_unref (devices);
23 manager->priv->devices_array = NULL;
24+
25 g_clear_object (&manager->priv->device_composite);
26 g_clear_object (&manager->priv->previous_icon);
27

Subscribers

People subscribed via source and target branches