diff options
author | Alexander Larsson <alexl@redhat.com> | 2004-10-13 15:49:05 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2004-10-13 15:49:05 +0000 |
commit | f9578b3fb41adc6d92d4716d6b4ba5408d29b454 (patch) | |
tree | 335ffbfbc0ca5deab3b067f60d0aba0394c0f1d3 /src/nautilus-navigation-window.c | |
parent | 17b212bc088c7ce3010754e8baacbbfa00f42b9d (diff) | |
download | nautilus-f9578b3fb41adc6d92d4716d6b4ba5408d29b454.tar.gz |
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
Diffstat (limited to 'src/nautilus-navigation-window.c')
-rw-r--r-- | src/nautilus-navigation-window.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index c7246c784..5eb5cf55f 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -139,6 +139,21 @@ nautilus_navigation_window_instance_init (NautilusNavigationWindow *window) } 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 *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); |