nautilus 2.8 string freeze break request



Is it ok to commit this patch on the 2.8 branch? (well, on HEAD, since
Nautilus isn't branched yet).

It adds the strings:
"Open New _Window"
"Open another Nautilus window for the displayed location"

-------- Forwarded Message --------
From: Michael Henson <mike axl net>
To: Nautilus <nautilus-list gnome org>
Subject: [PATCH] Bug 151385: Open New Window
Date: Tue, 12 Oct 2004 10:16:54 -0400
Attached is a patch that reimplements the Open New Window functionality
for the navigation mode.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an uncontrollable pirate romance novelist from the 'hood. She's a 
beautiful gold-digging traffic cop who don't take no shit from nobody. They 
fight crime! 
Index: src/nautilus-navigation-window-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-navigation-window-ui.xml,v
retrieving revision 1.8
diff -p -u -r1.8 nautilus-navigation-window-ui.xml
--- src/nautilus-navigation-window-ui.xml	29 Jul 2004 22:31:41 -0000	1.8
+++ src/nautilus-navigation-window-ui.xml	12 Oct 2004 14:06:48 -0000
@@ -21,6 +21,14 @@
 
 <menu>
 	<submenu name="File">
+		<placeholder name="New Items Placeholder">
+			<menuitem name="New Window"
+				_label="Open New _Window"
+				_tip="Open another Nautilus window for the displayed location"
+				accel="*Control*N"
+				verb="New Window"/>
+		</placeholder>
+		
 		<placeholder name="Location Placeholder">
 		        <menuitem name="Connect to Server"
 			  _label="Connect to _Server..."
Index: src/nautilus-navigation-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-navigation-window.c,v
retrieving revision 1.424
diff -p -u -r1.424 nautilus-navigation-window.c
--- src/nautilus-navigation-window.c	22 Jul 2004 03:57:43 -0000	1.424
+++ src/nautilus-navigation-window.c	12 Oct 2004 14:06:49 -0000
@@ -139,6 +139,21 @@ nautilus_navigation_window_instance_init
 }
 
 static void
+file_menu_new_window_callback (BonoboUIComponent *component,
+			       gpointer user_data,
+			       const char *verb)
+{
+	NautilusWindow *window = NAUTILUS_WINDOW (user_data);
+
+	const gchar    *uri = nautilus_window_get_location (window);
+
+	window = nautilus_application_create_navigation_window (window->application,
+						gtk_window_get_screen (GTK_WINDOW (window)));
+
+	nautilus_window_open_location (window, uri, FALSE);
+}
+
+static void
 go_to_callback (GtkWidget *widget,
 		const char *uri,
 		NautilusNavigationWindow *window)
@@ -703,6 +718,10 @@ real_merge_menus (NautilusWindow *nautil
 	GtkWidget *location_bar_box;
 	GtkWidget *view_as_menu_vbox;
 	BonoboControl *location_bar_wrapper;
+	BonoboUIVerb verbs [] = {
+		BONOBO_UI_VERB ("New Window", file_menu_new_window_callback),
+		BONOBO_UI_VERB_END
+	};
 
 	EEL_CALL_PARENT (NAUTILUS_WINDOW_CLASS, 
 			 merge_menus, (nautilus_window));
@@ -716,6 +735,9 @@ real_merge_menus (NautilusWindow *nautil
 
 	bonobo_ui_component_freeze 
 		(NAUTILUS_WINDOW (window)->details->shell_ui, NULL);
+
+	bonobo_ui_component_add_verb_list_with_data (nautilus_window->details->shell_ui,
+						     verbs, window);
 
 	nautilus_navigation_window_initialize_menus_part_1 (window);
 	nautilus_navigation_window_initialize_toolbars (window);


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