[gnome-power-manager] Rename show_context_menu to show_actions as we're moving to a mono-menu design



commit 4e561983793442ce1a25998447445affb959bd76
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 15 15:40:44 2009 +0100

    Rename show_context_menu to show_actions as we're moving to a mono-menu design

 data/gnome-power-manager.schemas.in |    6 +++---
 src/gpm-common.h                    |    2 +-
 src/gpm-tray-icon.c                 |   18 +++++++++---------
 3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/data/gnome-power-manager.schemas.in b/data/gnome-power-manager.schemas.in
index 14f403e..760317a 100644
--- a/data/gnome-power-manager.schemas.in
+++ b/data/gnome-power-manager.schemas.in
@@ -738,13 +738,13 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnome-power-manager/ui/show_context_menu</key>
-      <applyto>/apps/gnome-power-manager/ui/show_context_menu</applyto>
+      <key>/schemas/apps/gnome-power-manager/ui/show_actions</key>
+      <applyto>/apps/gnome-power-manager/ui/show_actions</applyto>
       <owner>gnome-power-manager</owner>
       <type>bool</type>
       <default>true</default>
       <locale name="C">
-        <short>If preferences should be shown</short>
+        <short>If preferences and statistics items should be shown in the context menu</short>
         <long></long>
       </locale>
     </schema>
diff --git a/src/gpm-common.h b/src/gpm-common.h
index 5c59e9e..e0a8d91 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -138,7 +138,7 @@ G_BEGIN_DECLS
 #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_CONTEXT_MENU		GPM_CONF_DIR "/ui/show_context_menu"
+#define GPM_CONF_UI_SHOW_ACTIONS		GPM_CONF_DIR "/ui/show_actions"
 
 /* new info binary */
 #define GPM_CONF_INFO_HISTORY_TIME		"/apps/gnome-power-manager/info/history_time"
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index 37fd29b..ff4eca3 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -62,7 +62,7 @@ struct GpmTrayIconPrivate
 	GtkStatusIcon		*status_icon;
 	gboolean		 show_suspend;
 	gboolean		 show_hibernate;
-	gboolean		 show_context_menu;
+	gboolean		 show_actions;
 };
 
 enum {
@@ -98,13 +98,13 @@ gpm_tray_icon_enable_hibernate (GpmTrayIcon *icon, gboolean enabled)
 }
 
 /**
- * gpm_tray_icon_enable_context_menu:
+ * gpm_tray_icon_enable_actions:
  **/
 static void
-gpm_tray_icon_enable_context_menu (GpmTrayIcon *icon, gboolean enabled)
+gpm_tray_icon_enable_actions (GpmTrayIcon *icon, gboolean enabled)
 {
 	g_return_if_fail (GPM_IS_TRAY_ICON (icon));
-	icon->priv->show_context_menu = enabled;
+	icon->priv->show_actions = enabled;
 }
 
 /**
@@ -303,7 +303,7 @@ gpm_tray_icon_popup_menu_cb (GtkStatusIcon *status_icon, guint button, guint32 t
 
 	egg_debug ("icon right clicked");
 
-	if (!icon->priv->show_context_menu)
+	if (!icon->priv->show_actions)
 		return;
 
 	/* preferences */
@@ -496,9 +496,9 @@ gpm_conf_gconf_key_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *e
 		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_CONTEXT_MENU) == 0) {
+	} else if (strcmp (entry->key, GPM_CONF_UI_SHOW_ACTIONS) == 0) {
 		allowed_in_menu = gconf_value_get_bool (value);
-		gpm_tray_icon_enable_context_menu (icon, allowed_in_menu);
+		gpm_tray_icon_enable_actions (icon, allowed_in_menu);
 	}
 }
 
@@ -546,8 +546,8 @@ gpm_tray_icon_init (GpmTrayIcon *icon)
 	gpm_control_allowed_hibernate (icon->priv->control, &enabled, NULL);
 	gpm_tray_icon_enable_hibernate (icon, enabled && allowed_in_menu);
 
-	allowed_in_menu = gconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_CONTEXT_MENU, NULL);
-	gpm_tray_icon_enable_context_menu (icon, allowed_in_menu);
+	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]