[Xfce4-commits] [xfce/xfce4-power-manager] 06/07: Use macros for xfconf properties instead of hardcoded strings

noreply at xfce.org noreply at xfce.org
Tue Aug 5 10:08:49 CEST 2014


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

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

commit c5166e73c1c901544849b9b594776ca415e4d7b9
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Aug 5 00:02:45 2014 +0200

    Use macros for xfconf properties instead of hardcoded strings
---
 panel-plugins/battery/battery-button.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/panel-plugins/battery/battery-button.c b/panel-plugins/battery/battery-button.c
index 84a69c9..2d1bf99 100644
--- a/panel-plugins/battery/battery-button.c
+++ b/panel-plugins/battery/battery-button.c
@@ -34,6 +34,7 @@
 #include <xfconf/xfconf.h>
 
 #include "common/xfpm-common.h"
+#include "common/xfpm-config.h"
 #include "common/xfpm-icons.h"
 #include "common/xfpm-power-common.h"
 #include "common/xfpm-brightness.h"
@@ -916,7 +917,7 @@ battery_button_show_menu (BatteryButton *button)
 
         /* determine minimum value for slider */
         min_level = xfconf_channel_get_int (button->priv->channel,
-                                            "/xfce4-power-manager/brightness-slider-min-level",
+                                            PROPERTIES_PREFIX BRIGHTNESS_SLIDER_MIN_LEVEL,
                                             -1);
         if (min_level == -1)
         {
@@ -929,7 +930,7 @@ battery_button_show_menu (BatteryButton *button)
              */
             min_level = (max_level > 100) ? SAFE_SLIDER_MIN_LEVEL : 0;
             xfconf_channel_set_int (button->priv->channel,
-                                    "/xfce4-power-manager/brightness-slider-min-level",
+                                    PROPERTIES_PREFIX BRIGHTNESS_SLIDER_MIN_LEVEL,
                                     min_level);
         }
 
@@ -970,7 +971,7 @@ battery_button_show_menu (BatteryButton *button)
     gtk_widget_show (mi);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
     xfconf_g_property_bind(button->priv->channel,
-                           "/xfce4-power-manager/presentation-mode",
+                           PROPERTIES_PREFIX PRESENTATION_MODE,
                            G_TYPE_BOOLEAN, G_OBJECT(mi), "active");
 
     /* Power manager settings */

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


More information about the Xfce4-commits mailing list