Commit f9578b3f authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Add Open New Window menu item in browser

2004-10-13  Alexander Larsson  <alexl@redhat.com>

	* src/nautilus-navigation-window-ui.xml:
	* src/nautilus-navigation-window.c:
	(file_menu_new_window_callback), (real_merge_menus):
	Add Open New Window menu item in browser
parent 17b212bc
2004-10-13 Alexander Larsson <alexl@redhat.com>
* src/nautilus-navigation-window-ui.xml:
* src/nautilus-navigation-window.c:
(file_menu_new_window_callback), (real_merge_menus):
Add Open New Window menu item in browser
2004-10-13 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
......
......@@ -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..."
......
......@@ -138,6 +138,21 @@ nautilus_navigation_window_instance_init (NautilusNavigationWindow *window)
bonobo_window_set_contents (BONOBO_WINDOW (window), window->details->content_paned);
}
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,
......@@ -703,6 +718,10 @@ real_merge_menus (NautilusWindow *nautilus_window)
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));
......@@ -717,6 +736,9 @@ real_merge_menus (NautilusWindow *nautilus_window)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment