[nautilus] Use NautilusZoomAction to put zoom item in toolbar



commit 946f377fc531b47ba71f85b8d57a4f2f20c9c432
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Dec 9 20:09:42 2009 +0100

    Use NautilusZoomAction to put zoom item in toolbar

 src/nautilus-navigation-window-menus.c |   11 +++++++++++
 src/nautilus-navigation-window-ui.xml  |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index ada1822..0a8bcf4 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -32,6 +32,7 @@
 #include "nautilus-actions.h"
 #include "nautilus-notebook.h"
 #include "nautilus-navigation-action.h"
+#include "nautilus-zoom-action.h"
 #include "nautilus-application.h"
 #include "nautilus-bookmark-list.h"
 #include "nautilus-bookmarks-window.h"
@@ -976,6 +977,16 @@ nautilus_navigation_window_initialize_actions (NautilusNavigationWindow *window)
 
 	g_object_unref (action);
 
+	action = g_object_new (NAUTILUS_TYPE_ZOOM_ACTION,
+			       "name", "Zoom",
+			       "label", _("_Zoom"),
+			       "window", window,
+			       "is_important", FALSE,
+			       NULL);
+	gtk_action_group_add_action (action_group,
+				     action);
+	g_object_unref (action);
+
 	action = gtk_action_group_get_action (action_group, NAUTILUS_ACTION_SEARCH);
 	g_object_set (action, "short_label", _("_Search"), NULL);
 
diff --git a/src/nautilus-navigation-window-ui.xml b/src/nautilus-navigation-window-ui.xml
index e50bb22..38f48ab 100644
--- a/src/nautilus-navigation-window-ui.xml
+++ b/src/nautilus-navigation-window-ui.xml
@@ -72,6 +72,7 @@
 	<toolitem name="Home" action="Home"/>
 	<toolitem name="Computer" action="Go to Computer"/>
 	<separator/>
+	<toolitem name="Zoom" action="Zoom"/>
 	<toolitem name="Search" action="Search"/>
 	<placeholder name="Extra Buttons Placeholder">
 	          <placeholder name="Extension Actions"/>



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