diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-08-31 16:43:05 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-08-31 16:44:55 -0400 |
commit | c8b27b3b8b815a993b1536336cdbc5d1089f2e7c (patch) | |
tree | 5978b57da6769d44cd48fbdef3f7c14cb257b892 /src/nautilus-window-menus.c | |
parent | 88f9c3cc46fd54b5b9aa9234a55ea1bc29202e6d (diff) | |
download | nautilus-c8b27b3b8b815a993b1536336cdbc5d1089f2e7c.tar.gz |
Add paste and location properties to the gear menu
So that we have everything there that we used to have in the
now harder to get to "background" menu.
https://bugzilla.gnome.org/show_bug.cgi?id=667386
Diffstat (limited to 'src/nautilus-window-menus.c')
-rw-r--r-- | src/nautilus-window-menus.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c index 28a50f7a8..76bc3bee2 100644 --- a/src/nautilus-window-menus.c +++ b/src/nautilus-window-menus.c @@ -39,6 +39,8 @@ #include "nautilus-window-manage-views.h" #include "nautilus-window-private.h" #include "nautilus-desktop-window.h" +#include "nautilus-properties-window.h" + #include <gtk/gtk.h> #include <gio/gio.h> #include <glib/gi18n.h> @@ -130,6 +132,26 @@ action_reload_callback (GtkAction *action, nautilus_window_slot_reload (slot); } +static void +action_location_properties_callback (GtkAction *action, + gpointer user_data) +{ + NautilusWindowSlot *slot; + GList *files; + NautilusView *view; + NautilusFile *file; + + slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (user_data)); + view = nautilus_window_slot_get_current_view (slot); + file = nautilus_view_get_directory_as_file (view); + + files = g_list_append (NULL, file); + + nautilus_properties_window_present (files, GTK_WIDGET (view), NULL); + + nautilus_file_list_free (files); +} + static NautilusView * get_current_view (NautilusWindow *window) { @@ -578,7 +600,12 @@ static const GtkActionEntry main_entries[] = { G_CALLBACK (action_tabs_move_left_callback) }, { "TabsMoveRight", NULL, N_("Move Tab _Right"), "<shift><control>Page_Down", N_("Move current tab to right"), - G_CALLBACK (action_tabs_move_right_callback) } + G_CALLBACK (action_tabs_move_right_callback) }, + /* name, stock id */ { NAUTILUS_ACTION_LOCATION_PROPERTIES, GTK_STOCK_PROPERTIES, + /* label, accelerator */ N_("P_roperties"), NULL, + /* tooltip */ N_("View or modify the properties of this folder"), + G_CALLBACK (action_location_properties_callback) }, + }; static const GtkToggleActionEntry main_toggle_entries[] = { |