-
From 1e3cb62030bb102a5f1c3b779fea157806f66b1f Mon Sep 17 00:00:00 2001
From: Humdinger <humdingerb@gmail.com>
Date: Sun, 5 Aug 2012 16:01:51 +0200
Subject: 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.
---
.../filters/shortcut_catcher/CommandActuators.cpp | 15 +++-
.../input_server/methods/canna/CannaLooper.cpp | 1 +
.../methods/pen/PenInputServerMethod.cpp | 1 +
.../methods/t9/DictionaryInputServerMethod.cpp | 1 +
.../methods/t9/T9InputServerMethod.cpp | 1 +
.../inbound_filters/notifier/filter.cpp | 1 +
.../spam_filter/SpamFilterConfig.cpp | 8 +-
.../print/drivers/canon_lips/lips3/Lips3.cpp | 2 +
.../print/drivers/canon_lips/lips4/Lips4.cpp | 2 +
src/add-ons/print/drivers/gutenprint/GPDriver.cpp | 1 +
src/add-ons/print/drivers/pcl5/PCL5.cpp | 1 +
src/add-ons/print/drivers/pcl6/PCL6.cpp | 1 +
.../print/drivers/pdf/source/MessagePrinter.cpp | 20 +++--
.../print/drivers/pdf/source/PrinterDriver.cpp | 1 +
src/add-ons/print/drivers/postscript/PS.cpp | 1 +
.../hp_jetdirect/HPJetDirectTransport.cpp | 2 +
.../print/transports/hp_jetdirect/SetupWindow.cpp | 6 +-
src/add-ons/print/transports/ipp/IppSetupDlg.cpp | 1 +
src/add-ons/print/transports/ipp/IppTransport.cpp | 1 +
src/add-ons/print/transports/lpr/LprSetupDlg.cpp | 2 +
src/add-ons/print/transports/lpr/LprTransport.cpp | 1 +
src/add-ons/tracker/iconvader/IconVader.cpp | 6 +-
.../tracker/opentargetfolder/opentargetfolder.cpp | 12 ++-
src/add-ons/translators/ppm/PPMMain.cpp | 1 +
.../translators/shared/TranslatorWindow.cpp | 1 +
src/apps/autoraise/AutoRaiseApp.cpp | 1 +
src/apps/autoraise/AutoRaiseIcon.cpp | 1 +
src/apps/bootmanager/BootManagerController.cpp | 1 +
src/apps/bsnow/SnowView.cpp | 2 +-
src/apps/cdplayer/CDDBSupport.cpp | 1 +
src/apps/cdplayer/CDPlayer.cpp | 1 +
src/apps/clock/cl_view.cpp | 2 +-
src/apps/codycam/CodyCam.cpp | 1 +
src/apps/cortex/AddOnHost/AddOnHostApp.cpp | 8 +-
.../cortex/MediaRoutingView/MediaRoutingView.cpp | 1 +
src/apps/cortex/ParameterView/ParameterWindow.cpp | 1 +
src/apps/cortex/RouteApp/RouteWindow.cpp | 7 +-
.../cortex/addons/common/MediaNodeControlApp.cpp | 12 ++-
src/apps/diskprobe/AttributeWindow.cpp | 8 +-
src/apps/diskprobe/DiskProbe.cpp | 6 +-
src/apps/diskprobe/ProbeView.cpp | 21 +++--
src/apps/drivesetup/MainWindow.cpp | 5 ++
src/apps/expander/ExpanderWindow.cpp | 19 ++++-
src/apps/glteapot/ObjectView.cpp | 2 +
src/apps/icon-o-matic/MainWindow.cpp | 5 +-
src/apps/icon-o-matic/gui/SavePanel.cpp | 1 +
src/apps/icon-o-matic/import_export/Exporter.cpp | 1 +
.../icon-o-matic/import_export/svg/SVGExporter.cpp | 1 +
.../icon-o-matic/import_export/svg/SVGImporter.cpp | 1 +
src/apps/installedpackages/UninstallView.cpp | 2 +-
src/apps/installer/InstallerApp.cpp | 1 +
src/apps/installer/InstallerWindow.cpp | 73 ++++++++++-------
src/apps/installer/WorkerThread.cpp | 57 ++++++++------
src/apps/launchbox/MainWindow.cpp | 2 +
src/apps/login/LoginApp.cpp | 19 +++--
src/apps/mail/Content.cpp | 35 +++++----
src/apps/mail/Enclosures.cpp | 12 ++-
src/apps/mail/MailWindow.cpp | 52 ++++++++-----
src/apps/mail/Signature.cpp | 24 ++++--
src/apps/mediaconverter/MediaConverterApp.cpp | 2 +-
src/apps/mediaconverter/MediaConverterWindow.cpp | 6 +-
src/apps/mediaconverter/MediaFileInfoView.cpp | 1 +
src/apps/mediaplayer/MainApp.cpp | 2 +
src/apps/mediaplayer/MainWin.cpp | 12 ++-
src/apps/mediaplayer/playlist/PlaylistWindow.cpp | 1 +
.../mediaplayer/playlist/RemovePLItemsCommand.cpp | 8 +-
src/apps/midiplayer/MidiPlayerApp.cpp | 12 +--
src/apps/midiplayer/MidiPlayerWindow.cpp | 6 +-
src/apps/networkstatus/NetworkStatus.cpp | 1 -
src/apps/networkstatus/NetworkStatusView.cpp | 4 +
src/apps/overlayimage/OverlayView.cpp | 5 +-
src/apps/packageinstaller/PackageInfo.cpp | 1 +
src/apps/packageinstaller/PackageInstall.cpp | 1 +
src/apps/packageinstaller/PackageView.cpp | 7 +-
src/apps/pairs/PairsView.cpp | 2 +-
src/apps/people/PeopleApp.cpp | 1 +
src/apps/people/PersonWindow.cpp | 11 ++-
src/apps/people/PictureView.cpp | 1 +
src/apps/poorman/PoorManWindow.cpp | 2 +
src/apps/powerstatus/PowerStatus.cpp | 1 -
src/apps/powerstatus/PowerStatusView.cpp | 1 +
src/apps/processcontroller/PCWorld.cpp | 3 +-
src/apps/processcontroller/Preferences.cpp | 3 +-
src/apps/processcontroller/ProcessController.cpp | 11 ++-
src/apps/pulse/CPUButton.cpp | 2 +-
src/apps/pulse/DeskbarPulseView.cpp | 2 +-
src/apps/pulse/PulseApp.cpp | 4 +-
src/apps/pulse/PulseView.cpp | 2 +-
src/apps/resedit/BitmapView.cpp | 5 +-
src/apps/resedit/ResWindow.cpp | 5 +-
src/apps/screenshot/ScreenshotWindow.cpp | 1 +
src/apps/showimage/ShowImageView.cpp | 1 +
src/apps/showimage/ShowImageWindow.cpp | 3 +
src/apps/soundrecorder/RecorderWindow.cpp | 23 ++++--
src/apps/stylededit/StyledEditWindow.cpp | 3 +-
src/apps/sudoku/SudokuWindow.cpp | 14 +++-
src/apps/terminal/TermApp.cpp | 2 +-
src/apps/terminal/TermWindow.cpp | 6 +-
src/apps/text_search/GrepWindow.cpp | 3 +
src/apps/tv/MainWin.cpp | 8 +-
src/apps/webpositive/BrowserApp.cpp | 1 +
src/apps/webpositive/BrowserWindow.cpp | 8 ++
src/apps/webpositive/DownloadProgressView.cpp | 1 +
src/apps/webpositive/DownloadWindow.cpp | 1 +
src/apps/webwatch/WatchView.cpp | 4 +-
src/apps/workspaces/Workspaces.cpp | 1 +
src/bin/checkitout.cpp | 1 +
src/bin/desklink/MediaReplicant.cpp | 6 +-
src/bin/mail_utils/spamdbm.cpp | 10 ++-
src/bin/screenmode/screenmode.cpp | 1 +
src/bin/urlwrapper.cpp | 1 +
src/kits/app/Application.cpp | 1 +
src/kits/interface/Dragger.cpp | 6 +-
src/kits/interface/PrintJob.cpp | 2 +
src/kits/interface/ZombieReplicantView.cpp | 1 +
src/kits/shared/AboutWindow.cpp | 1 +
src/kits/tracker/AutoMounterSettings.cpp | 6 +-
src/kits/tracker/ContainerWindow.cpp | 4 +-
src/kits/tracker/FSClipboard.cpp | 4 +-
src/kits/tracker/FSUtils.cpp | 82 ++++++++++++--------
src/kits/tracker/InfoWindow.cpp | 15 ++--
src/kits/tracker/OpenWithWindow.cpp | 6 +-
src/kits/tracker/PoseView.cpp | 20 ++---
src/kits/tracker/Tracker.cpp | 2 +-
src/kits/tracker/TrackerInitialState.cpp | 6 +-
src/kits/tracker/WidgetAttributeText.cpp | 6 +-
src/libs/print/libprint/BlockingWindow.cpp | 1 +
src/libs/print/libprint/GraphicsDriver.cpp | 1 +
src/preferences/appearance/CurView.cpp | 3 +
src/preferences/appearance/DecorSettingsView.cpp | 2 +-
src/preferences/bluetooth/BluetoothMain.cpp | 16 ++--
src/preferences/cpufrequency/StatusView.cpp | 6 +-
.../datatranslations/DataTranslations.cpp | 5 +-
.../datatranslations/DataTranslationsWindow.cpp | 1 +
src/preferences/dun/DUNWindow.cpp | 8 +-
.../filetypes/ApplicationTypeWindow.cpp | 2 +
src/preferences/filetypes/FileTypes.cpp | 12 ++-
src/preferences/filetypes/FileTypesWindow.cpp | 2 +
src/preferences/filetypes/PreferredAppMenu.cpp | 3 +-
src/preferences/fonts/main.cpp | 3 +-
src/preferences/joysticks/JoyWin.cpp | 6 +-
src/preferences/keyboard/Keyboard.cpp | 7 +-
src/preferences/locale/LocaleWindow.cpp | 1 +
src/preferences/mail/AutoConfigWindow.cpp | 1 +
src/preferences/mail/ConfigWindow.cpp | 6 +-
src/preferences/mail/FilterConfigView.cpp | 7 +-
src/preferences/media/MediaWindow.cpp | 4 +-
src/preferences/mouse/Mouse.cpp | 6 +-
src/preferences/network/EthernetSettingsView.cpp | 10 ++-
src/preferences/network_old/BackupWindow.cpp | 1 +
src/preferences/network_old/LoginInfo.cpp | 6 +-
src/preferences/network_old/NetworkWindow.cpp | 10 ++-
src/preferences/notifications/DisplayView.cpp | 2 +
src/preferences/notifications/GeneralView.cpp | 8 ++
.../notifications/NotificationsView.cpp | 1 +
src/preferences/screen/ScreenApplication.cpp | 2 +-
src/preferences/screen/ScreenWindow.cpp | 8 +-
src/preferences/screensaver/PasswordWindow.cpp | 1 +
src/preferences/shortcuts/ShortcutsWindow.cpp | 26 ++++---
src/preferences/sounds/HApp.cpp | 1 +
src/preferences/sounds/HEventList.cpp | 1 +
src/preferences/sounds/HWindow.cpp | 1 +
src/preferences/time/NetworkTimeView.cpp | 6 +-
src/preferences/time/Time.cpp | 1 +
src/preferences/touchpad/TouchpadPrefView.cpp | 1 +
src/preferences/virtualmemory/SettingsWindow.cpp | 12 ++-
src/preferences/virtualmemory/VirtualMemory.cpp | 1 +
src/servers/bluetooth/DeskbarReplicant.cpp | 1 +
src/servers/debug/DebugServer.cpp | 1 +
src/servers/input/MethodReplicant.cpp | 8 +-
src/servers/mail/MailDaemon.cpp | 1 +
src/servers/media/media_server.cpp | 6 +-
src/servers/midi/MidiServerApp.cpp | 8 +-
src/servers/mount/AutoMounter.cpp | 12 ++-
src/servers/net/NetServer.cpp | 1 +
src/servers/notification/NotificationWindow.cpp | 3 +
src/servers/print/ConfigWindow.cpp | 1 +
src/servers/print/PrintServerApp.R5.cpp | 2 +
src/servers/registrar/ShutdownProcess.cpp | 3 +-
src/servers/syslog_daemon/SyslogDaemon.cpp | 1 +
180 files changed, 761 insertions(+), 351 deletions(-)
diff --git a/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp b/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp
index 6f72dfc..b265790 100644
a
|
b
|
LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg,
|
195 | 195 | str << " Please check your Shortcuts settings."; |
196 | 196 | } |
197 | 197 | |
198 | | if (fArgc < 1 || err != B_NO_ERROR) |
199 | | (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); |
| 198 | if (fArgc < 1 || err != B_NO_ERROR) { |
| 199 | BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); |
| 200 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 201 | alert->Go(NULL); |
| 202 | } |
200 | 203 | } |
201 | 204 | } |
202 | 205 | |
… |
… |
MIMEHandlerCommandActuator::KeyEventAsync(const BMessage* keyMsg,
|
1015 | 1018 | str << "Can't launch handler for "; |
1016 | 1019 | str << ", no such MIME type exists. Please check your Shortcuts"; |
1017 | 1020 | str << " settings."; |
1018 | | (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); |
| 1021 | BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); |
| 1022 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1023 | alert->Go(NULL); |
1019 | 1024 | } |
1020 | 1025 | } |
1021 | 1026 | } |
… |
… |
SendMessageCommandActuator::KeyEventAsync(const BMessage* keyMsg,
|
1693 | 1698 | BString str1("Shortcuts SendMessage error"); |
1694 | 1699 | if (fSignature.Length() == 0) { |
1695 | 1700 | str << "SendMessage: Target application signature not specified"; |
1696 | | (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); |
| 1701 | BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); |
| 1702 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1703 | alert->Go(NULL); |
1697 | 1704 | } else { |
1698 | 1705 | status_t error = B_OK; |
1699 | 1706 | BMessenger msngr(fSignature.String(), -1, &error); |
-
diff --git a/src/add-ons/input_server/methods/canna/CannaLooper.cpp b/src/add-ons/input_server/methods/canna/CannaLooper.cpp
index db7fc80..8b5226a 100644
a
|
b
|
CannaLooper::MessageReceived(BMessage* msg)
|
178 | 178 | " Copyright 1992 NEC Corporation, Tokyo, Japan\n" |
179 | 179 | " Special thanks to T.Murai for porting\n", |
180 | 180 | "OK"); |
| 181 | panel->SetFlags(B_CLOSE_ON_ESCAPE); |
181 | 182 | panel->Go(); |
182 | 183 | break; |
183 | 184 | } |
-
diff --git a/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp b/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp
index d47b21c..656cc97 100644
a
|
b
|
PenInputServerMethod::PenInputServerMethod()
|
53 | 53 | //fDebugFile.SetTo("/tmp/PenInputMethodMessages.txt", B_READ_WRITE|B_CREATE_FILE); |
54 | 54 | fDebugAlert = new BAlert("PenInput Debug", "Plip \n\n\n\n\n\n\n\n\n\n\n\n\n", "OK"); |
55 | 55 | fDebugAlert->SetLook(B_TITLED_WINDOW_LOOK); |
| 56 | fDebugAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
56 | 57 | fDebugAlert->TextView()->MakeSelectable(); |
57 | 58 | fDebugAlert->TextView()->SelectAll(); |
58 | 59 | fDebugAlert->TextView()->Delete(); |
-
diff --git a/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp b/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp
index f6a75ee..bfc3fd2 100644
a
|
b
|
void T9InputServerMethod::MessageReceived(BMessage *message)
|
178 | 178 | s << " - "; |
179 | 179 | s << (long) fDeskbarMenu->ItemAt(v); |
180 | 180 | BAlert *a = new BAlert("Plop", s.String(), "OK"); |
| 181 | a->SetFlags(B_CLOSE_ON_ESCAPE); |
181 | 182 | a->Go(NULL); |
182 | 183 | }*/ |
183 | 184 | break; |
-
diff --git a/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp b/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp
index 0b10292..a402bb1 100644
a
|
b
|
void T9InputServerMethod::MessageReceived(BMessage *message)
|
179 | 179 | s << " - "; |
180 | 180 | s << (long) fDeskbarMenu->ItemAt(v); |
181 | 181 | BAlert *a = new BAlert("Plop", s.String(), "OK"); |
| 182 | a->SetFlags(B_CLOSE_ON_ESCAPE); |
182 | 183 | a->Go(NULL); |
183 | 184 | }*/ |
184 | 185 | break; |
-
diff --git a/src/add-ons/mail_daemon/inbound_filters/notifier/filter.cpp b/src/add-ons/mail_daemon/inbound_filters/notifier/filter.cpp
index 4e33116..9f83e6d 100644
a
|
b
|
NotifyFilter::MailboxSynced(status_t status)
|
79 | 79 | |
80 | 80 | BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(), |
81 | 81 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL); |
| 82 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
82 | 83 | alert->SetFeel(B_NORMAL_WINDOW_FEEL); |
83 | 84 | alert->Go(NULL); |
84 | 85 | } |
-
diff --git a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp
index 253134d..2c71d91 100644
a
|
b
|
AGMSBayesianSpamFilterConfig::ShowSpamServerConfigurationWindow () {
|
421 | 421 | return; // Successful. |
422 | 422 | |
423 | 423 | ErrorExit: |
424 | | (new BAlert ("SpamFilterConfig Error", B_TRANSLATE("Sorry, unable to " |
425 | | "launch the spamdbm program to let you edit the server settings."), |
426 | | B_TRANSLATE("Close")))->Go (); |
| 424 | BAlert* alert = new BAlert ("SpamFilterConfig Error", B_TRANSLATE("Sorry, " |
| 425 | "unable to launch the spamdbm program to let you edit the server " |
| 426 | "settings."), B_TRANSLATE("Close")); |
| 427 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 428 | alert->Go (); |
427 | 429 | return; |
428 | 430 | } |
429 | 431 | |
-
diff --git a/src/add-ons/print/drivers/canon_lips/lips3/Lips3.cpp b/src/add-ons/print/drivers/canon_lips/lips3/Lips3.cpp
index 5195c53..cf73c7b 100644
a
|
b
|
LIPS3Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
190 | 190 | } else if (compressedSize > out_size) { |
191 | 191 | BAlert* alert = new BAlert("memory overrun!!!", "warning", |
192 | 192 | "OK"); |
| 193 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
193 | 194 | alert->Go(); |
194 | 195 | return false; |
195 | 196 | } else { |
… |
… |
LIPS3Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
224 | 225 | } |
225 | 226 | catch (TransportException& err) { |
226 | 227 | BAlert* alert = new BAlert("", err.What(), "OK"); |
| 228 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
227 | 229 | alert->Go(); |
228 | 230 | return false; |
229 | 231 | } |
-
diff --git a/src/add-ons/print/drivers/canon_lips/lips4/Lips4.cpp b/src/add-ons/print/drivers/canon_lips/lips4/Lips4.cpp
index faa1d54..5fe36c7 100644
a
|
b
|
LIPS4Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
200 | 200 | buffer = out_buffer; |
201 | 201 | } else if (compressed_size > out_size) { |
202 | 202 | BAlert* alert = new BAlert("memory overrun!!!", "warning", "OK"); |
| 203 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
203 | 204 | alert->Go(); |
204 | 205 | return false; |
205 | 206 | } else { |
… |
… |
LIPS4Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
234 | 235 | } |
235 | 236 | catch (TransportException& err) { |
236 | 237 | BAlert* alert = new BAlert("", err.What(), "OK"); |
| 238 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
237 | 239 | alert->Go(); |
238 | 240 | return false; |
239 | 241 | } |
-
diff --git a/src/add-ons/print/drivers/gutenprint/GPDriver.cpp b/src/add-ons/print/drivers/gutenprint/GPDriver.cpp
index 434467a..a89f89e 100644
a
|
b
|
GPDriver::ShowError(const char* message)
|
308 | 308 | text << "\n"; |
309 | 309 | text << message; |
310 | 310 | BAlert* alert = new BAlert("", text.String(), "OK"); |
| 311 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
311 | 312 | alert->Go(); |
312 | 313 | } |
-
diff --git a/src/add-ons/print/drivers/pcl5/PCL5.cpp b/src/add-ons/print/drivers/pcl5/PCL5.cpp
index e009476..7bcd14c 100644
a
|
b
|
PCL5Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
213 | 213 | } |
214 | 214 | catch (TransportException& err) { |
215 | 215 | BAlert* alert = new BAlert("", err.What(), "OK"); |
| 216 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
216 | 217 | alert->Go(); |
217 | 218 | return false; |
218 | 219 | } |
-
diff --git a/src/add-ons/print/drivers/pcl6/PCL6.cpp b/src/add-ons/print/drivers/pcl6/PCL6.cpp
index ec951ec..b1727a5 100644
a
|
b
|
PCL6Driver::NextBand(BBitmap* bitmap, BPoint* offset)
|
176 | 176 | } |
177 | 177 | catch (TransportException& err) { |
178 | 178 | BAlert* alert = new BAlert("", err.What(), "OK"); |
| 179 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
179 | 180 | alert->Go(); |
180 | 181 | return false; |
181 | 182 | } |
-
diff --git a/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp b/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp
index 2e9e69a..b45055b 100644
a
|
b
|
status_t MessagePrinter::Print(BMessage* msg)
|
53 | 53 | // open a file to print message on the desktop |
54 | 54 | status = find_directory(B_DESKTOP_DIRECTORY, &settingsPath); |
55 | 55 | if (status != B_OK) { |
56 | | (new BAlert("","find directory error", "Doh!"))->Go(); |
| 56 | BAlert* alert = new BAlert("","Find directory error", "Doh!"); |
| 57 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 58 | alert->Go(); |
57 | 59 | return status; |
58 | 60 | } |
59 | 61 | |
60 | 62 | settingsPath.Append(msgFileName); |
61 | 63 | status = file.SetTo(settingsPath.Path(), B_WRITE_ONLY | B_CREATE_FILE); |
62 | 64 | if (status != B_OK) { |
63 | | (new BAlert("","file write error", "Doh!"))->Go(); |
| 65 | BAlert* alert = new BAlert("","File write error", "Doh!"); |
| 66 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 67 | alert->Go(); |
64 | 68 | return status; |
65 | 69 | } |
66 | 70 | |
… |
… |
status_t MessagePrinter::Print(BMessage* msg)
|
73 | 77 | // count |
74 | 78 | out << i; |
75 | 79 | if (file.Write(out.String(), out.Length()) < 0) { |
76 | | (new BAlert("","count write error", "Doh!"))->Go(); |
| 80 | BAlert* alert = new BAlert("","Count write error", "Doh!"); |
| 81 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 82 | alert->Go(); |
77 | 83 | return B_ERROR; |
78 | 84 | } |
79 | 85 | // name |
80 | 86 | out = " "; |
81 | 87 | out << name; |
82 | 88 | if (file.Write(out.String(), out.Length()) < 0) { |
83 | | (new BAlert("","name write error", "Doh!"))->Go(); |
| 89 | BAlert* alert = new BAlert("","Name write error", "Doh!"); |
| 90 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 91 | alert->Go(); |
84 | 92 | return B_ERROR; |
85 | 93 | } |
86 | 94 | |
… |
… |
status_t MessagePrinter::Print(BMessage* msg)
|
164 | 172 | break; |
165 | 173 | } |
166 | 174 | if (file.Write(out.String(), out.Length()) < 0) { |
167 | | (new BAlert("","value write error", "Doh!"))->Go(); |
| 175 | BAlert* alert = new BAlert("","Value write error", "Doh!"); |
| 176 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 177 | alert->Go(); |
168 | 178 | return B_ERROR; |
169 | 179 | } |
170 | 180 | } |
-
diff --git a/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp b/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp
index d00d207..ee7c476 100644
a
|
b
|
PrinterDriver::PrintPage(int32 pageNumber, int32 pageCount)
|
203 | 203 | |
204 | 204 | sprintf(text, "Faking print of page %ld/%ld...", pageNumber, pageCount); |
205 | 205 | BAlert *alert = new BAlert("PrinterDriver::PrintPage()", text, "Hmm?"); |
| 206 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
206 | 207 | alert->Go(); |
207 | 208 | return B_OK; |
208 | 209 | } |
-
diff --git a/src/add-ons/print/drivers/postscript/PS.cpp b/src/add-ons/print/drivers/postscript/PS.cpp
index fd518e7..f6ac112 100644
a
|
b
|
PSDriver::NextBand(BBitmap* bitmap, BPoint* offset)
|
336 | 336 | } |
337 | 337 | catch (TransportException& err) { |
338 | 338 | BAlert* alert = new BAlert("", err.What(), "OK"); |
| 339 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
339 | 340 | alert->Go(); |
340 | 341 | return false; |
341 | 342 | } |
-
diff --git a/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp b/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp
index 42b4a35..e15cedd 100644
a
|
b
|
HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
|
55 | 55 | fEndpoint = new BNetEndpoint(SOCK_STREAM); |
56 | 56 | if ((fReady = fEndpoint->InitCheck()) != B_OK) { |
57 | 57 | BAlert *alert = new BAlert("", "Fail to create the NetEndpoint!", "OK"); |
| 58 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
58 | 59 | alert->Go(); |
59 | 60 | return; |
60 | 61 | } |
… |
… |
HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
|
66 | 67 | } else { |
67 | 68 | BAlert *alert = new BAlert("", |
68 | 69 | "Can't connect to HP JetDirect printer port!", "OK"); |
| 70 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
69 | 71 | alert->Go(); |
70 | 72 | fReady = B_ERROR; |
71 | 73 | } |
-
diff --git a/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp b/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp
index 099f37d..5f7bfda 100644
a
|
b
|
SetupView::CheckSetup()
|
135 | 135 | |
136 | 136 | if (ep->Connect(fServerAddress->Text(), port) != B_OK) { |
137 | 137 | BString text; |
138 | | text << "Fail to connect to " << fServerAddress->Text() << ":" << (int) port << "!"; |
| 138 | text << "Failed to connect to " << fServerAddress->Text() << ":" << (int) port << "!"; |
139 | 139 | BAlert* alert = new BAlert("", text.String(), "OK"); |
| 140 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
140 | 141 | alert->Go(); |
141 | 142 | return false; |
142 | 143 | }; |
… |
… |
SetupView::CheckSetup()
|
149 | 150 | }; |
150 | 151 | }; |
151 | 152 | |
152 | | BAlert* alert = new BAlert("", "please input parameters.", "OK"); |
| 153 | BAlert* alert = new BAlert("", "Please input parameters.", "OK"); |
| 154 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
153 | 155 | alert->Go(); |
154 | 156 | return false; |
155 | 157 | } |
-
diff --git a/src/add-ons/print/transports/ipp/IppSetupDlg.cpp b/src/add-ons/print/transports/ipp/IppSetupDlg.cpp
index ad2cfd5..152ae32 100644
a
|
b
|
bool IppSetupView::UpdateViewData()
|
141 | 141 | } |
142 | 142 | |
143 | 143 | BAlert *alert = new BAlert("", error_msg.c_str(), "OK"); |
| 144 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
144 | 145 | alert->Go(); |
145 | 146 | return false; |
146 | 147 | } |
-
diff --git a/src/add-ons/print/transports/ipp/IppTransport.cpp b/src/add-ons/print/transports/ipp/IppTransport.cpp
index 1c4f6a9..0c35895 100644
a
|
b
|
IppTransport::~IppTransport()
|
129 | 129 | |
130 | 130 | if (__error) { |
131 | 131 | BAlert *alert = new BAlert("", error_msg.c_str(), "OK"); |
| 132 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
132 | 133 | alert->Go(); |
133 | 134 | } |
134 | 135 | } |
-
diff --git a/src/add-ons/print/transports/lpr/LprSetupDlg.cpp b/src/add-ons/print/transports/lpr/LprSetupDlg.cpp
index 5d82f58..040066d 100644
a
|
b
|
LprSetupView::UpdateViewData()
|
142 | 142 | |
143 | 143 | catch (LPSException &err) { |
144 | 144 | BAlert *alert = new BAlert("", err.what(), "OK"); |
| 145 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
145 | 146 | alert->Go(); |
146 | 147 | return false; |
147 | 148 | } |
… |
… |
LprSetupView::UpdateViewData()
|
155 | 156 | |
156 | 157 | BAlert *alert = new BAlert("", "Please enter server address and printer" |
157 | 158 | "queue name.", "OK"); |
| 159 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
158 | 160 | alert->Go(); |
159 | 161 | return false; |
160 | 162 | } |
-
diff --git a/src/add-ons/print/transports/lpr/LprTransport.cpp b/src/add-ons/print/transports/lpr/LprTransport.cpp
index 7f0b89a..a70cf73 100644
a
|
b
|
LprTransport::_SendFile()
|
129 | 129 | catch (LPSException &err) { |
130 | 130 | DBGMSG(("error: %s\n", err.what())); |
131 | 131 | BAlert *alert = new BAlert("", err.what(), "OK"); |
| 132 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
132 | 133 | alert->Go(); |
133 | 134 | } |
134 | 135 | } |
-
diff --git a/src/add-ons/tracker/iconvader/IconVader.cpp b/src/add-ons/tracker/iconvader/IconVader.cpp
index 42226a9..18d2b39 100644
a
|
b
|
static void Error(BView *view, status_t status, bool unlock=false)
|
18 | 18 | view->UnlockLooper(); |
19 | 19 | BString s(strerror(status)); |
20 | 20 | alert = new BAlert("Error", s.String(), "OK"); |
| 21 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
21 | 22 | alert->Go(); |
22 | 23 | } |
23 | 24 | |
… |
… |
process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/)
|
80 | 81 | |
81 | 82 | |
82 | 83 | |
83 | | alert = new BAlert("Error", "IconVader:\nClick on the icons to get points.\nAvoid symlinks!", "OK"); |
| 84 | alert = new BAlert("Error", "IconVader:\nClick on the icons to get points." |
| 85 | "\nAvoid symlinks!", "OK"); |
| 86 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
84 | 87 | alert->Go(); |
85 | 88 | |
86 | 89 | |
… |
… |
process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/)
|
133 | 136 | BString scoreStr("You scored "); |
134 | 137 | scoreStr << score << " points!"; |
135 | 138 | alert = new BAlert("Error", scoreStr.String(), "Cool!"); |
| 139 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
136 | 140 | alert->Go(); |
137 | 141 | |
138 | 142 | |
-
diff --git a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp
index 9e65ae3..29a1ef1 100644
a
|
b
|
process_refs(entry_ref directoryRef, BMessage *msg, void *)
|
38 | 38 | if (link.MakeLinkedPath(&directory, &path) < B_OK |
39 | 39 | || targetEntry.SetTo(path.Path()) != B_OK |
40 | 40 | || targetEntry.GetParent(&targetEntry) != B_OK) { |
41 | | (new BAlert("Open Target Folder", |
| 41 | BAlert* alert = new BAlert("Open Target Folder", |
42 | 42 | "Cannot open target folder. Maybe this link is broken?", |
43 | | "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); |
| 43 | "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 44 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 45 | alert->Go(NULL); |
44 | 46 | continue; |
45 | 47 | } |
46 | 48 | |
… |
… |
process_refs(entry_ref directoryRef, BMessage *msg, void *)
|
59 | 61 | } |
60 | 62 | |
61 | 63 | if (errors) { |
62 | | (new BAlert("Open Target Folder", |
| 64 | BAlert* alert = new BAlert("Open Target Folder", |
63 | 65 | "This add-on can only be used on symbolic links.\n" |
64 | 66 | "It opens the folder of the link target in Tracker.", |
65 | | "OK"))->Go(NULL); |
| 67 | "OK"); |
| 68 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 69 | alert->Go(NULL); |
66 | 70 | } |
67 | 71 | } |
68 | 72 | |
-
diff --git a/src/add-ons/translators/ppm/PPMMain.cpp b/src/add-ons/translators/ppm/PPMMain.cpp
index 6b4da65..f0164e1 100644
a
|
b
|
main()
|
51 | 51 | BAlert * err = new BAlert("Error", |
52 | 52 | B_TRANSLATE("Something is wrong with the PPMTranslator!"), |
53 | 53 | B_TRANSLATE("OK")); |
| 54 | err->SetFlags(B_CLOSE_ON_ESCAPE); |
54 | 55 | err->Go(); |
55 | 56 | return 1; |
56 | 57 | } |
-
diff --git a/src/add-ons/translators/shared/TranslatorWindow.cpp b/src/add-ons/translators/shared/TranslatorWindow.cpp
index 8e075d4..b97fac1 100644
a
|
b
|
LaunchTranslatorWindow(BTranslator *translator, const char *title, BRect rect)
|
88 | 88 | if (translator->MakeConfigurationView(NULL, &view, &rect)) { |
89 | 89 | BAlert *err = new BAlert(B_TRANSLATE("Error"), |
90 | 90 | B_TRANSLATE("Unable to create the view."), B_TRANSLATE("OK")); |
| 91 | err->SetFlags(B_CLOSE_ON_ESCAPE); |
91 | 92 | err->Go(); |
92 | 93 | return B_ERROR; |
93 | 94 | } |
-
diff --git a/src/apps/autoraise/AutoRaiseApp.cpp b/src/apps/autoraise/AutoRaiseApp.cpp
index 8bcd92e..b2a0f7e 100644
a
|
b
|
void AutoRaiseApp::ReadyToRun()
|
70 | 70 | BAlert *alert = new BAlert("usage box", APP_NAME ", (c) 2002, mmu_man\nUsage: " APP_NAME " [options]\n\t--deskbar\twill not open window, will just put " APP_NAME " into tray\n\t--persist will put "APP_NAME" into tray such that it remains between bootings\n", "OK", NULL, NULL, |
71 | 71 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); |
72 | 72 | alert->SetShortcut(0, B_ENTER); |
| 73 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
73 | 74 | alert->Go(); |
74 | 75 | be_app_messenger.SendMessage(B_QUIT_REQUESTED); |
75 | 76 | } |
-
diff --git a/src/apps/autoraise/AutoRaiseIcon.cpp b/src/apps/autoraise/AutoRaiseIcon.cpp
index 2755a0d..72413d9 100644
a
|
b
|
void TrayView::MessageReceived(BMessage* message)
|
542 | 542 | alert = new BAlert("about box", "AutoRaise, (c) 2002, mmu_man\nEnjoy :-)", "OK", NULL, NULL, |
543 | 543 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); |
544 | 544 | alert->SetShortcut(0, B_ENTER); |
| 545 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
545 | 546 | alert->Go(NULL); // use asynchronous version |
546 | 547 | break; |
547 | 548 | case OPEN_SETTINGS: |
-
diff --git a/src/apps/bootmanager/BootManagerController.cpp b/src/apps/bootmanager/BootManagerController.cpp
index f8b1bdb..1f7f16d 100644
a
|
b
|
BootManagerController::_HasSelectedPartitions()
|
177 | 177 | BAlert* alert = new BAlert("info", |
178 | 178 | B_TRANSLATE("At least one partition must be selected!"), |
179 | 179 | B_TRANSLATE_COMMENT("OK", "Button")); |
| 180 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
180 | 181 | alert->Go(); |
181 | 182 | |
182 | 183 | return false; |
-
diff --git a/src/apps/bsnow/SnowView.cpp b/src/apps/bsnow/SnowView.cpp
index 8625d15..a203ded 100644
a
|
b
|
void SnowView::MessageReceived(BMessage *msg)
|
214 | 214 | "Where is Santa ??"); |
215 | 215 | info->SetFeel(B_NORMAL_WINDOW_FEEL); |
216 | 216 | info->SetLook(B_FLOATING_WINDOW_LOOK); |
217 | | info->SetFlags(info->Flags()|B_NOT_ZOOMABLE); |
| 217 | info->SetFlags(info->Flags()|B_NOT_ZOOMABLE|B_CLOSE_ON_ESCAPE); |
218 | 218 | info->Go(NULL); |
219 | 219 | break; |
220 | 220 | default: |
-
diff --git a/src/apps/cdplayer/CDDBSupport.cpp b/src/apps/cdplayer/CDDBSupport.cpp
index e595223..052b2be 100644
a
|
b
|
CDDBQuery::_ParseData(const BString &data)
|
1121 | 1121 | |
1122 | 1122 | // TODO: finish, once I find an entry which actually has a year in it |
1123 | 1123 | BAlert *alert = new BAlert("SimplyVorbis", "DYEAR entry found\n", "OK"); |
| 1124 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1124 | 1125 | alert->Go(); |
1125 | 1126 | |
1126 | 1127 | } |
-
diff --git a/src/apps/cdplayer/CDPlayer.cpp b/src/apps/cdplayer/CDPlayer.cpp
index 5117b1f..2e4626c 100644
a
|
b
|
CDPlayer::CDPlayer(BRect frame, const char *name, uint32 resizeMask,
|
88 | 88 | "It appears that there are no CD" |
89 | 89 | " drives on your computer or there is no system software to " |
90 | 90 | "support one. Sorry."), B_TRANSLATE("OK")); |
| 91 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
91 | 92 | alert->Go(); |
92 | 93 | } |
93 | 94 | |
-
diff --git a/src/apps/clock/cl_view.cpp b/src/apps/clock/cl_view.cpp
index ea702a1..ae05b71 100644
a
|
b
|
TOnscreenView::MessageReceived(BMessage *msg)
|
361 | 361 | "Clock (The Replicant version)\n\n(C)2002, 2003 OpenBeOS,\n" |
362 | 362 | "2004 - 2007, Haiku, Inc.\n\nOriginally coded by the folks " |
363 | 363 | "at Be.\n Copyright Be Inc., 1991 - 1998", "OK"); |
364 | | |
| 364 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
365 | 365 | alert->Go(); |
366 | 366 | } break; |
367 | 367 | |
-
diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp
index a00dfd8..dcfe687 100644
a
|
b
|
ErrorAlert(const char* message, status_t err, BWindow *window = NULL)
|
62 | 62 | B_TRANSLATE("OK")); |
63 | 63 | if (window != NULL) |
64 | 64 | alert->CenterIn(window->Frame()); |
| 65 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
65 | 66 | alert->Go(); |
66 | 67 | |
67 | 68 | printf("%s\n%s [%lx]", message, strerror(err), err); |
-
diff --git a/src/apps/cortex/AddOnHost/AddOnHostApp.cpp b/src/apps/cortex/AddOnHost/AddOnHostApp.cpp
index 5d3251b..e481c4a 100644
a
|
b
|
main(int argc, char** argv)
|
170 | 170 | { |
171 | 171 | App app; |
172 | 172 | if (argc < 2 || strcmp(argv[1], "--addon-host") != 0) { |
173 | | int32 response = (new BAlert( |
174 | | "Cortex AddOnHost", |
| 173 | BAlert* alert = new BAlert("Cortex AddOnHost", |
175 | 174 | "This program runs in the background, and is started automatically " |
176 | 175 | "by Cortex when necessary. You probably don't want to start it manually.", |
177 | | "Continue", "Quit"))->Go(); |
| 176 | "Continue", "Quit"); |
| 177 | alert->SetShortcut(1, B_ESCAPE); |
| 178 | int32 response = alert->Go(); |
| 179 | |
178 | 180 | if(response == 1) |
179 | 181 | return 0; |
180 | 182 | } |
-
diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
index 3e4b2ca..0c5adbd 100644
a
|
b
|
void MediaRoutingView::showErrorMessage(
|
988 | 988 | || (messenger.SendMessage(&message) != B_OK)) { |
989 | 989 | BAlert *alert = new BAlert("Error", text.String(), "OK", 0, 0, |
990 | 990 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 991 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
991 | 992 | alert->Go(); |
992 | 993 | } |
993 | 994 | } |
-
diff --git a/src/apps/cortex/ParameterView/ParameterWindow.cpp b/src/apps/cortex/ParameterView/ParameterWindow.cpp
index 3f82c1c..c09dded 100644
a
|
b
|
void ParameterWindow::MessageReceived(
|
162 | 162 | s << " (" << strerror(error) << ")"; |
163 | 163 | BAlert *alert = new BAlert("", s.String(), "OK", 0, 0, |
164 | 164 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 165 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
165 | 166 | alert->Go(0); |
166 | 167 | } |
167 | 168 | bool replace = false; |
-
diff --git a/src/apps/cortex/RouteApp/RouteWindow.cpp b/src/apps/cortex/RouteApp/RouteWindow.cpp
index eb6c164..fb697f1 100644
a
|
b
|
RouteWindow::MessageReceived(BMessage* pMsg)
|
372 | 372 | // |
373 | 373 | switch (pMsg->what) { |
374 | 374 | case B_ABOUT_REQUESTED: |
375 | | (new BAlert("About", g_aboutText, "OK"))->Go(); |
| 375 | { |
| 376 | BAlert* alert = new BAlert("About", g_aboutText, "OK"); |
| 377 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 378 | alert->Go(); |
376 | 379 | break; |
377 | | |
| 380 | } |
378 | 381 | case MediaRoutingView::M_GROUP_SELECTED: |
379 | 382 | _handleGroupSelected(pMsg); |
380 | 383 | break; |
-
diff --git a/src/apps/cortex/addons/common/MediaNodeControlApp.cpp b/src/apps/cortex/addons/common/MediaNodeControlApp.cpp
index d90db03..42e3a6c 100644
a
|
b
|
MediaNodeControlApp::MediaNodeControlApp(
|
84 | 84 | sprintf(buffer, |
85 | 85 | "MediaNodeControlApp: couldn't find node (%ld):\n%s\n", |
86 | 86 | nodeID, strerror(err)); |
87 | | (new BAlert("error", buffer, "OK"))->Go(); |
| 87 | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 88 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 89 | alert->Go(); |
88 | 90 | return; |
89 | 91 | } |
90 | 92 | |
… |
… |
MediaNodeControlApp::MediaNodeControlApp(
|
96 | 98 | sprintf(buffer, |
97 | 99 | "MediaNodeControlApp: couldn't get node info (%ld):\n%s\n", |
98 | 100 | nodeID, strerror(err)); |
99 | | (new BAlert("error", buffer, "OK"))->Go(); |
| 101 | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 102 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 103 | alert->Go(); |
100 | 104 | return; |
101 | 105 | } |
102 | 106 | |
… |
… |
MediaNodeControlApp::MediaNodeControlApp(
|
111 | 115 | sprintf(buffer, |
112 | 116 | "MediaNodeControlApp: no parameters for node (%ld):\n%s\n", |
113 | 117 | nodeID, strerror(err)); |
114 | | (new BAlert("error", buffer, "OK"))->Go(); |
| 118 | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 119 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 120 | alert->Go(); |
115 | 121 | return; |
116 | 122 | } |
117 | 123 | |
-
diff --git a/src/apps/diskprobe/AttributeWindow.cpp b/src/apps/diskprobe/AttributeWindow.cpp
index 595d6ca..04d844f 100644
a
|
b
|
AttributeWindow::MessageReceived(BMessage *message)
|
278 | 278 | case kMsgRemoveAttribute: |
279 | 279 | { |
280 | 280 | char buffer[1024]; |
| 281 | |
281 | 282 | snprintf(buffer, sizeof(buffer), |
282 | 283 | B_TRANSLATE("Do you really want to remove the attribute \"%s\" from " |
283 | 284 | "the file \"%s\"?\n\nYou cannot undo this action."), |
284 | 285 | fAttribute, Ref().name); |
285 | 286 | |
286 | | int32 chosen = (new BAlert(B_TRANSLATE("DiskProbe request"), |
| 287 | BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), |
287 | 288 | buffer, B_TRANSLATE("Cancel"), B_TRANSLATE("Remove"), NULL, |
288 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 289 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 290 | alert->SetShortcut(0, B_ESCAPE); |
| 291 | int32 chosen = alert->Go(); |
| 292 | |
289 | 293 | if (chosen == 1) { |
290 | 294 | BNode node(&Ref()); |
291 | 295 | if (node.InitCheck() == B_OK) |
-
diff --git a/src/apps/diskprobe/DiskProbe.cpp b/src/apps/diskprobe/DiskProbe.cpp
index 600a8b9..aa06202 100644
a
|
b
|
DiskProbe::RefsReceived(BMessage *message)
|
367 | 367 | "error message is shown."), |
368 | 368 | ref.name, strerror(status)); |
369 | 369 | |
370 | | (new BAlert(B_TRANSLATE("DiskProbe request"), |
| 370 | BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), |
371 | 371 | buffer, B_TRANSLATE("OK"), NULL, NULL, |
372 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 372 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 373 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 374 | alert->Go(); |
373 | 375 | } |
374 | 376 | } |
375 | 377 | } |
-
diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp
index 2fcaea4..c03af32 100644
a
|
b
|
EditorLooper::Find(off_t startAt, const uint8 *data, size_t dataSize,
|
1105 | 1105 | if (system_time() > startTime + 8000000LL) { |
1106 | 1106 | // If the user had to wait more than 8 seconds for the result, |
1107 | 1107 | // we are trying to please him with a requester... |
1108 | | (new BAlert(B_TRANSLATE("DiskProbe request"), |
| 1108 | BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), |
1109 | 1109 | B_TRANSLATE("Could not find search string."), |
1110 | 1110 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
1111 | | B_WARNING_ALERT))->Go(NULL); |
| 1111 | B_WARNING_ALERT); |
| 1112 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1113 | alert->Go(NULL); |
1112 | 1114 | } else |
1113 | 1115 | beep(); |
1114 | 1116 | } |
… |
… |
ProbeView::_Save()
|
1867 | 1869 | "All changes will be lost when you quit."), |
1868 | 1870 | strerror(status)); |
1869 | 1871 | |
1870 | | (new BAlert(B_TRANSLATE("DiskProbe request"), |
| 1872 | BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), |
1871 | 1873 | buffer, B_TRANSLATE("OK"), NULL, NULL, |
1872 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); |
| 1874 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1875 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1876 | alert->Go(NULL); |
1873 | 1877 | |
1874 | 1878 | return status; |
1875 | 1879 | } |
… |
… |
ProbeView::QuitRequested()
|
1883 | 1887 | if (!fEditor.IsModified()) |
1884 | 1888 | return true; |
1885 | 1889 | |
1886 | | int32 chosen = (new BAlert(B_TRANSLATE("DiskProbe request"), |
1887 | | B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), |
1888 | | B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 1890 | BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), |
| 1891 | B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Don't save"), |
| 1892 | B_TRANSLATE("Cancel"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, |
| 1893 | B_WARNING_ALERT); |
| 1894 | alert->SetShortcut(1, B_ESCAPE); |
| 1895 | int32 chosen = alert->Go(); |
1889 | 1896 | |
1890 | 1897 | if (chosen == 0) |
1891 | 1898 | return true; |
-
diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp
index dd50a58..9d41226 100644
a
|
b
|
MainWindow::_DisplayPartitionError(BString _message,
|
657 | 657 | |
658 | 658 | BAlert* alert = new BAlert("error", message, B_TRANSLATE("OK"), NULL, NULL, |
659 | 659 | B_WIDTH_FROM_WIDEST, error < B_OK ? B_STOP_ALERT : B_INFO_ALERT); |
| 660 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
660 | 661 | alert->Go(NULL); |
661 | 662 | } |
662 | 663 | |
… |
… |
MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
820 | 821 | BAlert* alert = new BAlert("first notice", message, |
821 | 822 | B_TRANSLATE("Continue"), B_TRANSLATE("Cancel"), NULL, |
822 | 823 | B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); |
| 824 | alert->SetShortcut(1, B_ESCAPE); |
823 | 825 | int32 choice = alert->Go(); |
824 | 826 | |
825 | 827 | if (choice == 1) |
… |
… |
MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
917 | 919 | alert = new BAlert("final notice", message, |
918 | 920 | B_TRANSLATE("Write changes"), B_TRANSLATE("Cancel"), NULL, |
919 | 921 | B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); |
| 922 | alert->SetShortcut(1, B_ESCAPE); |
920 | 923 | choice = alert->Go(); |
921 | 924 | |
922 | 925 | if (choice == 1) |
… |
… |
MainWindow::_Create(BDiskDevice* disk, partition_id selectedPartition)
|
1024 | 1027 | "All data on the partition will be irretrievably lost if you do " |
1025 | 1028 | "so!"), B_TRANSLATE("Write changes"), B_TRANSLATE("Cancel"), NULL, |
1026 | 1029 | B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); |
| 1030 | alert->SetShortcut(1, B_ESCAPE); |
1027 | 1031 | int32 choice = alert->Go(); |
1028 | 1032 | |
1029 | 1033 | if (choice == 1) |
… |
… |
MainWindow::_Delete(BDiskDevice* disk, partition_id selectedPartition)
|
1103 | 1107 | "All data on the partition will be irretrievably lost if you " |
1104 | 1108 | "do so!"), B_TRANSLATE("Delete partition"), B_TRANSLATE("Cancel"), NULL, |
1105 | 1109 | B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); |
| 1110 | alert->SetShortcut(1, B_ESCAPE); |
1106 | 1111 | int32 choice = alert->Go(); |
1107 | 1112 | |
1108 | 1113 | if (choice == 1) |
-
diff --git a/src/apps/expander/ExpanderWindow.cpp b/src/apps/expander/ExpanderWindow.cpp
index 7355ce5..199f651 100644
a
|
b
|
ExpanderWindow::ValidateDest()
|
153 | 153 | B_TRANSLATE("The destination folder does not exist."), |
154 | 154 | B_TRANSLATE("Cancel"), NULL, NULL, |
155 | 155 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 156 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
156 | 157 | alert->Go(); |
157 | 158 | return false; |
158 | 159 | } else if (!entry.IsDirectory()) { |
159 | | (new BAlert("destAlert", |
| 160 | BAlert* alert = new BAlert("destAlert", |
160 | 161 | B_TRANSLATE("The destination is not a folder."), |
161 | 162 | B_TRANSLATE("Cancel"), NULL, NULL, |
162 | | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go(); |
| 163 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 164 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 165 | alert->Go(); |
163 | 166 | return false; |
164 | 167 | } else if (entry.GetVolume(&volume) != B_OK || volume.IsReadOnly()) { |
165 | | (new BAlert("destAlert", |
| 168 | BAlert* alert = new BAlert("destAlert", |
166 | 169 | B_TRANSLATE("The destination is read only."), |
167 | 170 | B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
168 | | B_EVEN_SPACING, B_WARNING_ALERT))->Go(); |
| 171 | B_EVEN_SPACING, B_WARNING_ALERT); |
| 172 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 173 | alert->Go(); |
169 | 174 | return false; |
170 | 175 | } else { |
171 | 176 | entry.GetRef(&fDestRef); |
… |
… |
ExpanderWindow::MessageReceived(BMessage* msg)
|
246 | 251 | "archive? The expanded items may not be complete."), |
247 | 252 | B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, |
248 | 253 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 254 | alert->SetShortcut(0, B_ESCAPE); |
249 | 255 | if (alert->Go() == 0) { |
250 | 256 | fExpandingThread->ResumeExternalExpander(); |
251 | 257 | StopExpanding(); |
… |
… |
ExpanderWindow::MessageReceived(BMessage* msg)
|
280 | 286 | B_TRANSLATE("The file doesn't exist"), |
281 | 287 | B_TRANSLATE("Cancel"), NULL, NULL, |
282 | 288 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 289 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
283 | 290 | alert->Go(); |
284 | 291 | break; |
285 | 292 | } |
… |
… |
ExpanderWindow::MessageReceived(BMessage* msg)
|
303 | 310 | BAlert* alert = new BAlert("srcAlert", string.String(), |
304 | 311 | B_TRANSLATE("Cancel"), |
305 | 312 | NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT); |
| 313 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
306 | 314 | alert->Go(); |
307 | 315 | |
308 | 316 | fShowContents->SetEnabled(false); |
… |
… |
ExpanderWindow::MessageReceived(BMessage* msg)
|
369 | 377 | BAlert* alert = new BAlert("stopAlert", string, |
370 | 378 | B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, |
371 | 379 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 380 | alert->SetShortcut(0, B_ESCAPE); |
372 | 381 | if (alert->Go() == 0) { |
373 | 382 | fExpandingThread->ResumeExternalExpander(); |
374 | 383 | StopExpanding(); |
… |
… |
ExpanderWindow::CanQuit()
|
422 | 431 | "archive? The expanded items may not be complete."), |
423 | 432 | B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, |
424 | 433 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 434 | alert->SetShortcut(0, B_ESCAPE); |
425 | 435 | if (alert->Go() == 0) { |
426 | 436 | fExpandingThread->ResumeExternalExpander(); |
427 | 437 | StopExpanding(); |
… |
… |
ExpanderWindow::StartExpanding()
|
558 | 568 | B_TRANSLATE("The folder was either moved, renamed or not\nsupported."), |
559 | 569 | B_TRANSLATE("Cancel"), NULL, NULL, |
560 | 570 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 571 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
561 | 572 | alert->Go(); |
562 | 573 | return; |
563 | 574 | } |
-
diff --git a/src/apps/glteapot/ObjectView.cpp b/src/apps/glteapot/ObjectView.cpp
index bf14e13..4059b18 100644
a
|
b
|
ObjectView::ObjectView(BRect rect, const char *name, ulong resizingMode,
|
177 | 177 | BAlert *NoResourceAlert = new BAlert(B_TRANSLATE("Error"), |
178 | 178 | kNoResourceError, B_TRANSLATE("OK"), NULL, NULL, |
179 | 179 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); |
| 180 | NoResourceAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
180 | 181 | NoResourceAlert->Go(); |
181 | 182 | delete Tri; |
182 | 183 | } |
… |
… |
ObjectView::MessageReceived(BMessage* msg)
|
323 | 324 | BAlert *NoResourceAlert = new BAlert(B_TRANSLATE("Error"), |
324 | 325 | kNoResourceError, B_TRANSLATE("OK"), NULL, NULL, |
325 | 326 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); |
| 327 | NoResourceAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
326 | 328 | NoResourceAlert->Go(); |
327 | 329 | delete Tri; |
328 | 330 | } |
-
diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp
index 51692f5..e91e1e5 100644
a
|
b
|
MainWindow::Open(const entry_ref& ref, bool append)
|
718 | 718 | "Cancel button - error alert"), |
719 | 719 | NULL, NULL); |
720 | 720 | // launch alert asynchronously |
| 721 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
721 | 722 | alert->Go(NULL); |
722 | 723 | |
723 | 724 | delete icon; |
… |
… |
MainWindow::Open(const BMessenger& externalObserver, const uint8* data,
|
796 | 797 | "Cancel button - error alert"), |
797 | 798 | NULL, NULL); |
798 | 799 | // launch alert asynchronously |
| 800 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
799 | 801 | alert->Go(NULL); |
800 | 802 | |
801 | 803 | delete icon; |
… |
… |
MainWindow::_CheckSaveIcon(const BMessage* currentMessage)
|
1273 | 1275 | |
1274 | 1276 | BAlert* alert = new BAlert("save", |
1275 | 1277 | B_TRANSLATE("Save changes to current icon?"), B_TRANSLATE("Discard"), |
1276 | | B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); |
| 1278 | B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); |
| 1279 | alert->SetShortcut(0, B_ESCAPE); |
1277 | 1280 | int32 choice = alert->Go(); |
1278 | 1281 | switch (choice) { |
1279 | 1282 | case 0: |
-
diff --git a/src/apps/icon-o-matic/gui/SavePanel.cpp b/src/apps/icon-o-matic/gui/SavePanel.cpp
index a131378..6598e47 100644
a
|
b
|
SavePanel::_ExportSettings()
|
365 | 365 | // status_t err = roster->MakeConfigurationView(item->id, NULL, &view, &rect); |
366 | 366 | // if (err < B_OK || view == NULL) { |
367 | 367 | // BAlert *alert = new BAlert(NULL, strerror(err), "OK"); |
| 368 | // alert->SetFlags(B_CLOSE_ON_ESCAPE); |
368 | 369 | // alert->Go(); |
369 | 370 | // } else { |
370 | 371 | // if (fConfigWindow != NULL) { |
-
diff --git a/src/apps/icon-o-matic/import_export/Exporter.cpp b/src/apps/icon-o-matic/import_export/Exporter.cpp
index 725148b..cc8bb83 100644
a
|
b
|
Exporter::_ExportThread()
|
116 | 116 | "Exporter - Continue in error dialog"), |
117 | 117 | NULL, NULL); |
118 | 118 | // launch alert asynchronously |
| 119 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
119 | 120 | alert->Go(NULL); |
120 | 121 | } else { |
121 | 122 | // success |
-
diff --git a/src/apps/icon-o-matic/import_export/svg/SVGExporter.cpp b/src/apps/icon-o-matic/import_export/svg/SVGExporter.cpp
index 029b6b7..0b57dc7 100644
a
|
b
|
SVGExporter::_DisplayWarning() const
|
164 | 164 | "be lost."), |
165 | 165 | B_TRANSLATE("Cancel"), |
166 | 166 | B_TRANSLATE("Overwrite")); |
| 167 | alert->SetShortcut(0, B_ESCAPE); |
167 | 168 | return alert->Go() == 1; |
168 | 169 | } |
169 | 170 | |
-
diff --git a/src/apps/icon-o-matic/import_export/svg/SVGImporter.cpp b/src/apps/icon-o-matic/import_export/svg/SVGImporter.cpp
index 1faf39b..1ae8338 100644
a
|
b
|
SVGImporter::Import(Icon* icon, const entry_ref* ref)
|
80 | 80 | BAlert* alert = new BAlert(B_TRANSLATE("load error"), |
81 | 81 | error, B_TRANSLATE("OK"), NULL, NULL, |
82 | 82 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 83 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
83 | 84 | alert->Go(NULL); |
84 | 85 | ret = B_ERROR; |
85 | 86 | } |
-
diff --git a/src/apps/installedpackages/UninstallView.cpp b/src/apps/installedpackages/UninstallView.cpp
index 794440b..bd28f25 100644
a
|
b
|
UninstallView::MessageReceived(BMessage* msg)
|
257 | 257 | "been corrupted."), B_TRANSLATE("OK"), NULL, |
258 | 258 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
259 | 259 | } |
260 | | |
| 260 | notify->SetFlags(B_CLOSE_ON_ESCAPE); |
261 | 261 | notify->Go(); |
262 | 262 | } |
263 | 263 | default: |
-
diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp
index 431ea25..728583e 100644
a
|
b
|
InstallerApp::AboutRequested()
|
82 | 82 | BAlert *alert = new BAlert("about", B_TRANSLATE("Installer\n" |
83 | 83 | "\twritten by Jérôme Duval and Stephan Aßmus\n" |
84 | 84 | "\tCopyright 2005-2010, Haiku.\n\n"), B_TRANSLATE("OK")); |
| 85 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
85 | 86 | BTextView *view = alert->TextView(); |
86 | 87 | BFont font; |
87 | 88 | |
-
diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp
index 707e03d..9bdda85 100644
a
|
b
|
InstallerWindow::MessageReceived(BMessage *msg)
|
346 | 346 | B_TRANSLATE("An error was encountered and the " |
347 | 347 | "installation was not completed:\n\n" |
348 | 348 | "Error: %s"), strerror(error)); |
349 | | (new BAlert("error", errorMessage, B_TRANSLATE("OK")))->Go(); |
| 349 | BAlert* alert = new BAlert("error", errorMessage, B_TRANSLATE("OK")); |
| 350 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 351 | alert->Go(); |
350 | 352 | } |
351 | 353 | |
352 | 354 | _DisableInterface(false); |
… |
… |
InstallerWindow::MessageReceived(BMessage *msg)
|
426 | 428 | } |
427 | 429 | case ENCOURAGE_DRIVESETUP: |
428 | 430 | { |
429 | | (new BAlert("use drive setup", B_TRANSLATE("No partitions have " |
| 431 | BAlert* alert = new BAlert("use drive setup", B_TRANSLATE("No partitions have " |
430 | 432 | "been found that are suitable for installation. Please set " |
431 | 433 | "up partitions and initialize at least one partition with the " |
432 | | "Be File System."), B_TRANSLATE("OK")))->Go(); |
| 434 | "Be File System."), B_TRANSLATE("OK")); |
| 435 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 436 | alert->Go(); |
433 | 437 | break; |
434 | 438 | } |
435 | 439 | case MSG_STATUS_MESSAGE: |
… |
… |
InstallerWindow::QuitRequested()
|
575 | 579 | // thing on the screen and we will reboot the machine once it quits. |
576 | 580 | |
577 | 581 | if (fDriveSetupLaunched && fBootManagerLaunched) { |
578 | | (new BAlert(B_TRANSLATE("Quit Boot Manager and DriveSetup"), |
579 | | B_TRANSLATE("Please close the Boot Manager and DriveSetup " |
580 | | "windows before closing the Installer window."), |
581 | | B_TRANSLATE("OK")))->Go(); |
| 582 | BAlert* alert = new BAlert(B_TRANSLATE("Quit Boot Manager and " |
| 583 | "DriveSetup"), B_TRANSLATE("Please close the Boot Manager " |
| 584 | "and DriveSetup windows before closing the Installer window."), |
| 585 | B_TRANSLATE("OK")); |
| 586 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 587 | alert->Go(); |
582 | 588 | return false; |
583 | 589 | } |
584 | 590 | if (fDriveSetupLaunched) { |
585 | | (new BAlert(B_TRANSLATE("Quit DriveSetup"), |
586 | | B_TRANSLATE("Please close the DriveSetup window before closing " |
587 | | "the Installer window."), B_TRANSLATE("OK")))->Go(); |
| 591 | BAlert* alert = new BAlert(B_TRANSLATE("Quit DriveSetup"), |
| 592 | B_TRANSLATE("Please close the DriveSetup window before " |
| 593 | "closing the Installer window."), B_TRANSLATE("OK")); |
| 594 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 595 | alert->Go(); |
588 | 596 | return false; |
589 | 597 | } |
590 | 598 | if (fBootManagerLaunched) { |
591 | | (new BAlert(B_TRANSLATE("Quit Boot Manager"), |
| 599 | BAlert* alert = new BAlert(B_TRANSLATE("Quit Boot Manager"), |
592 | 600 | B_TRANSLATE("Please close the Boot Manager window before " |
593 | | "closing the Installer window."), B_TRANSLATE("OK")))->Go(); |
| 601 | "closing the Installer window."), B_TRANSLATE("OK")); |
| 602 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 603 | alert->Go(); |
594 | 604 | return false; |
595 | 605 | } |
596 | | |
597 | | if (fInstallStatus != kFinished |
598 | | && (new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), |
599 | | B_TRANSLATE("Are you sure you want to abort the " |
600 | | "installation and restart the system?"), |
601 | | B_TRANSLATE("Cancel"), B_TRANSLATE("Restart system"), NULL, |
602 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() == 0) { |
603 | | return false; |
| 606 | if (fInstallStatus != kFinished) { |
| 607 | BAlert* alert = new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), |
| 608 | B_TRANSLATE("Are you sure you want to abort the " |
| 609 | "installation and restart the system?"), |
| 610 | B_TRANSLATE("Cancel"), B_TRANSLATE("Restart system"), NULL, |
| 611 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 612 | alert->SetShortcut(0, B_ESCAPE); |
| 613 | if (alert->Go() == 0) |
| 614 | return false; |
604 | 615 | } |
605 | | } else if (fInstallStatus == kInstalling |
606 | | && (new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), |
607 | | B_TRANSLATE("Are you sure you want to abort the installation?"), |
608 | | B_TRANSLATE("Cancel"), B_TRANSLATE("Abort"), NULL, |
609 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() == 0) { |
610 | | return false; |
| 616 | } else if (fInstallStatus == kInstalling) { |
| 617 | BAlert* alert = new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), |
| 618 | B_TRANSLATE("Are you sure you want to abort the installation?"), |
| 619 | B_TRANSLATE("Cancel"), B_TRANSLATE("Abort"), NULL, |
| 620 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 621 | alert->SetShortcut(0, B_ESCAPE); |
| 622 | if (alert->Go() == 0) |
| 623 | return false; |
611 | 624 | } |
612 | 625 | |
613 | 626 | _QuitCopyEngine(false); |
… |
… |
InstallerWindow::_LaunchDriveSetup()
|
648 | 661 | BAlert* alert = new BAlert("error", B_TRANSLATE("DriveSetup, the " |
649 | 662 | "application to configure disk partitions, could not be " |
650 | 663 | "launched."), B_TRANSLATE("OK")); |
| 664 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
651 | 665 | alert->Go(); |
652 | 666 | } |
653 | 667 | } |
… |
… |
InstallerWindow::_LaunchBootManager()
|
676 | 690 | BAlert* alert = new BAlert("error", B_TRANSLATE("BootManager, the " |
677 | 691 | "application to configure the Haiku boot menu, could not be " |
678 | 692 | "launched."), B_TRANSLATE("OK")); |
| 693 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
679 | 694 | alert->Go(); |
680 | 695 | } |
681 | 696 | } |
… |
… |
InstallerWindow::_QuitCopyEngine(bool askUser)
|
876 | 891 | |
877 | 892 | bool quit = true; |
878 | 893 | if (askUser) { |
879 | | quit = (new BAlert("cancel", |
| 894 | BAlert* alert = new BAlert("cancel", |
880 | 895 | B_TRANSLATE("Are you sure you want to to stop the installation?"), |
881 | 896 | B_TRANSLATE_COMMENT("Continue", "In alert after pressing Stop"), |
882 | 897 | B_TRANSLATE_COMMENT("Stop", "In alert after pressing Stop"), 0, |
883 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0; |
| 898 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 899 | alert->SetShortcut(1, B_ESCAPE); |
| 900 | quit = alert->Go(); |
884 | 901 | } |
885 | 902 | |
886 | 903 | if (quit) { |
-
diff --git a/src/apps/installer/WorkerThread.cpp b/src/apps/installer/WorkerThread.cpp
index 73abd11..fbb4727 100644
a
|
b
|
WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
316 | 316 | goto error; // shouldn't happen |
317 | 317 | |
318 | 318 | // check if target has enough space |
319 | | if ((fSpaceRequired > 0 && targetVolume.FreeBytes() < fSpaceRequired) |
320 | | && ((new BAlert("", B_TRANSLATE("The destination disk may not have " |
321 | | "enough space. Try choosing a different disk or choose to not " |
322 | | "install optional items."), B_TRANSLATE("Try installing anyway"), |
323 | | B_TRANSLATE("Cancel"), 0, |
324 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { |
325 | | goto error; |
| 319 | if (fSpaceRequired > 0 && targetVolume.FreeBytes() < fSpaceRequired) { |
| 320 | BAlert* alert = new BAlert("", B_TRANSLATE("The destination disk may " |
| 321 | "not have enough space. Try choosing a different disk or choose " |
| 322 | "to not install optional items."), |
| 323 | B_TRANSLATE("Try installing anyway"), B_TRANSLATE("Cancel"), 0, |
| 324 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 325 | alert->SetShortcut(1, B_ESCAPE); |
| 326 | if (alert->Go() != 0) |
| 327 | goto error; |
326 | 328 | } |
327 | 329 | |
328 | 330 | if (fDDRoster.GetPartitionWithID(srcItem->ID(), &device, &partition) == B_OK) { |
… |
… |
WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
346 | 348 | } |
347 | 349 | |
348 | 350 | // check not installing on boot volume |
349 | | if ((strncmp(BOOT_PATH, targetDirectory.Path(), strlen(BOOT_PATH)) == 0) |
350 | | && ((new BAlert("", B_TRANSLATE("Are you sure you want to install " |
351 | | "onto the current boot disk? The Installer will have to reboot " |
352 | | "your machine if you proceed."), B_TRANSLATE("OK"), |
353 | | B_TRANSLATE("Cancel"), 0, |
354 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { |
355 | | _SetStatusMessage("Installation stopped."); |
356 | | goto error; |
| 351 | if (strncmp(BOOT_PATH, targetDirectory.Path(), strlen(BOOT_PATH)) == 0) { |
| 352 | BAlert* alert = new BAlert("", B_TRANSLATE("Are you sure you want to " |
| 353 | "install onto the current boot disk? The Installer will have to " |
| 354 | "reboot your machine if you proceed."), B_TRANSLATE("OK"), |
| 355 | B_TRANSLATE("Cancel"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 356 | alert->SetShortcut(1, B_ESCAPE); |
| 357 | if (alert->Go() != 0) { |
| 358 | _SetStatusMessage("Installation stopped."); |
| 359 | goto error; |
| 360 | } |
357 | 361 | } |
358 | 362 | |
359 | 363 | // check if target volume's trash dir has anything in it |
… |
… |
WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
|
376 | 380 | entries++; |
377 | 381 | } |
378 | 382 | |
379 | | if (entries != 0 |
380 | | && ((new BAlert("", B_TRANSLATE("The target volume is not empty. Are " |
381 | | "you sure you want to install anyway?\n\nNote: The 'system' folder " |
382 | | "will be a clean copy from the source volume, all other folders " |
383 | | "will be merged, whereas files and links that exist on both the " |
384 | | "source and target volume will be overwritten with the source " |
385 | | "volume version."), |
| 383 | if (entries != 0) { |
| 384 | BAlert* alert = new BAlert("", B_TRANSLATE("The target volume is not " |
| 385 | "empty. Are you sure you want to install anyway?\n\nNote: The " |
| 386 | "'system' folder will be a clean copy from the source volume, all " |
| 387 | "other folders will be merged, whereas files and links that exist " |
| 388 | "on both the source and target volume will be overwritten with " |
| 389 | "the source volume version."), |
386 | 390 | B_TRANSLATE("Install anyway"), B_TRANSLATE("Cancel"), 0, |
387 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { |
| 391 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 392 | alert->SetShortcut(1, B_ESCAPE); |
| 393 | if (alert->Go() != 0) { |
388 | 394 | // TODO: Would be cool to offer the option here to clean additional |
389 | 395 | // folders at the user's choice (like /boot/common and /boot/develop). |
390 | | err = B_CANCELED; |
391 | | goto error; |
| 396 | err = B_CANCELED; |
| 397 | goto error; |
| 398 | } |
392 | 399 | } |
393 | 400 | |
394 | 401 | // Begin actual installation |
-
diff --git a/src/apps/launchbox/MainWindow.cpp b/src/apps/launchbox/MainWindow.cpp
index 448a99e..b71fdde 100644
a
|
b
|
MainWindow::QuitRequested()
|
98 | 98 | B_TRANSLATE("Really close this pad?\n" |
99 | 99 | "(The pad will not be remembered.)"), |
100 | 100 | B_TRANSLATE("Close"), B_TRANSLATE("Cancel"), NULL); |
| 101 | alert->SetShortcut(1, B_ESCAPE); |
101 | 102 | if (alert->Go() == 1) |
102 | 103 | return false; |
103 | 104 | } |
… |
… |
MainWindow::MessageReceived(BMessage* message)
|
172 | 173 | if (errorMessage.Length() > 0) { |
173 | 174 | BAlert* alert = new BAlert("error", errorMessage.String(), |
174 | 175 | B_TRANSLATE("Bummer"), NULL, NULL, B_WIDTH_FROM_WIDEST); |
| 176 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
175 | 177 | alert->Go(NULL); |
176 | 178 | } |
177 | 179 | break; |
-
diff --git a/src/apps/login/LoginApp.cpp b/src/apps/login/LoginApp.cpp
index a8771b1..6fcb32b 100644
a
|
b
|
LoginApp::ReadyToRun()
|
51 | 51 | BScreen screen; |
52 | 52 | |
53 | 53 | if (fEditShelfMode) { |
54 | | (new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can customize the " |
| 54 | BAlert* alert = new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can customize the " |
55 | 55 | "desktop shown behind the Login application by dropping replicants" |
56 | 56 | " onto it.\n" |
57 | 57 | "\n" |
58 | 58 | "When you are finished just quit the application (Alt-Q)."), |
59 | | B_TRANSLATE("OK")))->Go(NULL); |
| 59 | B_TRANSLATE("OK")); |
| 60 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 61 | alert->Go(NULL); |
60 | 62 | } else { |
61 | 63 | BRect frame(0, 0, 450, 150); |
62 | 64 | frame.OffsetBySelf(screen.Frame().Width()/2 - frame.Width()/2, |
… |
… |
LoginApp::MessageReceived(BMessage *message)
|
94 | 96 | if (error < B_OK) { |
95 | 97 | BString msg(B_TRANSLATE("Error: %1")); |
96 | 98 | msg.ReplaceFirst("%1", strerror(error)); |
97 | | (new BAlert(("Error"), msg.String(), B_TRANSLATE("OK")))->Go(); |
| 99 | BAlert* alert = new BAlert(("Error"), msg.String(), |
| 100 | B_TRANSLATE("OK")); |
| 101 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 102 | alert->Go(); |
98 | 103 | } |
99 | 104 | break; |
100 | 105 | } |
101 | 106 | case kSuspendAction: |
102 | | (new BAlert(B_TRANSLATE("Error"), B_TRANSLATE("Unimplemented"), |
103 | | B_TRANSLATE("OK")))->Go(); |
| 107 | { |
| 108 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), |
| 109 | B_TRANSLATE("Unimplemented"), B_TRANSLATE("OK")); |
| 110 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 111 | alert->Go(); |
104 | 112 | break; |
| 113 | } |
105 | 114 | #endif |
106 | 115 | default: |
107 | 116 | BApplication::MessageReceived(message); |
-
diff --git a/src/apps/mail/Content.cpp b/src/apps/mail/Content.cpp
index e3390d2..b089ca0 100644
a
|
b
|
TContentView::MessageReceived(BMessage *msg)
|
755 | 755 | free (signature); |
756 | 756 | } else { |
757 | 757 | beep(); |
758 | | (new BAlert("", |
| 758 | BAlert* alert = new BAlert("", |
759 | 759 | B_TRANSLATE("An error occurred trying to open this " |
760 | | "signature."), |
761 | | B_TRANSLATE("Sorry")))->Go(); |
| 760 | "signature."), B_TRANSLATE("Sorry")); |
| 761 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 762 | alert->Go(); |
762 | 763 | } |
763 | 764 | break; |
764 | 765 | } |
… |
… |
TTextView::Open(hyper_text *enclosure)
|
1914 | 1915 | status_t result = be_roster->Launch(handlerToLaunch, 1, &enclosure->name); |
1915 | 1916 | if (result != B_NO_ERROR && result != B_ALREADY_RUNNING) { |
1916 | 1917 | beep(); |
1917 | | (new BAlert("", |
| 1918 | BAlert* alert = new BAlert("", |
1918 | 1919 | B_TRANSLATE("There is no installed handler for " |
1919 | | "URL links."), |
1920 | | "Sorry"))->Go(); |
| 1920 | "URL links."), B_TRANSLATE("Sorry")); |
| 1921 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1922 | alert->Go(); |
1921 | 1923 | } |
1922 | 1924 | break; |
1923 | 1925 | } |
… |
… |
TTextView::Save(BMessage *msg, bool makeNewFile)
|
2065 | 2067 | |
2066 | 2068 | if (result != B_NO_ERROR) { |
2067 | 2069 | beep(); |
2068 | | (new BAlert("", B_TRANSLATE("An error occurred trying to save " |
2069 | | "the attachment."), |
2070 | | B_TRANSLATE("Sorry")))->Go(); |
| 2070 | BAlert* alert = new BAlert("", B_TRANSLATE("An error occurred trying to save " |
| 2071 | "the attachment."), B_TRANSLATE("Sorry")); |
| 2072 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2073 | alert->Go(); |
2071 | 2074 | } |
2072 | 2075 | |
2073 | 2076 | return result; |
… |
… |
TTextView::Undo(BClipboard */*clipboard*/)
|
3337 | 3340 | Select(offset, offset + length); |
3338 | 3341 | } else { |
3339 | 3342 | ::beep(); |
3340 | | (new BAlert("", |
| 3343 | BAlert* alert = new BAlert("", |
3341 | 3344 | B_TRANSLATE("Inconsistency occurred in the undo/redo " |
3342 | | "buffer."), |
3343 | | B_TRANSLATE("OK")))->Go(); |
| 3345 | "buffer."), B_TRANSLATE("OK")); |
| 3346 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 3347 | alert->Go(); |
3344 | 3348 | } |
3345 | 3349 | break; |
3346 | 3350 | } |
… |
… |
TTextView::Redo()
|
3384 | 3388 | |
3385 | 3389 | case K_REPLACED: |
3386 | 3390 | ::beep(); |
3387 | | (new BAlert("", |
| 3391 | BAlert* alert = new BAlert("", |
3388 | 3392 | B_TRANSLATE("Inconsistency occurred in the undo/redo " |
3389 | | "buffer."), |
3390 | | B_TRANSLATE("OK")))->Go(); |
| 3393 | "buffer."), B_TRANSLATE("OK")); |
| 3394 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 3395 | alert->Go(); |
3391 | 3396 | break; |
3392 | 3397 | } |
3393 | 3398 | ScrollToSelection(); |
-
diff --git a/src/apps/mail/Enclosures.cpp b/src/apps/mail/Enclosures.cpp
index 469fa1d..372b095 100644
a
|
b
|
TEnclosuresView::MessageReceived(BMessage *msg)
|
249 | 249 | if (window && window->Mail()) |
250 | 250 | window->Mail()->RemoveComponent(item->Component()); |
251 | 251 | |
252 | | (new BAlert("", B_TRANSLATE( |
| 252 | BAlert* alert = new BAlert("", B_TRANSLATE( |
253 | 253 | "Removing attachments from a forwarded mail is not yet " |
254 | 254 | "implemented!\nIt will not yet work correctly."), |
255 | | B_TRANSLATE("OK")))->Go(); |
| 255 | B_TRANSLATE("OK")); |
| 256 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 257 | alert->Go(); |
256 | 258 | } |
257 | 259 | else |
258 | 260 | watch_node(item->NodeRef(), B_STOP_WATCHING, this); |
… |
… |
TEnclosuresView::MessageReceived(BMessage *msg)
|
302 | 304 | if (badType) |
303 | 305 | { |
304 | 306 | beep(); |
305 | | (new BAlert("", |
| 307 | BAlert* alert = new BAlert("", |
306 | 308 | B_TRANSLATE("Only files can be added as attachments."), |
307 | | B_TRANSLATE("OK")))->Go(); |
| 309 | B_TRANSLATE("OK")); |
| 310 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 311 | alert->Go(); |
308 | 312 | } |
309 | 313 | } |
310 | 314 | break; |
-
diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp
index d06867f..2ff0552 100644
a
|
b
|
TMailWindow::MessageReceived(BMessage *msg)
|
1177 | 1177 | msg.AddRef("refs", fRef); |
1178 | 1178 | tracker.SendMessage(&msg); |
1179 | 1179 | } else { |
1180 | | (new BAlert("", |
| 1180 | BAlert* alert = new BAlert("", |
1181 | 1181 | B_TRANSLATE("Need Tracker to move items to trash"), |
1182 | | B_TRANSLATE("Sorry")))->Go(); |
| 1182 | B_TRANSLATE("Sorry")); |
| 1183 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1184 | alert->Go(); |
1183 | 1185 | } |
1184 | 1186 | } |
1185 | 1187 | } else { |
… |
… |
TMailWindow::MessageReceived(BMessage *msg)
|
1344 | 1346 | 1, &arg); |
1345 | 1347 | |
1346 | 1348 | if (result != B_NO_ERROR) { |
1347 | | (new BAlert("", B_TRANSLATE( |
| 1349 | BAlert* alert = new BAlert("", B_TRANSLATE( |
1348 | 1350 | "Sorry, could not find an application that " |
1349 | 1351 | "supports the 'Person' data type."), |
1350 | | B_TRANSLATE("OK")))->Go(); |
| 1352 | B_TRANSLATE("OK")); |
| 1353 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1354 | alert->Go(); |
1351 | 1355 | } |
1352 | | |
1353 | 1356 | } |
1354 | | |
1355 | 1357 | free(arg); |
1356 | 1358 | break; |
1357 | 1359 | } |
… |
… |
TMailWindow::MessageReceived(BMessage *msg)
|
1581 | 1583 | snooze (1500000); |
1582 | 1584 | if (!gDictCount) { |
1583 | 1585 | beep(); |
1584 | | (new BAlert("", |
| 1586 | BAlert* alert = new BAlert("", |
1585 | 1587 | B_TRANSLATE("Mail couldn't find its dictionary."), |
1586 | 1588 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
1587 | | B_OFFSET_SPACING, B_STOP_ALERT))->Go(); |
| 1589 | B_OFFSET_SPACING, B_STOP_ALERT); |
| 1590 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1591 | alert->Go(); |
1588 | 1592 | } else { |
1589 | 1593 | fSpelling->SetMarked(!fSpelling->IsMarked()); |
1590 | 1594 | fContentView->fTextView->EnableSpellCheck( |
… |
… |
TMailWindow::MessageReceived(BMessage *msg)
|
1626 | 1630 | B_TRANSLATE("Put your favorite e-mail queries and query " |
1627 | 1631 | "templates in this folder."), B_TRANSLATE("OK"), NULL, NULL, |
1628 | 1632 | B_WIDTH_AS_USUAL, B_IDEA_ALERT); |
| 1633 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1629 | 1634 | alert->Go(NULL); |
1630 | 1635 | } |
1631 | 1636 | |
… |
… |
TMailWindow::Send(bool now)
|
2225 | 2230 | status_t status = SaveAsDraft(); |
2226 | 2231 | if (status != B_OK) { |
2227 | 2232 | beep(); |
2228 | | (new BAlert("", B_TRANSLATE("E-mail draft could not be saved!"), |
2229 | | B_TRANSLATE("OK")))->Go(); |
| 2233 | BAlert* alert = new BAlert("", B_TRANSLATE("E-mail draft could " |
| 2234 | "not be saved!"), B_TRANSLATE("OK")); |
| 2235 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2236 | alert->Go(); |
2230 | 2237 | } |
2231 | 2238 | return status; |
2232 | 2239 | } |
… |
… |
TMailWindow::Send(bool now)
|
2315 | 2322 | "the unencodable ones), or choose Cancel to go back " |
2316 | 2323 | "and try fixing it up."); |
2317 | 2324 | messageString.ReplaceFirst("%ld", countString); |
2318 | | userAnswer = (new BAlert("Question", messageString.String(), |
| 2325 | BAlert* alert = new BAlert("Question", messageString.String(), |
2319 | 2326 | B_TRANSLATE("Send"), |
2320 | 2327 | B_TRANSLATE("Cancel"), |
2321 | 2328 | NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, |
2322 | | B_WARNING_ALERT))->Go(); |
| 2329 | B_WARNING_ALERT); |
| 2330 | alert->SetShortcut(1, B_ESCAPE); |
| 2331 | userAnswer = alert->Go(); |
| 2332 | |
2323 | 2333 | if (userAnswer == 1) { |
2324 | 2334 | // Cancel was picked. |
2325 | 2335 | return -1; |
… |
… |
TMailWindow::Send(bool now)
|
2450 | 2460 | close = true; |
2451 | 2461 | fSent = true; |
2452 | 2462 | |
2453 | | int32 start = (new BAlert("no daemon", |
| 2463 | BAlert* alert = new BAlert("no daemon", |
2454 | 2464 | B_TRANSLATE("The mail_daemon is not running. The message is " |
2455 | 2465 | "queued and will be sent when the mail_daemon is started."), |
2456 | | B_TRANSLATE("Start now"), B_TRANSLATE("OK")))->Go(); |
2457 | | |
| 2466 | B_TRANSLATE("Start now"), B_TRANSLATE("OK")); |
| 2467 | alert->SetShortcut(1, B_ESCAPE); |
| 2468 | int32 start = alert->Go(); |
| 2469 | |
2458 | 2470 | if (start == 0) { |
2459 | 2471 | result = be_roster->Launch("application/x-vnd.Be-POST"); |
2460 | 2472 | if (result == B_OK) { |
… |
… |
TMailWindow::Send(bool now)
|
2489 | 2501 | |
2490 | 2502 | if (result != B_NO_ERROR && result != B_MAIL_NO_DAEMON) { |
2491 | 2503 | beep(); |
2492 | | (new BAlert("", errorMessage.String(), B_TRANSLATE("OK")))->Go(); |
| 2504 | BAlert* alert = new BAlert("", errorMessage.String(), B_TRANSLATE("OK")); |
| 2505 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2506 | alert->Go(); |
2493 | 2507 | } |
2494 | 2508 | if (close) { |
2495 | 2509 | PostMessage(B_QUIT_REQUESTED); |
… |
… |
ErrorExit:
|
2721 | 2735 | sprintf(errorString, "Unable to train the message file \"%s\" as %s. " |
2722 | 2736 | "Possibly useful error code: %s (%ld).", |
2723 | 2737 | filePath.Path(), CommandWord, strerror (errorCode), errorCode); |
2724 | | (new BAlert("", errorString, |
2725 | | B_TRANSLATE("OK")))->Go(); |
| 2738 | BAlert* alert = new BAlert("", errorString, B_TRANSLATE("OK")); |
| 2739 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2740 | alert->Go(); |
| 2741 | |
2726 | 2742 | return errorCode; |
2727 | 2743 | } |
2728 | 2744 | |
-
diff --git a/src/apps/mail/Signature.cpp b/src/apps/mail/Signature.cpp
index 405bb69..065b958 100644
a
|
b
|
TSignatureWindow::MessageReceived(BMessage* msg)
|
192 | 192 | Save(); |
193 | 193 | break; |
194 | 194 | |
195 | | case M_DELETE: |
196 | | if (!(new BAlert("", |
| 195 | case M_DELETE: { |
| 196 | BAlert* alert = new BAlert("", |
197 | 197 | B_TRANSLATE("Really delete this signature? This cannot " |
198 | 198 | "be undone."), |
199 | 199 | B_TRANSLATE("Cancel"), |
200 | 200 | B_TRANSLATE("Delete"), |
201 | | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go()) |
| 201 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 202 | alert->SetShortcut(0, B_ESCAPE); |
| 203 | int32 choice = alert->Go(); |
| 204 | |
| 205 | if (choice == 0) |
202 | 206 | break; |
203 | 207 | |
204 | 208 | if (fFile) { |
… |
… |
TSignatureWindow::MessageReceived(BMessage* msg)
|
210 | 214 | fSigView->fName->MakeFocus(true); |
211 | 215 | } |
212 | 216 | break; |
213 | | |
| 217 | } |
214 | 218 | case M_SIGNATURE: |
215 | 219 | if (Clear()) { |
216 | 220 | msg->FindRef("ref", &ref); |
… |
… |
TSignatureWindow::MessageReceived(BMessage* msg)
|
231 | 235 | else { |
232 | 236 | fFile = NULL; |
233 | 237 | beep(); |
234 | | (new BAlert("", |
| 238 | BAlert* alert = new BAlert("", |
235 | 239 | B_TRANSLATE("Couldn't open this signature. Sorry."), |
236 | | B_TRANSLATE("OK")))->Go(); |
| 240 | B_TRANSLATE("OK")); |
| 241 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 242 | alert->Go(); |
237 | 243 | } |
238 | 244 | } |
239 | 245 | break; |
… |
… |
TSignatureWindow::Save()
|
385 | 391 | |
386 | 392 | err_exit: |
387 | 393 | beep(); |
388 | | (new BAlert("", |
| 394 | BAlert* alert = new BAlert("", |
389 | 395 | B_TRANSLATE("An error occurred trying to save this signature."), |
390 | | B_TRANSLATE("Sorry")))->Go(); |
| 396 | B_TRANSLATE("Sorry")); |
| 397 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 398 | alert->Go(); |
391 | 399 | } |
392 | 400 | |
393 | 401 | |
-
diff --git a/src/apps/mediaconverter/MediaConverterApp.cpp b/src/apps/mediaconverter/MediaConverterApp.cpp
index f9397d5..67af425 100644
a
|
b
|
MediaConverterApp::RefsReceived(BMessage* msg)
|
146 | 146 | BAlert* alert = new BAlert((errors > 1) ? |
147 | 147 | B_TRANSLATE("Error loading files") : |
148 | 148 | B_TRANSLATE("Error loading a file"), |
149 | | alertText.String(), B_TRANSLATE("Continue") , NULL, NULL, |
| 149 | alertText.String(), B_TRANSLATE("Continue"), NULL, NULL, |
150 | 150 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
151 | 151 | alert->Go(); |
152 | 152 | } |
-
diff --git a/src/apps/mediaconverter/MediaConverterWindow.cpp b/src/apps/mediaconverter/MediaConverterWindow.cpp
index c628866..74b3991 100644
a
|
b
|
MediaConverterWindow::MessageReceived(BMessage* msg)
|
428 | 428 | if (status != B_OK && status != B_ALREADY_RUNNING) { |
429 | 429 | BString errorString(B_TRANSLATE("Error launching: %strError%")); |
430 | 430 | errorString.ReplaceFirst("%strError%", strerror(status)); |
431 | | (new BAlert(B_TRANSLATE("Error"), errorString.String(), |
432 | | B_TRANSLATE("OK")))->Go(); |
| 431 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), |
| 432 | errorString.String(), B_TRANSLATE("OK")); |
| 433 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 434 | alert->Go(); |
433 | 435 | } |
434 | 436 | break; |
435 | 437 | } |
-
diff --git a/src/apps/mediaconverter/MediaFileInfoView.cpp b/src/apps/mediaconverter/MediaFileInfoView.cpp
index 6cd20e5..8dc8ed6 100644
a
|
b
|
MediaFileInfoView::Update(BMediaFile* file, entry_ref* ref)
|
165 | 165 | BAlert* alert = new BAlert( |
166 | 166 | B_TRANSLATE("File Error"), error.String(), |
167 | 167 | B_TRANSLATE("OK")); |
| 168 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
168 | 169 | alert->Go(NULL); |
169 | 170 | } |
170 | 171 | } else { |
-
diff --git a/src/apps/mediaplayer/MainApp.cpp b/src/apps/mediaplayer/MainApp.cpp
index 427de76..4b435d7 100644
a
|
b
|
MainApp::MainApp()
|
93 | 93 | "Would you like to start it ?"), B_TRANSLATE("Quit"), |
94 | 94 | B_TRANSLATE("Start media server"), NULL, |
95 | 95 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 96 | alert->SetShortcut(0, B_ESCAPE); |
| 97 | |
96 | 98 | if (alert->Go() == 0) { |
97 | 99 | PostMessage(B_QUIT_REQUESTED); |
98 | 100 | return; |
-
diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp
index e9ebd34..15ac18b 100644
a
|
b
|
MainWin::MessageReceived(BMessage* msg)
|
633 | 633 | BAlert* alert = new BAlert(B_TRANSLATE("Nothing to Play"), |
634 | 634 | B_TRANSLATE("None of the files you wanted to play appear " |
635 | 635 | "to be media files."), B_TRANSLATE("OK")); |
| 636 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
636 | 637 | alert->Go(); |
637 | 638 | fControls->SetDisabledString(kDisabledSeekMessage); |
638 | 639 | break; |
… |
… |
MainWin::OpenPlaylistItem(const PlaylistItemRef& item)
|
1090 | 1091 | BString message = B_TRANSLATE("%app% encountered an internal error. " |
1091 | 1092 | "The file could not be opened."); |
1092 | 1093 | message.ReplaceFirst("%app%", kApplicationName); |
1093 | | (new BAlert(kApplicationName, message.String(), |
1094 | | B_TRANSLATE("OK")))->Go(); |
| 1094 | BAlert* alert = new BAlert(kApplicationName, message.String(), |
| 1095 | B_TRANSLATE("OK")); |
| 1096 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1097 | alert->Go(); |
1095 | 1098 | _PlaylistItemOpened(item, ret); |
1096 | 1099 | } else { |
1097 | 1100 | BString string; |
… |
… |
MainWin::_PlaylistItemOpened(const PlaylistItemRef& item, status_t result)
|
1337 | 1340 | } else { |
1338 | 1341 | message << B_TRANSLATE("Error: ") << strerror(result); |
1339 | 1342 | } |
1340 | | (new BAlert("error", message.String(), B_TRANSLATE("OK")))->Go(); |
| 1343 | BAlert* alert = new BAlert("error", message.String(), |
| 1344 | B_TRANSLATE("OK")); |
| 1345 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1346 | alert->Go(); |
1341 | 1347 | fControls->SetDisabledString(kDisabledSeekMessage); |
1342 | 1348 | } else { |
1343 | 1349 | // Just go to the next file and don't bother user (yet) |
-
diff --git a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp
index 8e4d9f1..5dfbc0f 100644
a
|
b
|
display_save_alert(const char* message)
|
57 | 57 | { |
58 | 58 | BAlert* alert = new BAlert(B_TRANSLATE("Save error"), message, |
59 | 59 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 60 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
60 | 61 | alert->Go(NULL); |
61 | 62 | } |
62 | 63 | |
-
diff --git a/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp b/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp
index a872bc3..e4b9e28 100644
a
|
b
|
RemovePLItemsCommand::Perform()
|
118 | 118 | message << |
119 | 119 | B_TRANSLATE("Some files could not be moved into Trash."); |
120 | 120 | message << "\n\n" << B_TRANSLATE("Error: ") << strerror(moveError); |
121 | | (new BAlert(B_TRANSLATE("Move Into Trash Error"), message.String(), |
122 | | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
123 | | B_WARNING_ALERT))->Go(NULL); |
| 121 | BAlert* alert = new BAlert(B_TRANSLATE("Move into trash error"), |
| 122 | message.String(), B_TRANSLATE("OK"), NULL, NULL, |
| 123 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 124 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 125 | alert->Go(NULL); |
124 | 126 | } |
125 | 127 | } |
126 | 128 | |
-
diff --git a/src/apps/midiplayer/MidiPlayerApp.cpp b/src/apps/midiplayer/MidiPlayerApp.cpp
index 0450d27..e1d45a0 100644
a
|
b
|
MidiPlayerApp::ReadyToRun()
|
48 | 48 | void |
49 | 49 | MidiPlayerApp::AboutRequested() |
50 | 50 | { |
51 | | (new BAlert( |
52 | | NULL, |
| 51 | BAlert* alert = new BAlert(NULL, |
53 | 52 | B_TRANSLATE_COMMENT("Haiku MIDI Player 1.0.0 beta\n\n" |
54 | 53 | "This tiny program\n" |
55 | 54 | "Knows how to play thousands of\n" |
56 | | "Cheesy sounding songs", "This is a haiku. First line has five syllables, second has seven and last has five again. Create your own."), |
57 | | "Okay", NULL, NULL, |
58 | | B_WIDTH_AS_USUAL, B_INFO_ALERT))->Go(); |
| 55 | "Cheesy sounding songs", "This is a haiku. First line has five " |
| 56 | "syllables, second has seven and last has five again. " |
| 57 | "Create your own."), B_TRANSLATE("OK"), NULL, NULL, |
| 58 | B_WIDTH_AS_USUAL, B_INFO_ALERT); |
| 59 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 60 | alert->Go(); |
59 | 61 | } |
60 | 62 | |
61 | 63 | |
-
diff --git a/src/apps/midiplayer/MidiPlayerWindow.cpp b/src/apps/midiplayer/MidiPlayerWindow.cpp
index 3479e8f..cd8794b 100644
a
|
b
|
MidiPlayerWindow::LoadFile(entry_ref* ref)
|
381 | 381 | scopeView->SetPlaying(false); |
382 | 382 | scopeView->Invalidate(); |
383 | 383 | |
384 | | (new BAlert(NULL, B_TRANSLATE("Could not load song"), |
| 384 | BAlert* alert = new BAlert(NULL, B_TRANSLATE("Could not load song"), |
385 | 385 | B_TRANSLATE("OK"), NULL, NULL, |
386 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 386 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 387 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 388 | alert->Go(); |
387 | 389 | } |
388 | 390 | } |
389 | 391 | |
-
diff --git a/src/apps/networkstatus/NetworkStatus.cpp b/src/apps/networkstatus/NetworkStatus.cpp
index b7a9897..557523b 100644
a
|
b
|
NetworkStatus::ReadyToRun()
|
156 | 156 | "in a window or install it in the Deskbar."), |
157 | 157 | B_TRANSLATE("Run in window"), B_TRANSLATE("Install in Deskbar"), |
158 | 158 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
159 | | alert->SetShortcut(0, B_ESCAPE); |
160 | 159 | |
161 | 160 | if (alert->Go() == 1) { |
162 | 161 | _InstallReplicantInDeskbar(); |
-
diff --git a/src/apps/networkstatus/NetworkStatusView.cpp b/src/apps/networkstatus/NetworkStatusView.cpp
index f3490d9..758f069 100644
a
|
b
|
NetworkStatusView::MessageReceived(BMessage* message)
|
298 | 298 | BAlert* alert = new BAlert(name, text.String(), |
299 | 299 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
300 | 300 | B_STOP_ALERT); |
| 301 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
301 | 302 | alert->Go(NULL); |
302 | 303 | } |
303 | 304 | } |
… |
… |
NetworkStatusView::_ShowConfiguration(BMessage* message)
|
401 | 402 | } |
402 | 403 | |
403 | 404 | BAlert* alert = new BAlert(name, text.String(), B_TRANSLATE("OK")); |
| 405 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
404 | 406 | BTextView* view = alert->TextView(); |
405 | 407 | BFont font; |
406 | 408 | |
… |
… |
NetworkStatusView::_AboutRequested()
|
509 | 511 | about.ReplaceFirst("%2", "Copyright 2007-2010"); |
510 | 512 | // Append a new year here |
511 | 513 | BAlert* alert = new BAlert("about", about, B_TRANSLATE("OK")); |
| 514 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
512 | 515 | BTextView *view = alert->TextView(); |
513 | 516 | BFont font; |
514 | 517 | |
… |
… |
NetworkStatusView::_OpenNetworksPreferences()
|
602 | 605 | errorMessage << strerror(status); |
603 | 606 | BAlert* alert = new BAlert("launch error", errorMessage.String(), |
604 | 607 | B_TRANSLATE("OK")); |
| 608 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
605 | 609 | |
606 | 610 | // asynchronous alert in order to not block replicant host application |
607 | 611 | alert->Go(NULL); |
-
diff --git a/src/apps/overlayimage/OverlayView.cpp b/src/apps/overlayimage/OverlayView.cpp
index 9efac70..f133534 100644
a
|
b
|
OverlayView::OverlayAboutRequested()
|
159 | 159 | "originally by Seth Flaxman\n\t" |
160 | 160 | "modified by Hartmuth Reh\n\t" |
161 | 161 | "further modified by Humdinger\n", |
162 | | "OK"); |
163 | | |
| 162 | "OK"); |
164 | 163 | BTextView *view = alert->TextView(); |
165 | 164 | BFont font; |
166 | 165 | view->SetStylable(true); |
… |
… |
OverlayView::OverlayAboutRequested()
|
168 | 167 | font.SetSize(font.Size() + 7.0f); |
169 | 168 | font.SetFace(B_BOLD_FACE); |
170 | 169 | view->SetFontAndColor(0, 12, &font); |
171 | | |
| 170 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
172 | 171 | alert->Go(); |
173 | 172 | } |
-
diff --git a/src/apps/packageinstaller/PackageInfo.cpp b/src/apps/packageinstaller/PackageInfo.cpp
index d8bfdd0..22cfe55 100644
a
|
b
|
PackageInfo::Parse()
|
1044 | 1044 | B_TRANSLATE("Continue"), |
1045 | 1045 | B_TRANSLATE("Abort"), NULL, |
1046 | 1046 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1047 | warning->SetShortcut(1, B_ESCAPE); |
1047 | 1048 | selection = warning->Go(); |
1048 | 1049 | |
1049 | 1050 | if (selection == 1) { |
-
diff --git a/src/apps/packageinstaller/PackageInstall.cpp b/src/apps/packageinstaller/PackageInstall.cpp
index a779e1b..c4b4b2f 100644
a
|
b
|
PackageInstall::_Install()
|
125 | 125 | "and continue the installation?"), |
126 | 126 | B_TRANSLATE("Continue"), |
127 | 127 | B_TRANSLATE("Abort")); |
| 128 | reinstall->SetShortcut(1, B_ESCAPE); |
128 | 129 | |
129 | 130 | if (reinstall->Go() == 0) { |
130 | 131 | // Uninstall the package |
-
diff --git a/src/apps/packageinstaller/PackageView.cpp b/src/apps/packageinstaller/PackageView.cpp
index 8575454..ae80fcc 100644
a
|
b
|
PackageView::AttachedToWindow()
|
98 | 98 | "possible reasons for this might be that the requested file " |
99 | 99 | "is not a valid BeOS .pkg package."), B_TRANSLATE("OK"), |
100 | 100 | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 101 | warning->SetFlags(B_CLOSE_ON_ESCAPE); |
101 | 102 | warning->Go(); |
102 | 103 | |
103 | 104 | Window()->PostMessage(B_QUIT_REQUESTED); |
… |
… |
PackageView::MessageReceived(BMessage *msg)
|
195 | 196 | B_TRANSLATE("The package you requested has been successfully " |
196 | 197 | "installed on your system."), |
197 | 198 | B_TRANSLATE("OK")); |
| 199 | notify->SetFlags(B_CLOSE_ON_ESCAPE); |
198 | 200 | |
199 | 201 | notify->Go(); |
200 | 202 | fStatusWindow->Hide(); |
… |
… |
PackageView::MessageReceived(BMessage *msg)
|
214 | 216 | B_TRANSLATE( |
215 | 217 | "The installation of the package has been aborted."), |
216 | 218 | B_TRANSLATE("OK")); |
| 219 | notify->SetFlags(B_CLOSE_ON_ESCAPE); |
217 | 220 | notify->Go(); |
218 | 221 | fStatusWindow->Hide(); |
219 | 222 | fInstall->SetEnabled(true); |
… |
… |
PackageView::MessageReceived(BMessage *msg)
|
234 | 237 | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
235 | 238 | fprintf(stderr, |
236 | 239 | B_TRANSLATE("Error while installing the package\n")); |
| 240 | notify->SetFlags(B_CLOSE_ON_ESCAPE); |
237 | 241 | notify->Go(); |
238 | 242 | fStatusWindow->Hide(); |
239 | 243 | fInstall->SetEnabled(true); |
… |
… |
PackageView::ItemExists(PackageItem &item, BPath &path, int32 &policy)
|
354 | 358 | B_TRANSLATE("Replace"), |
355 | 359 | B_TRANSLATE("Skip"), |
356 | 360 | B_TRANSLATE("Abort")); |
357 | | |
| 361 | alert->SetShortcut(2, B_ESCAPE); |
| 362 | |
358 | 363 | choice = alert->Go(); |
359 | 364 | switch (choice) { |
360 | 365 | case 0: |
-
diff --git a/src/apps/pairs/PairsView.cpp b/src/apps/pairs/PairsView.cpp
index 5a68a38..1069a8f 100644
a
|
b
|
PairsView::_ReadRandomIcons()
|
175 | 175 | BAlert* alert = new BAlert("Fatal", msgStr.String(), |
176 | 176 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, |
177 | 177 | B_STOP_ALERT); |
178 | | alert->SetShortcut(0, B_ESCAPE); |
| 178 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
179 | 179 | alert->Go(); |
180 | 180 | exit(1); |
181 | 181 | } |
-
diff --git a/src/apps/people/PeopleApp.cpp b/src/apps/people/PeopleApp.cpp
index 41a3a36..5f954d5 100644
a
|
b
|
TPeopleApp::MessageReceived(BMessage* message)
|
247 | 247 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), |
248 | 248 | errorMsg.String(), B_TRANSLATE("OK"), NULL, NULL, |
249 | 249 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 250 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
250 | 251 | alert->Go(NULL); |
251 | 252 | } |
252 | 253 | break; |
-
diff --git a/src/apps/people/PersonWindow.cpp b/src/apps/people/PersonWindow.cpp
index 291b1df..b9532ed 100644
a
|
b
|
PersonWindow::MessageReceived(BMessage* msg)
|
216 | 216 | } |
217 | 217 | else { |
218 | 218 | sprintf(str, B_TRANSLATE("Could not create %s."), name); |
219 | | (new BAlert("", str, B_TRANSLATE("Sorry")))->Go(); |
| 219 | BAlert* alert = new BAlert("", str, B_TRANSLATE("Sorry")); |
| 220 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 221 | alert->Go(); |
220 | 222 | } |
221 | 223 | } |
222 | 224 | } |
… |
… |
PersonWindow::QuitRequested()
|
294 | 296 | status_t result; |
295 | 297 | |
296 | 298 | if (!fView->IsSaved()) { |
297 | | result = (new BAlert("", B_TRANSLATE("Save changes before quitting?"), |
| 299 | BAlert* alert = new BAlert("", B_TRANSLATE("Save changes before quitting?"), |
298 | 300 | B_TRANSLATE("Cancel"), B_TRANSLATE("Quit"), |
299 | | B_TRANSLATE("Save")))->Go(); |
| 301 | B_TRANSLATE("Save")); |
| 302 | alert->SetShortcut(0, B_ESCAPE); |
| 303 | result = alert->Go(); |
| 304 | |
300 | 305 | if (result == 2) { |
301 | 306 | if (fRef) |
302 | 307 | fView->Save(); |
-
diff --git a/src/apps/people/PictureView.cpp b/src/apps/people/PictureView.cpp
index 90b97b5..6b75146 100644
a
|
b
|
PictureView::_HandleDrop(BMessage* msg)
|
564 | 564 | text.ReplaceFirst("%name%", name); |
565 | 565 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), text.String(), |
566 | 566 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 567 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
567 | 568 | alert->Go(); |
568 | 569 | } |
569 | 570 | } |
-
diff --git a/src/apps/poorman/PoorManWindow.cpp b/src/apps/poorman/PoorManWindow.cpp
index 019ecc1..4652952 100644
a
|
b
|
PoorManWindow::DefaultSettings()
|
545 | 545 | { |
546 | 546 | BAlert* serverAlert = new BAlert(B_TRANSLATE("Error Server"), |
547 | 547 | STR_ERR_CANT_START, B_TRANSLATE("OK")); |
| 548 | serverAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
548 | 549 | BAlert* dirAlert = new BAlert(B_TRANSLATE("Error Dir"), |
549 | 550 | STR_ERR_WEB_DIR, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"), |
550 | 551 | B_TRANSLATE("Default"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING); |
… |
… |
PoorManWindow::DefaultSettings()
|
576 | 577 | BAlert* dirCreatedAlert = |
577 | 578 | new BAlert(B_TRANSLATE("Dir Created"), STR_DIR_CREATED, |
578 | 579 | B_TRANSLATE("OK")); |
| 580 | dirCreatedAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
579 | 581 | dirCreatedAlert->Go(); |
580 | 582 | SetWebDir(STR_DEFAULT_WEB_DIRECTORY); |
581 | 583 | be_app->PostMessage(kStartServer); |
-
diff --git a/src/apps/powerstatus/PowerStatus.cpp b/src/apps/powerstatus/PowerStatus.cpp
index ebaefb7..06b9355 100644
a
|
b
|
PowerStatus::ReadyToRun()
|
90 | 90 | "or install it in the Deskbar."), B_TRANSLATE("Run in window"), |
91 | 91 | B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL, |
92 | 92 | B_WARNING_ALERT); |
93 | | alert->SetShortcut(0, B_ESCAPE); |
94 | 93 | |
95 | 94 | if (alert->Go()) { |
96 | 95 | image_info info; |
-
diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp
index 647dae5..83dd1bd 100644
a
|
b
|
PowerStatusReplicant::_AboutRequested()
|
635 | 635 | font.SetFace(B_BOLD_FACE); |
636 | 636 | view->SetFontAndColor(0, strlen(B_TRANSLATE("PowerStatus")), &font); |
637 | 637 | |
| 638 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
638 | 639 | alert->Go(); |
639 | 640 | } |
640 | 641 | |
-
diff --git a/src/apps/processcontroller/PCWorld.cpp b/src/apps/processcontroller/PCWorld.cpp
index d4b8c7d..b456d15 100644
a
|
b
|
PCApplication::ReadyToRun()
|
93 | 93 | " or install it in the Deskbar."), B_TRANSLATE("Run in window"), |
94 | 94 | B_TRANSLATE("Install in Deskbar"), |
95 | 95 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
96 | | alert->SetShortcut(0, B_ESCAPE); |
97 | 96 | |
98 | 97 | if (alert->Go() != 0) { |
99 | 98 | BDeskbar deskbar; |
… |
… |
PCApplication::ReadyToRun()
|
107 | 106 | B_TRANSLATE("ProcessController is already installed in Deskbar."), |
108 | 107 | B_TRANSLATE("OK"), NULL, |
109 | 108 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
110 | | alert->SetShortcut(0, B_ESCAPE); |
| 109 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
111 | 110 | alert->Go(); |
112 | 111 | } |
113 | 112 | |
-
diff --git a/src/apps/processcontroller/Preferences.cpp b/src/apps/processcontroller/Preferences.cpp
index 8b4ca9b..0f22437 100644
a
|
b
|
Preferences::~Preferences()
|
115 | 115 | BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"), |
116 | 116 | error.String(), B_TRANSLATE("Damned!"), NULL, NULL, |
117 | 117 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
118 | | alert->SetShortcut(0, B_ESCAPE); |
119 | | |
| 118 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
120 | 119 | alert->Go(); |
121 | 120 | } |
122 | 121 | } |
-
diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp
index 168a4ef..8146fff 100644
a
|
b
|
ProcessController::MessageReceived(BMessage *message)
|
280 | 280 | B_TRANSLATE("This team is already gone"B_UTF8_ELLIPSIS), |
281 | 281 | B_TRANSLATE("Ok!"), NULL, NULL, B_WIDTH_AS_USUAL, |
282 | 282 | B_STOP_ALERT); |
283 | | alert->SetShortcut(0, B_ESCAPE); |
| 283 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
284 | 284 | alert->Go(); |
285 | 285 | } |
286 | 286 | } |
… |
… |
ProcessController::MessageReceived(BMessage *message)
|
298 | 298 | B_TRANSLATE("Cancel"), B_TRANSLATE("Debug this thread!"), |
299 | 299 | B_TRANSLATE("Kill this thread!"), B_WIDTH_AS_USUAL, |
300 | 300 | B_STOP_ALERT); |
| 301 | alert->SetShortcut(0, B_ESCAPE); |
| 302 | |
301 | 303 | #define KILL 2 |
302 | 304 | #else |
303 | 305 | snprintf(question, sizeof(question), |
… |
… |
ProcessController::MessageReceived(BMessage *message)
|
306 | 308 | alert = new BAlert(B_TRANSLATE("Please confirm"), question, |
307 | 309 | B_TRANSLATE("Cancel"), B_TRANSLATE("Kill this thread!"), |
308 | 310 | NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 311 | alert->SetShortcut(0, B_ESCAPE); |
| 312 | |
309 | 313 | #define KILL 1 |
310 | 314 | #endif |
311 | 315 | alert->SetShortcut(0, B_ESCAPE); |
… |
… |
ProcessController::MessageReceived(BMessage *message)
|
330 | 334 | B_TRANSLATE("This thread is already gone"B_UTF8_ELLIPSIS), |
331 | 335 | B_TRANSLATE("Ok!"), NULL, NULL, |
332 | 336 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
333 | | alert->SetShortcut(0, B_ESCAPE); |
| 337 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
334 | 338 | alert->Go(); |
335 | 339 | } |
336 | 340 | } |
… |
… |
ProcessController::MessageReceived(BMessage *message)
|
408 | 412 | "You can't turn it off!"), |
409 | 413 | B_TRANSLATE("That's no Fun!"), NULL, NULL, |
410 | 414 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
411 | | alert->SetShortcut(0, B_ESCAPE); |
| 415 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
412 | 416 | alert->Go(); |
413 | 417 | } else |
414 | 418 | _kern_set_cpu_enabled(cpu, !_kern_cpu_enabled(cpu)); |
… |
… |
thread_debug_thread(void *arg)
|
893 | 897 | alert = new BAlert("", "The semaphore wasn't released, " |
894 | 898 | "because it wasn't necessary anymore!", |
895 | 899 | "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 900 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
896 | 901 | alert->Go(); |
897 | 902 | } |
898 | 903 | } |
-
diff --git a/src/apps/pulse/CPUButton.cpp b/src/apps/pulse/CPUButton.cpp
index 2d18eed..4d1e142 100644
a
|
b
|
CPUButton::Invoke(BMessage *message)
|
243 | 243 | BAlert *alert = new BAlert(B_TRANSLATE("Info"), |
244 | 244 | B_TRANSLATE("You can't disable the last active CPU."), |
245 | 245 | B_TRANSLATE("OK")); |
246 | | alert->SetShortcut(0, B_ESCAPE); |
| 246 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
247 | 247 | alert->Go(NULL); |
248 | 248 | SetValue(!Value()); |
249 | 249 | } |
-
diff --git a/src/apps/pulse/DeskbarPulseView.cpp b/src/apps/pulse/DeskbarPulseView.cpp
index 802f7bb..6594d70 100644
a
|
b
|
void DeskbarPulseView::Remove() {
|
182 | 182 | str.UnlockBuffer(); |
183 | 183 | BAlert *alert = new BAlert(B_TRANSLATE("Info"), str.String(), |
184 | 184 | B_TRANSLATE("OK")); |
185 | | alert->SetShortcut(0, B_ESCAPE); |
| 185 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
186 | 186 | alert->Go(NULL); |
187 | 187 | } |
188 | 188 | delete deskbar; |
-
diff --git a/src/apps/pulse/PulseApp.cpp b/src/apps/pulse/PulseApp.cpp
index 9006f2f..06c3f02 100644
a
|
b
|
PulseApp::ShowAbout(bool asApplication)
|
193 | 193 | font.SetSize(18); |
194 | 194 | font.SetFace(B_BOLD_FACE); |
195 | 195 | view->SetFontAndColor(0, name.Length(), &font); |
196 | | alert->SetShortcut(0, B_ESCAPE); |
| 196 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
197 | 197 | // Use the asynchronous version so we don't block the window's thread |
198 | 198 | alert->Go(NULL); |
199 | 199 | } |
… |
… |
LoadInDeskbar()
|
278 | 278 | message.UnlockBuffer(); |
279 | 279 | BAlert *alert = new BAlert(B_TRANSLATE("Error"), |
280 | 280 | message.String(), B_TRANSLATE("OK")); |
281 | | alert->SetShortcut(0, B_ESCAPE); |
| 281 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
282 | 282 | alert->Go(NULL); |
283 | 283 | return false; |
284 | 284 | } |
-
diff --git a/src/apps/pulse/PulseView.cpp b/src/apps/pulse/PulseView.cpp
index d14037a..b5d233b 100644
a
|
b
|
void PulseView::ChangeCPUState(BMessage *message) {
|
130 | 130 | BAlert *alert = new BAlert(B_TRANSLATE("Info"), |
131 | 131 | B_TRANSLATE("You can't disable the last active CPU."), |
132 | 132 | B_TRANSLATE("OK")); |
133 | | alert->SetShortcut(0, B_ESCAPE); |
| 133 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
134 | 134 | alert->Go(NULL); |
135 | 135 | } |
136 | 136 | } |
-
diff --git a/src/apps/resedit/BitmapView.cpp b/src/apps/resedit/BitmapView.cpp
index 57e928b..007fc60 100644
a
|
b
|
BitmapView::MessageReceived(BMessage *msg)
|
250 | 250 | switch (msg->what) |
251 | 251 | { |
252 | 252 | case M_REMOVE_IMAGE: { |
253 | | BAlert *alert = new BAlert("Mr. Peeps!", "This cannot be undone. Remove the image?", |
254 | | "Remove", "Cancel"); |
| 253 | BAlert *alert = new BAlert("Mr. Peeps!", "This cannot be undone. " |
| 254 | "Remove the image?", "Remove", "Cancel"); |
| 255 | alert->SetShortcut(1, B_ESCAPE); |
255 | 256 | int32 value = alert->Go(); |
256 | 257 | if (value == 0) { |
257 | 258 | SetBitmap(NULL); |
-
diff --git a/src/apps/resedit/ResWindow.cpp b/src/apps/resedit/ResWindow.cpp
index f306837..4f5fea5 100644
a
|
b
|
bool
|
34 | 34 | ResWindow::QuitRequested(void) |
35 | 35 | { |
36 | 36 | if (fView->GetSaveStatus() == FILE_DIRTY) { |
37 | | BAlert *alert = new BAlert("ResEdit","Save your changes?","Cancel","Don't Save","Save"); |
| 37 | BAlert *alert = new BAlert("ResEdit", "Save your changes?", "Cancel", |
| 38 | "Don't Save", "Save"); |
| 39 | alert->SetShortcut(0, B_ESCAPE); |
| 40 | |
38 | 41 | switch (alert->Go()) { |
39 | 42 | case 0: |
40 | 43 | return false; |
-
diff --git a/src/apps/screenshot/ScreenshotWindow.cpp b/src/apps/screenshot/ScreenshotWindow.cpp
index f3bee39..ca40af5 100644
a
|
b
|
ScreenshotWindow::_ShowSettings(bool activate)
|
669 | 669 | &rect); |
670 | 670 | if (err < B_OK || view == NULL) { |
671 | 671 | BAlert *alert = new BAlert(NULL, strerror(err), "OK"); |
| 672 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
672 | 673 | alert->Go(); |
673 | 674 | } else { |
674 | 675 | if (fSettingsWindow) { |
-
diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp
index 86b3ee4..628fc7f 100644
a
|
b
|
ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
953 | 953 | snprintf(buffer, sizeof(buffer), B_TRANSLATE("The file '%s' could not " |
954 | 954 | "be written."), name); |
955 | 955 | BAlert* palert = new BAlert("", buffer, B_TRANSLATE("OK")); |
| 956 | palert->SetFlags(B_CLOSE_ON_ESCAPE); |
956 | 957 | palert->Go(); |
957 | 958 | } |
958 | 959 | |
-
diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp
index 6aa6e9f..6705680 100644
a
|
b
|
ShowImageWindow::_LoadError(const entry_ref& ref)
|
1108 | 1108 | "LoadAlerts"), |
1109 | 1109 | B_TRANSLATE_CONTEXT("OK", "Alerts"), NULL, NULL, |
1110 | 1110 | B_WIDTH_AS_USUAL, B_INFO_ALERT); |
| 1111 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1111 | 1112 | alert->Go(); |
1112 | 1113 | } |
1113 | 1114 | |
… |
… |
ShowImageWindow::_ClosePrompt()
|
1216 | 1217 | |
1217 | 1218 | BAlert* alert = new BAlert(B_TRANSLATE("Close document"), prompt.String(), |
1218 | 1219 | B_TRANSLATE("Cancel"), B_TRANSLATE("Close")); |
| 1220 | alert->SetShortcut(0, B_ESCAPE); |
| 1221 | |
1219 | 1222 | if (alert->Go() == 0) { |
1220 | 1223 | // Cancel |
1221 | 1224 | return false; |
-
diff --git a/src/apps/soundrecorder/RecorderWindow.cpp b/src/apps/soundrecorder/RecorderWindow.cpp
index 11b5a92..50430f5 100644
a
|
b
|
RecorderWindow::ErrorAlert(const char * action, status_t err)
|
1175 | 1175 | sprintf(msg, "%s: %s. [%lx]", action, strerror(err), (int32) err); |
1176 | 1176 | else |
1177 | 1177 | sprintf(msg, "%s.", action); |
1178 | | (new BAlert("", msg, B_TRANSLATE("Stop")))->Go(); |
| 1178 | BAlert* alert = new BAlert("", msg, B_TRANSLATE("Stop")); |
| 1179 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1180 | alert->Go(); |
1179 | 1181 | } |
1180 | 1182 | |
1181 | 1183 | |
… |
… |
RecorderWindow::RefsReceived(BMessage *msg)
|
1334 | 1336 | } |
1335 | 1337 | |
1336 | 1338 | if (countBad > 0 && countGood == 0) { |
1337 | | (new BAlert(B_TRANSLATE("Nothing to play"), B_TRANSLATE("None of the " |
1338 | | "files appear to be audio files"), B_TRANSLATE("OK"), NULL, NULL, |
1339 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 1339 | BAlert* alert = new BAlert(B_TRANSLATE("Nothing to play"), |
| 1340 | B_TRANSLATE("None of the files appear to be audio files"), |
| 1341 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 1342 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1343 | alert->Go(); |
1340 | 1344 | } else if (countGood > 0) { |
1341 | | if (countBad > 0) |
1342 | | (new BAlert(B_TRANSLATE("Invalid audio files"), B_TRANSLATE("Some " |
1343 | | "of the files don't appear to be audio files"), |
| 1345 | if (countBad > 0) { |
| 1346 | BAlert* alert = new BAlert(B_TRANSLATE("Invalid audio files"), |
| 1347 | B_TRANSLATE("Some of the files don't appear to be audio files"), |
1344 | 1348 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
1345 | | B_WARNING_ALERT))->Go(); |
| 1349 | B_WARNING_ALERT); |
| 1350 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1351 | alert->Go(); |
| 1352 | } |
1346 | 1353 | fSoundList->Select(fSoundList->CountItems() - 1); |
1347 | 1354 | } |
1348 | 1355 | } |
-
diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp
index 0601b0b..de4e56d 100644
a
|
b
|
StyledEditWindow::_ShowStatistics()
|
1640 | 1640 | |
1641 | 1641 | BAlert* alert = new BAlert("Statistics", result, B_TRANSLATE("OK"), NULL, |
1642 | 1642 | NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT); |
1643 | | |
| 1643 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1644 | |
1644 | 1645 | return alert->Go(); |
1645 | 1646 | } |
1646 | 1647 | |
-
diff --git a/src/apps/sudoku/SudokuWindow.cpp b/src/apps/sudoku/SudokuWindow.cpp
index 9a7f9a7..600019d 100644
a
|
b
|
SudokuWindow::_MessageDropped(BMessage* message)
|
411 | 411 | strerror(status)); |
412 | 412 | } |
413 | 413 | |
414 | | (new BAlert(B_TRANSLATE("Sudoku request"), |
| 414 | BAlert* alert = new BAlert(B_TRANSLATE("Sudoku request"), |
415 | 415 | buffer, B_TRANSLATE("OK"), NULL, NULL, |
416 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 416 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 417 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 418 | alert->Go(); |
417 | 419 | } |
418 | 420 | } |
419 | 421 | |
… |
… |
SudokuWindow::MessageReceived(BMessage* message)
|
554 | 556 | } |
555 | 557 | |
556 | 558 | case kMsgSudokuSolved: |
557 | | (new BAlert(B_TRANSLATE("Sudoku request"), |
| 559 | { |
| 560 | BAlert* alert = new BAlert(B_TRANSLATE("Sudoku request"), |
558 | 561 | B_TRANSLATE("Sudoku solved - congratulations!\n"), |
559 | 562 | B_TRANSLATE("OK"), NULL, NULL, |
560 | | B_WIDTH_AS_USUAL, B_IDEA_ALERT))->Go(); |
| 563 | B_WIDTH_AS_USUAL, B_IDEA_ALERT); |
| 564 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 565 | alert->Go(); |
561 | 566 | break; |
| 567 | } |
562 | 568 | |
563 | 569 | case B_OBSERVER_NOTICE_CHANGE: |
564 | 570 | { |
-
diff --git a/src/apps/terminal/TermApp.cpp b/src/apps/terminal/TermApp.cpp
index 20436f2..4b59fa5 100644
a
|
b
|
TermApp::ReadyToRun()
|
104 | 104 | B_TRANSLATE("Terminal couldn't start the shell. Sorry."), |
105 | 105 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL, |
106 | 106 | B_INFO_ALERT); |
107 | | alert->SetShortcut(0, B_ESCAPE); |
| 107 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
108 | 108 | alert->Go(NULL); |
109 | 109 | PostMessage(B_QUIT_REQUESTED); |
110 | 110 | return; |
-
diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp
index be789f1..17476e4 100644
a
|
b
|
TermWindow::MessageReceived(BMessage *message)
|
711 | 711 | BAlert* alert = new BAlert(B_TRANSLATE("Find failed"), |
712 | 712 | errorMsg, B_TRANSLATE("OK"), NULL, NULL, |
713 | 713 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
714 | | alert->SetShortcut(0, B_ESCAPE); |
| 714 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
715 | 715 | |
716 | 716 | alert->Go(); |
717 | 717 | fFindPreviousMenuItem->SetEnabled(false); |
… |
… |
TermWindow::MessageReceived(BMessage *message)
|
729 | 729 | B_TRANSLATE("Text not found."), |
730 | 730 | B_TRANSLATE("OK"), NULL, NULL, |
731 | 731 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
732 | | alert->SetShortcut(0, B_ESCAPE); |
| 732 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
733 | 733 | alert->Go(); |
734 | 734 | fFindPreviousMenuItem->SetEnabled(false); |
735 | 735 | fFindNextMenuItem->SetEnabled(false); |
… |
… |
TermWindow::MessageReceived(BMessage *message)
|
751 | 751 | BAlert* alert = new BAlert(B_TRANSLATE("Find failed"), |
752 | 752 | B_TRANSLATE("Not found."), B_TRANSLATE("OK"), |
753 | 753 | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
754 | | alert->SetShortcut(0, B_ESCAPE); |
| 754 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
755 | 755 | alert->Go(); |
756 | 756 | } |
757 | 757 | break; |
-
diff --git a/src/apps/text_search/GrepWindow.cpp b/src/apps/text_search/GrepWindow.cpp
index 928bd69..bd7e37d 100644
a
|
b
|
GrepWindow::_OnTrimSelection()
|
1290 | 1290 | text << "\n"; |
1291 | 1291 | BAlert* alert = new BAlert(NULL, text.String(), B_TRANSLATE("OK"), NULL, NULL, |
1292 | 1292 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1293 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1293 | 1294 | alert->Go(NULL); |
1294 | 1295 | return; |
1295 | 1296 | } |
… |
… |
GrepWindow::_OnSelectInTracker()
|
1382 | 1383 | B_TRANSLATE("Please select the files you wish to have selected for you in " |
1383 | 1384 | "Tracker."), |
1384 | 1385 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1386 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1385 | 1387 | alert->Go(NULL); |
1386 | 1388 | return; |
1387 | 1389 | } |
… |
… |
GrepWindow::_OnSelectInTracker()
|
1446 | 1448 | str1.ReplaceFirst("%APP_NAME",APP_NAME); |
1447 | 1449 | BAlert* alert = new BAlert(NULL, str1.String(), B_TRANSLATE("OK"), |
1448 | 1450 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 1451 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1449 | 1452 | alert->Go(NULL); |
1450 | 1453 | goto out; |
1451 | 1454 | } |
-
diff --git a/src/apps/tv/MainWin.cpp b/src/apps/tv/MainWin.cpp
index 63db99e..6cc3ab1 100644
a
|
b
|
MainWin::SelectInterface(int i)
|
375 | 375 | BString s; |
376 | 376 | s << B_TRANSLATE("Error, interface is busy:\n\n"); |
377 | 377 | s << gDeviceRoster->DeviceName(i); |
378 | | (new BAlert("error", s.String(), B_TRANSLATE("OK")))->Go(); |
| 378 | BAlert* alert = new BAlert("error", s.String(), B_TRANSLATE("OK")); |
| 379 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 380 | alert->Go(); |
379 | 381 | return; |
380 | 382 | } |
381 | 383 | |
… |
… |
MainWin::SelectInterface(int i)
|
384 | 386 | BString s; |
385 | 387 | s << B_TRANSLATE("Error, connecting to interface failed:\n\n"); |
386 | 388 | s << gDeviceRoster->DeviceName(i); |
387 | | (new BAlert("error", s.String(), B_TRANSLATE("OK")))->Go(); |
| 389 | BAlert* alert = new BAlert("error", s.String(), B_TRANSLATE("OK")); |
| 390 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 391 | alert->Go(); |
388 | 392 | } |
389 | 393 | |
390 | 394 | done: |
-
diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp
index c429167..9bfa632 100644
a
|
b
|
BrowserApp::AboutRequested()
|
103 | 103 | |
104 | 104 | BAlert* alert = new BAlert("About WebPositive", aboutText.String(), |
105 | 105 | "Sweet!"); |
| 106 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
106 | 107 | alert->Go(NULL); |
107 | 108 | } |
108 | 109 | |
-
diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp
index 92bd86b..4258bdd 100644
a
|
b
|
BrowserWindow::MessageReceived(BMessage* message)
|
680 | 680 | B_TRANSLATE("Do you really want to " |
681 | 681 | "clear the browsing history?"), B_TRANSLATE("Clear"), |
682 | 682 | B_TRANSLATE("Cancel")); |
| 683 | alert->SetShortcut(1, B_ESCAPE); |
| 684 | |
683 | 685 | if (alert->Go() == 0) |
684 | 686 | history->Clear(); |
685 | 687 | break; |
… |
… |
BrowserWindow::MessageReceived(BMessage* message)
|
732 | 734 | |
733 | 735 | BAlert* alert = new BAlert(B_TRANSLATE("Open bookmarks confirmation"), |
734 | 736 | string.String(), B_TRANSLATE("Cancel"), B_TRANSLATE("Open all")); |
| 737 | alert->SetShortcut(0, B_ESCAPE); |
735 | 738 | if (alert->Go() == 0) |
736 | 739 | break; |
737 | 740 | } |
… |
… |
BrowserWindow::_CreateBookmark()
|
1586 | 1589 | BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), |
1587 | 1590 | message.String(), B_TRANSLATE("OK"), NULL, NULL, |
1588 | 1591 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 1592 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1589 | 1593 | alert->Go(); |
1590 | 1594 | return; |
1591 | 1595 | } |
… |
… |
BrowserWindow::_CreateBookmark()
|
1615 | 1619 | message.ReplaceFirst("%bookmarkName", bookmarkName); |
1616 | 1620 | BAlert* alert = new BAlert(B_TRANSLATE("Bookmark info"), |
1617 | 1621 | message.String(), B_TRANSLATE("OK")); |
| 1622 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1618 | 1623 | alert->Go(); |
1619 | 1624 | return; |
1620 | 1625 | } |
… |
… |
BrowserWindow::_CreateBookmark()
|
1709 | 1714 | BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), |
1710 | 1715 | message.String(), B_TRANSLATE("OK"), NULL, NULL, |
1711 | 1716 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 1717 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1712 | 1718 | alert->Go(); |
1713 | 1719 | return; |
1714 | 1720 | } |
… |
… |
BrowserWindow::_ShowBookmarks()
|
1734 | 1740 | BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), |
1735 | 1741 | message.String(), B_TRANSLATE("OK"), NULL, NULL, |
1736 | 1742 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 1743 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1737 | 1744 | alert->Go(); |
1738 | 1745 | return; |
1739 | 1746 | } |
… |
… |
BrowserWindow::_HandlePageSourceResult(const BMessage* message)
|
2226 | 2233 | "page source: %s\n", strerror(ret)); |
2227 | 2234 | BAlert* alert = new BAlert(B_TRANSLATE("Page source error"), buffer, |
2228 | 2235 | B_TRANSLATE("OK")); |
| 2236 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
2229 | 2237 | alert->Go(NULL); |
2230 | 2238 | } |
2231 | 2239 | } |
-
diff --git a/src/apps/webpositive/DownloadProgressView.cpp b/src/apps/webpositive/DownloadProgressView.cpp
index 16c0ff1..dab2608 100644
a
|
b
|
DownloadProgressView::MessageReceived(BMessage* message)
|
412 | 412 | BAlert* alert = new BAlert(B_TRANSLATE("Open download error"), |
413 | 413 | B_TRANSLATE("The download could not be opened."), |
414 | 414 | B_TRANSLATE("OK")); |
| 415 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
415 | 416 | alert->Go(NULL); |
416 | 417 | } |
417 | 418 | break; |
-
diff --git a/src/apps/webpositive/DownloadWindow.cpp b/src/apps/webpositive/DownloadWindow.cpp
index 72c7663..89fa04c 100644
a
|
b
|
DownloadWindow::MessageReceived(BMessage* message)
|
286 | 286 | errorString.ReplaceFirst("%error", strerror(status)); |
287 | 287 | BAlert* alert = new BAlert(B_TRANSLATE("Error opening downloads " |
288 | 288 | "folder"), errorString.String(), B_TRANSLATE("OK")); |
| 289 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
289 | 290 | alert->Go(NULL); |
290 | 291 | } |
291 | 292 | break; |
-
diff --git a/src/apps/webwatch/WatchView.cpp b/src/apps/webwatch/WatchView.cpp
index 99d889c..4d9a707 100644
a
|
b
|
void WatchView::OnAboutRequested()
|
159 | 159 | "mahlzeit@users.sourceforge.net\n\n" |
160 | 160 | "Thanks to Jason Parks for his help.\n"); |
161 | 161 | text.ReplaceFirst("%1", VERSION); |
162 | | (new BAlert(NULL, text.String(), B_TRANSLATE("OK")))->Go(NULL); |
| 162 | BAlert* alert = new BAlert(NULL, text.String(), B_TRANSLATE("OK")); |
| 163 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 164 | alert->Go(NULL); |
163 | 165 | } |
164 | 166 | |
165 | 167 | /////////////////////////////////////////////////////////////////////////////// |
-
diff --git a/src/apps/workspaces/Workspaces.cpp b/src/apps/workspaces/Workspaces.cpp
index 9ca9071..6c7970c 100644
a
|
b
|
WorkspacesView::_AboutRequested()
|
420 | 420 | font.SetFace(B_BOLD_FACE); |
421 | 421 | view->SetFontAndColor(0, 10, &font); |
422 | 422 | |
| 423 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
423 | 424 | alert->Go(); |
424 | 425 | } |
425 | 426 | |
-
diff --git a/src/bin/checkitout.cpp b/src/bin/checkitout.cpp
index 9de9bb7..c068706 100644
a
|
b
|
CheckItOut::_Warn(const char* url)
|
57 | 57 | message << "Proceed anyway?"; |
58 | 58 | BAlert* alert = new BAlert("Warning", message.String(), "Proceed", "Stop", NULL, |
59 | 59 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 60 | alert->SetShortcut(1, B_ESCAPE); |
60 | 61 | int32 button; |
61 | 62 | button = alert->Go(); |
62 | 63 | if (button == 0) |
-
diff --git a/src/bin/desklink/MediaReplicant.cpp b/src/bin/desklink/MediaReplicant.cpp
index f9a379a..79fcc9f 100644
a
|
b
|
MediaReplicant::_Launch(const char* prettyName, const char* signature,
|
390 | 390 | BString message = B_TRANSLATE("Couldn't launch "); |
391 | 391 | message << prettyName; |
392 | 392 | |
393 | | (new BAlert(B_TRANSLATE("desklink"), message.String(), |
394 | | B_TRANSLATE("OK")))->Go(); |
| 393 | BAlert* alert = new BAlert(B_TRANSLATE("desklink"), message.String(), |
| 394 | B_TRANSLATE("OK")); |
| 395 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 396 | alert->Go(); |
395 | 397 | } |
396 | 398 | } |
397 | 399 | |
-
diff --git a/src/bin/mail_utils/spamdbm.cpp b/src/bin/mail_utils/spamdbm.cpp
index ebe549b..b8dadc0 100644
a
|
b
|
DisplayErrorMessage (
|
1503 | 1503 | { |
1504 | 1504 | AlertPntr = new BAlert (TitleString, MessageString, |
1505 | 1505 | "Acknowledge", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
1506 | | if (AlertPntr != NULL) |
| 1506 | if (AlertPntr != NULL) { |
| 1507 | AlertPntr->SetFlags(B_CLOSE_ON_ESCAPE); |
1507 | 1508 | AlertPntr->Go (); |
| 1509 | } |
1508 | 1510 | } |
1509 | 1511 | } |
1510 | 1512 | |
… |
… |
EstimateRefFilesAndDisplay (BMessage *MessagePntr)
|
1839 | 1841 | g_MaxInterestingWords - j); |
1840 | 1842 | |
1841 | 1843 | AlertPntr = new BAlert ("Estimate", TempString, "OK"); |
1842 | | if (AlertPntr != NULL) |
| 1844 | if (AlertPntr != NULL) { |
| 1845 | AlertPntr->SetFlags(B_CLOSE_ON_ESCAPE); |
1843 | 1846 | AlertPntr->Go (); |
| 1847 | } |
1844 | 1848 | } |
1845 | 1849 | } |
1846 | 1850 | |
… |
… |
uses to extract words from messages. In particular, HTML is now handled.\n\n"
|
2533 | 2537 | "Compiled on " __DATE__ " at " __TIME__ ".", "Done"); |
2534 | 2538 | if (AboutAlertPntr != NULL) |
2535 | 2539 | { |
2536 | | AboutAlertPntr->SetShortcut (0, B_ESCAPE); |
| 2540 | AboutAlertPntr->SetFlags(B_CLOSE_ON_ESCAPE); |
2537 | 2541 | AboutAlertPntr->Go (); |
2538 | 2542 | } |
2539 | 2543 | } |
-
diff --git a/src/bin/screenmode/screenmode.cpp b/src/bin/screenmode/screenmode.cpp
index 512ac32..f3127a1 100644
a
|
b
|
main(int argc, char** argv)
|
335 | 335 | BAlert* alert = new BAlert("screenmode", |
336 | 336 | "You have used the shortcut <Command><Ctrl><Escape> to reset the " |
337 | 337 | "screen mode to a safe fallback.", "Keep", "Revert"); |
| 338 | alert->SetShortcut(1, B_ESCAPE); |
338 | 339 | if (alert->Go() == 1) |
339 | 340 | screenMode.Revert(); |
340 | 341 | } |
-
diff --git a/src/bin/urlwrapper.cpp b/src/bin/urlwrapper.cpp
index 6c610e9..57f9806 100644
a
|
b
|
UrlWrapper::_Warn(const char* url)
|
58 | 58 | message << "Proceed anyway?"; |
59 | 59 | BAlert* alert = new BAlert("Warning", message.String(), "Proceed", "Stop", NULL, |
60 | 60 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 61 | alert->SetShortcut(1, B_ESCAPE); |
61 | 62 | int32 button; |
62 | 63 | button = alert->Go(); |
63 | 64 | if (button == 0) |
-
diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp
index 4d68d63..77981d3 100644
a
|
b
|
BApplication::AboutRequested()
|
649 | 649 | thread_info info; |
650 | 650 | if (get_thread_info(Thread(), &info) == B_OK) { |
651 | 651 | BAlert *alert = new BAlert("_about_", info.name, "OK"); |
| 652 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
652 | 653 | alert->Go(NULL); |
653 | 654 | } |
654 | 655 | } |
-
diff --git a/src/kits/interface/Dragger.cpp b/src/kits/interface/Dragger.cpp
index 37f92d6..d35f330 100644
a
|
b
|
BDragger::MessageReceived(BMessage* msg)
|
303 | 303 | if (fShelf != NULL) |
304 | 304 | Window()->PostMessage(kDeleteReplicant, fTarget, NULL); |
305 | 305 | else { |
306 | | (new BAlert(B_TRANSLATE("Warning"), |
| 306 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), |
307 | 307 | B_TRANSLATE("Can't delete this replicant from its original " |
308 | 308 | "application. Life goes on."), |
309 | 309 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, |
310 | | B_WARNING_ALERT))->Go(NULL); |
| 310 | B_WARNING_ALERT); |
| 311 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 312 | alert->Go(NULL); |
311 | 313 | } |
312 | 314 | break; |
313 | 315 | |
-
diff --git a/src/kits/interface/PrintJob.cpp b/src/kits/interface/PrintJob.cpp
index d21f27f..6df2f5c 100644
a
|
b
|
static void
|
103 | 103 | ShowError(const char* message) |
104 | 104 | { |
105 | 105 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), message, B_TRANSLATE("OK")); |
| 106 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
106 | 107 | alert->Go(); |
107 | 108 | } |
108 | 109 | |
… |
… |
PrintServerMessenger::RejectUserInput()
|
748 | 749 | fHiddenApplicationModalWindow = new BAlert("bogus", "app_modal", "OK"); |
749 | 750 | fHiddenApplicationModalWindow->DefaultButton()->SetEnabled(false); |
750 | 751 | fHiddenApplicationModalWindow->SetDefaultButton(NULL); |
| 752 | fHiddenApplicationModalWindow->SetFlags(B_CLOSE_ON_ESCAPE); |
751 | 753 | fHiddenApplicationModalWindow->MoveTo(-65000, -65000); |
752 | 754 | fHiddenApplicationModalWindow->Go(NULL); |
753 | 755 | } |
-
diff --git a/src/kits/interface/ZombieReplicantView.cpp b/src/kits/interface/ZombieReplicantView.cpp
index 400a2db..45f8656 100644
a
|
b
|
_BZombieReplicantView_::MessageReceived(BMessage* msg)
|
70 | 70 | BAlert* alert = new (std::nothrow) BAlert(B_TRANSLATE("Error"), |
71 | 71 | error.String(), B_TRANSLATE("OK"), NULL, NULL, |
72 | 72 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 73 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
73 | 74 | if (alert != NULL) |
74 | 75 | alert->Go(); |
75 | 76 | |
-
diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp
index c5dd255..14daf45 100644
a
|
b
|
BAboutWindow::Show()
|
88 | 88 | font.SetFace(B_BOLD_FACE); |
89 | 89 | font.SetSize(font.Size() * 1.7); |
90 | 90 | view->SetFontAndColor(0, fAppName->Length(), &font); |
| 91 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
91 | 92 | alert->Go(); |
92 | 93 | } |
93 | 94 | |
-
diff --git a/src/kits/tracker/AutoMounterSettings.cpp b/src/kits/tracker/AutoMounterSettings.cpp
index da9fed6..36cb499 100644
a
|
b
|
AutomountSettingsDialog::RunAutomountSettings(const BMessenger& target)
|
335 | 335 | BMessage reply; |
336 | 336 | status_t ret = target.SendMessage(&message, &reply, 2500000); |
337 | 337 | if (ret != B_OK) { |
338 | | (new BAlert(B_TRANSLATE("Mount server error"), |
| 338 | BAlert* alert = new BAlert(B_TRANSLATE("Mount server error"), |
339 | 339 | B_TRANSLATE("The mount server could not be contacted."), |
340 | 340 | B_TRANSLATE("OK"), |
341 | | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 341 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 342 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 343 | alert->Go(); |
342 | 344 | return; |
343 | 345 | } |
344 | 346 | |
-
diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp
index 33ec873..8045c94 100644
a
|
b
|
AddOnThread(BMessage* refsMessage, entry_ref addonRef, entry_ref dirRef)
|
286 | 286 | |
287 | 287 | BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), |
288 | 288 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
289 | | alert->SetShortcut(0, B_ESCAPE); |
| 289 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
290 | 290 | alert->Go(); |
291 | 291 | |
292 | 292 | return result; |
… |
… |
BContainerWindow::LoadAddOn(BMessage* message)
|
3213 | 3213 | |
3214 | 3214 | BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), |
3215 | 3215 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
3216 | | alert->SetShortcut(0, B_ESCAPE); |
| 3216 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
3217 | 3217 | alert->Go(); |
3218 | 3218 | return; |
3219 | 3219 | } |
-
diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp
index f250aa8..c2d3328 100644
a
|
b
|
FSClipboardPaste(Model* model, uint32 linksMode)
|
479 | 479 | B_TRANSLATE("You must drop items on one of the disk icons " |
480 | 480 | "in the \"Disks\" window."), B_TRANSLATE("Cancel"), NULL, NULL, |
481 | 481 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
482 | | alert->SetShortcut(0, B_ESCAPE); |
| 482 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
483 | 483 | alert->Go(); |
484 | 484 | okToMove = false; |
485 | 485 | } |
… |
… |
FSClipboardPaste(Model* model, uint32 linksMode)
|
493 | 493 | B_TRANSLATE("Sorry, you can't copy items to the Trash."), |
494 | 494 | B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
495 | 495 | B_WARNING_ALERT); |
496 | | alert->SetShortcut(0, B_ESCAPE); |
| 496 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
497 | 497 | alert->Go(); |
498 | 498 | okToMove = false; |
499 | 499 | } |
-
diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp
index 2e462e1..315c795 100644
a
|
b
|
TrackerCopyLoopControl::FileError(const char* message, const char* name,
|
357 | 357 | |
358 | 358 | BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, |
359 | 359 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
360 | | alert->SetShortcut(0, B_ESCAPE); |
| 360 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
361 | 361 | alert->Go(); |
362 | 362 | return false; |
363 | 363 | } |
… |
… |
InitCopy(CopyLoopControl* loopControl, uint32 moveMode,
|
736 | 736 | BAlert* alert = new BAlert("", |
737 | 737 | B_TRANSLATE("You can't move or copy items to read-only volumes."), |
738 | 738 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
739 | | alert->SetShortcut(0, B_ESCAPE); |
| 739 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
740 | 740 | alert->Go(); |
741 | 741 | return B_ERROR; |
742 | 742 | } |
… |
… |
InitCopy(CopyLoopControl* loopControl, uint32 moveMode,
|
762 | 762 | BAlert* alert = new BAlert("", errorStr.String(), |
763 | 763 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
764 | 764 | B_WARNING_ALERT); |
765 | | alert->SetShortcut(0, B_ESCAPE); |
| 765 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
766 | 766 | alert->Go(); |
767 | 767 | return B_ERROR; |
768 | 768 | } |
… |
… |
InitCopy(CopyLoopControl* loopControl, uint32 moveMode,
|
820 | 820 | B_TRANSLATE_NOCOLLECT(kNoFreeSpace), |
821 | 821 | B_TRANSLATE("Cancel"), |
822 | 822 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
823 | | alert->SetShortcut(0, B_ESCAPE); |
| 823 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
824 | 824 | alert->Go(); |
825 | 825 | return B_ERROR; |
826 | 826 | } |
… |
… |
MoveTask(BObjectList<entry_ref>* srcList, BEntry* destEntry, BList* pointList,
|
993 | 993 | BAlert* alert = new BAlert("", error.String(), |
994 | 994 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
995 | 995 | B_WARNING_ALERT); |
996 | | alert->SetShortcut(0, B_ESCAPE); |
| 996 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
997 | 997 | alert->Go(); |
998 | 998 | break; |
999 | 999 | } |
… |
… |
MoveTask(BObjectList<entry_ref>* srcList, BEntry* destEntry, BList* pointList,
|
1012 | 1012 | BAlert* alert = new BAlert("", error.String(), |
1013 | 1013 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
1014 | 1014 | B_WARNING_ALERT); |
1015 | | alert->SetShortcut(0, B_ESCAPE); |
| 1015 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1016 | 1016 | alert->Go(); |
1017 | 1017 | break; |
1018 | 1018 | } |
… |
… |
MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode,
|
1742 | 1742 | } catch (MoveError error) { |
1743 | 1743 | BString errorString(B_TRANSLATE("Error moving \"%name\"")); |
1744 | 1744 | errorString.ReplaceFirst("%name", ref.name); |
1745 | | (new BAlert("", errorString.String(), B_TRANSLATE("OK"), 0, 0, |
1746 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 1745 | BAlert* alert = new BAlert("", errorString.String(), B_TRANSLATE("OK"), |
| 1746 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1747 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1748 | alert->Go(); |
1747 | 1749 | return error.fError; |
1748 | 1750 | } catch (FailWithAlert error) { |
1749 | 1751 | BString buffer(error.fString); |
… |
… |
MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode,
|
1751 | 1753 | buffer.ReplaceFirst("%name", error.fName); |
1752 | 1754 | else |
1753 | 1755 | buffer << error.fString; |
1754 | | (new BAlert("", buffer.String(), B_TRANSLATE("OK"), 0, 0, |
1755 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 1756 | BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("OK"), |
| 1757 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1758 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1759 | alert->Go(); |
1756 | 1760 | |
1757 | 1761 | return error.fError; |
1758 | 1762 | } |
… |
… |
MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo)
|
1890 | 1894 | BAlert* alert = new BAlert("", buffer.String(), |
1891 | 1895 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
1892 | 1896 | B_WARNING_ALERT); |
1893 | | alert->SetShortcut(0, B_ESCAPE); |
| 1897 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1894 | 1898 | alert->Go(); |
1895 | 1899 | } else { |
1896 | 1900 | BMessage message(kUnmountVolume); |
… |
… |
MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo)
|
1910 | 1914 | trash_dir.GetEntry(&trashEntry); |
1911 | 1915 | |
1912 | 1916 | if (dir == trash_dir || dir.Contains(&trashEntry)) { |
1913 | | (new BAlert("", |
| 1917 | BAlert* alert = new BAlert("", |
1914 | 1918 | B_TRANSLATE("You cannot put the Trash, home or Desktop " |
1915 | 1919 | "directory into the trash."), |
1916 | 1920 | B_TRANSLATE("OK"), |
1917 | | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 1921 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1922 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1923 | alert->Go(); |
1918 | 1924 | |
1919 | 1925 | // return no error so we don't get two dialogs |
1920 | 1926 | return B_OK; |
… |
… |
CheckName(uint32 moveMode, const BEntry* sourceEntry,
|
2062 | 2068 | && moveMode != kCreateRelativeLink |
2063 | 2069 | && (srcDirectory == *destDir |
2064 | 2070 | || srcDirectory.Contains(&destEntry))) { |
2065 | | (new BAlert("", |
| 2071 | BAlert* alert = new BAlert("", |
2066 | 2072 | B_TRANSLATE("You can't move a folder into itself " |
2067 | 2073 | "or any of its own sub-folders."), B_TRANSLATE("OK"), |
2068 | | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 2074 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 2075 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2076 | alert->Go(); |
2069 | 2077 | return B_ERROR; |
2070 | 2078 | } |
2071 | 2079 | } |
2072 | 2080 | |
2073 | 2081 | if (FSIsTrashDir(sourceEntry) && moveMode != kCreateLink |
2074 | 2082 | && moveMode != kCreateRelativeLink) { |
2075 | | (new BAlert("", |
| 2083 | BAlert* alert = new BAlert("", |
2076 | 2084 | B_TRANSLATE("You can't move or copy the trash."), |
2077 | 2085 | B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, |
2078 | | B_WARNING_ALERT))->Go(); |
| 2086 | B_WARNING_ALERT); |
| 2087 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2088 | alert->Go(); |
2079 | 2089 | return B_ERROR; |
2080 | 2090 | } |
2081 | 2091 | |
… |
… |
CheckName(uint32 moveMode, const BEntry* sourceEntry,
|
2098 | 2108 | if (destIsDir) { |
2099 | 2109 | BDirectory test_dir(&entry); |
2100 | 2110 | if (test_dir.Contains(sourceEntry)) { |
2101 | | (new BAlert("", |
| 2111 | BAlert* alert = new BAlert("", |
2102 | 2112 | B_TRANSLATE("You can't replace a folder " |
2103 | 2113 | "with one of its sub-folders."), |
2104 | | B_TRANSLATE("OK"), |
2105 | | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 2114 | B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 2115 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2116 | alert->Go(); |
2106 | 2117 | return B_ERROR; |
2107 | 2118 | } |
2108 | 2119 | } |
… |
… |
CheckName(uint32 moveMode, const BEntry* sourceEntry,
|
2112 | 2123 | if (moveMode != kCreateLink |
2113 | 2124 | && moveMode != kCreateRelativeLink |
2114 | 2125 | && destIsDir != sourceIsDirectory) { |
2115 | | (new BAlert("", sourceIsDirectory |
| 2126 | BAlert* alert = new BAlert("", sourceIsDirectory |
2116 | 2127 | ? B_TRANSLATE("You cannot replace a file with a folder or a " |
2117 | 2128 | "symbolic link.") |
2118 | 2129 | : B_TRANSLATE("You cannot replace a folder or a symbolic link " |
2119 | 2130 | "with a file."), B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, |
2120 | | B_WARNING_ALERT))->Go(); |
| 2131 | B_WARNING_ALERT); |
| 2132 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2133 | alert->Go(); |
2121 | 2134 | return B_ERROR; |
2122 | 2135 | } |
2123 | 2136 | |
… |
… |
CheckName(uint32 moveMode, const BEntry* sourceEntry,
|
2196 | 2209 | error.ReplaceFirst("%name", name);; |
2197 | 2210 | BAlert* alert = new BAlert("", error.String(), |
2198 | 2211 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
2199 | | alert->SetShortcut(0, B_ESCAPE); |
| 2212 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
2200 | 2213 | alert->Go(); |
2201 | 2214 | } |
2202 | 2215 | |
… |
… |
empty_trash(void*)
|
2815 | 2828 | } |
2816 | 2829 | |
2817 | 2830 | if (err != B_OK && err != kTrashCanceled && err != kUserCanceled) { |
2818 | | (new BAlert("", B_TRANSLATE("Error emptying Trash"), |
2819 | | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
2820 | | B_WARNING_ALERT))->Go(); |
| 2831 | BAlert* alert = new BAlert("", B_TRANSLATE("Error emptying Trash"), |
| 2832 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 2833 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2834 | alert->Go(); |
2821 | 2835 | } |
2822 | 2836 | |
2823 | 2837 | return B_OK; |
… |
… |
_DeleteTask(BObjectList<entry_ref>* list, bool confirm)
|
2887 | 2901 | err = entry.Remove(); |
2888 | 2902 | } |
2889 | 2903 | |
2890 | | if (err != kTrashCanceled && err != kUserCanceled && err != B_OK) |
2891 | | (new BAlert("", B_TRANSLATE("Error deleting items"), |
2892 | | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
2893 | | B_WARNING_ALERT))->Go(); |
| 2904 | if (err != kTrashCanceled && err != kUserCanceled && err != B_OK) { |
| 2905 | BAlert* alert = new BAlert("", B_TRANSLATE("Error deleting items"), |
| 2906 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 2907 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2908 | alert->Go(); |
| 2909 | } |
2894 | 2910 | } |
2895 | 2911 | |
2896 | 2912 | delete list; |
… |
… |
FSCreateNewFolderIn(const node_ref* dirNode, entry_ref* newRef,
|
3081 | 3097 | BAlert* alert = new BAlert("", |
3082 | 3098 | B_TRANSLATE("Sorry, could not create a new folder."), |
3083 | 3099 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
3084 | | alert->SetShortcut(0, B_ESCAPE); |
| 3100 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
3085 | 3101 | alert->Go(); |
3086 | 3102 | return result; |
3087 | 3103 | } |
… |
… |
_TrackerLaunchAppWithDocuments(const entry_ref* appRef, const BMessage* refs,
|
3254 | 3270 | BAlert* alert = new BAlert("", alertString.String(), |
3255 | 3271 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
3256 | 3272 | B_WARNING_ALERT); |
3257 | | alert->SetShortcut(0, B_ESCAPE); |
| 3273 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
3258 | 3274 | alert->Go(); |
3259 | 3275 | } |
3260 | 3276 | } |
… |
… |
_TrackerLaunchDocuments(const entry_ref* /*doNotUse*/, const BMessage* refs,
|
3557 | 3573 | BAlert* alert = new BAlert("", alertString.String(), |
3558 | 3574 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
3559 | 3575 | B_WARNING_ALERT); |
3560 | | alert->SetShortcut(0, B_ESCAPE); |
| 3576 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
3561 | 3577 | alert->Go(); |
3562 | 3578 | } |
3563 | 3579 | } |
-
diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp
index 1513841..d4d1440 100644
a
|
b
|
AttributeView::FinishEditingTitle(bool commit)
|
1985 | 1985 | if (entry.InitCheck() == B_OK |
1986 | 1986 | && entry.GetParent(&parent) == B_OK) { |
1987 | 1987 | if (parent.Contains(text)) { |
1988 | | (new BAlert("", |
| 1988 | BAlert* alert = new BAlert("", |
1989 | 1989 | B_TRANSLATE("That name is already taken. " |
1990 | 1990 | "Please type another one."), |
1991 | 1991 | B_TRANSLATE("OK"), |
1992 | | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 1992 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1993 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 1994 | alert->Go(); |
1993 | 1995 | reopen = true; |
1994 | 1996 | } else { |
1995 | 1997 | if (fModel->IsVolume()) { |
… |
… |
AttributeView::FinishEditingTitle(bool commit)
|
2009 | 2011 | } |
2010 | 2012 | } |
2011 | 2013 | } else if (length >= B_FILE_NAME_LENGTH) { |
2012 | | (new BAlert("", |
2013 | | B_TRANSLATE("That name is too long. " |
2014 | | "Please type another one."), |
| 2014 | BAlert* alert = new BAlert("", |
| 2015 | B_TRANSLATE("That name is too long. Please type another one."), |
2015 | 2016 | B_TRANSLATE("OK"), |
2016 | | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 2017 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 2018 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 2019 | alert->Go(); |
2017 | 2020 | reopen = true; |
2018 | 2021 | } |
2019 | 2022 | |
-
diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp
index 7d5456d..9156ab8 100644
a
|
b
|
OpenWithPoseView::OpenSelection(BPose* pose, int32*)
|
672 | 672 | B_TRANSLATE("Could not find application \"%appname\"")); |
673 | 673 | errorString.ReplaceFirst("%appname", pose->TargetModel()->Name()); |
674 | 674 | |
675 | | (new BAlert("", errorString.String(), B_TRANSLATE("OK"), 0, 0, |
676 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 675 | BAlert* alert = new BAlert("", errorString.String(), B_TRANSLATE("OK"), |
| 676 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 677 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 678 | alert->Go(); |
677 | 679 | return; |
678 | 680 | } |
679 | 681 | |
-
diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 7430bff..1e6c2c7 100644
a
|
b
|
BPoseView::RemoveColumn(BColumn* columnToRemove, bool runAlert)
|
2609 | 2609 | BAlert* alert = new BAlert("", |
2610 | 2610 | B_TRANSLATE("You must have at least one attribute showing."), |
2611 | 2611 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
2612 | | alert->SetShortcut(0, B_ESCAPE); |
| 2612 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
2613 | 2613 | alert->Go(); |
2614 | 2614 | } |
2615 | 2615 | |
… |
… |
BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
4832 | 4832 | B_TRANSLATE("You must drop items on one of the disk icons " |
4833 | 4833 | "in the \"Disks\" window."), B_TRANSLATE("Cancel"), NULL, NULL, |
4834 | 4834 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
4835 | | alert->SetShortcut(0, B_ESCAPE); |
| 4835 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
4836 | 4836 | alert->Go(); |
4837 | 4837 | okToMove = false; |
4838 | 4838 | } |
… |
… |
BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
4843 | 4843 | B_TRANSLATE("Sorry, you can't copy items to the Trash."), |
4844 | 4844 | B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
4845 | 4845 | B_WARNING_ALERT); |
4846 | | alert->SetShortcut(0, B_ESCAPE); |
| 4846 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
4847 | 4847 | alert->Go(); |
4848 | 4848 | okToMove = false; |
4849 | 4849 | } |
… |
… |
BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
4854 | 4854 | B_TRANSLATE("Sorry, you can't create links in the Trash."), |
4855 | 4855 | B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
4856 | 4856 | B_WARNING_ALERT); |
4857 | | alert->SetShortcut(0, B_ESCAPE); |
| 4857 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
4858 | 4858 | alert->Go(); |
4859 | 4859 | okToMove = false; |
4860 | 4860 | } |
… |
… |
CheckVolumeReadOnly(const entry_ref* ref)
|
5744 | 5744 | B_TRANSLATE("Files cannot be moved or deleted from a read-only " |
5745 | 5745 | "volume."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
5746 | 5746 | B_STOP_ALERT); |
5747 | | alert->SetShortcut(0, B_ESCAPE); |
| 5747 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
5748 | 5748 | alert->Go(); |
5749 | 5749 | return false; |
5750 | 5750 | } |
… |
… |
BPoseView::SelectMatchingEntries(const BMessage* message)
|
6084 | 6084 | BString message( |
6085 | 6085 | B_TRANSLATE("Error in regular expression:\n\n'%errstring'")); |
6086 | 6086 | message.ReplaceFirst("%errstring", regExpression.ErrorString()); |
6087 | | (new BAlert("", message.String(), B_TRANSLATE("OK"), NULL, NULL, |
6088 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 6087 | BAlert* alert = new BAlert("", message.String(), B_TRANSLATE("OK"), |
| 6088 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 6089 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 6090 | alert->Go(); |
6089 | 6091 | return 0; |
6090 | 6092 | } |
6091 | 6093 | } |
… |
… |
BPoseView::OpenInfoWindows()
|
8076 | 8078 | B_TRANSLATE("The Tracker must be running to see Info windows."), |
8077 | 8079 | B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
8078 | 8080 | B_WARNING_ALERT); |
8079 | | alert->SetShortcut(0, B_ESCAPE); |
| 8081 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
8080 | 8082 | alert->Go(); |
8081 | 8083 | return; |
8082 | 8084 | } |
… |
… |
BPoseView::SetDefaultPrinter()
|
8093 | 8095 | B_TRANSLATE("The Tracker must be running to see set the default " |
8094 | 8096 | "printer."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, |
8095 | 8097 | B_WARNING_ALERT); |
8096 | | alert->SetShortcut(0, B_ESCAPE); |
| 8098 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
8097 | 8099 | alert->Go(); |
8098 | 8100 | return; |
8099 | 8101 | } |
-
diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp
index bf44a53..8e48e29 100644
a
|
b
|
TTracker::OpenRef(const entry_ref* ref, const node_ref* nodeToClose,
|
704 | 704 | B_TRANSLATE("There was an error resolving the link."), |
705 | 705 | B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, |
706 | 706 | B_WARNING_ALERT); |
707 | | alert->SetShortcut(0, B_ESCAPE); |
| 707 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
708 | 708 | alert->Go(); |
709 | 709 | return result; |
710 | 710 | } |
-
diff --git a/src/kits/tracker/TrackerInitialState.cpp b/src/kits/tracker/TrackerInitialState.cpp
index 7bc3c89..4c867bf 100644
a
|
b
|
TTracker::InstallTemporaryBackgroundImages()
|
641 | 641 | "failed. \nReason: %error")); |
642 | 642 | errorMessage.ReplaceFirst("%func", __PRETTY_FUNCTION__); |
643 | 643 | errorMessage.ReplaceFirst("%error", strerror(status)); |
644 | | (new BAlert("AlertError", errorMessage.String(), B_TRANSLATE("OK"), |
645 | | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 644 | BAlert* alert = new BAlert("AlertError", errorMessage.String(), |
| 645 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 646 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 647 | alert->Go(); |
646 | 648 | return; |
647 | 649 | } |
648 | 650 | path.Append("artwork"); |
-
diff --git a/src/kits/tracker/WidgetAttributeText.cpp b/src/kits/tracker/WidgetAttributeText.cpp
index 3e6c25d..0456fba 100644
a
|
b
|
GenericAttributeText::CommitEditedTextFlavor(BTextView* textView)
|
1661 | 1661 | B_TRANSLATE("Sorry, you cannot edit that attribute."), |
1662 | 1662 | B_TRANSLATE("Cancel"), |
1663 | 1663 | 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
1664 | | alert->SetShortcut(0, B_ESCAPE); |
| 1664 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1665 | 1665 | alert->Go(); |
1666 | 1666 | return false; |
1667 | 1667 | } |
… |
… |
GenericAttributeText::CommitEditedTextFlavor(BTextView* textView)
|
1698 | 1698 | "attribute cannot store a multi-byte glyph."), |
1699 | 1699 | B_TRANSLATE("Cancel"), |
1700 | 1700 | 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
1701 | | alert->SetShortcut(0, B_ESCAPE); |
| 1701 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1702 | 1702 | alert->Go(); |
1703 | 1703 | return false; |
1704 | 1704 | } |
… |
… |
GenericAttributeText::CommitEditedTextFlavor(BTextView* textView)
|
1806 | 1806 | B_TRANSLATE("There was an error writing the attribute."), |
1807 | 1807 | B_TRANSLATE("Cancel"), |
1808 | 1808 | 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
1809 | | alert->SetShortcut(0, B_ESCAPE); |
| 1809 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1810 | 1810 | alert->Go(); |
1811 | 1811 | |
1812 | 1812 | fValueIsDefined = false; |
-
diff --git a/src/libs/print/libprint/BlockingWindow.cpp b/src/libs/print/libprint/BlockingWindow.cpp
index 82cb546..ab658cb 100644
a
|
b
|
HWindow::AboutRequested()
|
131 | 131 | font.SetSize(12); // font.SetFace(B_OUTLINED_FACE); |
132 | 132 | v->SetFontAndColor(0, s-text+1, &font, B_FONT_SIZE); |
133 | 133 | }; |
| 134 | about->SetFlags(B_CLOSE_ON_ESCAPE); |
134 | 135 | about->Go(); |
135 | 136 | } |
136 | 137 | |
-
diff --git a/src/libs/print/libprint/GraphicsDriver.cpp b/src/libs/print/libprint/GraphicsDriver.cpp
index 8340b8a..0aa8a4e 100644
a
|
b
|
GraphicsDriver::_PrintJob(BFile* spoolFile)
|
702 | 702 | alert = new BAlert("", fTransport->LastError().c_str(), "OK"); |
703 | 703 | else |
704 | 704 | alert = new BAlert("", "Printer not responding.", "OK"); |
| 705 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
705 | 706 | alert->Go(); |
706 | 707 | } |
707 | 708 | |
-
diff --git a/src/preferences/appearance/CurView.cpp b/src/preferences/appearance/CurView.cpp
index f034006..0e227b1 100644
a
|
b
|
printf("Loading cursor sets from disk\n");
|
238 | 238 | "Please contact OpenBeOS about Appearance Preferences::CurView::" |
239 | 239 | "LoadCursorSets::B_NAME_TOO_LONG for a bugfix", "OK", |
240 | 240 | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 241 | a->SetFlags(B_CLOSE_ON_ESCAPE); |
241 | 242 | a->Go(); |
242 | 243 | break; |
243 | 244 | } |
… |
… |
printf("Loading cursor sets from disk\n");
|
267 | 268 | "because of a file error. Perhaps there is a file (instead of a folder) at " COLOR_SET_DIR |
268 | 269 | "? You will be able to change system cursors, but be unable to save them to a cursor set. ", |
269 | 270 | "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 271 | a->SetFlags(B_CLOSE_ON_ESCAPE); |
270 | 272 | a->Go(); |
271 | 273 | break; |
272 | 274 | } |
… |
… |
printf("Loading cursor sets from disk\n");
|
276 | 278 | "because there are too many open files. Please close some files and restart " |
277 | 279 | " this application.", "OK", |
278 | 280 | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 281 | a->SetFlags(B_CLOSE_ON_ESCAPE); |
279 | 282 | a->Go(); |
280 | 283 | if(Window()) |
281 | 284 | Window()->PostMessage(B_QUIT_REQUESTED); |
-
diff --git a/src/preferences/appearance/DecorSettingsView.cpp b/src/preferences/appearance/DecorSettingsView.cpp
index 86882be..237d20d 100644
a
|
b
|
DecorSettingsView::MessageReceived(BMessage *msg)
|
120 | 120 | |
121 | 121 | BAlert *infoAlert = new BAlert(B_TRANSLATE("About Decorator"), |
122 | 122 | infoText.String(), B_TRANSLATE("OK")); |
123 | | infoAlert->SetShortcut(0, B_ESCAPE); |
| 123 | infoAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
124 | 124 | infoAlert->Go(); |
125 | 125 | |
126 | 126 | break; |
-
diff --git a/src/preferences/bluetooth/BluetoothMain.cpp b/src/preferences/bluetooth/BluetoothMain.cpp
index c76142f..2d6c402 100644
a
|
b
|
void
|
27 | 27 | BluetoothApplication::ReadyToRun() |
28 | 28 | { |
29 | 29 | if (!be_roster->IsRunning(BLUETOOTH_SIGNATURE)) { |
30 | | |
31 | | int32 choice = (new BAlert("bluetooth_server not running", |
| 30 | BAlert* alert = new BAlert("bluetooth_server not running", |
32 | 31 | B_TRANSLATE("bluetooth_server has not been found running on the " |
33 | 32 | "system. Should be started, or stay offline"), |
34 | 33 | B_TRANSLATE("Work offline"), B_TRANSLATE("Quit"), |
35 | 34 | B_TRANSLATE("Start please"), B_WIDTH_AS_USUAL, |
36 | | B_WARNING_ALERT))->Go(); |
| 35 | B_WARNING_ALERT); |
| 36 | alert->SetShortcut(2, B_ESCAPE); |
| 37 | int32 choice = alert->Go(); |
37 | 38 | |
38 | 39 | |
39 | 40 | switch (choice) { |
… |
… |
BluetoothApplication::MessageReceived(BMessage* message)
|
90 | 91 | void |
91 | 92 | BluetoothApplication::AboutRequested() |
92 | 93 | { |
93 | | |
94 | | (new BAlert("about", B_TRANSLATE("Haiku Bluetooth system, (ARCE)\n\n" |
| 94 | BAlert* alert = new BAlert("about", B_TRANSLATE( |
| 95 | "Haiku Bluetooth system, (ARCE)\n\n" |
95 | 96 | "Created by Oliver Ruiz Dorantes\n\n" |
96 | 97 | "With support of:\n" |
97 | 98 | " - Mika Lindqvist\n" |
… |
… |
BluetoothApplication::AboutRequested()
|
121 | 122 | " - Petter H. Juliussen\n" |
122 | 123 | "Who gave me all the knowledge:\n" |
123 | 124 | " - the yellowTAB team"), |
124 | | B_TRANSLATE("OK")))->Go(); |
125 | | |
| 125 | B_TRANSLATE("OK")); |
| 126 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 127 | alert->Go(); |
126 | 128 | } |
127 | 129 | |
128 | 130 | |
-
diff --git a/src/preferences/cpufrequency/StatusView.cpp b/src/preferences/cpufrequency/StatusView.cpp
index 3d7a651..c235ac8 100644
a
|
b
|
StatusView::_AboutRequested()
|
429 | 429 | BAlert *alert = new BAlert("about", B_TRANSLATE("CPUFrequency\n" |
430 | 430 | "\twritten by Clemens Zeidler\n" |
431 | 431 | "\tCopyright 2009, Haiku, Inc.\n"), |
432 | | B_TRANSLATE("Ok")); |
| 432 | B_TRANSLATE("OK")); |
433 | 433 | BTextView *view = alert->TextView(); |
434 | 434 | BFont font; |
435 | 435 | |
… |
… |
StatusView::_AboutRequested()
|
440 | 440 | font.SetFace(B_BOLD_FACE); |
441 | 441 | view->SetFontAndColor(0, 13, &font); |
442 | 442 | |
| 443 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
443 | 444 | alert->Go(); |
444 | 445 | } |
445 | 446 | |
… |
… |
StatusView::_OpenPreferences()
|
689 | 690 | "Launching the CPU frequency preflet failed.\n\nError: ")); |
690 | 691 | errorMessage << strerror(ret); |
691 | 692 | BAlert* alert = new BAlert("launch error", errorMessage.String(), |
692 | | "Ok"); |
| 693 | "OK"); |
693 | 694 | // asynchronous alert in order to not block replicant host |
694 | 695 | // application |
| 696 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
695 | 697 | alert->Go(NULL); |
696 | 698 | } |
697 | 699 | } |
-
diff --git a/src/preferences/datatranslations/DataTranslations.cpp b/src/preferences/datatranslations/DataTranslations.cpp
index 2c9ff01..9aeeb84 100644
a
|
b
|
DataTranslationsApplication::_InstallError(const char* name, status_t status)
|
53 | 53 | text.UnlockBuffer(); |
54 | 54 | BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Error"), |
55 | 55 | text.String(), B_TRANSLATE("OK")); |
| 56 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
56 | 57 | alert->Go(); |
57 | 58 | } |
58 | 59 | |
… |
… |
DataTranslationsApplication::_NoTranslatorError(const char* name)
|
83 | 84 | B_TRANSLATE("The item '%name' does not appear to be a Translator and " |
84 | 85 | "will not be installed.")); |
85 | 86 | text.ReplaceAll("%name", name); |
86 | | BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok")); |
| 87 | BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("OK")); |
| 88 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
87 | 89 | alert->Go(); |
88 | 90 | } |
89 | 91 | |
… |
… |
DataTranslationsApplication::RefsReceived(BMessage* message)
|
152 | 154 | BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"), |
153 | 155 | B_TRANSLATE("The new translator has been installed " |
154 | 156 | "successfully."), B_TRANSLATE("OK")); |
| 157 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
155 | 158 | alert->Go(NULL); |
156 | 159 | } else |
157 | 160 | _InstallError(ref.name, status); |
-
diff --git a/src/preferences/datatranslations/DataTranslationsWindow.cpp b/src/preferences/datatranslations/DataTranslationsWindow.cpp
index 41e8bb3..0c834c3 100644
a
|
b
|
DataTranslationsWindow::_ShowInfoAlert(int32 id)
|
282 | 282 | view->SetFontAndColor(index, index + strlen(labels[i]), &font); |
283 | 283 | } |
284 | 284 | |
| 285 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
285 | 286 | alert->Go(); |
286 | 287 | } |
287 | 288 | |
-
diff --git a/src/preferences/dun/DUNWindow.cpp b/src/preferences/dun/DUNWindow.cpp
index f8d8f6c81..40c1571 100644
a
|
b
|
void DUNWindow::MessageReceived (BMessage *message)
|
357 | 357 | connectbutton->SetEnabled(false); |
358 | 358 | //debug |
359 | 359 | BAlert *errormsg = new BAlert("errormsg", "The hidden wispy bush\nOver the green flower\nThe sea and connection have stopped.", " Haiku Error ;) " , NULL, NULL, B_WIDTH_FROM_WIDEST, B_IDEA_ALERT); |
360 | | errormsg->SetShortcut(0, B_ESCAPE); |
| 360 | errormsg->SetFlags(B_CLOSE_ON_ESCAPE); |
361 | 361 | errormsg->Go(); |
362 | 362 | } |
363 | 363 | break; |
… |
… |
void DUNWindow::MessageReceived (BMessage *message)
|
367 | 367 | disconnectbutton->SetEnabled(false); |
368 | 368 | connectbutton->SetEnabled(true); |
369 | 369 | BAlert *errormsg = new BAlert("errormsg", "A late long rain\nOver an icy meadow\nBroken connection and dreams.", " Haiku Error ;) ", NULL , NULL, B_WIDTH_FROM_WIDEST, B_IDEA_ALERT); |
370 | | errormsg->SetShortcut(0, B_ESCAPE); |
| 370 | errormsg->SetFlags(B_CLOSE_ON_ESCAPE); |
371 | 371 | errormsg->Go(); |
372 | 372 | } |
373 | 373 | break; |
… |
… |
void DUNWindow::MessageReceived (BMessage *message)
|
376 | 376 | { |
377 | 377 | // debug |
378 | 378 | BAlert *errormsg = new BAlert("errormsg", "Hark! Something is wrong.\nFor this is not what I asked.\n\nMy life is somewhat ... Incomplete.\n", " Haiku Error ;) " , NULL, NULL, B_WIDTH_FROM_WIDEST, B_IDEA_ALERT); |
379 | | errormsg->SetShortcut(0, B_ESCAPE); |
| 379 | errormsg->SetFlags(B_CLOSE_ON_ESCAPE); |
380 | 380 | errormsg->Go(); |
381 | 381 | } |
382 | 382 | break; |
… |
… |
void DUNWindow::MessageReceived (BMessage *message)
|
385 | 385 | { |
386 | 386 | // debug |
387 | 387 | BAlert *errormsg = new BAlert("errormsg", "Lost Clouds.\nDisappear behind the mountains.\n\nFor an eternity must I wait ?\n", " Haiku Error ;) " , NULL, NULL, B_WIDTH_FROM_WIDEST, B_IDEA_ALERT); |
388 | | errormsg->SetShortcut(0, B_ESCAPE); |
| 388 | errormsg->SetFlags(B_CLOSE_ON_ESCAPE); |
389 | 389 | errormsg->Go(); |
390 | 390 | } |
391 | 391 | break; |
-
diff --git a/src/preferences/filetypes/ApplicationTypeWindow.cpp b/src/preferences/filetypes/ApplicationTypeWindow.cpp
index 5ceaaed..77fc74f 100644
a
|
b
|
ApplicationTypeWindow::QuitRequested()
|
1025 | 1025 | B_TRANSLATE("Do you want to save the changes?"), |
1026 | 1026 | B_TRANSLATE("Quit, don't save"), B_TRANSLATE("Cancel"), |
1027 | 1027 | B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1028 | alert->SetShortcut(1, B_ESCAPE); |
| 1029 | |
1028 | 1030 | int32 choice = alert->Go(); |
1029 | 1031 | switch (choice) { |
1030 | 1032 | case 0: |
-
diff --git a/src/preferences/filetypes/FileTypes.cpp b/src/preferences/filetypes/FileTypes.cpp
index 91ec41b..17fcda6 100644
a
|
b
|
FileTypes::RefsReceived(BMessage* message)
|
227 | 227 | "%s"), |
228 | 228 | ref.name, strerror(status)); |
229 | 229 | |
230 | | (new BAlert(B_TRANSLATE("FileTypes request"), |
| 230 | BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), |
231 | 231 | buffer, B_TRANSLATE("OK"), NULL, NULL, |
232 | | B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); |
| 232 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 233 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 234 | alert->Go(); |
233 | 235 | |
234 | 236 | message->RemoveData("refs", --index); |
235 | 237 | continue; |
… |
… |
error_alert(const char* message, status_t status, alert_type type)
|
475 | 477 | strerror(status)); |
476 | 478 | } |
477 | 479 | |
478 | | (new BAlert(B_TRANSLATE("FileTypes request"), |
| 480 | BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), |
479 | 481 | status == B_OK ? message : warning, |
480 | | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, type))->Go(); |
| 482 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, type); |
| 483 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 484 | alert->Go(); |
481 | 485 | } |
482 | 486 | |
483 | 487 | |
-
diff --git a/src/preferences/filetypes/FileTypesWindow.cpp b/src/preferences/filetypes/FileTypesWindow.cpp
index 6d8d9de..ed2b153 100644
a
|
b
|
FileTypesWindow::MessageReceived(BMessage* message)
|
679 | 679 | "group, hold down the Shift key and press \"Remove\"."), |
680 | 680 | B_TRANSLATE("Remove"), B_SHIFT_KEY, B_TRANSLATE("Cancel"), |
681 | 681 | 0, NULL, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 682 | alert->SetShortcut(1, B_ESCAPE); |
682 | 683 | } else { |
683 | 684 | alert = new BAlert(B_TRANSLATE("FileTypes request"), |
684 | 685 | B_TRANSLATE("Removing a file type cannot be reverted.\n" |
685 | 686 | "Are you sure you want to remove it?"), |
686 | 687 | B_TRANSLATE("Remove"), B_TRANSLATE("Cancel"), |
687 | 688 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 689 | alert->SetShortcut(1, B_ESCAPE); |
688 | 690 | } |
689 | 691 | if (alert->Go()) |
690 | 692 | break; |
-
diff --git a/src/preferences/filetypes/PreferredAppMenu.cpp b/src/preferences/filetypes/PreferredAppMenu.cpp
index 55933b3..2ff8154 100644
a
|
b
|
retrieve_preferred_app(BMessage* message, bool sameAs, const char* forType,
|
291 | 291 | description[0] ? description : preferred); |
292 | 292 | |
293 | 293 | BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), warning, |
294 | | B_TRANSLATE("Set Preferred Application"), B_TRANSLATE("Cancel"), |
| 294 | B_TRANSLATE("Set preferred application"), B_TRANSLATE("Cancel"), |
295 | 295 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 296 | alert->SetShortcut(1, B_ESCAPE); |
296 | 297 | if (alert->Go() == 1) |
297 | 298 | return B_ERROR; |
298 | 299 | } |
-
diff --git a/src/preferences/fonts/main.cpp b/src/preferences/fonts/main.cpp
index c46fa4a..34cddfd 100644
a
|
b
|
FontsApp::AboutRequested()
|
50 | 50 | font.SetSize(18); |
51 | 51 | font.SetFace(B_BOLD_FACE); |
52 | 52 | view->SetFontAndColor(0, 5, &font); |
53 | | |
| 53 | |
| 54 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
54 | 55 | alert->Go(); |
55 | 56 | } |
56 | 57 | |
-
diff --git a/src/preferences/joysticks/JoyWin.cpp b/src/preferences/joysticks/JoyWin.cpp
index fb03fea..2423eb4 100644
a
|
b
|
static int
|
49 | 49 | ShowMessage(char* string) |
50 | 50 | { |
51 | 51 | BAlert *alert = new BAlert("Message", string, "OK"); |
52 | | alert->SetShortcut(1, B_ESCAPE); |
| 52 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
53 | 53 | return alert->Go(); |
54 | 54 | } |
55 | 55 | |
… |
… |
JoyWin::_ShowNoCompatibleJoystickMessage()
|
437 | 437 | str << " for a driver designed for Haiku or BeOS."; |
438 | 438 | |
439 | 439 | BAlert *alert = new BAlert("test1", str.String(), "OK"); |
440 | | alert->SetShortcut(0, B_ENTER); |
| 440 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
441 | 441 | alert->Go(); |
442 | 442 | } |
443 | 443 | |
… |
… |
JoyWin::_ShowNoDeviceConnectedMessage(const char* joy, const char* port)
|
448 | 448 | str << joy << " device connected to the port '" << port << "'."; |
449 | 449 | |
450 | 450 | BAlert *alert = new BAlert("test1", str.String(), "Stop"); |
451 | | alert->SetShortcut(0, B_ENTER); |
| 451 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
452 | 452 | alert->Go(); |
453 | 453 | } |
454 | 454 | |
-
diff --git a/src/preferences/keyboard/Keyboard.cpp b/src/preferences/keyboard/Keyboard.cpp
index 91c8d74..1774fac 100644
a
|
b
|
KeyboardApplication::MessageReceived(BMessage* message)
|
35 | 35 | B_TRANSLATE("Something has gone wrong!"), |
36 | 36 | B_TRANSLATE("OK"), NULL, NULL, |
37 | 37 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); |
| 38 | errorAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
38 | 39 | errorAlert->Go(); |
39 | 40 | be_app->PostMessage(B_QUIT_REQUESTED); |
40 | 41 | break; |
… |
… |
KeyboardApplication::MessageReceived(BMessage* message)
|
49 | 50 | void |
50 | 51 | KeyboardApplication::AboutRequested() |
51 | 52 | { |
52 | | (new BAlert("about", B_TRANSLATE("Written by Andrew Edward McCall"), |
53 | | B_TRANSLATE("OK")))->Go(); |
| 53 | BAlert* alert = new BAlert("about", |
| 54 | B_TRANSLATE("Written by Andrew Edward McCall"), B_TRANSLATE("OK")); |
| 55 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 56 | alert->Go(); |
54 | 57 | } |
55 | 58 | |
56 | 59 | |
-
diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp
index a112a9c..4adfb85 100644
a
|
b
|
LocaleWindow::LocaleWindow()
|
147 | 147 | "use this preflet!"), |
148 | 148 | B_TRANSLATE("OK"), NULL, NULL, |
149 | 149 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); |
| 150 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
150 | 151 | alert->Go(); |
151 | 152 | } |
152 | 153 | |
-
diff --git a/src/preferences/mail/AutoConfigWindow.cpp b/src/preferences/mail/AutoConfigWindow.cpp
index 2ffeb8d..36dd4dc 100644
a
|
b
|
AutoConfigWindow::MessageReceived(BMessage* msg)
|
95 | 95 | invalidMailAlert = new BAlert("invalidMailAlert", |
96 | 96 | B_TRANSLATE("Enter a valid e-mail address."), |
97 | 97 | B_TRANSLATE("OK")); |
| 98 | invalidMailAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
98 | 99 | invalidMailAlert->Go(); |
99 | 100 | return; |
100 | 101 | } |
-
diff --git a/src/preferences/mail/ConfigWindow.cpp b/src/preferences/mail/ConfigWindow.cpp
index e3b4ce3..256f51f 100644
a
|
b
|
ConfigWindow::_RevertToLastSettings()
|
866 | 866 | "\nThe general settings couldn't be reverted.\n\n" |
867 | 867 | "Error retrieving general settings:\n%s\n"), |
868 | 868 | strerror(status)); |
869 | | (new BAlert(B_TRANSLATE("Error"), text, B_TRANSLATE("OK"), NULL, NULL, |
870 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 869 | BAlert* alert = new BAlert(B_TRANSLATE("Error"), text, |
| 870 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 871 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 872 | alert->Go(); |
871 | 873 | } |
872 | 874 | |
873 | 875 | // revert account data |
-
diff --git a/src/preferences/mail/FilterConfigView.cpp b/src/preferences/mail/FilterConfigView.cpp
index ce330b8..b2f9d1e 100644
a
|
b
|
FiltersConfigView::MessageReceived(BMessage *msg)
|
460 | 460 | |
461 | 461 | MailAddonSettings* mailSettings = _GetCurrentMailSettings(); |
462 | 462 | if (!mailSettings->MoveFilterSettings(from, to)) { |
463 | | (new BAlert("E-mail", B_TRANSLATE("The filter could not be " |
464 | | "moved. Deleting filter."), B_TRANSLATE("OK")))->Go(); |
| 463 | BAlert* alert = new BAlert("E-mail", |
| 464 | B_TRANSLATE("The filter could not be moved. Deleting " |
| 465 | "filter."), B_TRANSLATE("OK")); |
| 466 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 467 | alert->Go(); |
465 | 468 | fListView->RemoveItem(to); |
466 | 469 | break; |
467 | 470 | } |
-
diff --git a/src/preferences/media/MediaWindow.cpp b/src/preferences/media/MediaWindow.cpp
index a9efbc1..0fc2de3 100644
a
|
b
|
MediaWindow::InitMedia(bool first)
|
436 | 436 | B_TRANSLATE("Quit"), |
437 | 437 | B_TRANSLATE("Start media server"), NULL, |
438 | 438 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
439 | | if (alert->Go()==0) |
| 439 | alert->SetShortcut(0, B_ESCAPE); |
| 440 | if (alert->Go() == 0) |
440 | 441 | return B_ERROR; |
441 | 442 | |
442 | 443 | fAlert = new MediaAlert(BRect(0, 0, 300, 60), |
… |
… |
ErrorAlert(char* errorMessage) {
|
565 | 566 | printf("%s\n", errorMessage); |
566 | 567 | BAlert* alert = new BAlert("BAlert", errorMessage, B_TRANSLATE("OK"), |
567 | 568 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 569 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
568 | 570 | alert->Go(); |
569 | 571 | exit(1); |
570 | 572 | } |
-
diff --git a/src/preferences/mouse/Mouse.cpp b/src/preferences/mouse/Mouse.cpp
index e6a20e7..ba34407 100644
a
|
b
|
MouseApplication::MouseApplication()
|
34 | 34 | void |
35 | 35 | MouseApplication::AboutRequested() |
36 | 36 | { |
37 | | (new BAlert("about", B_TRANSLATE("...by Andrew Edward McCall"), |
38 | | B_TRANSLATE("Dig Deal")))->Go(); |
| 37 | BAlert* alert = new BAlert("about", |
| 38 | B_TRANSLATE("...by Andrew Edward McCall"), B_TRANSLATE("Dig Deal")); |
| 39 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 40 | alert->Go(); |
39 | 41 | } |
40 | 42 | |
41 | 43 | |
-
diff --git a/src/preferences/network/EthernetSettingsView.cpp b/src/preferences/network/EthernetSettingsView.cpp
index 8a23893..89c28b1 100644
a
|
b
|
EthernetSettingsView::_TriggerAutoConfig(const char* device)
|
589 | 589 | status_t status = interface.AutoConfigure(AF_INET); |
590 | 590 | |
591 | 591 | if (status == B_BAD_PORT_ID) { |
592 | | (new BAlert("error", B_TRANSLATE("The net_server needs to run for " |
593 | | "the auto configuration!"), B_TRANSLATE("OK")))->Go(); |
| 592 | BAlert* alert = new BAlert("error", B_TRANSLATE("The net_server needs to run for " |
| 593 | "the auto configuration!"), B_TRANSLATE("OK")); |
| 594 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 595 | alert->Go(); |
594 | 596 | } else if (status != B_OK) { |
595 | 597 | BString errorMessage(B_TRANSLATE("Auto-configuring failed: ")); |
596 | 598 | errorMessage << strerror(status); |
597 | | (new BAlert("error", errorMessage.String(), "OK"))->Go(); |
| 599 | BAlert* alert = new BAlert("error", errorMessage.String(), "OK"); |
| 600 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 601 | alert->Go(); |
598 | 602 | } |
599 | 603 | |
600 | 604 | return status; |
-
diff --git a/src/preferences/network_old/BackupWindow.cpp b/src/preferences/network_old/BackupWindow.cpp
index c494f67..faf60fe 100644
a
|
b
|
BackupWin::MessageReceived(BMessage *message)
|
63 | 63 | } |
64 | 64 | else { |
65 | 65 | BAlert *alert = new BAlert("Backup Info Alert","You must specify a name.","OK"); |
| 66 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
66 | 67 | alert->Go(); |
67 | 68 | } |
68 | 69 | break; |
-
diff --git a/src/preferences/network_old/LoginInfo.cpp b/src/preferences/network_old/LoginInfo.cpp
index 36d7d6f..a39a613 100644
a
|
b
|
void LoginInfo::MessageReceived(BMessage *message)
|
63 | 63 | else { |
64 | 64 | BAlert *alert = new BAlert("Login Info Alert", |
65 | 65 | "Passwords don't match. Please try again","OK"); |
| 66 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
66 | 67 | alert->Go(); |
67 | 68 | } |
68 | 69 | |
69 | 70 | } |
70 | 71 | else { |
71 | 72 | |
72 | | BAlert *alert = new BAlert("Login Info Alert","You didn't fill all the fields","Oups...",NULL,NULL,B_WIDTH_FROM_WIDEST,B_INFO_ALERT); |
| 73 | BAlert *alert = new BAlert("Login Info Alert", |
| 74 | "You didn't fill in all the fields","Oops...", NULL, NULL, |
| 75 | B_WIDTH_FROM_WIDEST,B_INFO_ALERT); |
| 76 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
73 | 77 | alert->Go(); |
74 | 78 | } |
75 | 79 | break; |
-
diff --git a/src/preferences/network_old/NetworkWindow.cpp b/src/preferences/network_old/NetworkWindow.cpp
index da8e5f3..c7dd8c6 100644
a
|
b
|
bool
|
457 | 457 | NetworkWindow::QuitRequested(void) |
458 | 458 | { |
459 | 459 | if (fSave->IsEnabled() == true) { |
460 | | BAlert *alert = new BAlert("Save Info Alert","Save changes before quitting?", |
461 | | "Don't Save","Cancel","Save"); |
| 460 | BAlert *alert = new BAlert("Save Info Alert", "Save changes before " |
| 461 | quitting?", "Don't Save", "Cancel", "Save"); |
| 462 | alert->SetShortcut(1, B_ESCAPE); |
462 | 463 | int32 result = alert->Go(); |
463 | 464 | |
464 | 465 | switch (result) { |
… |
… |
NetworkWindow::QuitRequested(void)
|
486 | 487 | |
487 | 488 | void NetworkWindow::DeleteConfigFile() |
488 | 489 | { |
489 | | BAlert *alert = new BAlert("Alert","Really delete networking configuration?", |
490 | | "Delete","Cancel"); |
| 490 | BAlert *alert = new BAlert("Alert", "Really delete networking configuration?", |
| 491 | "Delete", "Cancel"); |
| 492 | alert->SetShortcut(1, B_ESCAPE); |
491 | 493 | int32 result = alert->Go(); |
492 | 494 | |
493 | 495 | if (result == 0) { |
-
diff --git a/src/preferences/notifications/DisplayView.cpp b/src/preferences/notifications/DisplayView.cpp
index cde5bcf..66744f5 100644
a
|
b
|
DisplayView::Load()
|
107 | 107 | "It's possible you don't have write access to the " |
108 | 108 | "settings directory."), B_TRANSLATE("OK"), NULL, NULL, |
109 | 109 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 110 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
110 | 111 | (void)alert->Go(); |
111 | 112 | } |
112 | 113 | |
… |
… |
DisplayView::Save()
|
176 | 177 | B_TRANSLATE("Can't save preferenes, you probably don't have " |
177 | 178 | "write access to the settings directory or the disk is full."), |
178 | 179 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 180 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
179 | 181 | (void)alert->Go(); |
180 | 182 | return ret; |
181 | 183 | } |
-
diff --git a/src/preferences/notifications/GeneralView.cpp b/src/preferences/notifications/GeneralView.cpp
index 7d1eb8d..8b749d8 100644
a
|
b
|
GeneralView::MessageReceived(BMessage* msg)
|
136 | 136 | " found, this means your InfoPopper installation was" |
137 | 137 | " not successfully completed."), B_TRANSLATE("OK"), |
138 | 138 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 139 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
139 | 140 | (void)alert->Go(); |
140 | 141 | return; |
141 | 142 | } |
… |
… |
GeneralView::MessageReceived(BMessage* msg)
|
153 | 154 | "cannot be stopped, because the server can't be" |
154 | 155 | " reached."), B_TRANSLATE("OK"), NULL, NULL, |
155 | 156 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 157 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
156 | 158 | (void)alert->Go(); |
157 | 159 | return; |
158 | 160 | } |
… |
… |
GeneralView::MessageReceived(BMessage* msg)
|
164 | 166 | " notifications because the server can't be " |
165 | 167 | "reached."), B_TRANSLATE("OK"), |
166 | 168 | NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 169 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
167 | 170 | (void)alert->Go(); |
168 | 171 | return; |
169 | 172 | } |
… |
… |
GeneralView::MessageReceived(BMessage* msg)
|
181 | 184 | " was not successfully completed."), |
182 | 185 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, |
183 | 186 | B_STOP_ALERT); |
| 187 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
184 | 188 | (void)alert->Go(); |
185 | 189 | return; |
186 | 190 | } |
… |
… |
GeneralView::Load()
|
215 | 219 | "It's possible you don't have write access to the " |
216 | 220 | "settings directory."), B_TRANSLATE("OK"), NULL, NULL, |
217 | 221 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 222 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
218 | 223 | (void)alert->Go(); |
219 | 224 | } |
220 | 225 | |
… |
… |
GeneralView::Save()
|
270 | 275 | B_TRANSLATE("An error occurred saving the preferences.\n" |
271 | 276 | "It's possible you are running out of disk space."), |
272 | 277 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 278 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
273 | 279 | (void)alert->Go(); |
274 | 280 | return ret; |
275 | 281 | } |
… |
… |
GeneralView::Save()
|
296 | 302 | "write access to the boot settings directory."), B_TRANSLATE("OK"), |
297 | 303 | NULL, NULL, |
298 | 304 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 305 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
299 | 306 | (void)alert->Go(); |
300 | 307 | return ret; |
301 | 308 | } |
… |
… |
GeneralView::Save()
|
316 | 323 | "you probably don't have write permission to the boot settings" |
317 | 324 | " directory."), B_TRANSLATE("OK"), NULL, NULL, |
318 | 325 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 326 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
319 | 327 | (void)alert->Go(); |
320 | 328 | return ret; |
321 | 329 | } |
-
diff --git a/src/preferences/notifications/NotificationsView.cpp b/src/preferences/notifications/NotificationsView.cpp
index b032666..d9dc381 100644
a
|
b
|
NotificationsView::_LoadAppUsage()
|
184 | 184 | "It's possible you don't have write access to the " |
185 | 185 | "settings directory."), B_TRANSLATE("OK"), NULL, NULL, |
186 | 186 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 187 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
187 | 188 | (void)alert->Go(); |
188 | 189 | return B_ERROR; |
189 | 190 | } |
-
diff --git a/src/preferences/screen/ScreenApplication.cpp b/src/preferences/screen/ScreenApplication.cpp
index fc87e7a..a35aa35 100644
a
|
b
|
ScreenApplication::AboutRequested()
|
40 | 40 | BAlert *aboutAlert = new BAlert(B_TRANSLATE("About"), |
41 | 41 | B_TRANSLATE("Screen preferences by the Haiku team"), B_TRANSLATE("OK"), |
42 | 42 | NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); |
43 | | aboutAlert->SetShortcut(0, B_OK); |
| 43 | aboutAlert->SetFlags(B_CLOSE_ON_ESCAPE); |
44 | 44 | aboutAlert->Go(); |
45 | 45 | } |
46 | 46 | |
-
diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp
index f2199d9..bce4e57 100644
a
|
b
|
ScreenWindow::QuitRequested()
|
520 | 520 | BString warning = B_TRANSLATE("Could not write VESA mode settings" |
521 | 521 | " file:\n\t"); |
522 | 522 | warning << strerror(status); |
523 | | (new BAlert(B_TRANSLATE("Warning"), warning.String(), B_TRANSLATE("OK"), NULL, |
524 | | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 523 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), |
| 524 | warning.String(), B_TRANSLATE("OK"), NULL, |
| 525 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 526 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 527 | alert->Go(); |
525 | 528 | } |
526 | 529 | } |
527 | 530 | |
… |
… |
ScreenWindow::_Apply()
|
1303 | 1306 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), message, |
1304 | 1307 | B_TRANSLATE("OK"), NULL, NULL, |
1305 | 1308 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 1309 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
1306 | 1310 | alert->Go(); |
1307 | 1311 | } |
1308 | 1312 | } |
-
diff --git a/src/preferences/screensaver/PasswordWindow.cpp b/src/preferences/screensaver/PasswordWindow.cpp
index 661ff4d..aaaf4ff 100644
a
|
b
|
PasswordWindow::MessageReceived(BMessage *message)
|
184 | 184 | BAlert *alert = new BAlert("noMatch", |
185 | 185 | B_TRANSLATE("Passwords don't match. Please try again."), |
186 | 186 | B_TRANSLATE("OK")); |
| 187 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
187 | 188 | alert->Go(); |
188 | 189 | break; |
189 | 190 | } |
-
diff --git a/src/preferences/shortcuts/ShortcutsWindow.cpp b/src/preferences/shortcuts/ShortcutsWindow.cpp
index 6632f2e..1a7373d 100644
a
|
b
|
ShortcutsWindow::QuitRequested()
|
286 | 286 | B_TRANSLATE("Really quit without saving your changes?"), |
287 | 287 | B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), |
288 | 288 | B_TRANSLATE("Save")); |
| 289 | alert->SetShortcut(1, B_ESCAPE); |
289 | 290 | switch(alert->Go()) { |
290 | 291 | case 1: |
291 | 292 | ret = false; |
… |
… |
ShortcutsWindow::QuitRequested()
|
296 | 297 | // up the file requester |
297 | 298 | if (fLastSaved.InitCheck() == B_OK) { |
298 | 299 | if (_SaveKeySet(fLastSaved) == false) { |
299 | | (new BAlert(ERROR, |
| 300 | BAlert* alert = new BAlert(ERROR, |
300 | 301 | B_TRANSLATE("Shortcuts was unable to save your " |
301 | 302 | "KeySet file!"), |
302 | | B_TRANSLATE("Oh no")))->Go(); |
| 303 | B_TRANSLATE("Oh no")); |
| 304 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 305 | alert->Go(); |
303 | 306 | ret = true; //quit anyway |
304 | 307 | } |
305 | 308 | } else { |
… |
… |
ShortcutsWindow::MessageReceived(BMessage* msg)
|
550 | 553 | fLastSaved = BEntry(&ref); |
551 | 554 | break; |
552 | 555 | } else { |
553 | | (new BAlert(ERROR, |
| 556 | BAlert* alert = new BAlert(ERROR, |
554 | 557 | B_TRANSLATE("Shortcuts was couldn't open your " |
555 | | "KeySet file!"), B_TRANSLATE("OK")))->Go(NULL); |
| 558 | "KeySet file!"), B_TRANSLATE("OK")); |
| 559 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 560 | alert->Go(NULL); |
556 | 561 | break; |
557 | 562 | } |
558 | 563 | } |
… |
… |
ShortcutsWindow::MessageReceived(BMessage* msg)
|
576 | 581 | _GetSettingsFile(&eref); |
577 | 582 | if (ref == eref) fKeySetModified = false; |
578 | 583 | } else { |
579 | | (new BAlert(ERROR, |
| 584 | BAlert* alert = new BAlert(ERROR, |
580 | 585 | B_TRANSLATE("Shortcuts was unable to parse your " |
581 | | "KeySet file!"), |
582 | | B_TRANSLATE("OK")))->Go(NULL); |
| 586 | "KeySet file!"), B_TRANSLATE("OK")); |
| 587 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 588 | alert->Go(NULL); |
583 | 589 | break; |
584 | 590 | } |
585 | 591 | } |
… |
… |
ShortcutsWindow::MessageReceived(BMessage* msg)
|
629 | 635 | } else PostMessage(SAVE_KEYSET_AS); // open the save requester... |
630 | 636 | |
631 | 637 | if (showSaveError) { |
632 | | (new BAlert(ERROR, |
| 638 | BAlert* alert = new BAlert(ERROR, |
633 | 639 | B_TRANSLATE("Shortcuts wasn't able to save your keyset."), |
634 | | B_TRANSLATE("OK")))->Go(NULL); |
| 640 | B_TRANSLATE("OK")); |
| 641 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 642 | alert->Go(NULL); |
635 | 643 | } |
636 | 644 | break; |
637 | 645 | } |
-
diff --git a/src/preferences/sounds/HApp.cpp b/src/preferences/sounds/HApp.cpp
index bdc2409..7c23673 100644
a
|
b
|
HApp::AboutRequested()
|
49 | 49 | " Original work from Atsushi Takamatsu.\n" |
50 | 50 | "Copyright ©2003-2006 Haiku"), |
51 | 51 | B_TRANSLATE("OK")); |
| 52 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
52 | 53 | alert->Go(); |
53 | 54 | } |
54 | 55 | |
-
diff --git a/src/preferences/sounds/HEventList.cpp b/src/preferences/sounds/HEventList.cpp
index afb04ed..f2bde82 100644
a
|
b
|
HEventList::SelectionChanged()
|
127 | 127 | BMediaFiles().RemoveRefFor(fType, row->Name(), ref); |
128 | 128 | BAlert* alert = new BAlert("alert", |
129 | 129 | B_TRANSLATE("No such file or directory"), B_TRANSLATE("OK")); |
| 130 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
130 | 131 | alert->Go(); |
131 | 132 | return; |
132 | 133 | } |
-
diff --git a/src/preferences/sounds/HWindow.cpp b/src/preferences/sounds/HWindow.cpp
index 06efd30..40f2b0c 100644
a
|
b
|
HWindow::MessageReceived(BMessage* message)
|
212 | 212 | B_TRANSLATE("This is not an audio file."), |
213 | 213 | B_TRANSLATE("OK"), NULL, NULL, |
214 | 214 | B_WIDTH_AS_USUAL, B_STOP_ALERT); |
| 215 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
215 | 216 | alert->Go(); |
216 | 217 | break; |
217 | 218 | } |
-
diff --git a/src/preferences/time/NetworkTimeView.cpp b/src/preferences/time/NetworkTimeView.cpp
index 49a34dd..d463ddb 100644
a
|
b
|
NetworkTimeView::MessageReceived(BMessage* message)
|
377 | 377 | "while synchronizing:\r\n%s"), |
378 | 378 | errorString); |
379 | 379 | |
380 | | (new BAlert(B_TRANSLATE("Time"), buffer, |
381 | | B_TRANSLATE("OK")))->Go(); |
| 380 | BAlert* alert = new BAlert(B_TRANSLATE("Time"), buffer, |
| 381 | B_TRANSLATE("OK")); |
| 382 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 383 | alert->Go(); |
382 | 384 | } |
383 | 385 | break; |
384 | 386 | } |
-
diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp
index 6fb1805..4f9fd37 100644
a
|
b
|
TimeApplication::AboutRequested()
|
59 | 59 | "Time & Date, written by:\n\n\tAndrew Edward McCall\n\tMike Berg\n\t" |
60 | 60 | "Julun\n\tPhilippe Saint-Pierre\n\nCopyright 2004-2012, Haiku."), |
61 | 61 | B_TRANSLATE("OK")); |
| 62 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
62 | 63 | alert->Go(); |
63 | 64 | } |
64 | 65 | |
-
diff --git a/src/preferences/touchpad/TouchpadPrefView.cpp b/src/preferences/touchpad/TouchpadPrefView.cpp
index 713d92b..b53ce2d 100644
a
|
b
|
TouchpadView::MouseUp(BPoint point)
|
106 | 106 | "normal mouse operation. Do you really want to change it?"), |
107 | 107 | B_TRANSLATE("OK"), B_TRANSLATE("Cancel"), |
108 | 108 | NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 109 | alert->SetShortcut(1, B_ESCAPE); |
109 | 110 | result = alert->Go(); |
110 | 111 | } |
111 | 112 | if (result == 0) { |
-
diff --git a/src/preferences/virtualmemory/SettingsWindow.cpp b/src/preferences/virtualmemory/SettingsWindow.cpp
index 7328806..3443d9a 100644
a
|
b
|
SettingsWindow::SettingsWindow()
|
237 | 237 | status_t result = fSettings.SwapVolume().InitCheck(); |
238 | 238 | |
239 | 239 | if (result != B_OK) { |
240 | | int32 choice = (new BAlert("VirtualMemory", B_TRANSLATE( |
| 240 | BAlert* alert = new BAlert("VirtualMemory", B_TRANSLATE( |
241 | 241 | "The swap volume specified in the settings file is invalid.\n" |
242 | 242 | "You can keep the current setting or switch to the " |
243 | 243 | "default swap volume."), |
244 | 244 | B_TRANSLATE("Keep"), B_TRANSLATE("Switch"), NULL, |
245 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 245 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 246 | alert->SetShortcut(0, B_ESCAPE); |
| 247 | int32 choice = alert->Go(); |
246 | 248 | if (choice == 1) { |
247 | 249 | BVolumeRoster volumeRoster; |
248 | 250 | BVolume bootVolume; |
… |
… |
SettingsWindow::MessageReceived(BMessage* message)
|
293 | 295 | // ToDo: maybe we want to remove this possibility in the GUI |
294 | 296 | // as Be did, but I thought a proper warning could be helpful |
295 | 297 | // (for those that want to change that anyway) |
296 | | int32 choice = (new BAlert("VirtualMemory", |
| 298 | BAlert* alert = new BAlert("VirtualMemory", |
297 | 299 | B_TRANSLATE( |
298 | 300 | "Disabling virtual memory will have unwanted effects on " |
299 | 301 | "system stability once the memory is used up.\n" |
… |
… |
SettingsWindow::MessageReceived(BMessage* message)
|
301 | 303 | "until this point is reached.\n\n" |
302 | 304 | "Are you really sure you want to turn it off?"), |
303 | 305 | B_TRANSLATE("Turn off"), B_TRANSLATE("Keep enabled"), NULL, |
304 | | B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); |
| 306 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 307 | alert->SetShortcut(1, B_ESCAPE); |
| 308 | int32 choice = alert->Go(); |
305 | 309 | if (choice == 1) { |
306 | 310 | fSwapEnabledCheckBox->SetValue(1); |
307 | 311 | break; |
-
diff --git a/src/preferences/virtualmemory/VirtualMemory.cpp b/src/preferences/virtualmemory/VirtualMemory.cpp
index 60fdfda..51d7560 100644
a
|
b
|
VirtualMemory::AboutRequested()
|
50 | 50 | font.SetFace(B_BOLD_FACE); |
51 | 51 | view->SetFontAndColor(0, 13, &font); |
52 | 52 | |
| 53 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
53 | 54 | alert->Go(); |
54 | 55 | } |
55 | 56 | |
-
diff --git a/src/servers/bluetooth/DeskbarReplicant.cpp b/src/servers/bluetooth/DeskbarReplicant.cpp
index 67f999d..8265b69 100644
a
|
b
|
DeskbarReplicant::_ShowErrorAlert(BString msg, status_t status)
|
242 | 242 | { |
243 | 243 | msg << "\n\nError: " << strerror(status); |
244 | 244 | BAlert* alert = new BAlert("Bluetooth error", msg.String(), "OK"); |
| 245 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
245 | 246 | alert->Go(NULL); |
246 | 247 | } |
247 | 248 | |
-
diff --git a/src/servers/debug/DebugServer.cpp b/src/servers/debug/DebugServer.cpp
index 83e4970..837ca26 100644
a
|
b
|
TeamDebugHandler::_HandleMessage(DebugMessage *message)
|
689 | 689 | BAlert *alert = new BAlert(NULL, buffer.String(), |
690 | 690 | B_TRANSLATE("Debug"), B_TRANSLATE("OK"), NULL, |
691 | 691 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 692 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
692 | 693 | int32 result = alert->Go(); |
693 | 694 | kill = (result == 1); |
694 | 695 | _NotifyRegistrar(fTeam, false, !kill); |
-
diff --git a/src/servers/input/MethodReplicant.cpp b/src/servers/input/MethodReplicant.cpp
index 2a6c9df..a0e3c43 100644
a
|
b
|
MethodReplicant::MessageReceived(BMessage* message)
|
137 | 137 | |
138 | 138 | switch (message->what) { |
139 | 139 | case B_ABOUT_REQUESTED: |
140 | | (new BAlert("About Method Replicant", |
| 140 | { |
| 141 | BAlert* alert = new BAlert("About Method Replicant", |
141 | 142 | "Method Replicant (Replicant)\n" |
142 | 143 | " Brought to you by Jérôme DUVAL.\n\n" |
143 | | "Haiku, 2004-2009", "OK"))->Go(); |
| 144 | "Haiku, 2004-2009", "OK"); |
| 145 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 146 | alert->Go(); |
144 | 147 | break; |
| 148 | } |
145 | 149 | case IS_UPDATE_NAME: |
146 | 150 | UpdateMethodName(message); |
147 | 151 | break; |
-
diff --git a/src/servers/mail/MailDaemon.cpp b/src/servers/mail/MailDaemon.cpp
index b12bcbe..6d53cb8 100644
a
|
b
|
MailDaemonApp::MessageReceived(BMessage* msg)
|
306 | 306 | BAlert* alert = new BAlert(B_TRANSLATE("New Messages"), |
307 | 307 | fAlertString.String(), "OK", NULL, NULL, B_WIDTH_AS_USUAL); |
308 | 308 | alert->SetFeel(B_NORMAL_WINDOW_FEEL); |
| 309 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
309 | 310 | alert->Go(NULL); |
310 | 311 | fAlertString = B_EMPTY_STRING; |
311 | 312 | } |
-
diff --git a/src/servers/media/media_server.cpp b/src/servers/media/media_server.cpp
index fd51cf77..e0494c1 100644
a
|
b
|
ServerApp::_LaunchAddOnServer()
|
219 | 219 | if (err == B_OK) |
220 | 220 | return; |
221 | 221 | |
222 | | (new BAlert("media_server", "Launching media_addon_server failed.\n\n" |
223 | | "media_server will terminate", "OK"))->Go(); |
| 222 | BAlert* alert = new BAlert("media_server", "Launching media_addon_server " |
| 223 | "failed.\n\nmedia_server will terminate", "OK"); |
| 224 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 225 | alert->Go(); |
224 | 226 | fprintf(stderr, "Launching media_addon_server (%s) failed: %s\n", |
225 | 227 | B_MEDIA_ADDON_SERVER_SIGNATURE, strerror(err)); |
226 | 228 | exit(1); |
-
diff --git a/src/servers/midi/MidiServerApp.cpp b/src/servers/midi/MidiServerApp.cpp
index 28fa74a..184ed88 100644
a
|
b
|
MidiServerApp::~MidiServerApp()
|
62 | 62 | void |
63 | 63 | MidiServerApp::AboutRequested() |
64 | 64 | { |
65 | | (new BAlert(0, |
| 65 | BAlert* alert = new BAlert(0, |
66 | 66 | "Haiku midi_server 1.0.0 alpha\n\n" |
67 | 67 | "notes disguised as bytes\n" |
68 | 68 | "propagating to endpoints,\n" |
69 | 69 | "an aural delight", |
70 | | "Okay", 0, 0, B_WIDTH_AS_USUAL, |
71 | | B_INFO_ALERT))->Go(); |
| 70 | "OK", 0, 0, B_WIDTH_AS_USUAL, |
| 71 | B_INFO_ALERT); |
| 72 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 73 | alert->Go(); |
72 | 74 | } |
73 | 75 | |
74 | 76 | |
-
diff --git a/src/servers/mount/AutoMounter.cpp b/src/servers/mount/AutoMounter.cpp
index 65afd90..cf60d1d 100644
a
|
b
|
AutoMounter::_MountVolume(const BMessage* message)
|
569 | 569 | char text[512]; |
570 | 570 | snprintf(text, sizeof(text), |
571 | 571 | B_TRANSLATE("Error mounting volume:\n\n%s"), strerror(status)); |
572 | | (new BAlert(B_TRANSLATE("Mount error"), text, |
573 | | B_TRANSLATE("OK")))->Go(NULL); |
| 572 | BAlert* alert = new BAlert(B_TRANSLATE("Mount error"), text, |
| 573 | B_TRANSLATE("OK")); |
| 574 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 575 | alert->Go(NULL); |
574 | 576 | } |
575 | 577 | } |
576 | 578 | |
… |
… |
AutoMounter::_ReportUnmountError(const char* name, status_t error)
|
603 | 605 | snprintf(text, sizeof(text), B_TRANSLATE("Could not unmount disk " |
604 | 606 | "\"%s\":\n\t%s"), name, strerror(error)); |
605 | 607 | |
606 | | (new BAlert(B_TRANSLATE("Unmount error"), text, B_TRANSLATE("OK"), |
607 | | NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); |
| 608 | BAlert* alert = new BAlert(B_TRANSLATE("Unmount error"), text, |
| 609 | B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
| 610 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
| 611 | alert->Go(NULL); |
608 | 612 | } |
609 | 613 | |
610 | 614 | |
-
diff --git a/src/servers/net/NetServer.cpp b/src/servers/net/NetServer.cpp
index e30db4a..fdf9b46 100644
a
|
b
|
NetServer::AboutRequested()
|
238 | 238 | font.SetFace(B_BOLD_FACE); |
239 | 239 | view->SetFontAndColor(0, 17, &font); |
240 | 240 | |
| 241 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
241 | 242 | alert->Go(NULL); |
242 | 243 | } |
243 | 244 | |
-
diff --git a/src/servers/notification/NotificationWindow.cpp b/src/servers/notification/NotificationWindow.cpp
index 39bdf1e..f7e8321 100644
a
|
b
|
NotificationWindow::_LoadAppFilters(bool startMonitor)
|
440 | 440 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), |
441 | 441 | B_TRANSLATE("Couldn't start filter monitor." |
442 | 442 | " Live filter changes disabled."), B_TRANSLATE("Darn.")); |
| 443 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
443 | 444 | alert->Go(); |
444 | 445 | } |
445 | 446 | } |
… |
… |
NotificationWindow::_LoadGeneralSettings(bool startMonitor)
|
504 | 505 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), |
505 | 506 | B_TRANSLATE("Couldn't start general settings monitor.\n" |
506 | 507 | "Live filter changes disabled."), B_TRANSLATE("OK")); |
| 508 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
507 | 509 | alert->Go(); |
508 | 510 | } |
509 | 511 | } |
… |
… |
NotificationWindow::_LoadDisplaySettings(bool startMonitor)
|
555 | 557 | BAlert* alert = new BAlert(B_TRANSLATE("Warning"), |
556 | 558 | B_TRANSLATE("Couldn't start display settings monitor.\n" |
557 | 559 | "Live filter changes disabled."), B_TRANSLATE("OK")); |
| 560 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
558 | 561 | alert->Go(); |
559 | 562 | } |
560 | 563 | } |
-
diff --git a/src/servers/print/ConfigWindow.cpp b/src/servers/print/ConfigWindow.cpp
index a88ea61..30ea250 100644
a
|
b
|
ConfigWindow::AboutRequested()
|
309 | 309 | |
310 | 310 | BAlert *about = new BAlert("About printer server", text.String(), |
311 | 311 | B_TRANSLATE("OK")); |
| 312 | about->SetFlags(B_CLOSE_ON_ESCAPE); |
312 | 313 | about->Go(); |
313 | 314 | } |
314 | 315 | |
-
diff --git a/src/servers/print/PrintServerApp.R5.cpp b/src/servers/print/PrintServerApp.R5.cpp
index c89948f..bf466ae 100644
a
|
b
|
PrintServerApp::async_thread(void* data)
|
97 | 97 | B_TRANSLATE("Would you like to set one up now?")); |
98 | 98 | BAlert* alert = new BAlert("Info", alertText.String(), |
99 | 99 | B_TRANSLATE("No"), B_TRANSLATE("Yes")); |
| 100 | alert->SetShortcut(0, B_ESCAPE); |
100 | 101 | if (alert->Go() == 1) { |
101 | 102 | if (count == 0) |
102 | 103 | run_add_printer_panel(); |
… |
… |
PrintServerApp::async_thread(void* data)
|
143 | 144 | text.ReplaceFirst("@", printerName.String()); |
144 | 145 | BAlert* alert = new BAlert("", text.String(), |
145 | 146 | B_TRANSLATE("No"), B_TRANSLATE("Yes")); |
| 147 | alert->SetShortcut(0, B_ESCAPE); |
146 | 148 | if (alert->Go() == 1) |
147 | 149 | p->app->SelectPrinter(printerName.String()); |
148 | 150 | } |
-
diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp
index 02a2a71..e3d2ea2 100644
a
|
b
|
ShutdownProcess::_WorkerDoShutdown()
|
1256 | 1256 | BAlert* alert = new BAlert(title.String(), text, |
1257 | 1257 | B_TRANSLATE("Cancel"), otherText, defaultText, |
1258 | 1258 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
1259 | | alert->SetShortcut(0, B_ESCAPE); |
1260 | 1259 | // We want the alert to behave more like a regular window... |
1261 | 1260 | alert->SetFeel(B_NORMAL_WINDOW_FEEL); |
1262 | 1261 | // ...but not quit. Minimizing the alert would prevent the user from |
1263 | 1262 | // finding it again, since registrar does not have an entry in the |
1264 | 1263 | // Deskbar. |
1265 | | alert->SetFlags(alert->Flags() | B_NOT_MINIMIZABLE); |
| 1264 | alert->SetFlags(alert->Flags() | B_NOT_MINIMIZABLE | B_CLOSE_ON_ESCAPE); |
1266 | 1265 | alert->SetWorkspaces(B_ALL_WORKSPACES); |
1267 | 1266 | int32 result = alert->Go(); |
1268 | 1267 | |
-
diff --git a/src/servers/syslog_daemon/SyslogDaemon.cpp b/src/servers/syslog_daemon/SyslogDaemon.cpp
index 993638d..5808469 100644
a
|
b
|
SyslogDaemon::AboutRequested()
|
73 | 73 | font.SetFace(B_BOLD_FACE); |
74 | 74 | view->SetFontAndColor(0, name.Length(), &font); |
75 | 75 | |
| 76 | alert->SetFlags(B_CLOSE_ON_ESCAPE); |
76 | 77 | alert->Go(NULL); |
77 | 78 | } |
78 | 79 | |