[totem] main: Move Properties menu item to cogwheel



commit 22a7788b8d0029f2004521692f8427d30b3baac6
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 10 18:14:24 2013 +0200

    main: Move Properties menu item to cogwheel

 data/totem.ui    |   18 +++++++-----------
 src/totem-menu.c |   17 ++++++++++-------
 2 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index e3fdfb9..7ca7f03 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -105,6 +105,13 @@
                        <attribute name="action">app.next-angle</attribute>
                        <attribute name="accel">&lt;Ctrl&gt;G</attribute>
                </item>
+               <section>
+                       <item>
+                               <attribute name="label" translatable="yes">_Properties</attribute>
+                               <attribute name="action">app.properties</attribute>
+                               <attribute name="accel">&lt;Ctrl&gt;P</attribute>
+                       </item>
+               </section>
        </section>
 </menu>
 
@@ -155,15 +162,6 @@
             <accelerator key="E" modifiers="GDK_CONTROL_MASK"/>
          </child>
          <child>
-            <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"/>
-         </child>
-         <child>
             <object class="GtkAction" id="play">
                <property name="label" translatable="yes">Play / P_ause</property>
                <property name="icon-name">media-playback-start-symbolic</property>
@@ -256,8 +254,6 @@
       <menubar name="tmw-menubar">
          <menu name="movie" action="movie-menu">
             <placeholder name="recent-placeholder"/>
-           <separator/>
-            <menuitem name="properties" action="properties"/>
             <separator/>
             <menuitem name="eject" action="eject"/>
          </menu>
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 99916a0..224baa9 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -42,7 +42,6 @@
 
 /* Callback functions for GtkBuilder */
 G_MODULE_EXPORT void eject_action_callback (GtkAction *action, Totem *totem);
-G_MODULE_EXPORT void properties_action_callback (GtkAction *action, Totem *totem);
 G_MODULE_EXPORT void play_action_callback (GtkAction *action, Totem *totem);
 G_MODULE_EXPORT void quit_action_callback (GtkAction *action, Totem *totem);
 G_MODULE_EXPORT void next_chapter_action_callback (GtkAction *action, Totem *totem);
@@ -227,6 +226,14 @@ next_angle_action_cb (GSimpleAction *action,
         totem_object_action_next_angle (TOTEM_OBJECT (user_data));
 }
 
+static void
+properties_action_cb (GSimpleAction *action,
+                     GVariant      *parameter,
+                     gpointer       user_data)
+{
+        totem_action_show_properties (TOTEM_OBJECT (user_data));
+}
+
 static GActionEntry app_entries[] = {
        /* Main app menu */
        { "open", open_action_cb, NULL, NULL, NULL },
@@ -249,6 +256,7 @@ static GActionEntry app_entries[] = {
        { "aspect-ratio", aspect_ratio_action_cb, "i", "0", aspect_ratio_change_state },
        { "zoom", toggle_action_cb, NULL, "false", zoom_action_change_state },
        { "next-angle", next_angle_action_cb, NULL, NULL, NULL },
+       { "properties", properties_action_cb, NULL, NULL, NULL },
 };
 
 void
@@ -264,6 +272,7 @@ totem_app_menu_setup (Totem *totem)
        /* FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=700085 */
        gtk_application_add_accelerator (GTK_APPLICATION (totem), "<Primary>G", "app.next-angle", NULL);
        gtk_application_add_accelerator (GTK_APPLICATION (totem), "<Primary>M", "app.next-angle", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (totem), "<Primary>P", "app.properties", NULL);
 
        gtk_window_set_application (GTK_WINDOW (totem->win), GTK_APPLICATION (totem));
 }
@@ -545,12 +554,6 @@ eject_action_callback (GtkAction *action, Totem *totem)
 }
 
 void
-properties_action_callback (GtkAction *action, Totem *totem)
-{
-       totem_action_show_properties (totem);
-}
-
-void
 play_action_callback (GtkAction *action, Totem *totem)
 {
        totem_object_action_play_pause (totem);


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