diff options
author | Stefano Karapetsas <[email protected]> | 2012-11-01 17:33:16 -0700 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-11-01 17:33:16 -0700 |
commit | 7c7b09026bde3ffd1ce886fd545e7bfa1e59aec7 (patch) | |
tree | 076ec7419159262e65f608da7a3dbccdd8ec3a5a /src/gpm-common.c | |
parent | 83dc101045267b2e793af3af4716f1cf02089ac6 (diff) | |
parent | 972be3627b8b6368a0e8c971ade7963ea7d459de (diff) | |
download | mate-power-manager-7c7b09026bde3ffd1ce886fd545e7bfa1e59aec7.tar.bz2 mate-power-manager-7c7b09026bde3ffd1ce886fd545e7bfa1e59aec7.tar.xz |
Merge pull request #19 from bhull2010/gsettings
Port to Gsettings
Diffstat (limited to 'src/gpm-common.c')
-rw-r--r-- | src/gpm-common.c | 84 |
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 **/ |