[totem] Added missing tooltips to menu actions



commit 3b42e1d9e1d2e0e3f922797a2cbff2f36c512b92
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Jul 26 20:19:28 2009 +0100

    Added missing tooltips to menu actions

 data/totem.ui    |    5 +++++
 src/totem-menu.c |    8 +++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index eed2a82..1ef7bfa 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -32,6 +32,7 @@
             <object class="GtkAction" id="eject">
                <property name="label" translatable="yes">_Eject</property>
                <property name="icon-name">media-eject</property>
+               <property name="tooltip" translatable="yes">Eject the current disc</property>
                <signal name="activate" handler="eject_action_callback"/>
             </object>
             <accelerator key="E" modifiers="GDK_CONTROL_MASK"/>
@@ -40,6 +41,7 @@
             <object class="GtkAction" id="properties">
                <property name="label" translatable="yes">_Properties</property>
                <property name="stock-id">gtk-properties</property>
+               <property name="tooltip" translatable="yes">View the properties of the current stream</property>
                <signal name="activate" handler="properties_action_callback"/>
             </object>
             <accelerator key="P" modifiers="GDK_CONTROL_MASK"/>
@@ -80,12 +82,14 @@
             <object class="GtkAction" id="preferences">
                <property name="label" translatable="yes">Prefere_nces</property>
                <property name="stock-id">gtk-preferences</property>
+               <property name="tooltip" translatable="yes">Configure the application</property>
                <signal name="activate" handler="preferences_action_callback"/>
             </object>
          </child>
          <child>
             <object class="GtkAction" id="plugins">
                <property name="label" translatable="yes">Plugins...</property>
+               <property name="tooltip" translatable="yes">Configure plugins to extend the application</property>
                <signal name="activate" handler="plugins_action_callback"/>
             </object>
          </child>
@@ -249,6 +253,7 @@
             <object class="GtkAction" id="about">
                <property name="label" translatable="yes">_About</property>
                <property name="stock-id">gtk-about</property>
+               <property name="tooltip" translatable="yes">About this application</property>
                <signal name="activate" handler="about_action_callback"/>
             </object>
          </child>
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 0330c17..8895058 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -1320,16 +1320,14 @@ static void
 menu_item_select_cb (GtkMenuItem *proxy, Totem *totem)
 {
 	GtkAction *action;
-	char *message;
+	const gchar *message;
 
 	action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
 	g_return_if_fail (action != NULL);
 
-	g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
-	if (message) {
+	message = gtk_action_get_tooltip (action);
+	if (message)
 		totem_statusbar_push_help (TOTEM_STATUSBAR (totem->statusbar), message);
-		g_free (message);
-	}
 }
 
 static void



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