summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Abdallah <ali.slackware@gmail.com>2009-08-09 14:12:50 +0000
committerAli Abdallah <ali.slackware@gmail.com>2009-08-09 14:12:50 +0000
commit2adea0b6dc740a4720709cf802e23f5db7c4321f (patch)
tree33d8287e6c6ab5ca89296f105e2c938c94864867
parent8f17d722678acf3d113bcd00af96987a3177f56c (diff)
downloadixfce4-power-manager-2adea0b6dc740a4720709cf802e23f5db7c4321f.tar.gz
* version 0.8.3.10.8.3.1
(Old svn revision: 7903)
-rw-r--r--ChangeLog3
-rw-r--r--NEWS2
-rw-r--r--configure.ac.in6
-rw-r--r--data/interfaces/xfpm-settings.ui2
-rw-r--r--settings/xfpm-settings.c6
-rw-r--r--src/xfpm-config.h39
-rw-r--r--src/xfpm-xfconf.c4
7 files changed, 34 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index abfaf52f..b87ceb2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
2009-08-09: aliov@xfce.org
+ * version 0.8.3.1
+
+2009-08-09: aliov@xfce.org
* Missing signal handler for power button settings (bug #5656).
* Regenerate documentation.
diff --git a/NEWS b/NEWS
index 6e43c4fc..a9cbdab4 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
=======
- Missing signal handler for power button settings (bug #5656).
- Allow 5% as a minimum critical charge instead of 10%.
+- Change some property names, specially for buttons to avoid
+ problems with old 0.6 configuration.
0.8.3
=======
diff --git a/configure.ac.in b/configure.ac.in
index ad11cc5b..3b0696b0 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -1,9 +1,9 @@
m4_define([intltool_minimum_version], [0.31])
m4_define([xfpm_version_major], [0])
m4_define([xfpm_version_minor], [8])
-m4_define([xfpm_version_micro], [3])
-m4_define([xfpm_version_build], [r@REVISION@])
-m4_define([xfpm_version_tag],[svn])
+m4_define([xfpm_version_micro], [3.1])
+m4_define([xfpm_version_build], [])
+m4_define([xfpm_version_tag],[])
m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [svn], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])])
AC_INIT([xfce4-power-manager], [xfpm_version], [http://bugzilla.xfce.org/])
diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui
index ea70cbf8..de7794a7 100644
--- a/data/interfaces/xfpm-settings.ui
+++ b/data/interfaces/xfpm-settings.ui
@@ -53,7 +53,7 @@
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment9">
- <property name="value">5</property>
+ <property name="value">10</property>
<property name="lower">5</property>
<property name="upper">20</property>
<property name="step_increment">1</property>
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index f0ba954e..180444f8 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -1346,12 +1346,12 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
gtk_widget_set_tooltip_text (critical_level,
_("When all the power sources of the computer reach this charge level"));
- val = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX CRITICAL_POWER_LEVEL, 5);
+ val = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX CRITICAL_POWER_LEVEL, 10);
- if ( val > 20 )
+ if ( val > 20 || val < 5)
{
g_critical ("Value %d if out of range for property %s\n", val, CRITICAL_POWER_LEVEL);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON(critical_level), 5);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(critical_level), 10);
}
else
gtk_spin_button_set_value (GTK_SPIN_BUTTON(critical_level), val);
diff --git a/src/xfpm-config.h b/src/xfpm-config.h
index 44d497a4..226402c5 100644
--- a/src/xfpm-config.h
+++ b/src/xfpm-config.h
@@ -39,39 +39,40 @@ G_BEGIN_DECLS
/*
* Backward compatibility with old version.
*/
-#define PROPERTIES_PREFIX "/xfce4-power-manager/"
+#define PROPERTIES_PREFIX "/xfce4-power-manager/"
#define POWER_SAVE_ON_BATTERY "power-save-on-battery"
-#define CPU_FREQ_CONTROL "enable-cpu-freq-control"
-#define LOCK_SCREEN_ON_SLEEP "lock-screen-suspend-hibernate"
+#define CPU_FREQ_CONTROL "enable-cpu-freq-control"
+#define LOCK_SCREEN_ON_SLEEP "lock-screen-suspend-hibernate"
#define DPMS_ENABLED_CFG "dpms-enabled"
-#define ON_AC_DPMS_SLEEP "dpms-on-ac-sleep"
+#define ON_AC_DPMS_SLEEP "dpms-on-ac-sleep"
#define ON_AC_DPMS_OFF "dpms-on-ac-off"
-#define ON_BATT_DPMS_SLEEP "dpms-on-battery-sleep"
-#define ON_BATT_DPMS_OFF "dpms-on-battery-off"
-#define DPMS_SLEEP_MODE "dpms-sleep-mode"
+#define ON_BATT_DPMS_SLEEP "dpms-on-battery-sleep"
+#define ON_BATT_DPMS_OFF "dpms-on-battery-off"
+#define DPMS_SLEEP_MODE "dpms-sleep-mode"
#define GENERAL_NOTIFICATION_CFG "general-notification"
-#define ON_AC_INACTIVITY_TIMEOUT "inactivity-on-ac"
-#define ON_BATTERY_INACTIVITY_TIMEOUT "inactivity-on-battery"
-#define INACTIVITY_SLEEP_MODE "inactivity-sleep-mode"
+#define ON_AC_INACTIVITY_TIMEOUT "inactivity-on-ac"
+#define ON_BATTERY_INACTIVITY_TIMEOUT "inactivity-on-battery"
+#define INACTIVITY_SLEEP_MODE "inactivity-sleep-mode"
-#define BRIGHTNESS_ON_AC "brightness-on-ac"
-#define BRIGHTNESS_ON_BATTERY "brightness-on-battery"
+#define BRIGHTNESS_ON_AC "brightness-on-ac"
+#define BRIGHTNESS_ON_BATTERY "brightness-on-battery"
-#define CRITICAL_POWER_LEVEL "critical-power-level"
-#define SHOW_BRIGHTNESS_POPUP "show-brightness-popup"
-#define ENABLE_BRIGHTNESS_CONTROL "change-brightness-on-key-events"
+#define CRITICAL_POWER_LEVEL "critical-power-level"
+#define SHOW_BRIGHTNESS_POPUP "show-brightness-popup"
+#define ENABLE_BRIGHTNESS_CONTROL "change-brightness-on-key-events"
#define SHOW_TRAY_ICON_CFG "show-tray-icon"
-#define CRITICAL_BATT_ACTION_CFG "critical-battery-action"
+#define CRITICAL_BATT_ACTION_CFG "critical-power-action"
+
+#define POWER_SWITCH_CFG "power-button-action"
+#define HIBERNATE_SWITCH_CFG "hibernate-button-action"
+#define SLEEP_SWITCH_CFG "sleep-button-action"
-#define POWER_SWITCH_CFG "power-switch-action"
-#define HIBERNATE_SWITCH_CFG "hibernate-switch-action"
-#define SLEEP_SWITCH_CFG "sleep-switch-action"
#define LID_SWITCH_ON_AC_CFG "lid-action-on-ac"
#define LID_SWITCH_ON_BATTERY_CFG "lid-action-on-battery"
diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c
index b92d6155..6284e4c0 100644
--- a/src/xfpm-xfconf.c
+++ b/src/xfpm-xfconf.c
@@ -175,7 +175,7 @@ xfpm_xfconf_property_changed_cb (XfconfChannel *channel, gchar *property,
if ( G_VALUE_TYPE(value) == G_TYPE_INVALID )
return;
- if ( !g_str_has_prefix (property, PROPERTIES_PREFIX) )
+ if ( !g_str_has_prefix (property, PROPERTIES_PREFIX) || strlen (property) <= strlen (PROPERTIES_PREFIX) )
return;
TRACE("Property modified: %s\n", property);
@@ -239,7 +239,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
NULL, NULL,
5,
20,
- 5,
+ 10,
G_PARAM_READWRITE));
/**