GNOME Bugzilla – Bug 328111
Ctrl+W does not close file-roller window
Last modified: 2006-09-26 14:51:25 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/file-roller/+bug/29324 "Behaviour of Ctrl+W in file-roller is inconsistent with other applications. Nautilus, Firefox and some other programs close the window when the last tab is closed using Ctrl+W, but file-roller keeps the window open and just closes the archive. The current behaviour makes a little sense in that Nautilus, Firefox, gnome-terminal and others don't "open" and "close" files as file-roller does. On the other hand, if you use the "Open" command in file-roller to open a new archive, a new window will be opened. It would then seem logical to have a 1-1 mapping from files to file-roller windows, although this would be problematic when file-roller is invoked as a stand-alone application (rather than by clicking an archive in Nautilus)."
I think that file-roller should close the window when ctrl+W is pressed, regardless of wether it is opened as a standalone application or by using the open command or by double clicking on an archive in nautilius. Right now, the only way to close the window is to press ctrl+F4 (if that is the way your gnome desktop is set) or by select exit from the menu and so on. File->Exit should exit all instances of file-roller and ctr+w (file->close) should close the current instance.
Created attachment 61151 [details] [review] Patch for closing current window when ctrl+w is pressed Here is my first patch. I have tested it somewhat and it works on my side.
Comment on attachment 61151 [details] [review] Patch for closing current window when ctrl+w is pressed ? patch Index: src/actions.c =================================================================== RCS file: /cvs/gnome/file-roller/src/actions.c,v retrieving revision 1.25 diff -u -p -r1.25 actions.c --- src/actions.c 4 Mar 2006 09:53:42 -0000 1.25 +++ src/actions.c 14 Mar 2006 07:02:58 -0000 @@ -653,7 +653,11 @@ void activate_action_close (GtkAction *action, gpointer data) { + FRWindow *window = data; + window_archive_close ((FRWindow*) data); + + window_close(window); }
CTRL+q closes the window as well as the F4 combo, if that's any help.
The HIG (http://developer.gnome.org/projects/gup/hig/2.0/input-keyboard.html#standard-shortcuts) says CRTL-W should close an open document(archive), CTRL-Q should quit the app. Furthermore, file-roller is not able to open multiple archives ('documents' / 'tabs') in a single window. There is no point in stating that it should quit when closing the last tab with CTRL-W. File-roller, unlike Firefox, is part of Gnome and should be consistent with all Gnome apps. Nautilus is actually running all the time, you really do not want to quit it and leave your desktop blank -- hence CTRL-W closes the window, but the app is still running. CTRL-Q definitely closes file-roller 2.14. Adding the HIG keyword so that the HIG folks can add their comments.
Far as I am concerned the current behaviour works the same as gedit and Gnome apps should be consistent with Gnome apps.
hmm, that was my first patch ever, so pardon me :) The experience has left me a lot wiser than my years would show and I hereby proclaim that the current behaviour of file-roller is consistent with the rest of the gnome apps and should remain as such :) btw: gnome rocks ! And I would love to keep contributing to the project. Those patches are a great way to learn and enrich ones knowledge :D And since I'm starting to sound like a dork, I'll shutup now :)
I hope it's ok to close this as NOTABUG. Thanks for your work, Sharninder.