Opened 16 years ago
Closed 16 years ago
#2833 closed enhancement (fixed)
Shortcut for closing all Tracker windows (Easy)
Reported by: | humdinger | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Tracker | Version: | R1/pre-alpha1 |
Keywords: | Cc: | obaro.ogbo@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Revision is hrev28069.
I'd like to propose the shortcut ALT+Q for closing all Tracker windows. If we want to get fancy, how about ALT+SHIFT+Q to close only the ones on the current workspace?
Attachments (2)
Change History (12)
by , 16 years ago
Attachment: | CloseAll.diff added |
---|
by , 16 years ago
Attachment: | CloseAllWorkspace.diff added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Thanks nastee! As I filed the enhancement suggestion, I like it of course. :) Though I dunno how others feel about it...
In any case, if I see that correctly, the CloseAllWorkspace.diff would add two new menu items. Should others vote to include your patch, I'm for only adding the "Close all" item and change that to "Close all in workspace" when the SHIFT key is pressed while invoking the menu. It's a Haiku standard to "hide" extended options (see "Clean up [all]").
It would be cool if these SHIFT-key-changed menu item were changed live, i.e. you click on a menu to open it, then decide to press SHIFT, and menu items would change to their SHIFT-alternative. But that's another issue altogether.
comment:3 by , 16 years ago
I'm not sure I agree with overloading Q for this purpose, since that pretty universally means quit app, which you're not allowed to do to Tracker, and is definitely not what it's doing here. I'd rather suggest just making these variants of cmd+w (i.e. shift+cmd+w = close all, opt+shift+cmd+w = close current workspace). Comments welcome.
comment:4 by , 16 years ago
I see where you're coming from, anevilyak. From a users POV, Tracker appears to be the windows with those file listings. That the Desktop is just another Tracker window, doesn't register. From that POV, ALT+Q would mean quitting all Tracker windows. Question is, is it important to stress that that POV is technically wrong?
If we'd go with your suggestion, I think we should leave out the "Close all on current workspace" option. OPT+SHIFT+CMD+W ?! Gee, I have to order another pair of hands. :)
comment:5 by , 16 years ago
Maybe ctrl+shift+cmd then? I know we've used before for something, and ctrl+shift+cmd+w is definitely doable with one hand :) Besides if they don't want to go for the keyboard shortcut there's always picking it from the menu :)
comment:6 by , 16 years ago
Hmmm. Let's see what others think of the whole thing before getting into the specifics.
comment:7 by , 16 years ago
Tracker already has a command to close all windows : it is Cmd-Opt-W (Alt-Win-W). When Option is pressed, the Window menu displays "Close All" instead of "Close". IMHO this shortcut should not be changed (there are the same shortcuts in Mac OS, in almost every application). For "Close all on the current workspace", why not use Cmd-Shift-W ? It does not seems assigned ATM.
comment:8 by , 16 years ago
I think overloading Command-Q for this is just fine - after all that's what the Tracker currently does as well, it just doesn't allow you to quit it (ie. the well known shortcut is left with no action at all). I also wouldn't mind having "shift" change its meaning; as humdinger said, this is often in Haiku. While it's not necessarily obvious or intuitive, it's nice for those who actually read docs and improve the usability by remembering those oddities :-)
I'm not sure it deserves a menu entry, though. I would rather add a shortcut, and that's it.
Anyway, thanks for your patch, nastee! It looks good overall and everything has been added to where it belongs. Just a minor style thing: when the block following an if/for/while or whatever spans over more than one line (no matter if due to a comment or not), we always use brackets around the block. Ie.
+ if (window->Workspaces() & currentWorkspace) + // avoid the desktop + if (!dynamic_cast<BDeskWindow *>(window) + && !dynamic_cast<BStatusWindow *>(window)) + window->PostMessage(B_QUIT_REQUESTED);
would become:
+ if (window->Workspaces() & currentWorkspace) { + // avoid the desktop + if (!dynamic_cast<BDeskWindow *>(window) + && !dynamic_cast<BStatusWindow *>(window)) + window->PostMessage(B_QUIT_REQUESTED); + }
' and '&&'; "if (a & 1 && c == 0)" is a common source of errors. Plus you have a real boolean check here :-) |
comment:9 by , 16 years ago
@VinDuv: Oh. Didn't know that. Why on earth is it hidden beneath a WIN key combo? Are there more WIN combos? I think those should all be moved to SHIFT. "One key to reveal them all."
Now, I'm a bit confused as to what exactly we need and what feels right and what's consistent...
SHIFT+ALT+W makes sense as it reveals a modified behaviour to ALT+W. ALT+Q would be very convenient and kinda intuitive to "Close all windows". Furthermore, however, IMO a "Close all windows on current workspace" is much more needed than "Close all windows" to quickly clean up a workspace after navigating around not bothering to always "close parent" and ending up with many Tracker windows. In that case, you normaly don't want the windows on other workspaces closed. If you do, there's still the menu of Tracker in the Deskbar.
So, for convenience I'd love to have ALT+Q for "Close All Here" (what's short for "all windows on current workspace"?) But for consistency's sake, I guess SHIFT+ALT+W to reveal that option would be the right thing.
comment:10 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks a lot Obaro! I applied the patch with small changes in hrev30205. See commit message. I decided that re-purposing Alt-Q for this feature is just fine. Alt-Shift-W was already used anyways (actually Alt-Option-W, but that was just confusing, since it introduced another modifier and Shift is used for "Clean Up All"). As mentioned, the patch was nicely done! Sorry it took so long for someone to look into it!
CloseAll.diff adds "Close All(ALT+Q)" under Windows menu. CloseAllWorkspace adds both "Close All(ALT+Q) and Close All In Workspace(ALT+SHIFT+Q)". I hope they are appropriate.