[gnome-power-manager] Remove show_actions_in_menu GConf key as the menu items are being removed eventually



commit d1727825f920f0ec54b0708fb6c2c6cfeb6803c6
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 15 15:43:27 2009 +0100

    Remove show_actions_in_menu GConf key as the menu items are being removed eventually

 data/gnome-power-manager.schemas.in |   12 ------------
 src/gpm-common.h                    |    1 -
 src/gpm-tray-icon.c                 |   17 ++++-------------
 3 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/data/gnome-power-manager.schemas.in b/data/gnome-power-manager.schemas.in
index 760317a..13a61fd 100644
--- a/data/gnome-power-manager.schemas.in
+++ b/data/gnome-power-manager.schemas.in
@@ -750,18 +750,6 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnome-power-manager/ui/show_actions_in_menu</key>
-      <applyto>/apps/gnome-power-manager/ui/show_actions_in_menu</applyto>
-      <owner>gnome-power-manager</owner>
-      <type>bool</type>
-      <default>false</default>
-      <locale name="C">
-        <short>Allow Suspend and Hibernate in the menu</short>
-        <long>If the Suspend and Hibernate options should be allowed in the notification area drop down menu.</long>
-      </locale>
-    </schema>
-
-    <schema>
       <key>/schemas/apps/gnome-power-manager/ui/icon_policy</key>
       <applyto>/apps/gnome-power-manager/ui/icon_policy</applyto>
       <owner>gnome-power-manager</owner>
diff --git a/src/gpm-common.h b/src/gpm-common.h
index e0a8d91..521f683 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -136,7 +136,6 @@ G_BEGIN_DECLS
 
 /* ui */
 #define GPM_CONF_UI_ICON_POLICY			GPM_CONF_DIR "/ui/icon_policy"
-#define GPM_CONF_UI_SHOW_ACTIONS_IN_MENU	GPM_CONF_DIR "/ui/show_actions_in_menu"
 #define GPM_CONF_UI_ENABLE_SOUND		GPM_CONF_DIR "/ui/enable_sound"
 #define GPM_CONF_UI_SHOW_ACTIONS		GPM_CONF_DIR "/ui/show_actions"
 
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index ff4eca3..8e4cba4 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -482,20 +482,12 @@ gpm_conf_gconf_key_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *e
 
 	if (strcmp (entry->key, GPM_CONF_CAN_SUSPEND) == 0) {
 		gpm_control_allowed_suspend (icon->priv->control, &enabled, NULL);
-		allowed_in_menu = gconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_ACTIONS_IN_MENU, NULL);
-		gpm_tray_icon_enable_suspend (icon, allowed_in_menu && enabled);
+		gpm_tray_icon_enable_suspend (icon, enabled);
 
 	} else if (strcmp (entry->key, GPM_CONF_CAN_HIBERNATE) == 0) {
 		gpm_control_allowed_hibernate (icon->priv->control, &enabled, NULL);
-		allowed_in_menu = gconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_ACTIONS_IN_MENU, NULL);
-		gpm_tray_icon_enable_hibernate (icon, allowed_in_menu && enabled);
+		gpm_tray_icon_enable_hibernate (icon, enabled);
 
-	} else if (strcmp (entry->key, GPM_CONF_UI_SHOW_ACTIONS_IN_MENU) == 0) {
-		allowed_in_menu = gconf_value_get_bool (value);
-		gpm_control_allowed_suspend (icon->priv->control, &enabled, NULL);
-		gpm_tray_icon_enable_suspend (icon, allowed_in_menu && enabled);
-		gpm_control_allowed_hibernate (icon->priv->control, &enabled, NULL);
-		gpm_tray_icon_enable_hibernate (icon, allowed_in_menu && enabled);
 	} else if (strcmp (entry->key, GPM_CONF_UI_SHOW_ACTIONS) == 0) {
 		allowed_in_menu = gconf_value_get_bool (value);
 		gpm_tray_icon_enable_actions (icon, allowed_in_menu);
@@ -540,11 +532,10 @@ gpm_tray_icon_init (GpmTrayIcon *icon)
 
 	/* only show the suspend and hibernate icons if we can do the action,
 	   and the policy allows the actions in the menu */
-	allowed_in_menu = gconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_ACTIONS_IN_MENU, NULL);
 	gpm_control_allowed_suspend (icon->priv->control, &enabled, NULL);
-	gpm_tray_icon_enable_suspend (icon, enabled && allowed_in_menu);
+	gpm_tray_icon_enable_suspend (icon, enabled);
 	gpm_control_allowed_hibernate (icon->priv->control, &enabled, NULL);
-	gpm_tray_icon_enable_hibernate (icon, enabled && allowed_in_menu);
+	gpm_tray_icon_enable_hibernate (icon, enabled);
 
 	allowed_in_menu = gconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_ACTIONS, NULL);
 	gpm_tray_icon_enable_actions (icon, allowed_in_menu);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]