[totem] main: Remove "Sidebar" toggle menu



commit 1cc4243e45257a796a728a8aceda86411be6ca95
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jul 3 17:45:23 2013 +0200

    main: Remove "Sidebar" toggle menu

 data/totem.ui       |   13 -------------
 src/totem-object.c  |   28 +---------------------------
 src/totem-sidebar.c |    9 ---------
 3 files changed, 1 insertions(+), 49 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index 0f24c17..5a4f990 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -204,24 +204,11 @@
             </object>
          </child>
 
-         <child>
-               <object class="GtkToggleAction" id="sidebar">
-               <property name="label" translatable="yes">S_idebar</property>
-               <property name="tooltip" translatable="yes">Show or hide the sidebar</property>
-              <property name="active">TRUE</property>
-              <property name="icon-name">view-sidebar-symbolic</property>
-               <signal name="activate" handler="show_sidebar_action_callback"/>
-            </object>
-            <accelerator key="F9"/>
-         </child>
-
       </object>
    </child>
    <ui>
       <menubar name="tmw-menubar">
          <menu name="view" action="view-menu">
-            <separator/>
-            <menuitem name="sidebar" action="sidebar"/>
             <placeholder name="sidebars-placeholder"/>
          </menu>
       </menubar>
diff --git a/src/totem-object.c b/src/totem-object.c
index bfc0aeb..11b6fbb 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3824,9 +3824,7 @@ create_control_button (TotemObject *totem,
 void
 totem_callback_connect (TotemObject *totem)
 {
-       GtkWidget *item, *image, *label;
-       GIcon *icon;
-       GtkAction *action;
+       GtkWidget *item, *image;
        GtkBox *box;
        GAction *gaction;
        AtkObject *accessible;
@@ -3889,30 +3887,6 @@ totem_callback_connect (TotemObject *totem)
        menu = (GMenuModel *) gtk_builder_get_object (totem->xml, "playermenu");
        gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (item), menu);
 
-       /* Sidebar button (Drag'n'Drop) */
-       action = gtk_action_group_get_action (totem->main_action_group, "sidebar");
-       item = gtk_toggle_button_new ();
-       gtk_activatable_set_related_action (GTK_ACTIVATABLE (item), action);
-
-       /* Remove the label */
-       label = gtk_bin_get_child (GTK_BIN (item));
-       gtk_widget_destroy (label);
-
-       /* Force add an icon, so it doesn't follow the
-        * gtk-button-images setting */
-       icon = g_themed_icon_new_with_default_fallbacks ("view-sidebar-symbolic");
-       image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON);
-       gtk_widget_show (image);
-       gtk_container_add (GTK_CONTAINER (item), image);
-       gtk_header_bar_pack_end (GTK_HEADER_BAR (totem->header), item);
-       g_signal_connect (G_OBJECT (item), "drag_data_received",
-                       G_CALLBACK (drop_playlist_cb), totem);
-       g_signal_connect (G_OBJECT (item), "drag_motion",
-                       G_CALLBACK (drag_motion_playlist_cb), totem);
-       gtk_drag_dest_set (item, GTK_DEST_DEFAULT_ALL,
-                       target_table, G_N_ELEMENTS (target_table),
-                       GDK_ACTION_COPY | GDK_ACTION_MOVE);
-
        /* Add a back button */
        item = gd_header_simple_button_new ();
        gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (item),
diff --git a/src/totem-sidebar.c b/src/totem-sidebar.c
index b77ecec..0638e99 100644
--- a/src/totem-sidebar.c
+++ b/src/totem-sidebar.c
@@ -61,8 +61,6 @@ cb_resize (Totem * totem)
 void
 totem_sidebar_toggle (Totem *totem, gboolean state)
 {
-       GtkAction *action;
-
        if (gtk_widget_get_visible (GTK_WIDGET (totem->sidebar)) == state)
                return;
 
@@ -71,11 +69,6 @@ totem_sidebar_toggle (Totem *totem, gboolean state)
        else
                gtk_widget_hide (GTK_WIDGET (totem->sidebar));
 
-       action = gtk_action_group_get_action (totem->main_action_group, "sidebar");
-       totem_signal_block_by_data (G_OBJECT (action), totem);
-       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), state);
-       totem_signal_unblock_by_data (G_OBJECT (action), totem);
-
        totem->sidebar_shown = state;
        cb_resize(totem);
 }
@@ -143,8 +136,6 @@ totem_sidebar_setup (Totem *totem, gboolean visible)
        gtk_paned_pack2 (item, totem->sidebar, FALSE, FALSE);
 
        totem->sidebar_shown = visible;
-       action = gtk_action_group_get_action (totem->main_action_group, "sidebar");
-       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
 
        gtk_widget_show_all (totem->sidebar);
        gtk_widget_realize (totem->sidebar);


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