[haiku-commits] r40862 - haiku/trunk/src/bin

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2011 00:01:45 +0100 (CET)

Author: stpere
Date: 2011-03-08 00:01:45 +0100 (Tue, 08 Mar 2011)
New Revision: 40862
Changeset: http://dev.haiku-os.org/changeset/40862
Ticket: http://dev.haiku-os.org/ticket/6902

Modified:
   haiku/trunk/src/bin/dstcheck.cpp
Log:
dstcheck:
  * Make alerts closeable using escape

fixes ticket #6902.


Modified: haiku/trunk/src/bin/dstcheck.cpp
===================================================================
--- haiku/trunk/src/bin/dstcheck.cpp    2011-03-07 20:03:00 UTC (rev 40861)
+++ haiku/trunk/src/bin/dstcheck.cpp    2011-03-07 23:01:45 UTC (rev 40862)
@@ -46,6 +46,7 @@
        : BAlert(title, text, button1, button2, button3, width, type),
        fRunner(NULL)
 {
+       SetShortcut(0, B_ESCAPE);
 }
 
 
@@ -143,9 +144,11 @@
                        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");


Other related posts: