summaryrefslogtreecommitdiff
path: root/src/gpm-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpm-common.h')
-rw-r--r--src/gpm-common.h166
1 files changed, 71 insertions, 95 deletions
diff --git a/src/gpm-common.h b/src/gpm-common.h
index e2733a8..5cb0696 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -36,119 +36,99 @@ G_BEGIN_DECLS
#define GPM_NAME _("Power Manager")
#define GPM_DESCRIPTION _("Power Manager for the MATE desktop")
-/* help location */
-#define GPM_HOMEPAGE_URL "http://www.mate.org/projects/mate-power-manager/"
-#define GPM_BUGZILLA_URL "http://bugzilla.mate.org/buglist.cgi?product=mate-power-manager"
-#define GPM_FAQ_URL "http://live.mate.org/MatePowerManager/Faq"
-
-/* change general/installed_schema whenever adding or moving keys */
-#define GPM_CONF_SCHEMA_ID 3
-
-#define GPM_CONF_DIR "/apps/mate-power-manager"
+/* schema location */
+#define GPM_SETTINGS_SCHEMA "org.mate.power-manager"
/* actions */
-#define GPM_CONF_ACTIONS_CRITICAL_UPS GPM_CONF_DIR "/actions/critical_ups"
-#define GPM_CONF_ACTIONS_CRITICAL_BATT GPM_CONF_DIR "/actions/critical_battery"
-#define GPM_CONF_ACTIONS_LOW_UPS GPM_CONF_DIR "/actions/low_ups"
-#define GPM_CONF_ACTIONS_SLEEP_TYPE_AC GPM_CONF_DIR "/actions/sleep_type_ac"
-#define GPM_CONF_ACTIONS_SLEEP_TYPE_BATT GPM_CONF_DIR "/actions/sleep_type_battery"
-#define GPM_CONF_ACTIONS_SLEEP_WHEN_CLOSED GPM_CONF_DIR "/actions/event_when_closed_battery"
+#define GPM_SETTINGS_ACTION_CRITICAL_UPS "action-critical-ups"
+#define GPM_SETTINGS_ACTION_CRITICAL_BATT "action-critical-battery"
+#define GPM_SETTINGS_ACTION_LOW_UPS "action-low-ups"
+#define GPM_SETTINGS_ACTION_SLEEP_TYPE_AC "action-sleep-type-ac"
+#define GPM_SETTINGS_ACTION_SLEEP_TYPE_BATT "action-sleep-type-battery"
+#define GPM_SETTINGS_SLEEP_WHEN_CLOSED "event-when-closed-battery"
/* backlight stuff */
-#define GPM_CONF_BACKLIGHT_ENABLE GPM_CONF_DIR "/backlight/enable"
-#define GPM_CONF_BACKLIGHT_BATTERY_REDUCE GPM_CONF_DIR "/backlight/battery_reduce"
-#define GPM_CONF_BACKLIGHT_DPMS_METHOD_AC GPM_CONF_DIR "/backlight/dpms_method_ac"
-#define GPM_CONF_BACKLIGHT_DPMS_METHOD_BATT GPM_CONF_DIR "/backlight/dpms_method_battery"
-#define GPM_CONF_BACKLIGHT_IDLE_BRIGHTNESS GPM_CONF_DIR "/backlight/idle_brightness"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_AC GPM_CONF_DIR "/backlight/idle_dim_ac"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_BATT GPM_CONF_DIR "/backlight/idle_dim_battery"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_TIME GPM_CONF_DIR "/backlight/idle_dim_time"
-#define GPM_CONF_BACKLIGHT_BRIGHTNESS_AC GPM_CONF_DIR "/backlight/brightness_ac"
-#define GPM_CONF_BACKLIGHT_BRIGHTNESS_DIM_BATT GPM_CONF_DIR "/backlight/brightness_dim_battery"
+#define GPM_SETTINGS_BACKLIGHT_ENABLE "backlight-enable"
+#define GPM_SETTINGS_BACKLIGHT_BATTERY_REDUCE "backlight-battery-reduce"
+#define GPM_SETTINGS_DPMS_METHOD_AC "dpms-method-ac"
+#define GPM_SETTINGS_DPMS_METHOD_BATT "dpms-method-battery"
+#define GPM_SETTINGS_IDLE_BRIGHTNESS "idle-brightness"
+#define GPM_SETTINGS_IDLE_DIM_AC "idle-dim-ac"
+#define GPM_SETTINGS_IDLE_DIM_BATT "idle-dim-battery"
+#define GPM_SETTINGS_IDLE_DIM_TIME "idle-dim-time"
+#define GPM_SETTINGS_BRIGHTNESS_AC "brightness-ac"
+#define GPM_SETTINGS_BRIGHTNESS_DIM_BATT "brightness-dim-battery"
/* buttons */
-#define GPM_CONF_BUTTON_LID_AC GPM_CONF_DIR "/buttons/lid_ac"
-#define GPM_CONF_BUTTON_LID_BATT GPM_CONF_DIR "/buttons/lid_battery"
-#define GPM_CONF_BUTTON_SUSPEND GPM_CONF_DIR "/buttons/suspend"
-#define GPM_CONF_BUTTON_HIBERNATE GPM_CONF_DIR "/buttons/hibernate"
-#define GPM_CONF_BUTTON_POWER GPM_CONF_DIR "/buttons/power"
+#define GPM_SETTINGS_BUTTON_LID_AC "button-lid-ac"
+#define GPM_SETTINGS_BUTTON_LID_BATT "button-lid-battery"
+#define GPM_SETTINGS_BUTTON_SUSPEND "button-suspend"
+#define GPM_SETTINGS_BUTTON_HIBERNATE "button-hibernate"
+#define GPM_SETTINGS_BUTTON_POWER "button-power"
/* general */
-#define GPM_CONF_SCHEMA_VERSION GPM_CONF_DIR "/general/installed_schema"
-#define GPM_CONF_USE_TIME_POLICY GPM_CONF_DIR "/general/use_time_for_policy"
-#define GPM_CONF_USE_PROFILE_TIME GPM_CONF_DIR "/general/use_profile_time"
-#define GPM_CONF_NETWORKMANAGER_SLEEP GPM_CONF_DIR "/general/network_sleep"
-#define GPM_CONF_IDLE_CHECK_CPU GPM_CONF_DIR "/general/check_type_cpu"
-#define GPM_CONF_LAPTOP_USES_EXT_MON GPM_CONF_DIR "/general/using_external_monitor"
+#define GPM_SETTINGS_USE_TIME_POLICY "use-time-for-policy"
+#define GPM_SETTINGS_NETWORKMANAGER_SLEEP "network-sleep"
+#define GPM_SETTINGS_IDLE_CHECK_CPU "check-type-cpu"
/* lock */
-#define GPM_CONF_LOCK_USE_SCREENSAVER GPM_CONF_DIR "/lock/use_screensaver_settings"
-#define GPM_CONF_LOCK_ON_BLANK_SCREEN GPM_CONF_DIR "/lock/blank_screen"
-#define GPM_CONF_LOCK_ON_SUSPEND GPM_CONF_DIR "/lock/suspend"
-#define GPM_CONF_LOCK_ON_HIBERNATE GPM_CONF_DIR "/lock/hibernate"
-#define GPM_CONF_LOCK_MATE_KEYRING_SUSPEND GPM_CONF_DIR "/lock/mate_keyring_suspend"
-#define GPM_CONF_LOCK_MATE_KEYRING_HIBERNATE GPM_CONF_DIR "/lock/mate_keyring_hibernate"
+#define GPM_SETTINGS_LOCK_USE_SCREENSAVER "lock-use-screensaver"
+#define GPM_SETTINGS_LOCK_ON_BLANK_SCREEN "lock-blank-screen"
+#define GPM_SETTINGS_LOCK_ON_SUSPEND "lock-suspend"
+#define GPM_SETTINGS_LOCK_ON_HIBERNATE "lock-hibernate"
+#define GPM_SETTINGS_LOCK_KEYRING_SUSPEND "lock-keyring-suspend"
+#define GPM_SETTINGS_LOCK_KEYRING_HIBERNATE "lock-keyring-hibernate"
/* disks */
-#define GPM_CONF_DISKS_SPINDOWN_ENABLE_AC GPM_CONF_DIR "/disks/spindown_enable_ac"
-#define GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT GPM_CONF_DIR "/disks/spindown_enable_battery"
-#define GPM_CONF_DISKS_SPINDOWN_TIMEOUT_AC GPM_CONF_DIR "/disks/spindown_timeout_ac"
-#define GPM_CONF_DISKS_SPINDOWN_TIMEOUT_BATT GPM_CONF_DIR "/disks/spindown_timeout_battery"
+#define GPM_SETTINGS_SPINDOWN_ENABLE_AC "spindown-enable-ac"
+#define GPM_SETTINGS_SPINDOWN_ENABLE_BATT "spindown-enable-battery"
+#define GPM_SETTINGS_SPINDOWN_TIMEOUT_AC "spindown-timeout-ac"
+#define GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT "spindown-timeout-battery"
/* notify */
-#define GPM_CONF_NOTIFY_PERHAPS_RECALL GPM_CONF_DIR "/notify/perhaps_recall"
-#define GPM_CONF_NOTIFY_LOW_CAPACITY GPM_CONF_DIR "/notify/low_capacity"
-#define GPM_CONF_NOTIFY_DISCHARGING GPM_CONF_DIR "/notify/discharging"
-#define GPM_CONF_NOTIFY_FULLY_CHARGED GPM_CONF_DIR "/notify/fully_charged"
-#define GPM_CONF_NOTIFY_SLEEP_FAILED GPM_CONF_DIR "/notify/sleep_failed"
-#define GPM_CONF_NOTIFY_SLEEP_FAILED_URI GPM_CONF_DIR "/notify/sleep_failed_uri"
-#define GPM_CONF_NOTIFY_LOW_POWER GPM_CONF_DIR "/notify/low_power"
-
-/* statistics */
-#define GPM_CONF_STATS_SHOW_AXIS_LABELS GPM_CONF_DIR "/statistics/show_axis_labels"
-#define GPM_CONF_STATS_SHOW_EVENTS GPM_CONF_DIR "/statistics/show_events"
-#define GPM_CONF_STATS_SMOOTH_DATA GPM_CONF_DIR "/statistics/smooth_data"
-#define GPM_CONF_STATS_GRAPH_TYPE GPM_CONF_DIR "/statistics/graph_type"
-#define GPM_CONF_STATS_MAX_TIME GPM_CONF_DIR "/statistics/data_max_time"
+#define GPM_SETTINGS_NOTIFY_PERHAPS_RECALL "notify-perhaps-recall"
+#define GPM_SETTINGS_NOTIFY_LOW_CAPACITY "notify-low-capacity"
+#define GPM_SETTINGS_NOTIFY_DISCHARGING "notify-discharging"
+#define GPM_SETTINGS_NOTIFY_FULLY_CHARGED "notify-fully-charged"
+#define GPM_SETTINGS_NOTIFY_SLEEP_FAILED "notify-sleep-failed"
+#define GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI "notify-sleep-failed-uri"
+#define GPM_SETTINGS_NOTIFY_LOW_POWER "notify-low-power"
/* thresholds */
-#define GPM_CONF_THRESH_PERCENTAGE_LOW GPM_CONF_DIR "/thresholds/percentage_low"
-#define GPM_CONF_THRESH_PERCENTAGE_CRITICAL GPM_CONF_DIR "/thresholds/percentage_critical"
-#define GPM_CONF_THRESH_PERCENTAGE_ACTION GPM_CONF_DIR "/thresholds/percentage_action"
-#define GPM_CONF_THRESH_TIME_LOW GPM_CONF_DIR "/thresholds/time_low"
-#define GPM_CONF_THRESH_TIME_CRITICAL GPM_CONF_DIR "/thresholds/time_critical"
-#define GPM_CONF_THRESH_TIME_ACTION GPM_CONF_DIR "/thresholds/time_action"
+#define GPM_SETTINGS_PERCENTAGE_LOW "percentage-low"
+#define GPM_SETTINGS_PERCENTAGE_CRITICAL "percentage-critical"
+#define GPM_SETTINGS_PERCENTAGE_ACTION "percentage-action"
+#define GPM_SETTINGS_TIME_LOW "time-low"
+#define GPM_SETTINGS_TIME_CRITICAL "time-critical"
+#define GPM_SETTINGS_TIME_ACTION "time-action"
/* timeout */
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC GPM_CONF_DIR "/timeout/sleep_computer_ac"
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT GPM_CONF_DIR "/timeout/sleep_computer_battery"
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_UPS GPM_CONF_DIR "/timeout/sleep_computer_ups"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC GPM_CONF_DIR "/timeout/sleep_display_ac"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT GPM_CONF_DIR "/timeout/sleep_display_battery"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_UPS GPM_CONF_DIR "/timeout/sleep_display_ups"
+#define GPM_SETTINGS_SLEEP_COMPUTER_AC "sleep-computer-ac"
+#define GPM_SETTINGS_SLEEP_COMPUTER_BATT "sleep-computer-battery"
+#define GPM_SETTINGS_SLEEP_COMPUTER_UPS "sleep-computer-ups"
+#define GPM_SETTINGS_SLEEP_DISPLAY_AC "sleep-display-ac"
+#define GPM_SETTINGS_SLEEP_DISPLAY_BATT "sleep-display-battery"
+#define GPM_SETTINGS_SLEEP_DISPLAY_UPS "sleep-display-ups"
/* ui */
-#define GPM_CONF_UI_ICON_POLICY GPM_CONF_DIR "/ui/icon_policy"
-#define GPM_CONF_UI_ENABLE_SOUND GPM_CONF_DIR "/ui/enable_sound"
-#define GPM_CONF_UI_SHOW_ACTIONS GPM_CONF_DIR "/ui/show_actions"
-
-/* new info binary */
-#define GPM_CONF_INFO_HISTORY_TIME "/apps/mate-power-manager/info/history_time"
-#define GPM_CONF_INFO_HISTORY_TYPE "/apps/mate-power-manager/info/history_type"
-#define GPM_CONF_INFO_HISTORY_GRAPH_SMOOTH "/apps/mate-power-manager/info/history_graph_smooth"
-#define GPM_CONF_INFO_HISTORY_GRAPH_POINTS "/apps/mate-power-manager/info/history_graph_points"
-#define GPM_CONF_INFO_STATS_TYPE "/apps/mate-power-manager/info/stats_type"
-#define GPM_CONF_INFO_STATS_GRAPH_SMOOTH "/apps/mate-power-manager/info/stats_graph_smooth"
-#define GPM_CONF_INFO_STATS_GRAPH_POINTS "/apps/mate-power-manager/info/stats_graph_points"
-#define GPM_CONF_INFO_PAGE_NUMBER "/apps/mate-power-manager/info/page_number"
-#define GPM_CONF_INFO_LAST_DEVICE "/apps/mate-power-manager/info/last_device"
+#define GPM_SETTINGS_ICON_POLICY "icon-policy"
+#define GPM_SETTINGS_ENABLE_SOUND "enable-sound"
+#define GPM_SETTINGS_SHOW_ACTIONS "show-actions"
-/* mate-screensaver */
-#define GS_CONF_DIR "/apps/mate-screensaver"
-#define GS_PREF_LOCK_ENABLED GS_CONF_DIR "/lock_enabled"
+/* statistics */
+#define GPM_SETTINGS_INFO_HISTORY_TIME "info-history-time"
+#define GPM_SETTINGS_INFO_HISTORY_TYPE "info-history-type"
+#define GPM_SETTINGS_INFO_HISTORY_GRAPH_SMOOTH "info-history-graph-smooth"
+#define GPM_SETTINGS_INFO_HISTORY_GRAPH_POINTS "info-history-graph-points"
+#define GPM_SETTINGS_INFO_STATS_TYPE "info-stats-type"
+#define GPM_SETTINGS_INFO_STATS_GRAPH_SMOOTH "info-stats-graph-smooth"
+#define GPM_SETTINGS_INFO_STATS_GRAPH_POINTS "info-stats-graph-points"
+#define GPM_SETTINGS_INFO_PAGE_NUMBER "info-page-number"
+#define GPM_SETTINGS_INFO_LAST_DEVICE "info-last-device"
-/* mate-session */
-#define GPM_CONF_IDLE_DELAY "/desktop/mate/session/idle_delay"
+/* mate-screensaver */
+#define GS_CONF_DIR "/apps/mate-screensaver"
+#define GS_CONF_PREF_LOCK_ENABLED GS_CONF_DIR "/lock_enabled"
typedef enum {
GPM_ICON_POLICY_ALWAYS,
@@ -169,10 +149,6 @@ typedef enum {
} GpmActionPolicy;
gchar *gpm_get_timestring (guint time);
-GpmIconPolicy gpm_icon_policy_from_string (const gchar *policy);
-const gchar *gpm_icon_policy_to_string (GpmIconPolicy policy);
-GpmActionPolicy gpm_action_policy_from_string (const gchar *policy);
-const gchar *gpm_action_policy_to_string (GpmActionPolicy policy);
void gpm_help_display (const gchar *link_id);
#ifdef EGG_TEST
void gpm_common_test (gpointer data);