Close alerts with ESCAPE key.
Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts depending if the result gets used later in the code, or if it's a one-button BAlert.
This commit is contained in:
@@ -649,6 +649,7 @@ BApplication::AboutRequested()
|
||||
thread_info info;
|
||||
if (get_thread_info(Thread(), &info) == B_OK) {
|
||||
BAlert *alert = new BAlert("_about_", info.name, "OK");
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->Go(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user