We don't add the Alt-w shortcut to modal windows anymore

by default, thanks to Darkwyrm for pointing to this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18450 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-08-07 21:34:07 +00:00
parent 8809a51076
commit 9319c7b88f
+4 -1
View File
@@ -2306,8 +2306,11 @@ BWindow::_InitData(BRect frame, const char* title, window_look look,
// get sent to the application, and not one of our handlers
fNoQuitShortcut = false;
if ((fFlags & B_NOT_CLOSABLE) == 0)
if ((fFlags & B_NOT_CLOSABLE) == 0 && !IsModal()) {
// Modal windows default to non-closable, but you can add the shortcut manually,
// if a different behaviour is wanted
AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
}
AddShortcut('X', B_COMMAND_KEY, new BMessage(B_CUT), NULL);
AddShortcut('C', B_COMMAND_KEY, new BMessage(B_COPY), NULL);