[Xfce4-commits] [xfce/xfce4-power-manager] 02/13: Fix empty systray icon in some panels on battery removal and addition

noreply at xfce.org noreply at xfce.org
Tue Apr 8 18:42:56 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 8f87339354585949ba8033196b1e8b57623f5a52
Author: Henry Gebhardt <hsggebhardt at googlemail.com>
Date:   Wed Feb 29 14:14:33 2012 +0100

    Fix empty systray icon in some panels on battery removal and addition
    
    Unreferencing a GtkStatusIcon is not enough to get rid of it entirely.
    
    This fixes these bugs:
    
        https://bugzilla.xfce.org/show_bug.cgi?id=7603
        http://bugzilla.xfce.org/show_bug.cgi?id=8424
        https://bugs.launchpad.net/ubuntu/+source/lxpanel/+bug/846878
        https://bugzilla.redhat.com/show_bug.cgi?id=765726
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 src/xfpm-battery.c |    2 ++
 src/xfpm-power.c   |    1 +
 2 files changed, 3 insertions(+)

diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c
index b3690d2..2e0e504 100644
--- a/src/xfpm-battery.c
+++ b/src/xfpm-battery.c
@@ -788,6 +788,8 @@ xfpm_battery_finalize (GObject *object)
     g_object_unref (battery->priv->notify);
     g_object_unref (battery->priv->button);
 
+    gtk_status_icon_set_visible(GTK_STATUS_ICON(battery), FALSE);
+
     G_OBJECT_CLASS (xfpm_battery_parent_class)->finalize (object);
 }
 
diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index a53753f..febac1d 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -1137,6 +1137,7 @@ xfpm_power_hide_adapter_icon (XfpmPower *power)
 
     if ( power->priv->adapter_icon )
     {
+        gtk_status_icon_set_visible (power->priv->adapter_icon, FALSE);
         g_object_unref (power->priv->adapter_icon);
         power->priv->adapter_icon = NULL;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list