preferences/printers Close dialog on alt+w/esc - Bug #14573

* Adds keyboard shortcuts to close the Add Printer dialog

Change-Id: Iac3d75c4b3e27793124919112f1be68308c95db3
Reviewed-on: https://review.haiku-os.org/c/1019
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
Rob Gill
2019-02-10 10:04:36 +00:00
committed by Stephan Aßmus
parent e89985cc31
commit 1e82c5d927
@@ -40,7 +40,8 @@ AddPrinterDialog::AddPrinterDialog(BWindow *parent)
:
Inherited(BRect(78, 71, 400, 300), B_TRANSLATE("Add printer"),
B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS
| B_CLOSE_ON_ESCAPE),
fPrintersPrefletMessenger(parent)
{
_BuildGUI(0);
@@ -221,6 +222,8 @@ AddPrinterDialog::_BuildGUI(int stage)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING,
B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING);
AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
SetDefaultButton(fOk);
fOk->MakeDefault(true);