[evince] Put dual and continuous modes into view menu



commit 40d9cd88d99f85e9ce7776c4ca787638e01028ac
Author: William Jon McCann <jmccann redhat com>
Date:   Wed Jan 2 10:56:23 2013 -0500

    Put dual and continuous modes into view menu
    
    Instead of having them on the toolbar directly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691020

 shell/ev-toolbar.c  |   31 ++++++-------------------------
 shell/evince-ui.xml |    3 +++
 2 files changed, 9 insertions(+), 25 deletions(-)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index c33e811..ef39514 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -222,38 +222,19 @@ ev_toolbar_constructed (GObject *object)
         tool_item = GTK_WIDGET (gtk_tool_item_new ());
         gtk_container_add (GTK_CONTAINER (tool_item), button);
         gtk_widget_show (button);
-        gtk_widget_set_margin_right (tool_item, 12);
+        gtk_widget_set_margin_right (tool_item, 6);
         gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item);
         gtk_widget_show (tool_item);
 
-        /* View */
-        hbox = ev_toolbar_create_button_group (ev_toolbar);
-
-        action = gtk_action_group_get_action (action_group, "ViewContinuous");
-        /* I don't know why our icon name is not set for our stock icons */
-        gtk_action_set_icon_name (action, EV_STOCK_VIEW_CONTINUOUS);
-        button = ev_toolbar_create_toggle_button (ev_toolbar, action);
-        gtk_container_add (GTK_CONTAINER (hbox), button);
-        gtk_widget_show (button);
-
-        action = gtk_action_group_get_action (action_group, "ViewDual");
-        /* I don't know why our icon name is not set for our stock icons */
-        gtk_action_set_icon_name (action, EV_STOCK_VIEW_DUAL);
-        button = ev_toolbar_create_toggle_button (ev_toolbar, action);
-        gtk_container_add (GTK_CONTAINER (hbox), button);
-        gtk_widget_show (button);
-
+        /* View Menu */
         menu = gtk_ui_manager_get_widget (ui_manager, "/ViewMenuPopup");
-        button = ev_toolbar_create_menu_button (ev_toolbar, "go-down-symbolic",
+        button = ev_toolbar_create_menu_button (ev_toolbar, "document-properties-symbolic",
                                                 menu, GTK_ALIGN_END);
         ev_toolbar->priv->view_menu_button = button;
-        gtk_container_add (GTK_CONTAINER (hbox), button);
-        gtk_widget_show (button);
-
         tool_item = GTK_WIDGET (gtk_tool_item_new ());
-        gtk_widget_set_margin_right (tool_item, 12);
-        gtk_container_add (GTK_CONTAINER (tool_item), hbox);
-        gtk_widget_show (hbox);
+        gtk_container_add (GTK_CONTAINER (tool_item), button);
+        gtk_widget_show (button);
+        gtk_widget_set_margin_right (tool_item, 6);
 
         gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item);
         gtk_widget_show (tool_item);
diff --git a/shell/evince-ui.xml b/shell/evince-ui.xml
index 45a1a29..feecef0 100644
--- a/shell/evince-ui.xml
+++ b/shell/evince-ui.xml
@@ -31,6 +31,9 @@
   </popup>
 
   <popup name="ViewMenuPopup">
+    <menuitem name="ViewContinuousMenu" action="ViewContinuous"/>
+    <menuitem name="ViewDualMenu" action="ViewDual"/>
+    <separator/>
     <menuitem name="ViewSidebarMenu" action="ViewSidebar"/>
     <separator/>
     <menuitem name="ViewFullscreenMenu" action="ViewFullscreen"/>



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