[Xfce4-commits] <xfce4-power-manager:nick/upower-session> Fix icon destruction.
Nick Schermer
noreply at xfce.org
Fri Mar 23 22:04:01 CET 2012
Updating branch refs/heads/nick/upower-session
to 2bd1233d512cc7d095a818fd33d7cf5d6871ad3b (commit)
from ebeb8ae0d4c33f917453ac713bfbf20593ea3f1d (commit)
commit 2bd1233d512cc7d095a818fd33d7cf5d6871ad3b
Author: Nick Schermer <nick at xfce.org>
Date: Fri Mar 23 21:28:46 2012 +0100
Fix icon destruction.
src/xfpm-battery.c | 2 ++
src/xfpm-power.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c
index be3e9ff..44340d6 100644
--- a/src/xfpm-battery.c
+++ b/src/xfpm-battery.c
@@ -755,6 +755,8 @@ xfpm_battery_finalize (GObject *object)
{
XfpmBattery *battery = XFPM_BATTERY (object);
+ XFPM_DEBUG ("Device %s destroyed", up_device_get_object_path (battery->device));
+
g_signal_handlers_disconnect_by_func (battery->device,
G_CALLBACK (xfpm_battery_changed_cb), battery);
diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index 0f96cf6..e46ed49 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -597,10 +597,10 @@ xfpm_power_remove_device (XfpmPower *power, UpDevice *device)
{
if (xfpm_battery_get_device (XFPM_BATTERY (li->data)) == device)
{
- power->batteries = g_slist_delete_link (power->batteries, li);
-
g_object_unref (G_OBJECT (li->data));
+ power->batteries = g_slist_delete_link (power->batteries, li);
+
xfpm_power_refresh_adaptor_visible (power);
break;
More information about the Xfce4-commits
mailing list