Bug 169573 [1] complains that there are no means to close spatial and navigational windows. Proposed patch attached, which binds ctrl-shift-q to that action. [1] http://bugzilla.gnome.org/show_bug.cgi?id=169573 -- Christian Neumair <chris gnome-de org>
Index: src/nautilus-window.c =================================================================== RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v retrieving revision 1.455 diff -u -p -r1.455 nautilus-window.c --- src/nautilus-window.c 5 Aug 2005 18:38:11 -0000 1.455 +++ src/nautilus-window.c 17 Aug 2005 10:34:51 -0000 @@ -107,6 +107,7 @@ enum { GO_UP, RELOAD, PROMPT_FOR_LOCATION, + CLOSE_ALL_WINDOWS, LAST_SIGNAL }; @@ -413,6 +414,13 @@ nautilus_window_zoom_to_default (Nautilu } } +static void +nautilus_window_close_all_windows (void) +{ + nautilus_application_close_all_navigation_windows (); + nautilus_application_close_all_spatial_windows (); +} + /* Code should never force the window taller than this size. * (The user can still stretch the window taller if desired). */ @@ -1510,6 +1518,14 @@ nautilus_window_class_init (NautilusWind NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + signals[CLOSE_ALL_WINDOWS] = + g_signal_new ("close-all-windows", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (NautilusWindowClass, close_all_windows), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); binding_set = gtk_binding_set_by_class (class); gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0, @@ -1519,7 +1535,11 @@ nautilus_window_class_init (NautilusWind "reload", 0); gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_MOD1_MASK, "prompt-for-location", 0); + gtk_binding_entry_add_signal (binding_set, GDK_q, + GDK_CONTROL_MASK | GDK_SHIFT_MASK, + "close-all-windows", 0); class->reload = nautilus_window_reload; class->go_up = nautilus_window_go_up_signal; + class->close_all_windows = nautilus_window_close_all_windows; } Index: src/nautilus-window.h =================================================================== RCS file: /cvs/gnome/nautilus/src/nautilus-window.h,v retrieving revision 1.122 diff -u -p -r1.122 nautilus-window.h --- src/nautilus-window.h 5 Aug 2005 18:38:11 -0000 1.122 +++ src/nautilus-window.h 17 Aug 2005 10:34:51 -0000 @@ -80,6 +80,7 @@ typedef struct { void (* get_default_size) (NautilusWindow *window, guint *default_width, guint *default_height); void (* show_window) (NautilusWindow *window); void (* close) (NautilusWindow *window); + void (* close_all_windows) (void); /* Signals used only for keybindings */ gboolean (* go_up) (NautilusWindow *window, gboolean close);
Attachment:
signature.asc
Description: This is a digitally signed message part