From d8e2b9fea6eb8558ac49d337ce1211fe386141e3 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Mon, 7 Mar 2011 23:01:45 +0000 Subject: [PATCH] dstcheck: * Make alerts closeable using escape fixes ticket #6902. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40862 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/dstcheck.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/dstcheck.cpp b/src/bin/dstcheck.cpp index 774c3e6565..b94eb6b01a 100644 --- a/src/bin/dstcheck.cpp +++ b/src/bin/dstcheck.cpp @@ -46,6 +46,7 @@ TimedAlert::TimedAlert(const char *title, const char *text, const char *button1, : BAlert(title, text, button1, button2, button3, width, type), fRunner(NULL) { + SetShortcut(0, B_ESCAPE); } @@ -143,9 +144,11 @@ main(int argc, char **argv) exit(0); if (index == 2) { - index = (new BAlert("dstcheck", + BAlert *alert = new BAlert("dstcheck", B_TRANSLATE("Would you like to set the clock?"), - B_TRANSLATE("No"), B_TRANSLATE("Yes")))->Go(); + B_TRANSLATE("No"), B_TRANSLATE("Yes")); + alert->SetShortcut(0, B_ESCAPE); + index = alert->Go(); if (index == 1) be_roster->Launch("application/x-vnd.Haiku-Time");