[Xfce4-commits] [xfce/xfce4-power-manager] 17/64: Close the popup when preferences selected

noreply at xfce.org noreply at xfce.org
Mon May 26 06:00:12 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 6e46573020b7e2339c0b6b7ca2132e0322e1f0e3
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri May 2 16:03:25 2014 +0300

    Close the popup when preferences selected
---
 panel-plugins/battery/battery-button.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/panel-plugins/battery/battery-button.c b/panel-plugins/battery/battery-button.c
index 91d2b99..7f36bc6 100644
--- a/panel-plugins/battery/battery-button.c
+++ b/panel-plugins/battery/battery-button.c
@@ -660,6 +660,16 @@ device_removed_cb (UpClient *upower, UpDevice *device, BatteryButton *button)
 }
 #endif
 
+static void
+preferences_cb (GtkButton *gtkbutton, gpointer user_data)
+{
+    BatteryButton *button = BATTERY_BUTTON (user_data);
+
+    /* close the window and release any grabs */
+    battery_button_grab_notify (button, FALSE);
+
+    xfpm_preferences ();
+}
 
 static void
 battery_button_add_all_devices (BatteryButton *button)
@@ -740,7 +750,7 @@ battery_button_create_popup (BatteryButton *button)
 
     /* Preferences option */
     option_button = gtk_button_new_from_stock (GTK_STOCK_PREFERENCES);
-    g_signal_connect (option_button, "clicked",G_CALLBACK (xfpm_preferences), NULL);
+    g_signal_connect (option_button, "clicked",G_CALLBACK (preferences_cb), button);
 
     gtk_box_pack_start (GTK_BOX (box), option_button, TRUE, TRUE, 1);
 

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


More information about the Xfce4-commits mailing list