summaryrefslogtreecommitdiff
path: root/src/gpm-common.c
diff options
context:
space:
mode:
authorBrent Hull <[email protected]>2012-10-30 15:55:35 -0400
committerBrent Hull <[email protected]>2012-10-30 15:55:35 -0400
commit060a4507145425c02c6aa0ef810138c04d38f5a9 (patch)
tree696262b89d749abf74ccec08260969679ef70d6e /src/gpm-common.c
parente58350ab1a00d55e82f7ae97589562e10a77c485 (diff)
downloadmate-power-manager-060a4507145425c02c6aa0ef810138c04d38f5a9.tar.bz2
mate-power-manager-060a4507145425c02c6aa0ef810138c04d38f5a9.tar.xz
Use gsettings enums (partially from GNOME)
Diffstat (limited to 'src/gpm-common.c')
-rw-r--r--src/gpm-common.c84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/gpm-common.c b/src/gpm-common.c
index 0d0e536..861837a 100644
--- a/src/gpm-common.c
+++ b/src/gpm-common.c
@@ -79,90 +79,6 @@ gpm_get_timestring (guint time_secs)
}
/**
- * gpm_icon_policy_from_string:
- **/
-GpmIconPolicy
-gpm_icon_policy_from_string (const gchar *policy)
-{
- if (policy == NULL)
- return GPM_ICON_POLICY_NEVER;
- if (g_strcmp0 (policy, "always") == 0)
- return GPM_ICON_POLICY_ALWAYS;
- if (g_strcmp0 (policy, "present") == 0)
- return GPM_ICON_POLICY_PRESENT;
- if (g_strcmp0 (policy, "charge") == 0)
- return GPM_ICON_POLICY_CHARGE;
- if (g_strcmp0 (policy, "low") == 0)
- return GPM_ICON_POLICY_LOW;
- if (g_strcmp0 (policy, "critical") == 0)
- return GPM_ICON_POLICY_CRITICAL;
- if (g_strcmp0 (policy, "never") == 0)
- return GPM_ICON_POLICY_NEVER;
- return GPM_ICON_POLICY_NEVER;
-}
-
-/**
- * gpm_icon_policy_to_string:
- **/
-const gchar *
-gpm_icon_policy_to_string (GpmIconPolicy policy)
-{
- if (policy == GPM_ICON_POLICY_ALWAYS)
- return "always";
- if (policy == GPM_ICON_POLICY_PRESENT)
- return "present";
- if (policy == GPM_ICON_POLICY_CHARGE)
- return "charge";
- if (policy == GPM_ICON_POLICY_LOW)
- return "low";
- if (policy == GPM_ICON_POLICY_CRITICAL)
- return "critical";
- if (policy == GPM_ICON_POLICY_NEVER)
- return "never";
- return "never";
-}
-
-/**
- * gpm_action_policy_from_string:
- **/
-GpmActionPolicy
-gpm_action_policy_from_string (const gchar *policy)
-{
- if (policy == NULL)
- return GPM_ACTION_POLICY_NOTHING;
- if (g_strcmp0 (policy, "blank") == 0)
- return GPM_ACTION_POLICY_BLANK;
- if (g_strcmp0 (policy, "shutdown") == 0)
- return GPM_ACTION_POLICY_SHUTDOWN;
- if (g_strcmp0 (policy, "suspend") == 0)
- return GPM_ACTION_POLICY_SUSPEND;
- if (g_strcmp0 (policy, "hibernate") == 0)
- return GPM_ACTION_POLICY_HIBERNATE;
- if (g_strcmp0 (policy, "interactive") == 0)
- return GPM_ACTION_POLICY_INTERACTIVE;
- return GPM_ACTION_POLICY_NOTHING;
-}
-
-/**
- * gpm_action_policy_to_string:
- **/
-const gchar *
-gpm_action_policy_to_string (GpmActionPolicy policy)
-{
- if (policy == GPM_ACTION_POLICY_BLANK)
- return "blank";
- if (policy == GPM_ACTION_POLICY_SHUTDOWN)
- return "shutdown";
- if (policy == GPM_ACTION_POLICY_SUSPEND)
- return "suspend";
- if (policy == GPM_ACTION_POLICY_HIBERNATE)
- return "hibernate";
- if (policy == GPM_ACTION_POLICY_INTERACTIVE)
- return "interactive";
- return "nothing";
-}
-
-/**
* gpm_help_display:
* @link_id: Subsection of mate-power-manager help section
**/