From f0e29955bf1a694ce05e0756181443eb3af7c91a Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 5 Aug 2012 00:50:56 -0500 Subject: [PATCH 1/8] radeon_hd: Fix pre-emphasis shift * pre-emphasis shift was always for lane b --- src/add-ons/accelerants/radeon_hd/displayport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp b/src/add-ons/accelerants/radeon_hd/displayport.cpp index 0efa52578e..e291c2cf65 100644 --- a/src/add-ons/accelerants/radeon_hd/displayport.cpp +++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp @@ -463,7 +463,7 @@ dp_get_adjust_request_pre_emphasis(dp_info* dp, int lane) { int i = DP_ADJ_REQUEST_0_1 + (lane >> 1); int s = (((lane & 1) != 0) ? DP_ADJ_PRE_EMPHASIS_LANEB_SHIFT - : DP_ADJ_PRE_EMPHASIS_LANEB_SHIFT); + : DP_ADJ_PRE_EMPHASIS_LANEA_SHIFT); uint8 l = dp->linkStatus[i - DP_LANE_STATUS_0_1]; return ((l >> s) & 0x3) << DP_TRAIN_PRE_EMPHASIS_SHIFT; @@ -777,7 +777,6 @@ dp_link_train(uint8 crtcID, display_mode* mode) dp_link_train_cr(connectorIndex); dp_link_train_ce(connectorIndex); - // *** DisplayPort link training finish snooze(400); From 4e7e3e331d4b0d1edfb94f52507b04163dc001f8 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 5 Aug 2012 12:15:35 -0500 Subject: [PATCH 2/8] radeon_hd: display port improvements * Remove non-generic radeon dp_get_lane_count * Set lane count and link rate at set_display_mode * Pass entire mode to pll_set vs only pixel clock for DP code * Add helpers for DP config data to common code * Obtain more correct link rate --- headers/private/graphics/common/dp.h | 5 +- src/add-ons/accelerants/common/dp.cpp | 43 ++++------- .../accelerants/radeon_hd/displayport.cpp | 77 +++++++++++++++++-- .../accelerants/radeon_hd/displayport.h | 5 +- src/add-ons/accelerants/radeon_hd/mode.cpp | 12 +-- src/add-ons/accelerants/radeon_hd/pll.cpp | 12 +-- src/add-ons/accelerants/radeon_hd/pll.h | 5 +- 7 files changed, 109 insertions(+), 50 deletions(-) diff --git a/headers/private/graphics/common/dp.h b/headers/private/graphics/common/dp.h index e9d2396196..149da7e895 100644 --- a/headers/private/graphics/common/dp.h +++ b/headers/private/graphics/common/dp.h @@ -40,7 +40,10 @@ typedef struct { uint32 dp_encode_link_rate(uint32 linkRate); uint32 dp_decode_link_rate(uint32 rawLinkRate); -uint32 dp_get_lane_count(dp_info* dpInfo, display_mode* mode); +uint32 dp_get_lane_count_max(dp_info* dpInfo); +uint32 dp_get_link_rate_max(dp_info* dpInfo); + +uint32 dp_get_pixel_clock_max(int linkRate, int laneCount, int bpp); #endif /* _DP_H */ diff --git a/src/add-ons/accelerants/common/dp.cpp b/src/add-ons/accelerants/common/dp.cpp index 8b9c5764fd..9cd31b5b77 100644 --- a/src/add-ons/accelerants/common/dp.cpp +++ b/src/add-ons/accelerants/common/dp.cpp @@ -60,32 +60,21 @@ dp_decode_link_rate(uint32 rawLinkRate) uint32 -dp_get_lane_count(dp_info* dpInfo, display_mode* mode) +dp_get_pixel_clock_max(int linkRate, int laneCount, int bpp) { - size_t pixelChunk; - size_t pixelsPerChunk; - status_t result = get_pixel_size_for((color_space)mode->space, &pixelChunk, - NULL, &pixelsPerChunk); - - if (result != B_OK) { - TRACE("%s: Invalid color space!\n", __func__); - return 0; - } - - uint32 bitsPerPixel = (pixelChunk / pixelsPerChunk) * 8; - - uint32 maxLaneCount = dpInfo->config[DP_MAX_LANE_COUNT] - & DP_MAX_LANE_COUNT_MASK; - uint32 maxLinkRate = dp_decode_link_rate(dpInfo->config[DP_MAX_LINK_RATE]); - - uint32 lane; - for (lane = 1; lane < maxLaneCount; lane <<= 1) { - uint32 maxDPPixelClock = (maxLinkRate * lane * 8) / bitsPerPixel; - if (mode->timing.pixel_clock <= maxDPPixelClock) - break; - } - - TRACE("%s: Lanes: %" B_PRIu32 "\n", __func__, lane); - - return lane; + return (linkRate * laneCount * 8) / bpp; +} + + +uint32 +dp_get_link_rate_max(dp_info* dpInfo) +{ + return dp_decode_link_rate(dpInfo->config[DP_MAX_LINK_RATE]); +} + + +uint32 +dp_get_lane_count_max(dp_info* dpInfo) +{ + return dpInfo->config[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK; } diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp b/src/add-ons/accelerants/radeon_hd/displayport.cpp index e291c2cf65..b442ab26d1 100644 --- a/src/add-ons/accelerants/radeon_hd/displayport.cpp +++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp @@ -321,15 +321,81 @@ dp_aux_set_i2c_byte(uint32 hwPin, uint16 address, uint8* data, bool end) uint32 -dp_get_link_clock(uint32 connectorIndex) +dp_get_lane_count(uint32 connectorIndex, display_mode* mode) +{ + // Radeon specific + dp_info* dpInfo = &gConnector[connectorIndex]->dpInfo; + + size_t pixelChunk; + size_t pixelsPerChunk; + status_t result = get_pixel_size_for((color_space)mode->space, &pixelChunk, + NULL, &pixelsPerChunk); + + if (result != B_OK) { + TRACE("%s: Invalid color space!\n", __func__); + return 0; + } + + uint32 bitsPerPixel = (pixelChunk / pixelsPerChunk) * 8; + + uint32 dpMaxLinkRate = dp_get_link_rate_max(dpInfo); + uint32 dpMaxLaneCount = dp_get_lane_count_max(dpInfo); + + uint32 lane; + for (lane = 1; lane < dpMaxLaneCount; lane <<= 1) { + uint32 maxPixelClock = dp_get_pixel_clock_max(dpMaxLinkRate, lane, + bitsPerPixel); + if (mode->timing.pixel_clock <= maxPixelClock) + break; + } + + TRACE("%s: Lanes: %" B_PRIu32 "\n", __func__, lane); + return lane; +} + + +uint32 +dp_get_link_rate(uint32 connectorIndex, display_mode* mode) { uint16 encoderID = gConnector[connectorIndex]->encoderExternal.objectID; if (encoderID == ENCODER_OBJECT_ID_NUTMEG) return 270000; - // TODO: calculate DisplayPort max pixel clock based on bpp and DP channels - return 162000; + dp_info* dpInfo = &gConnector[connectorIndex]->dpInfo; + uint32 laneCount = dp_get_lane_count(connectorIndex, mode); + + size_t pixelChunk; + size_t pixelsPerChunk; + status_t result = get_pixel_size_for((color_space)mode->space, &pixelChunk, + NULL, &pixelsPerChunk); + + if (result != B_OK) { + TRACE("%s: Invalid color space!\n", __func__); + return 0; + } + + uint32 bitsPerPixel = (pixelChunk / pixelsPerChunk) * 8; + + uint32 maxPixelClock + = dp_get_pixel_clock_max(162000, laneCount, bitsPerPixel); + if (mode->timing.pixel_clock <= maxPixelClock) + return 162000; + + maxPixelClock = dp_get_pixel_clock_max(270000, laneCount, bitsPerPixel); + if (mode->timing.pixel_clock <= maxPixelClock) + return 270000; + + // TODO: DisplayPort 1.2 + #if 0 + if (is_dp12_capable(connectorIndex)) { + maxPixelClock = dp_get_pixel_clock_max(540000, laneCount, bitsPerPixel); + if (mode->timing.pixel_clock <= maxPixelClock) + return 540000; + } + #endif + + return dp_get_link_rate_max(dpInfo); } @@ -364,8 +430,6 @@ dp_setup_connectors() dpInfo->valid = true; memcpy(dpInfo->config, auxMessage, 8); } - - dpInfo->linkRate = dp_get_link_clock(index); } } @@ -686,11 +750,10 @@ dp_link_train_ce(uint32 connectorIndex) status_t -dp_link_train(uint8 crtcID, display_mode* mode) +dp_link_train(uint32 connectorIndex, display_mode* mode) { TRACE("%s\n", __func__); - uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; dp_info* dp = &gConnector[connectorIndex]->dpInfo; if (dp->valid != true) { diff --git a/src/add-ons/accelerants/radeon_hd/displayport.h b/src/add-ons/accelerants/radeon_hd/displayport.h index 570934a431..fe5f3b8d5e 100644 --- a/src/add-ons/accelerants/radeon_hd/displayport.h +++ b/src/add-ons/accelerants/radeon_hd/displayport.h @@ -31,11 +31,12 @@ status_t dp_aux_set_i2c_byte(uint32 hwPin, uint16 address, status_t dp_aux_get_i2c_byte(uint32 hwPin, uint16 address, uint8* data, bool end); -uint32 dp_get_link_clock(uint32 connectorIndex); +uint32 dp_get_link_rate(uint32 connectorIndex, display_mode* mode); +uint32 dp_get_lane_count(uint32 connectorIndex, display_mode* mode); void dp_setup_connectors(); -status_t dp_link_train(uint8 crtcID, display_mode* mode); +status_t dp_link_train(uint32 connectorIndex, display_mode* mode); status_t dp_link_train_cr(uint32 connectorIndex); status_t dp_link_train_ce(uint32 connectorIndex); diff --git a/src/add-ons/accelerants/radeon_hd/mode.cpp b/src/add-ons/accelerants/radeon_hd/mode.cpp index c0b5c3d773..03176397a4 100644 --- a/src/add-ons/accelerants/radeon_hd/mode.cpp +++ b/src/add-ons/accelerants/radeon_hd/mode.cpp @@ -167,11 +167,13 @@ radeon_set_display_mode(display_mode* mode) continue; uint32 connectorIndex = gDisplay[id]->connectorIndex; - dp_info *dpInfo = &gConnector[connectorIndex]->dpInfo; // Determine DP lanes if DP - if (connector_is_dp(connectorIndex)) - dpInfo->laneCount = dp_get_lane_count(dpInfo, mode); + if (connector_is_dp(connectorIndex)) { + dp_info *dpInfo = &gConnector[connectorIndex]->dpInfo; + dpInfo->laneCount = dp_get_lane_count(connectorIndex, mode); + dpInfo->linkRate = dp_get_link_rate(connectorIndex, mode); + } // *** crtc and encoder prep encoder_output_lock(true); @@ -184,7 +186,7 @@ radeon_set_display_mode(display_mode* mode) // *** CRT controler mode set // TODO: program SS - pll_set(ATOM_PPLL1, mode->timing.pixel_clock, id); + pll_set(ATOM_PPLL1, mode, id); // TODO: check if ATOM_PPLL1 is used and use ATOM_PPLL2 if so display_crtc_set_dtd(id, mode); @@ -207,7 +209,7 @@ radeon_set_display_mode(display_mode* mode) encoder_dig_setup(connectorIndex, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0); - dp_link_train(id, mode); + dp_link_train(connectorIndex, mode); if (info.dceMajor >= 4) encoder_dig_setup(connectorIndex, diff --git a/src/add-ons/accelerants/radeon_hd/pll.cpp b/src/add-ons/accelerants/radeon_hd/pll.cpp index 167f507003..829a367625 100644 --- a/src/add-ons/accelerants/radeon_hd/pll.cpp +++ b/src/add-ons/accelerants/radeon_hd/pll.cpp @@ -503,7 +503,7 @@ pll_setup_flags(pll_info* pll, uint8 crtcID) status_t -pll_adjust(pll_info* pll, uint8 crtcID) +pll_adjust(pll_info* pll, display_mode* mode, uint8 crtcID) { radeon_shared_info &info = *gInfo->shared_info; @@ -585,7 +585,7 @@ pll_adjust(pll_info* pll, uint8 crtcID) |= DISPPLL_CONFIG_COHERENT_MODE; /* 16200 or 27000 */ uint32 dpLinkSpeed - = dp_get_link_clock(connectorIndex); + = dp_get_link_rate(connectorIndex, mode); args.v3.sInput.usPixelClock = B_HOST_TO_LENDIAN_INT16(dpLinkSpeed / 10); } else if ((encoderFlags & ATOM_DEVICE_DFP_SUPPORT) @@ -650,17 +650,17 @@ pll_adjust(pll_info* pll, uint8 crtcID) status_t -pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) +pll_set(uint8 pllID, display_mode* mode, uint8 crtcID) { uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; pll_info* pll = &gConnector[connectorIndex]->encoder.pll; - pll->pixelClock = pixelClock; + pll->pixelClock = mode->timing.pixel_clock; pll->id = pllID; pll_setup_flags(pll, crtcID); // set up any special flags - pll_adjust(pll, crtcID); + pll_adjust(pll, mode, crtcID); // get any needed clock adjustments, set reference/post dividers pll_compute(pll); // compute dividers @@ -799,7 +799,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) } TRACE("%s: set adjusted pixel clock %" B_PRIu32 " (was %" B_PRIu32 ")\n", - __func__, pll->pixelClock, pixelClock); + __func__, pll->pixelClock, mode->timing.pixel_clock); status_t result = atom_execute_table(gAtomContext, index, (uint32*)&args); diff --git a/src/add-ons/accelerants/radeon_hd/pll.h b/src/add-ons/accelerants/radeon_hd/pll.h index be358572f4..128e6c03ee 100644 --- a/src/add-ons/accelerants/radeon_hd/pll.h +++ b/src/add-ons/accelerants/radeon_hd/pll.h @@ -9,6 +9,7 @@ #define RADEON_HD_PLL_H +#include #include @@ -99,13 +100,13 @@ struct pll_info { }; -status_t pll_adjust(pll_info* pll, uint8 crtcID); +status_t pll_adjust(pll_info* pll, display_mode* mode, uint8 crtcID); status_t pll_compute(pll_info* pll); void pll_setup_flags(pll_info* pll, uint8 crtcID); status_t pll_limit_probe(pll_info* pll); status_t pll_dp_ss_probe(pll_info* pll); status_t pll_asic_ss_probe(pll_info* pll); -status_t pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID); +status_t pll_set(uint8 pllID, display_mode* mode, uint8 crtcID); #endif /* RADEON_HD_PLL_H */ From aed35104852941f0f6f3d1dcc5338b5f337d0a3c Mon Sep 17 00:00:00 2001 From: Humdinger Date: Sun, 5 Aug 2012 16:01:51 +0200 Subject: [PATCH 3/8] 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. --- .../shortcut_catcher/CommandActuators.cpp | 15 +++- .../methods/canna/CannaLooper.cpp | 1 + .../methods/pen/PenInputServerMethod.cpp | 1 + .../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 + .../print/drivers/gutenprint/GPDriver.cpp | 1 + src/add-ons/print/drivers/pcl5/PCL5.cpp | 1 + src/add-ons/print/drivers/pcl6/PCL6.cpp | 1 + .../drivers/pdf/source/MessagePrinter.cpp | 20 +++-- .../drivers/pdf/source/PrinterDriver.cpp | 1 + src/add-ons/print/drivers/postscript/PS.cpp | 1 + .../hp_jetdirect/HPJetDirectTransport.cpp | 2 + .../transports/hp_jetdirect/SetupWindow.cpp | 6 +- .../print/transports/ipp/IppSetupDlg.cpp | 1 + .../print/transports/ipp/IppTransport.cpp | 1 + .../print/transports/lpr/LprSetupDlg.cpp | 2 + .../print/transports/lpr/LprTransport.cpp | 1 + src/add-ons/tracker/iconvader/IconVader.cpp | 6 +- .../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 + .../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 +- .../MediaRoutingView/MediaRoutingView.cpp | 1 + .../cortex/ParameterView/ParameterWindow.cpp | 1 + src/apps/cortex/RouteApp/RouteWindow.cpp | 7 +- .../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 + .../icon-o-matic/import_export/Exporter.cpp | 1 + .../import_export/svg/SVGExporter.cpp | 1 + .../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 +- .../mediaconverter/MediaConverterWindow.cpp | 6 +- src/apps/mediaconverter/MediaFileInfoView.cpp | 1 + src/apps/mediaplayer/MainApp.cpp | 2 + src/apps/mediaplayer/MainWin.cpp | 12 ++- .../mediaplayer/playlist/PlaylistWindow.cpp | 1 + .../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 +- .../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 + .../appearance/DecorSettingsView.cpp | 2 +- src/preferences/bluetooth/BluetoothMain.cpp | 16 ++-- src/preferences/cpufrequency/StatusView.cpp | 6 +- .../datatranslations/DataTranslations.cpp | 5 +- .../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 + .../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 +- .../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 +- .../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 + .../virtualmemory/SettingsWindow.cpp | 12 ++- .../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 + .../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 6f72dfcf29..84d63c5c97 100644 --- a/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp +++ b/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp @@ -195,8 +195,11 @@ LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg, str << " Please check your Shortcuts settings."; } - if (fArgc < 1 || err != B_NO_ERROR) - (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); + if (fArgc < 1 || err != B_NO_ERROR) { + BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); + } } } @@ -1015,7 +1018,9 @@ MIMEHandlerCommandActuator::KeyEventAsync(const BMessage* keyMsg, str << "Can't launch handler for "; str << ", no such MIME type exists. Please check your Shortcuts"; str << " settings."; - (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); + BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } } } @@ -1693,7 +1698,9 @@ SendMessageCommandActuator::KeyEventAsync(const BMessage* keyMsg, BString str1("Shortcuts SendMessage error"); if (fSignature.Length() == 0) { str << "SendMessage: Target application signature not specified"; - (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); + BAlert* alert = new BAlert(str1.String(), str.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } else { status_t error = B_OK; 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 db7fc806e4..4fbfa5099e 100644 --- a/src/add-ons/input_server/methods/canna/CannaLooper.cpp +++ b/src/add-ons/input_server/methods/canna/CannaLooper.cpp @@ -178,6 +178,7 @@ CannaLooper::MessageReceived(BMessage* msg) " Copyright 1992 NEC Corporation, Tokyo, Japan\n" " Special thanks to T.Murai for porting\n", "OK"); + panel->SetFlags(panel->Flags() | B_CLOSE_ON_ESCAPE); panel->Go(); break; } diff --git a/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp b/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp index d47b21c7ba..b67a68a28d 100644 --- a/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp +++ b/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp @@ -53,6 +53,7 @@ PenInputServerMethod::PenInputServerMethod() //fDebugFile.SetTo("/tmp/PenInputMethodMessages.txt", B_READ_WRITE|B_CREATE_FILE); fDebugAlert = new BAlert("PenInput Debug", "Plip \n\n\n\n\n\n\n\n\n\n\n\n\n", "OK"); fDebugAlert->SetLook(B_TITLED_WINDOW_LOOK); + fDebugAlert->SetFlags(fDebugAlert->Flags() | B_CLOSE_ON_ESCAPE); fDebugAlert->TextView()->MakeSelectable(); fDebugAlert->TextView()->SelectAll(); 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 f6a75ee727..dbfc470f12 100644 --- a/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp +++ b/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp @@ -178,6 +178,7 @@ void T9InputServerMethod::MessageReceived(BMessage *message) s << " - "; s << (long) fDeskbarMenu->ItemAt(v); BAlert *a = new BAlert("Plop", s.String(), "OK"); + a->SetFlags(a->Flags() | B_CLOSE_ON_ESCAPE); a->Go(NULL); }*/ break; diff --git a/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp b/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp index 0b102923bf..3699cd1962 100644 --- a/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp +++ b/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp @@ -179,6 +179,7 @@ void T9InputServerMethod::MessageReceived(BMessage *message) s << " - "; s << (long) fDeskbarMenu->ItemAt(v); BAlert *a = new BAlert("Plop", s.String(), "OK"); + a->SetFlags(a->Flags() | B_CLOSE_ON_ESCAPE); a->Go(NULL); }*/ 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 4e3311685b..d417ed7a7a 100644 --- a/src/add-ons/mail_daemon/inbound_filters/notifier/filter.cpp +++ b/src/add-ons/mail_daemon/inbound_filters/notifier/filter.cpp @@ -79,6 +79,7 @@ NotifyFilter::MailboxSynced(status_t status) BAlert *alert = new BAlert(B_TRANSLATE("New messages"), text.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->SetFeel(B_NORMAL_WINDOW_FEEL); alert->Go(NULL); } 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 253134dd12..bc71405e1d 100644 --- a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp +++ b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp @@ -421,9 +421,11 @@ AGMSBayesianSpamFilterConfig::ShowSpamServerConfigurationWindow () { return; // Successful. ErrorExit: - (new BAlert ("SpamFilterConfig Error", B_TRANSLATE("Sorry, unable to " - "launch the spamdbm program to let you edit the server settings."), - B_TRANSLATE("Close")))->Go (); + BAlert* alert = new BAlert ("SpamFilterConfig Error", B_TRANSLATE("Sorry, " + "unable to launch the spamdbm program to let you edit the server " + "settings."), B_TRANSLATE("Close")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go (); return; } 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 5195c539cf..1e219f673d 100644 --- a/src/add-ons/print/drivers/canon_lips/lips3/Lips3.cpp +++ b/src/add-ons/print/drivers/canon_lips/lips3/Lips3.cpp @@ -190,6 +190,7 @@ LIPS3Driver::NextBand(BBitmap* bitmap, BPoint* offset) } else if (compressedSize > out_size) { BAlert* alert = new BAlert("memory overrun!!!", "warning", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } else { @@ -224,6 +225,7 @@ LIPS3Driver::NextBand(BBitmap* bitmap, BPoint* offset) } catch (TransportException& err) { BAlert* alert = new BAlert("", err.What(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } 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 faa1d5412d..8f9fd51cc6 100644 --- a/src/add-ons/print/drivers/canon_lips/lips4/Lips4.cpp +++ b/src/add-ons/print/drivers/canon_lips/lips4/Lips4.cpp @@ -200,6 +200,7 @@ LIPS4Driver::NextBand(BBitmap* bitmap, BPoint* offset) buffer = out_buffer; } else if (compressed_size > out_size) { BAlert* alert = new BAlert("memory overrun!!!", "warning", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } else { @@ -234,6 +235,7 @@ LIPS4Driver::NextBand(BBitmap* bitmap, BPoint* offset) } catch (TransportException& err) { BAlert* alert = new BAlert("", err.What(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/drivers/gutenprint/GPDriver.cpp b/src/add-ons/print/drivers/gutenprint/GPDriver.cpp index 434467a428..ce1f041719 100644 --- a/src/add-ons/print/drivers/gutenprint/GPDriver.cpp +++ b/src/add-ons/print/drivers/gutenprint/GPDriver.cpp @@ -308,5 +308,6 @@ GPDriver::ShowError(const char* message) text << "\n"; text << message; BAlert* alert = new BAlert("", text.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/add-ons/print/drivers/pcl5/PCL5.cpp b/src/add-ons/print/drivers/pcl5/PCL5.cpp index e00947673f..518c27a518 100644 --- a/src/add-ons/print/drivers/pcl5/PCL5.cpp +++ b/src/add-ons/print/drivers/pcl5/PCL5.cpp @@ -213,6 +213,7 @@ PCL5Driver::NextBand(BBitmap* bitmap, BPoint* offset) } catch (TransportException& err) { BAlert* alert = new BAlert("", err.What(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/drivers/pcl6/PCL6.cpp b/src/add-ons/print/drivers/pcl6/PCL6.cpp index ec951eccc2..a953e871e1 100644 --- a/src/add-ons/print/drivers/pcl6/PCL6.cpp +++ b/src/add-ons/print/drivers/pcl6/PCL6.cpp @@ -176,6 +176,7 @@ PCL6Driver::NextBand(BBitmap* bitmap, BPoint* offset) } catch (TransportException& err) { BAlert* alert = new BAlert("", err.What(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp b/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp index 2e9e69ae65..3cd43b00fc 100644 --- a/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp +++ b/src/add-ons/print/drivers/pdf/source/MessagePrinter.cpp @@ -53,14 +53,18 @@ status_t MessagePrinter::Print(BMessage* msg) // open a file to print message on the desktop status = find_directory(B_DESKTOP_DIRECTORY, &settingsPath); if (status != B_OK) { - (new BAlert("","find directory error", "Doh!"))->Go(); + BAlert* alert = new BAlert("","Find directory error", "Doh!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return status; } settingsPath.Append(msgFileName); status = file.SetTo(settingsPath.Path(), B_WRITE_ONLY | B_CREATE_FILE); if (status != B_OK) { - (new BAlert("","file write error", "Doh!"))->Go(); + BAlert* alert = new BAlert("","File write error", "Doh!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return status; } @@ -73,14 +77,18 @@ status_t MessagePrinter::Print(BMessage* msg) // count out << i; if (file.Write(out.String(), out.Length()) < 0) { - (new BAlert("","count write error", "Doh!"))->Go(); + BAlert* alert = new BAlert("","Count write error", "Doh!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } // name out = " "; out << name; if (file.Write(out.String(), out.Length()) < 0) { - (new BAlert("","name write error", "Doh!"))->Go(); + BAlert* alert = new BAlert("","Name write error", "Doh!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } @@ -164,7 +172,9 @@ status_t MessagePrinter::Print(BMessage* msg) break; } if (file.Write(out.String(), out.Length()) < 0) { - (new BAlert("","value write error", "Doh!"))->Go(); + BAlert* alert = new BAlert("","Value write error", "Doh!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } } diff --git a/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp b/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp index d00d2078c0..9bdb410445 100644 --- a/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp +++ b/src/add-ons/print/drivers/pdf/source/PrinterDriver.cpp @@ -203,6 +203,7 @@ PrinterDriver::PrintPage(int32 pageNumber, int32 pageCount) sprintf(text, "Faking print of page %ld/%ld...", pageNumber, pageCount); BAlert *alert = new BAlert("PrinterDriver::PrintPage()", text, "Hmm?"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return B_OK; } diff --git a/src/add-ons/print/drivers/postscript/PS.cpp b/src/add-ons/print/drivers/postscript/PS.cpp index fd518e754d..5be890a2b0 100644 --- a/src/add-ons/print/drivers/postscript/PS.cpp +++ b/src/add-ons/print/drivers/postscript/PS.cpp @@ -336,6 +336,7 @@ PSDriver::NextBand(BBitmap* bitmap, BPoint* offset) } catch (TransportException& err) { BAlert* alert = new BAlert("", err.What(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp b/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp index 42b4a35c1a..71f3f72b8f 100644 --- a/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp +++ b/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp @@ -55,6 +55,7 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg) fEndpoint = new BNetEndpoint(SOCK_STREAM); if ((fReady = fEndpoint->InitCheck()) != B_OK) { BAlert *alert = new BAlert("", "Fail to create the NetEndpoint!", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -66,6 +67,7 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg) } else { BAlert *alert = new BAlert("", "Can't connect to HP JetDirect printer port!", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fReady = B_ERROR; } diff --git a/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp b/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp index 099f37d487..6a2f89ff23 100644 --- a/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp +++ b/src/add-ons/print/transports/hp_jetdirect/SetupWindow.cpp @@ -135,8 +135,9 @@ SetupView::CheckSetup() if (ep->Connect(fServerAddress->Text(), port) != B_OK) { BString text; - text << "Fail to connect to " << fServerAddress->Text() << ":" << (int) port << "!"; + text << "Failed to connect to " << fServerAddress->Text() << ":" << (int) port << "!"; BAlert* alert = new BAlert("", text.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; }; @@ -149,7 +150,8 @@ SetupView::CheckSetup() }; }; - BAlert* alert = new BAlert("", "please input parameters.", "OK"); + BAlert* alert = new BAlert("", "Please input parameters.", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/transports/ipp/IppSetupDlg.cpp b/src/add-ons/print/transports/ipp/IppSetupDlg.cpp index ad2cfd545f..295c573460 100644 --- a/src/add-ons/print/transports/ipp/IppSetupDlg.cpp +++ b/src/add-ons/print/transports/ipp/IppSetupDlg.cpp @@ -141,6 +141,7 @@ bool IppSetupView::UpdateViewData() } BAlert *alert = new BAlert("", error_msg.c_str(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/transports/ipp/IppTransport.cpp b/src/add-ons/print/transports/ipp/IppTransport.cpp index 1c4f6a967f..64814f1502 100644 --- a/src/add-ons/print/transports/ipp/IppTransport.cpp +++ b/src/add-ons/print/transports/ipp/IppTransport.cpp @@ -129,6 +129,7 @@ IppTransport::~IppTransport() if (__error) { BAlert *alert = new BAlert("", error_msg.c_str(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/add-ons/print/transports/lpr/LprSetupDlg.cpp b/src/add-ons/print/transports/lpr/LprSetupDlg.cpp index 5d82f588ae..4fbf395f73 100644 --- a/src/add-ons/print/transports/lpr/LprSetupDlg.cpp +++ b/src/add-ons/print/transports/lpr/LprSetupDlg.cpp @@ -142,6 +142,7 @@ LprSetupView::UpdateViewData() catch (LPSException &err) { BAlert *alert = new BAlert("", err.what(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } @@ -155,6 +156,7 @@ LprSetupView::UpdateViewData() BAlert *alert = new BAlert("", "Please enter server address and printer" "queue name.", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } diff --git a/src/add-ons/print/transports/lpr/LprTransport.cpp b/src/add-ons/print/transports/lpr/LprTransport.cpp index 7f0b89aa29..8ac8daf536 100644 --- a/src/add-ons/print/transports/lpr/LprTransport.cpp +++ b/src/add-ons/print/transports/lpr/LprTransport.cpp @@ -129,6 +129,7 @@ LprTransport::_SendFile() catch (LPSException &err) { DBGMSG(("error: %s\n", err.what())); BAlert *alert = new BAlert("", err.what(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/add-ons/tracker/iconvader/IconVader.cpp b/src/add-ons/tracker/iconvader/IconVader.cpp index 42226a9b69..0b3b3bf15a 100644 --- a/src/add-ons/tracker/iconvader/IconVader.cpp +++ b/src/add-ons/tracker/iconvader/IconVader.cpp @@ -18,6 +18,7 @@ static void Error(BView *view, status_t status, bool unlock=false) view->UnlockLooper(); BString s(strerror(status)); alert = new BAlert("Error", s.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -80,7 +81,9 @@ process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/) - alert = new BAlert("Error", "IconVader:\nClick on the icons to get points.\nAvoid symlinks!", "OK"); + alert = new BAlert("Error", "IconVader:\nClick on the icons to get points." + "\nAvoid symlinks!", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); @@ -133,6 +136,7 @@ process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/) BString scoreStr("You scored "); scoreStr << score << " points!"; alert = new BAlert("Error", scoreStr.String(), "Cool!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); diff --git a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp index 9e65ae3acf..e3d6174568 100644 --- a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp +++ b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp @@ -38,9 +38,11 @@ process_refs(entry_ref directoryRef, BMessage *msg, void *) if (link.MakeLinkedPath(&directory, &path) < B_OK || targetEntry.SetTo(path.Path()) != B_OK || targetEntry.GetParent(&targetEntry) != B_OK) { - (new BAlert("Open Target Folder", + BAlert* alert = new BAlert("Open Target Folder", "Cannot open target folder. Maybe this link is broken?", - "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); + "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); continue; } @@ -59,10 +61,12 @@ process_refs(entry_ref directoryRef, BMessage *msg, void *) } if (errors) { - (new BAlert("Open Target Folder", + BAlert* alert = new BAlert("Open Target Folder", "This add-on can only be used on symbolic links.\n" "It opens the folder of the link target in Tracker.", - "OK"))->Go(NULL); + "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } } diff --git a/src/add-ons/translators/ppm/PPMMain.cpp b/src/add-ons/translators/ppm/PPMMain.cpp index 6b4da65991..7a226055ce 100644 --- a/src/add-ons/translators/ppm/PPMMain.cpp +++ b/src/add-ons/translators/ppm/PPMMain.cpp @@ -51,6 +51,7 @@ main() BAlert * err = new BAlert("Error", B_TRANSLATE("Something is wrong with the PPMTranslator!"), B_TRANSLATE("OK")); + err->SetFlags(err->Flags() | B_CLOSE_ON_ESCAPE); err->Go(); return 1; } diff --git a/src/add-ons/translators/shared/TranslatorWindow.cpp b/src/add-ons/translators/shared/TranslatorWindow.cpp index 8e075d445a..824dcb4f5c 100644 --- a/src/add-ons/translators/shared/TranslatorWindow.cpp +++ b/src/add-ons/translators/shared/TranslatorWindow.cpp @@ -88,6 +88,7 @@ LaunchTranslatorWindow(BTranslator *translator, const char *title, BRect rect) if (translator->MakeConfigurationView(NULL, &view, &rect)) { BAlert *err = new BAlert(B_TRANSLATE("Error"), B_TRANSLATE("Unable to create the view."), B_TRANSLATE("OK")); + err->SetFlags(err->Flags() | B_CLOSE_ON_ESCAPE); err->Go(); return B_ERROR; } diff --git a/src/apps/autoraise/AutoRaiseApp.cpp b/src/apps/autoraise/AutoRaiseApp.cpp index 8bcd92e518..edd7790626 100644 --- a/src/apps/autoraise/AutoRaiseApp.cpp +++ b/src/apps/autoraise/AutoRaiseApp.cpp @@ -70,6 +70,7 @@ void AutoRaiseApp::ReadyToRun() 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, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); alert->SetShortcut(0, B_ENTER); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); be_app_messenger.SendMessage(B_QUIT_REQUESTED); } diff --git a/src/apps/autoraise/AutoRaiseIcon.cpp b/src/apps/autoraise/AutoRaiseIcon.cpp index 2755a0d8f3..51b1e03f0e 100644 --- a/src/apps/autoraise/AutoRaiseIcon.cpp +++ b/src/apps/autoraise/AutoRaiseIcon.cpp @@ -542,6 +542,7 @@ void TrayView::MessageReceived(BMessage* message) alert = new BAlert("about box", "AutoRaise, (c) 2002, mmu_man\nEnjoy :-)", "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); alert->SetShortcut(0, B_ENTER); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); // use asynchronous version break; case OPEN_SETTINGS: diff --git a/src/apps/bootmanager/BootManagerController.cpp b/src/apps/bootmanager/BootManagerController.cpp index f8b1bdbb9e..7cc5fcdf5e 100644 --- a/src/apps/bootmanager/BootManagerController.cpp +++ b/src/apps/bootmanager/BootManagerController.cpp @@ -177,6 +177,7 @@ BootManagerController::_HasSelectedPartitions() BAlert* alert = new BAlert("info", B_TRANSLATE("At least one partition must be selected!"), B_TRANSLATE_COMMENT("OK", "Button")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; diff --git a/src/apps/bsnow/SnowView.cpp b/src/apps/bsnow/SnowView.cpp index 8625d1560d..a203ded88b 100644 --- a/src/apps/bsnow/SnowView.cpp +++ b/src/apps/bsnow/SnowView.cpp @@ -214,7 +214,7 @@ void SnowView::MessageReceived(BMessage *msg) "Where is Santa ??"); info->SetFeel(B_NORMAL_WINDOW_FEEL); info->SetLook(B_FLOATING_WINDOW_LOOK); - info->SetFlags(info->Flags()|B_NOT_ZOOMABLE); + info->SetFlags(info->Flags()|B_NOT_ZOOMABLE|B_CLOSE_ON_ESCAPE); info->Go(NULL); break; default: diff --git a/src/apps/cdplayer/CDDBSupport.cpp b/src/apps/cdplayer/CDDBSupport.cpp index e595223e05..4e6875ce60 100644 --- a/src/apps/cdplayer/CDDBSupport.cpp +++ b/src/apps/cdplayer/CDDBSupport.cpp @@ -1121,6 +1121,7 @@ CDDBQuery::_ParseData(const BString &data) // TODO: finish, once I find an entry which actually has a year in it BAlert *alert = new BAlert("SimplyVorbis", "DYEAR entry found\n", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/apps/cdplayer/CDPlayer.cpp b/src/apps/cdplayer/CDPlayer.cpp index 5117b1f061..b4304b3b7d 100644 --- a/src/apps/cdplayer/CDPlayer.cpp +++ b/src/apps/cdplayer/CDPlayer.cpp @@ -88,6 +88,7 @@ CDPlayer::CDPlayer(BRect frame, const char *name, uint32 resizeMask, "It appears that there are no CD" " drives on your computer or there is no system software to " "support one. Sorry."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/apps/clock/cl_view.cpp b/src/apps/clock/cl_view.cpp index ea702a1961..d0605d95e4 100644 --- a/src/apps/clock/cl_view.cpp +++ b/src/apps/clock/cl_view.cpp @@ -361,7 +361,7 @@ TOnscreenView::MessageReceived(BMessage *msg) "Clock (The Replicant version)\n\n(C)2002, 2003 OpenBeOS,\n" "2004 - 2007, Haiku, Inc.\n\nOriginally coded by the folks " "at Be.\n Copyright Be Inc., 1991 - 1998", "OK"); - + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } break; diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index a00dfd80d3..6c4038c003 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -62,6 +62,7 @@ ErrorAlert(const char* message, status_t err, BWindow *window = NULL) B_TRANSLATE("OK")); if (window != NULL) alert->CenterIn(window->Frame()); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); 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 5d3251bf5f..e481c4aa69 100644 --- a/src/apps/cortex/AddOnHost/AddOnHostApp.cpp +++ b/src/apps/cortex/AddOnHost/AddOnHostApp.cpp @@ -170,11 +170,13 @@ main(int argc, char** argv) { App app; if (argc < 2 || strcmp(argv[1], "--addon-host") != 0) { - int32 response = (new BAlert( - "Cortex AddOnHost", + BAlert* alert = new BAlert("Cortex AddOnHost", "This program runs in the background, and is started automatically " "by Cortex when necessary. You probably don't want to start it manually.", - "Continue", "Quit"))->Go(); + "Continue", "Quit"); + alert->SetShortcut(1, B_ESCAPE); + int32 response = alert->Go(); + if(response == 1) return 0; } diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp index 3e4b2cac39..b2290a03fe 100644 --- a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp +++ b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp @@ -988,6 +988,7 @@ void MediaRoutingView::showErrorMessage( || (messenger.SendMessage(&message) != B_OK)) { BAlert *alert = new BAlert("Error", text.String(), "OK", 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/apps/cortex/ParameterView/ParameterWindow.cpp b/src/apps/cortex/ParameterView/ParameterWindow.cpp index 3f82c1c101..8a8b963636 100644 --- a/src/apps/cortex/ParameterView/ParameterWindow.cpp +++ b/src/apps/cortex/ParameterView/ParameterWindow.cpp @@ -162,6 +162,7 @@ void ParameterWindow::MessageReceived( s << " (" << strerror(error) << ")"; BAlert *alert = new BAlert("", s.String(), "OK", 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(0); } bool replace = false; diff --git a/src/apps/cortex/RouteApp/RouteWindow.cpp b/src/apps/cortex/RouteApp/RouteWindow.cpp index eb6c1648c0..ae5fd26ca3 100644 --- a/src/apps/cortex/RouteApp/RouteWindow.cpp +++ b/src/apps/cortex/RouteApp/RouteWindow.cpp @@ -372,9 +372,12 @@ RouteWindow::MessageReceived(BMessage* pMsg) // switch (pMsg->what) { case B_ABOUT_REQUESTED: - (new BAlert("About", g_aboutText, "OK"))->Go(); + { + BAlert* alert = new BAlert("About", g_aboutText, "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; - + } case MediaRoutingView::M_GROUP_SELECTED: _handleGroupSelected(pMsg); break; diff --git a/src/apps/cortex/addons/common/MediaNodeControlApp.cpp b/src/apps/cortex/addons/common/MediaNodeControlApp.cpp index d90db03881..d0326ebbfb 100644 --- a/src/apps/cortex/addons/common/MediaNodeControlApp.cpp +++ b/src/apps/cortex/addons/common/MediaNodeControlApp.cpp @@ -84,7 +84,9 @@ MediaNodeControlApp::MediaNodeControlApp( sprintf(buffer, "MediaNodeControlApp: couldn't find node (%ld):\n%s\n", nodeID, strerror(err)); - (new BAlert("error", buffer, "OK"))->Go(); + BAlert* alert = new BAlert("error", buffer, "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } @@ -96,7 +98,9 @@ MediaNodeControlApp::MediaNodeControlApp( sprintf(buffer, "MediaNodeControlApp: couldn't get node info (%ld):\n%s\n", nodeID, strerror(err)); - (new BAlert("error", buffer, "OK"))->Go(); + BAlert* alert = new BAlert("error", buffer, "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } @@ -111,7 +115,9 @@ MediaNodeControlApp::MediaNodeControlApp( sprintf(buffer, "MediaNodeControlApp: no parameters for node (%ld):\n%s\n", nodeID, strerror(err)); - (new BAlert("error", buffer, "OK"))->Go(); + BAlert* alert = new BAlert("error", buffer, "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } diff --git a/src/apps/diskprobe/AttributeWindow.cpp b/src/apps/diskprobe/AttributeWindow.cpp index 595d6ca399..04d844f6db 100644 --- a/src/apps/diskprobe/AttributeWindow.cpp +++ b/src/apps/diskprobe/AttributeWindow.cpp @@ -278,14 +278,18 @@ AttributeWindow::MessageReceived(BMessage *message) case kMsgRemoveAttribute: { char buffer[1024]; + snprintf(buffer, sizeof(buffer), B_TRANSLATE("Do you really want to remove the attribute \"%s\" from " "the file \"%s\"?\n\nYou cannot undo this action."), fAttribute, Ref().name); - int32 chosen = (new BAlert(B_TRANSLATE("DiskProbe request"), + BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), buffer, B_TRANSLATE("Cancel"), B_TRANSLATE("Remove"), NULL, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + int32 chosen = alert->Go(); + if (chosen == 1) { BNode node(&Ref()); if (node.InitCheck() == B_OK) diff --git a/src/apps/diskprobe/DiskProbe.cpp b/src/apps/diskprobe/DiskProbe.cpp index 600a8b90eb..7cfc9958cb 100644 --- a/src/apps/diskprobe/DiskProbe.cpp +++ b/src/apps/diskprobe/DiskProbe.cpp @@ -367,9 +367,11 @@ DiskProbe::RefsReceived(BMessage *message) "error message is shown."), ref.name, strerror(status)); - (new BAlert(B_TRANSLATE("DiskProbe request"), + BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), buffer, B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } } diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp index 2fcaea48d7..4072057a8a 100644 --- a/src/apps/diskprobe/ProbeView.cpp +++ b/src/apps/diskprobe/ProbeView.cpp @@ -1105,10 +1105,12 @@ EditorLooper::Find(off_t startAt, const uint8 *data, size_t dataSize, if (system_time() > startTime + 8000000LL) { // If the user had to wait more than 8 seconds for the result, // we are trying to please him with a requester... - (new BAlert(B_TRANSLATE("DiskProbe request"), + BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), B_TRANSLATE("Could not find search string."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(NULL); + B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } else beep(); } @@ -1867,9 +1869,11 @@ ProbeView::_Save() "All changes will be lost when you quit."), strerror(status)); - (new BAlert(B_TRANSLATE("DiskProbe request"), + BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), buffer, B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); + B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); return status; } @@ -1883,9 +1887,12 @@ ProbeView::QuitRequested() if (!fEditor.IsModified()) return true; - int32 chosen = (new BAlert(B_TRANSLATE("DiskProbe request"), - B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), - B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), + B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Don't save"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, + B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); + int32 chosen = alert->Go(); if (chosen == 0) return true; diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp index e51cb36da0..3197a6f170 100644 --- a/src/apps/drivesetup/MainWindow.cpp +++ b/src/apps/drivesetup/MainWindow.cpp @@ -657,6 +657,7 @@ MainWindow::_DisplayPartitionError(BString _message, BAlert* alert = new BAlert("error", message, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, error < B_OK ? B_STOP_ALERT : B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } @@ -853,6 +854,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition, BAlert* alert = new BAlert("first notice", message, B_TRANSLATE("Continue"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); int32 choice = alert->Go(); if (choice == 1) @@ -933,6 +935,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition, alert = new BAlert("final notice", message, B_TRANSLATE("Write changes"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); choice = alert->Go(); if (choice == 1) @@ -1050,6 +1053,7 @@ MainWindow::_Create(BDiskDevice* disk, partition_id selectedPartition) "All data on the partition will be irretrievably lost if you do " "so!"), B_TRANSLATE("Write changes"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); int32 choice = alert->Go(); if (choice == 1) @@ -1130,6 +1134,7 @@ MainWindow::_Delete(BDiskDevice* disk, partition_id selectedPartition) "All data on the partition will be irretrievably lost if you " "do so!"), B_TRANSLATE("Delete partition"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); int32 choice = alert->Go(); if (choice == 1) diff --git a/src/apps/expander/ExpanderWindow.cpp b/src/apps/expander/ExpanderWindow.cpp index 7355ce5e51..9ea6fdc8ae 100644 --- a/src/apps/expander/ExpanderWindow.cpp +++ b/src/apps/expander/ExpanderWindow.cpp @@ -153,19 +153,24 @@ ExpanderWindow::ValidateDest() B_TRANSLATE("The destination folder does not exist."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } else if (!entry.IsDirectory()) { - (new BAlert("destAlert", + BAlert* alert = new BAlert("destAlert", B_TRANSLATE("The destination is not a folder."), B_TRANSLATE("Cancel"), NULL, NULL, - B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return false; } else if (entry.GetVolume(&volume) != B_OK || volume.IsReadOnly()) { - (new BAlert("destAlert", + BAlert* alert = new BAlert("destAlert", B_TRANSLATE("The destination is read only."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, - B_EVEN_SPACING, B_WARNING_ALERT))->Go(); + B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return false; } else { entry.GetRef(&fDestRef); @@ -246,6 +251,7 @@ ExpanderWindow::MessageReceived(BMessage* msg) "archive? The expanded items may not be complete."), B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 0) { fExpandingThread->ResumeExternalExpander(); StopExpanding(); @@ -280,6 +286,7 @@ ExpanderWindow::MessageReceived(BMessage* msg) B_TRANSLATE("The file doesn't exist"), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); break; } @@ -303,6 +310,7 @@ ExpanderWindow::MessageReceived(BMessage* msg) BAlert* alert = new BAlert("srcAlert", string.String(), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fShowContents->SetEnabled(false); @@ -369,6 +377,7 @@ ExpanderWindow::MessageReceived(BMessage* msg) BAlert* alert = new BAlert("stopAlert", string, B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 0) { fExpandingThread->ResumeExternalExpander(); StopExpanding(); @@ -422,6 +431,7 @@ ExpanderWindow::CanQuit() "archive? The expanded items may not be complete."), B_TRANSLATE("Stop"), B_TRANSLATE("Continue"), NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 0) { fExpandingThread->ResumeExternalExpander(); StopExpanding(); @@ -558,6 +568,7 @@ ExpanderWindow::StartExpanding() B_TRANSLATE("The folder was either moved, renamed or not\nsupported."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } diff --git a/src/apps/glteapot/ObjectView.cpp b/src/apps/glteapot/ObjectView.cpp index bf14e13d76..35dd22609d 100644 --- a/src/apps/glteapot/ObjectView.cpp +++ b/src/apps/glteapot/ObjectView.cpp @@ -177,6 +177,7 @@ ObjectView::ObjectView(BRect rect, const char *name, ulong resizingMode, BAlert *NoResourceAlert = new BAlert(B_TRANSLATE("Error"), kNoResourceError, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); + NoResourceAlert->SetFlags(NoResourceAlert->Flags() | B_CLOSE_ON_ESCAPE); NoResourceAlert->Go(); delete Tri; } @@ -323,6 +324,7 @@ ObjectView::MessageReceived(BMessage* msg) BAlert *NoResourceAlert = new BAlert(B_TRANSLATE("Error"), kNoResourceError, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); + NoResourceAlert->SetFlags(NoResourceAlert->Flags() | B_CLOSE_ON_ESCAPE); NoResourceAlert->Go(); delete Tri; } diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp index 51692f559f..4842e5ed46 100644 --- a/src/apps/icon-o-matic/MainWindow.cpp +++ b/src/apps/icon-o-matic/MainWindow.cpp @@ -718,6 +718,7 @@ MainWindow::Open(const entry_ref& ref, bool append) "Cancel button - error alert"), NULL, NULL); // launch alert asynchronously + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); delete icon; @@ -796,6 +797,7 @@ MainWindow::Open(const BMessenger& externalObserver, const uint8* data, "Cancel button - error alert"), NULL, NULL); // launch alert asynchronously + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); delete icon; @@ -1273,7 +1275,8 @@ MainWindow::_CheckSaveIcon(const BMessage* currentMessage) BAlert* alert = new BAlert("save", B_TRANSLATE("Save changes to current icon?"), B_TRANSLATE("Discard"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); + B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); + alert->SetShortcut(0, B_ESCAPE); int32 choice = alert->Go(); switch (choice) { case 0: diff --git a/src/apps/icon-o-matic/gui/SavePanel.cpp b/src/apps/icon-o-matic/gui/SavePanel.cpp index a131378cdc..a3d107a68d 100644 --- a/src/apps/icon-o-matic/gui/SavePanel.cpp +++ b/src/apps/icon-o-matic/gui/SavePanel.cpp @@ -365,6 +365,7 @@ SavePanel::_ExportSettings() // status_t err = roster->MakeConfigurationView(item->id, NULL, &view, &rect); // if (err < B_OK || view == NULL) { // BAlert *alert = new BAlert(NULL, strerror(err), "OK"); +// alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); // alert->Go(); // } else { // 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 725148b94f..6440fdd95f 100644 --- a/src/apps/icon-o-matic/import_export/Exporter.cpp +++ b/src/apps/icon-o-matic/import_export/Exporter.cpp @@ -116,6 +116,7 @@ Exporter::_ExportThread() "Exporter - Continue in error dialog"), NULL, NULL); // launch alert asynchronously + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } else { // 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 029b6b7035..0b57dc7bc0 100644 --- a/src/apps/icon-o-matic/import_export/svg/SVGExporter.cpp +++ b/src/apps/icon-o-matic/import_export/svg/SVGExporter.cpp @@ -164,6 +164,7 @@ SVGExporter::_DisplayWarning() const "be lost."), B_TRANSLATE("Cancel"), B_TRANSLATE("Overwrite")); + alert->SetShortcut(0, B_ESCAPE); return alert->Go() == 1; } 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 1faf39b974..f26c460ac3 100644 --- a/src/apps/icon-o-matic/import_export/svg/SVGImporter.cpp +++ b/src/apps/icon-o-matic/import_export/svg/SVGImporter.cpp @@ -80,6 +80,7 @@ SVGImporter::Import(Icon* icon, const entry_ref* ref) BAlert* alert = new BAlert(B_TRANSLATE("load error"), error, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); ret = B_ERROR; } diff --git a/src/apps/installedpackages/UninstallView.cpp b/src/apps/installedpackages/UninstallView.cpp index 794440b97d..28a847430e 100644 --- a/src/apps/installedpackages/UninstallView.cpp +++ b/src/apps/installedpackages/UninstallView.cpp @@ -257,7 +257,7 @@ UninstallView::MessageReceived(BMessage* msg) "been corrupted."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); } - + notify->SetFlags(notify->Flags() | B_CLOSE_ON_ESCAPE); notify->Go(); } default: diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index 431ea2507a..22b7ee6e1b 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -82,6 +82,7 @@ InstallerApp::AboutRequested() BAlert *alert = new BAlert("about", B_TRANSLATE("Installer\n" "\twritten by Jérôme Duval and Stephan Aßmus\n" "\tCopyright 2005-2010, Haiku.\n\n"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); BTextView *view = alert->TextView(); BFont font; diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index 707e03dc5d..cc639ea12a 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -346,7 +346,9 @@ InstallerWindow::MessageReceived(BMessage *msg) B_TRANSLATE("An error was encountered and the " "installation was not completed:\n\n" "Error: %s"), strerror(error)); - (new BAlert("error", errorMessage, B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("error", errorMessage, B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } _DisableInterface(false); @@ -426,10 +428,12 @@ InstallerWindow::MessageReceived(BMessage *msg) } case ENCOURAGE_DRIVESETUP: { - (new BAlert("use drive setup", B_TRANSLATE("No partitions have " + BAlert* alert = new BAlert("use drive setup", B_TRANSLATE("No partitions have " "been found that are suitable for installation. Please set " "up partitions and initialize at least one partition with the " - "Be File System."), B_TRANSLATE("OK")))->Go(); + "Be File System."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; } case MSG_STATUS_MESSAGE: @@ -575,39 +579,48 @@ InstallerWindow::QuitRequested() // thing on the screen and we will reboot the machine once it quits. if (fDriveSetupLaunched && fBootManagerLaunched) { - (new BAlert(B_TRANSLATE("Quit Boot Manager and DriveSetup"), - B_TRANSLATE("Please close the Boot Manager and DriveSetup " - "windows before closing the Installer window."), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Quit Boot Manager and " + "DriveSetup"), B_TRANSLATE("Please close the Boot Manager " + "and DriveSetup windows before closing the Installer window."), + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return false; } if (fDriveSetupLaunched) { - (new BAlert(B_TRANSLATE("Quit DriveSetup"), - B_TRANSLATE("Please close the DriveSetup window before closing " - "the Installer window."), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Quit DriveSetup"), + B_TRANSLATE("Please close the DriveSetup window before " + "closing the Installer window."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return false; } if (fBootManagerLaunched) { - (new BAlert(B_TRANSLATE("Quit Boot Manager"), + BAlert* alert = new BAlert(B_TRANSLATE("Quit Boot Manager"), B_TRANSLATE("Please close the Boot Manager window before " - "closing the Installer window."), B_TRANSLATE("OK")))->Go(); + "closing the Installer window."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return false; } - - if (fInstallStatus != kFinished - && (new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), - B_TRANSLATE("Are you sure you want to abort the " - "installation and restart the system?"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Restart system"), NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() == 0) { - return false; + if (fInstallStatus != kFinished) { + BAlert* alert = new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), + B_TRANSLATE("Are you sure you want to abort the " + "installation and restart the system?"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Restart system"), NULL, + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(0, B_ESCAPE); + if (alert->Go() == 0) + return false; } - } else if (fInstallStatus == kInstalling - && (new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), - B_TRANSLATE("Are you sure you want to abort the installation?"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Abort"), NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() == 0) { - return false; + } else if (fInstallStatus == kInstalling) { + BAlert* alert = new BAlert(B_TRANSLATE_SYSTEM_NAME("Installer"), + B_TRANSLATE("Are you sure you want to abort the installation?"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Abort"), NULL, + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(0, B_ESCAPE); + if (alert->Go() == 0) + return false; } _QuitCopyEngine(false); @@ -648,6 +661,7 @@ InstallerWindow::_LaunchDriveSetup() BAlert* alert = new BAlert("error", B_TRANSLATE("DriveSetup, the " "application to configure disk partitions, could not be " "launched."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -676,6 +690,7 @@ InstallerWindow::_LaunchBootManager() BAlert* alert = new BAlert("error", B_TRANSLATE("BootManager, the " "application to configure the Haiku boot menu, could not be " "launched."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -876,11 +891,13 @@ InstallerWindow::_QuitCopyEngine(bool askUser) bool quit = true; if (askUser) { - quit = (new BAlert("cancel", + BAlert* alert = new BAlert("cancel", B_TRANSLATE("Are you sure you want to to stop the installation?"), B_TRANSLATE_COMMENT("Continue", "In alert after pressing Stop"), B_TRANSLATE_COMMENT("Stop", "In alert after pressing Stop"), 0, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0; + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(1, B_ESCAPE); + quit = alert->Go(); } if (quit) { diff --git a/src/apps/installer/WorkerThread.cpp b/src/apps/installer/WorkerThread.cpp index 73abd112a1..fbb4727430 100644 --- a/src/apps/installer/WorkerThread.cpp +++ b/src/apps/installer/WorkerThread.cpp @@ -316,13 +316,15 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu) goto error; // shouldn't happen // check if target has enough space - if ((fSpaceRequired > 0 && targetVolume.FreeBytes() < fSpaceRequired) - && ((new BAlert("", B_TRANSLATE("The destination disk may not have " - "enough space. Try choosing a different disk or choose to not " - "install optional items."), B_TRANSLATE("Try installing anyway"), - B_TRANSLATE("Cancel"), 0, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { - goto error; + if (fSpaceRequired > 0 && targetVolume.FreeBytes() < fSpaceRequired) { + BAlert* alert = new BAlert("", B_TRANSLATE("The destination disk may " + "not have enough space. Try choosing a different disk or choose " + "to not install optional items."), + B_TRANSLATE("Try installing anyway"), B_TRANSLATE("Cancel"), 0, + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(1, B_ESCAPE); + if (alert->Go() != 0) + goto error; } if (fDDRoster.GetPartitionWithID(srcItem->ID(), &device, &partition) == B_OK) { @@ -346,14 +348,16 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu) } // check not installing on boot volume - if ((strncmp(BOOT_PATH, targetDirectory.Path(), strlen(BOOT_PATH)) == 0) - && ((new BAlert("", B_TRANSLATE("Are you sure you want to install " - "onto the current boot disk? The Installer will have to reboot " - "your machine if you proceed."), B_TRANSLATE("OK"), - B_TRANSLATE("Cancel"), 0, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { - _SetStatusMessage("Installation stopped."); - goto error; + if (strncmp(BOOT_PATH, targetDirectory.Path(), strlen(BOOT_PATH)) == 0) { + BAlert* alert = new BAlert("", B_TRANSLATE("Are you sure you want to " + "install onto the current boot disk? The Installer will have to " + "reboot your machine if you proceed."), B_TRANSLATE("OK"), + B_TRANSLATE("Cancel"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(1, B_ESCAPE); + if (alert->Go() != 0) { + _SetStatusMessage("Installation stopped."); + goto error; + } } // check if target volume's trash dir has anything in it @@ -376,19 +380,22 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu) entries++; } - if (entries != 0 - && ((new BAlert("", B_TRANSLATE("The target volume is not empty. Are " - "you sure you want to install anyway?\n\nNote: The 'system' folder " - "will be a clean copy from the source volume, all other folders " - "will be merged, whereas files and links that exist on both the " - "source and target volume will be overwritten with the source " - "volume version."), + if (entries != 0) { + BAlert* alert = new BAlert("", B_TRANSLATE("The target volume is not " + "empty. Are you sure you want to install anyway?\n\nNote: The " + "'system' folder will be a clean copy from the source volume, all " + "other folders will be merged, whereas files and links that exist " + "on both the source and target volume will be overwritten with " + "the source volume version."), B_TRANSLATE("Install anyway"), B_TRANSLATE("Cancel"), 0, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(1, B_ESCAPE); + if (alert->Go() != 0) { // TODO: Would be cool to offer the option here to clean additional // folders at the user's choice (like /boot/common and /boot/develop). - err = B_CANCELED; - goto error; + err = B_CANCELED; + goto error; + } } // Begin actual installation diff --git a/src/apps/launchbox/MainWindow.cpp b/src/apps/launchbox/MainWindow.cpp index 448a99e97a..3d3edd8af8 100644 --- a/src/apps/launchbox/MainWindow.cpp +++ b/src/apps/launchbox/MainWindow.cpp @@ -98,6 +98,7 @@ MainWindow::QuitRequested() B_TRANSLATE("Really close this pad?\n" "(The pad will not be remembered.)"), B_TRANSLATE("Close"), B_TRANSLATE("Cancel"), NULL); + alert->SetShortcut(1, B_ESCAPE); if (alert->Go() == 1) return false; } @@ -172,6 +173,7 @@ MainWindow::MessageReceived(BMessage* message) if (errorMessage.Length() > 0) { BAlert* alert = new BAlert("error", errorMessage.String(), B_TRANSLATE("Bummer"), NULL, NULL, B_WIDTH_FROM_WIDEST); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } break; diff --git a/src/apps/login/LoginApp.cpp b/src/apps/login/LoginApp.cpp index a8771b1a67..6945f6d555 100644 --- a/src/apps/login/LoginApp.cpp +++ b/src/apps/login/LoginApp.cpp @@ -51,12 +51,14 @@ LoginApp::ReadyToRun() BScreen screen; if (fEditShelfMode) { - (new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can customize the " + BAlert* alert = new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can customize the " "desktop shown behind the Login application by dropping replicants" " onto it.\n" "\n" "When you are finished just quit the application (Alt-Q)."), - B_TRANSLATE("OK")))->Go(NULL); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } else { BRect frame(0, 0, 450, 150); frame.OffsetBySelf(screen.Frame().Width()/2 - frame.Width()/2, @@ -94,14 +96,21 @@ LoginApp::MessageReceived(BMessage *message) if (error < B_OK) { BString msg(B_TRANSLATE("Error: %1")); msg.ReplaceFirst("%1", strerror(error)); - (new BAlert(("Error"), msg.String(), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(("Error"), msg.String(), + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } case kSuspendAction: - (new BAlert(B_TRANSLATE("Error"), B_TRANSLATE("Unimplemented"), - B_TRANSLATE("OK")))->Go(); + { + BAlert* alert = new BAlert(B_TRANSLATE("Error"), + B_TRANSLATE("Unimplemented"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; + } #endif default: BApplication::MessageReceived(message); diff --git a/src/apps/mail/Content.cpp b/src/apps/mail/Content.cpp index e3390d23be..c4f40717f7 100644 --- a/src/apps/mail/Content.cpp +++ b/src/apps/mail/Content.cpp @@ -755,10 +755,11 @@ TContentView::MessageReceived(BMessage *msg) free (signature); } else { beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("An error occurred trying to open this " - "signature."), - B_TRANSLATE("Sorry")))->Go(); + "signature."), B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } @@ -1914,10 +1915,11 @@ TTextView::Open(hyper_text *enclosure) status_t result = be_roster->Launch(handlerToLaunch, 1, &enclosure->name); if (result != B_NO_ERROR && result != B_ALREADY_RUNNING) { beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("There is no installed handler for " - "URL links."), - "Sorry"))->Go(); + "URL links."), B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } @@ -2065,9 +2067,10 @@ TTextView::Save(BMessage *msg, bool makeNewFile) if (result != B_NO_ERROR) { beep(); - (new BAlert("", B_TRANSLATE("An error occurred trying to save " - "the attachment."), - B_TRANSLATE("Sorry")))->Go(); + BAlert* alert = new BAlert("", B_TRANSLATE("An error occurred trying to save " + "the attachment."), B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } return result; @@ -3337,10 +3340,11 @@ TTextView::Undo(BClipboard */*clipboard*/) Select(offset, offset + length); } else { ::beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Inconsistency occurred in the undo/redo " - "buffer."), - B_TRANSLATE("OK")))->Go(); + "buffer."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } @@ -3384,10 +3388,11 @@ TTextView::Redo() case K_REPLACED: ::beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Inconsistency occurred in the undo/redo " - "buffer."), - B_TRANSLATE("OK")))->Go(); + "buffer."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; } ScrollToSelection(); diff --git a/src/apps/mail/Enclosures.cpp b/src/apps/mail/Enclosures.cpp index 469fa1d155..f6ea5d0df9 100644 --- a/src/apps/mail/Enclosures.cpp +++ b/src/apps/mail/Enclosures.cpp @@ -249,10 +249,12 @@ TEnclosuresView::MessageReceived(BMessage *msg) if (window && window->Mail()) window->Mail()->RemoveComponent(item->Component()); - (new BAlert("", B_TRANSLATE( + BAlert* alert = new BAlert("", B_TRANSLATE( "Removing attachments from a forwarded mail is not yet " "implemented!\nIt will not yet work correctly."), - B_TRANSLATE("OK")))->Go(); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } else watch_node(item->NodeRef(), B_STOP_WATCHING, this); @@ -302,9 +304,11 @@ TEnclosuresView::MessageReceived(BMessage *msg) if (badType) { beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Only files can be added as attachments."), - B_TRANSLATE("OK")))->Go(); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } break; diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index d06867f427..99daf47071 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -1177,9 +1177,11 @@ TMailWindow::MessageReceived(BMessage *msg) msg.AddRef("refs", fRef); tracker.SendMessage(&msg); } else { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Need Tracker to move items to trash"), - B_TRANSLATE("Sorry")))->Go(); + B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } } else { @@ -1344,14 +1346,14 @@ TMailWindow::MessageReceived(BMessage *msg) 1, &arg); if (result != B_NO_ERROR) { - (new BAlert("", B_TRANSLATE( + BAlert* alert = new BAlert("", B_TRANSLATE( "Sorry, could not find an application that " "supports the 'Person' data type."), - B_TRANSLATE("OK")))->Go(); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } - } - free(arg); break; } @@ -1581,10 +1583,12 @@ TMailWindow::MessageReceived(BMessage *msg) snooze (1500000); if (!gDictCount) { beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Mail couldn't find its dictionary."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_OFFSET_SPACING, B_STOP_ALERT))->Go(); + B_OFFSET_SPACING, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } else { fSpelling->SetMarked(!fSpelling->IsMarked()); fContentView->fTextView->EnableSpellCheck( @@ -1626,6 +1630,7 @@ TMailWindow::MessageReceived(BMessage *msg) B_TRANSLATE("Put your favorite e-mail queries and query " "templates in this folder."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_IDEA_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } @@ -2225,8 +2230,10 @@ TMailWindow::Send(bool now) status_t status = SaveAsDraft(); if (status != B_OK) { beep(); - (new BAlert("", B_TRANSLATE("E-mail draft could not be saved!"), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("", B_TRANSLATE("E-mail draft could " + "not be saved!"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } return status; } @@ -2315,11 +2322,14 @@ TMailWindow::Send(bool now) "the unencodable ones), or choose Cancel to go back " "and try fixing it up."); messageString.ReplaceFirst("%ld", countString); - userAnswer = (new BAlert("Question", messageString.String(), + BAlert* alert = new BAlert("Question", messageString.String(), B_TRANSLATE("Send"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, - B_WARNING_ALERT))->Go(); + B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); + userAnswer = alert->Go(); + if (userAnswer == 1) { // Cancel was picked. return -1; @@ -2450,11 +2460,13 @@ TMailWindow::Send(bool now) close = true; fSent = true; - int32 start = (new BAlert("no daemon", + BAlert* alert = new BAlert("no daemon", B_TRANSLATE("The mail_daemon is not running. The message is " "queued and will be sent when the mail_daemon is started."), - B_TRANSLATE("Start now"), B_TRANSLATE("OK")))->Go(); - + B_TRANSLATE("Start now"), B_TRANSLATE("OK")); + alert->SetShortcut(1, B_ESCAPE); + int32 start = alert->Go(); + if (start == 0) { result = be_roster->Launch("application/x-vnd.Be-POST"); if (result == B_OK) { @@ -2489,7 +2501,9 @@ TMailWindow::Send(bool now) if (result != B_NO_ERROR && result != B_MAIL_NO_DAEMON) { beep(); - (new BAlert("", errorMessage.String(), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("", errorMessage.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } if (close) { PostMessage(B_QUIT_REQUESTED); @@ -2721,8 +2735,10 @@ ErrorExit: sprintf(errorString, "Unable to train the message file \"%s\" as %s. " "Possibly useful error code: %s (%ld).", filePath.Path(), CommandWord, strerror (errorCode), errorCode); - (new BAlert("", errorString, - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("", errorString, B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); + return errorCode; } diff --git a/src/apps/mail/Signature.cpp b/src/apps/mail/Signature.cpp index 405bb69525..7fd5ea867e 100644 --- a/src/apps/mail/Signature.cpp +++ b/src/apps/mail/Signature.cpp @@ -192,13 +192,17 @@ TSignatureWindow::MessageReceived(BMessage* msg) Save(); break; - case M_DELETE: - if (!(new BAlert("", + case M_DELETE: { + BAlert* alert = new BAlert("", B_TRANSLATE("Really delete this signature? This cannot " "be undone."), B_TRANSLATE("Cancel"), B_TRANSLATE("Delete"), - NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go()) + NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + int32 choice = alert->Go(); + + if (choice == 0) break; if (fFile) { @@ -210,7 +214,7 @@ TSignatureWindow::MessageReceived(BMessage* msg) fSigView->fName->MakeFocus(true); } break; - + } case M_SIGNATURE: if (Clear()) { msg->FindRef("ref", &ref); @@ -231,9 +235,11 @@ TSignatureWindow::MessageReceived(BMessage* msg) else { fFile = NULL; beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("Couldn't open this signature. Sorry."), - B_TRANSLATE("OK")))->Go(); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } break; @@ -385,9 +391,11 @@ TSignatureWindow::Save() err_exit: beep(); - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("An error occurred trying to save this signature."), - B_TRANSLATE("Sorry")))->Go(); + B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/apps/mediaconverter/MediaConverterApp.cpp b/src/apps/mediaconverter/MediaConverterApp.cpp index f9397d5d2f..67af42588b 100644 --- a/src/apps/mediaconverter/MediaConverterApp.cpp +++ b/src/apps/mediaconverter/MediaConverterApp.cpp @@ -146,7 +146,7 @@ MediaConverterApp::RefsReceived(BMessage* msg) BAlert* alert = new BAlert((errors > 1) ? B_TRANSLATE("Error loading files") : B_TRANSLATE("Error loading a file"), - alertText.String(), B_TRANSLATE("Continue") , NULL, NULL, + alertText.String(), B_TRANSLATE("Continue"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); alert->Go(); } diff --git a/src/apps/mediaconverter/MediaConverterWindow.cpp b/src/apps/mediaconverter/MediaConverterWindow.cpp index c6288660d2..c835ec8fc0 100644 --- a/src/apps/mediaconverter/MediaConverterWindow.cpp +++ b/src/apps/mediaconverter/MediaConverterWindow.cpp @@ -428,8 +428,10 @@ MediaConverterWindow::MessageReceived(BMessage* msg) if (status != B_OK && status != B_ALREADY_RUNNING) { BString errorString(B_TRANSLATE("Error launching: %strError%")); errorString.ReplaceFirst("%strError%", strerror(status)); - (new BAlert(B_TRANSLATE("Error"), errorString.String(), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Error"), + errorString.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } diff --git a/src/apps/mediaconverter/MediaFileInfoView.cpp b/src/apps/mediaconverter/MediaFileInfoView.cpp index 6cd20e5d00..0aa2de7277 100644 --- a/src/apps/mediaconverter/MediaFileInfoView.cpp +++ b/src/apps/mediaconverter/MediaFileInfoView.cpp @@ -165,6 +165,7 @@ MediaFileInfoView::Update(BMediaFile* file, entry_ref* ref) BAlert* alert = new BAlert( B_TRANSLATE("File Error"), error.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } else { diff --git a/src/apps/mediaplayer/MainApp.cpp b/src/apps/mediaplayer/MainApp.cpp index 427de760d8..4b435d74ea 100644 --- a/src/apps/mediaplayer/MainApp.cpp +++ b/src/apps/mediaplayer/MainApp.cpp @@ -93,6 +93,8 @@ MainApp::MainApp() "Would you like to start it ?"), B_TRANSLATE("Quit"), B_TRANSLATE("Start media server"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + if (alert->Go() == 0) { PostMessage(B_QUIT_REQUESTED); return; diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp index e9ebd34da0..bdce0485db 100644 --- a/src/apps/mediaplayer/MainWin.cpp +++ b/src/apps/mediaplayer/MainWin.cpp @@ -633,6 +633,7 @@ MainWin::MessageReceived(BMessage* msg) BAlert* alert = new BAlert(B_TRANSLATE("Nothing to Play"), B_TRANSLATE("None of the files you wanted to play appear " "to be media files."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fControls->SetDisabledString(kDisabledSeekMessage); break; @@ -1090,8 +1091,10 @@ MainWin::OpenPlaylistItem(const PlaylistItemRef& item) BString message = B_TRANSLATE("%app% encountered an internal error. " "The file could not be opened."); message.ReplaceFirst("%app%", kApplicationName); - (new BAlert(kApplicationName, message.String(), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(kApplicationName, message.String(), + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); _PlaylistItemOpened(item, ret); } else { BString string; @@ -1337,7 +1340,10 @@ MainWin::_PlaylistItemOpened(const PlaylistItemRef& item, status_t result) } else { message << B_TRANSLATE("Error: ") << strerror(result); } - (new BAlert("error", message.String(), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("error", message.String(), + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); fControls->SetDisabledString(kDisabledSeekMessage); } else { // 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 8e4d9f1499..8aab7168f3 100644 --- a/src/apps/mediaplayer/playlist/PlaylistWindow.cpp +++ b/src/apps/mediaplayer/playlist/PlaylistWindow.cpp @@ -57,6 +57,7 @@ display_save_alert(const char* message) { BAlert* alert = new BAlert(B_TRANSLATE("Save error"), message, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } diff --git a/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp b/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp index a872bc3167..7b1a0d2b1c 100644 --- a/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp +++ b/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp @@ -118,9 +118,11 @@ RemovePLItemsCommand::Perform() message << B_TRANSLATE("Some files could not be moved into Trash."); message << "\n\n" << B_TRANSLATE("Error: ") << strerror(moveError); - (new BAlert(B_TRANSLATE("Move Into Trash Error"), message.String(), - B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(NULL); + BAlert* alert = new BAlert(B_TRANSLATE("Move into trash error"), + message.String(), B_TRANSLATE("OK"), NULL, NULL, + B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } } diff --git a/src/apps/midiplayer/MidiPlayerApp.cpp b/src/apps/midiplayer/MidiPlayerApp.cpp index 0450d2790c..e557482382 100644 --- a/src/apps/midiplayer/MidiPlayerApp.cpp +++ b/src/apps/midiplayer/MidiPlayerApp.cpp @@ -48,14 +48,16 @@ MidiPlayerApp::ReadyToRun() void MidiPlayerApp::AboutRequested() { - (new BAlert( - NULL, + BAlert* alert = new BAlert(NULL, B_TRANSLATE_COMMENT("Haiku MIDI Player 1.0.0 beta\n\n" "This tiny program\n" "Knows how to play thousands of\n" - "Cheesy sounding songs", "This is a haiku. First line has five syllables, second has seven and last has five again. Create your own."), - "Okay", NULL, NULL, - B_WIDTH_AS_USUAL, B_INFO_ALERT))->Go(); + "Cheesy sounding songs", "This is a haiku. First line has five " + "syllables, second has seven and last has five again. " + "Create your own."), B_TRANSLATE("OK"), NULL, NULL, + B_WIDTH_AS_USUAL, B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/apps/midiplayer/MidiPlayerWindow.cpp b/src/apps/midiplayer/MidiPlayerWindow.cpp index 3479e8f53a..e098f584a0 100644 --- a/src/apps/midiplayer/MidiPlayerWindow.cpp +++ b/src/apps/midiplayer/MidiPlayerWindow.cpp @@ -381,9 +381,11 @@ MidiPlayerWindow::LoadFile(entry_ref* ref) scopeView->SetPlaying(false); scopeView->Invalidate(); - (new BAlert(NULL, B_TRANSLATE("Could not load song"), + BAlert* alert = new BAlert(NULL, B_TRANSLATE("Could not load song"), B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } diff --git a/src/apps/networkstatus/NetworkStatus.cpp b/src/apps/networkstatus/NetworkStatus.cpp index b7a9897ec6..557523b03f 100644 --- a/src/apps/networkstatus/NetworkStatus.cpp +++ b/src/apps/networkstatus/NetworkStatus.cpp @@ -156,7 +156,6 @@ NetworkStatus::ReadyToRun() "in a window or install it in the Deskbar."), B_TRANSLATE("Run in window"), B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 1) { _InstallReplicantInDeskbar(); diff --git a/src/apps/networkstatus/NetworkStatusView.cpp b/src/apps/networkstatus/NetworkStatusView.cpp index f3490d9bb5..626cb60757 100644 --- a/src/apps/networkstatus/NetworkStatusView.cpp +++ b/src/apps/networkstatus/NetworkStatusView.cpp @@ -298,6 +298,7 @@ NetworkStatusView::MessageReceived(BMessage* message) BAlert* alert = new BAlert(name, text.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } @@ -401,6 +402,7 @@ NetworkStatusView::_ShowConfiguration(BMessage* message) } BAlert* alert = new BAlert(name, text.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); BTextView* view = alert->TextView(); BFont font; @@ -509,6 +511,7 @@ NetworkStatusView::_AboutRequested() about.ReplaceFirst("%2", "Copyright 2007-2010"); // Append a new year here BAlert* alert = new BAlert("about", about, B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); BTextView *view = alert->TextView(); BFont font; @@ -602,6 +605,7 @@ NetworkStatusView::_OpenNetworksPreferences() errorMessage << strerror(status); BAlert* alert = new BAlert("launch error", errorMessage.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); // asynchronous alert in order to not block replicant host application alert->Go(NULL); diff --git a/src/apps/overlayimage/OverlayView.cpp b/src/apps/overlayimage/OverlayView.cpp index 9efac70e15..8bc37bcddd 100644 --- a/src/apps/overlayimage/OverlayView.cpp +++ b/src/apps/overlayimage/OverlayView.cpp @@ -159,8 +159,7 @@ OverlayView::OverlayAboutRequested() "originally by Seth Flaxman\n\t" "modified by Hartmuth Reh\n\t" "further modified by Humdinger\n", - "OK"); - + "OK"); BTextView *view = alert->TextView(); BFont font; view->SetStylable(true); @@ -168,6 +167,6 @@ OverlayView::OverlayAboutRequested() font.SetSize(font.Size() + 7.0f); font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 12, &font); - + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/apps/packageinstaller/PackageInfo.cpp b/src/apps/packageinstaller/PackageInfo.cpp index d8bfdd0f6f..22cfe55e35 100644 --- a/src/apps/packageinstaller/PackageInfo.cpp +++ b/src/apps/packageinstaller/PackageInfo.cpp @@ -1044,6 +1044,7 @@ PackageInfo::Parse() B_TRANSLATE("Continue"), B_TRANSLATE("Abort"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + warning->SetShortcut(1, B_ESCAPE); selection = warning->Go(); if (selection == 1) { diff --git a/src/apps/packageinstaller/PackageInstall.cpp b/src/apps/packageinstaller/PackageInstall.cpp index a779e1b6b1..c4b4b2fa7d 100644 --- a/src/apps/packageinstaller/PackageInstall.cpp +++ b/src/apps/packageinstaller/PackageInstall.cpp @@ -125,6 +125,7 @@ PackageInstall::_Install() "and continue the installation?"), B_TRANSLATE("Continue"), B_TRANSLATE("Abort")); + reinstall->SetShortcut(1, B_ESCAPE); if (reinstall->Go() == 0) { // Uninstall the package diff --git a/src/apps/packageinstaller/PackageView.cpp b/src/apps/packageinstaller/PackageView.cpp index 8575454e33..1005e58fa7 100644 --- a/src/apps/packageinstaller/PackageView.cpp +++ b/src/apps/packageinstaller/PackageView.cpp @@ -98,6 +98,7 @@ PackageView::AttachedToWindow() "possible reasons for this might be that the requested file " "is not a valid BeOS .pkg package."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + warning->SetFlags(warning->Flags() | B_CLOSE_ON_ESCAPE); warning->Go(); Window()->PostMessage(B_QUIT_REQUESTED); @@ -195,6 +196,7 @@ PackageView::MessageReceived(BMessage *msg) B_TRANSLATE("The package you requested has been successfully " "installed on your system."), B_TRANSLATE("OK")); + notify->SetFlags(notify->Flags() | B_CLOSE_ON_ESCAPE); notify->Go(); fStatusWindow->Hide(); @@ -214,6 +216,7 @@ PackageView::MessageReceived(BMessage *msg) B_TRANSLATE( "The installation of the package has been aborted."), B_TRANSLATE("OK")); + notify->SetFlags(notify->Flags() | B_CLOSE_ON_ESCAPE); notify->Go(); fStatusWindow->Hide(); fInstall->SetEnabled(true); @@ -234,6 +237,7 @@ PackageView::MessageReceived(BMessage *msg) NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); fprintf(stderr, B_TRANSLATE("Error while installing the package\n")); + notify->SetFlags(notify->Flags() | B_CLOSE_ON_ESCAPE); notify->Go(); fStatusWindow->Hide(); fInstall->SetEnabled(true); @@ -354,7 +358,8 @@ PackageView::ItemExists(PackageItem &item, BPath &path, int32 &policy) B_TRANSLATE("Replace"), B_TRANSLATE("Skip"), B_TRANSLATE("Abort")); - + alert->SetShortcut(2, B_ESCAPE); + choice = alert->Go(); switch (choice) { case 0: diff --git a/src/apps/pairs/PairsView.cpp b/src/apps/pairs/PairsView.cpp index 5a68a38bdb..569832c59b 100644 --- a/src/apps/pairs/PairsView.cpp +++ b/src/apps/pairs/PairsView.cpp @@ -175,7 +175,7 @@ PairsView::_ReadRandomIcons() BAlert* alert = new BAlert("Fatal", msgStr.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); exit(1); } diff --git a/src/apps/people/PeopleApp.cpp b/src/apps/people/PeopleApp.cpp index 41a3a36436..c1e14424b6 100644 --- a/src/apps/people/PeopleApp.cpp +++ b/src/apps/people/PeopleApp.cpp @@ -247,6 +247,7 @@ TPeopleApp::MessageReceived(BMessage* message) BAlert* alert = new BAlert(B_TRANSLATE("Error"), errorMsg.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } break; diff --git a/src/apps/people/PersonWindow.cpp b/src/apps/people/PersonWindow.cpp index 291b1df6b9..8c5511e92c 100644 --- a/src/apps/people/PersonWindow.cpp +++ b/src/apps/people/PersonWindow.cpp @@ -216,7 +216,9 @@ PersonWindow::MessageReceived(BMessage* msg) } else { sprintf(str, B_TRANSLATE("Could not create %s."), name); - (new BAlert("", str, B_TRANSLATE("Sorry")))->Go(); + BAlert* alert = new BAlert("", str, B_TRANSLATE("Sorry")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } } @@ -294,9 +296,12 @@ PersonWindow::QuitRequested() status_t result; if (!fView->IsSaved()) { - result = (new BAlert("", B_TRANSLATE("Save changes before quitting?"), + BAlert* alert = new BAlert("", B_TRANSLATE("Save changes before quitting?"), B_TRANSLATE("Cancel"), B_TRANSLATE("Quit"), - B_TRANSLATE("Save")))->Go(); + B_TRANSLATE("Save")); + alert->SetShortcut(0, B_ESCAPE); + result = alert->Go(); + if (result == 2) { if (fRef) fView->Save(); diff --git a/src/apps/people/PictureView.cpp b/src/apps/people/PictureView.cpp index 90b97b5605..837bd7df99 100644 --- a/src/apps/people/PictureView.cpp +++ b/src/apps/people/PictureView.cpp @@ -564,6 +564,7 @@ PictureView::_HandleDrop(BMessage* msg) text.ReplaceFirst("%name%", name); BAlert* alert = new BAlert(B_TRANSLATE("Error"), text.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/apps/poorman/PoorManWindow.cpp b/src/apps/poorman/PoorManWindow.cpp index 019ecc1e8a..ef572846ec 100644 --- a/src/apps/poorman/PoorManWindow.cpp +++ b/src/apps/poorman/PoorManWindow.cpp @@ -545,6 +545,7 @@ PoorManWindow::DefaultSettings() { BAlert* serverAlert = new BAlert(B_TRANSLATE("Error Server"), STR_ERR_CANT_START, B_TRANSLATE("OK")); + serverAlert->SetFlags(serverAlert->Flags() | B_CLOSE_ON_ESCAPE); BAlert* dirAlert = new BAlert(B_TRANSLATE("Error Dir"), STR_ERR_WEB_DIR, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"), B_TRANSLATE("Default"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING); @@ -576,6 +577,7 @@ PoorManWindow::DefaultSettings() BAlert* dirCreatedAlert = new BAlert(B_TRANSLATE("Dir Created"), STR_DIR_CREATED, B_TRANSLATE("OK")); + dirCreatedAlert->SetFlags(dirCreatedAlert->Flags() | B_CLOSE_ON_ESCAPE); dirCreatedAlert->Go(); SetWebDir(STR_DEFAULT_WEB_DIRECTORY); be_app->PostMessage(kStartServer); diff --git a/src/apps/powerstatus/PowerStatus.cpp b/src/apps/powerstatus/PowerStatus.cpp index ebaefb73da..06b9355e28 100644 --- a/src/apps/powerstatus/PowerStatus.cpp +++ b/src/apps/powerstatus/PowerStatus.cpp @@ -90,7 +90,6 @@ PowerStatus::ReadyToRun() "or install it in the Deskbar."), B_TRANSLATE("Run in window"), B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); if (alert->Go()) { image_info info; diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp index 647dae5399..0d540f60cc 100644 --- a/src/apps/powerstatus/PowerStatusView.cpp +++ b/src/apps/powerstatus/PowerStatusView.cpp @@ -635,6 +635,7 @@ PowerStatusReplicant::_AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, strlen(B_TRANSLATE("PowerStatus")), &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/apps/processcontroller/PCWorld.cpp b/src/apps/processcontroller/PCWorld.cpp index d4b8c7dad8..d97d8b542f 100644 --- a/src/apps/processcontroller/PCWorld.cpp +++ b/src/apps/processcontroller/PCWorld.cpp @@ -93,7 +93,6 @@ PCApplication::ReadyToRun() " or install it in the Deskbar."), B_TRANSLATE("Run in window"), B_TRANSLATE("Install in Deskbar"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); if (alert->Go() != 0) { BDeskbar deskbar; @@ -107,7 +106,7 @@ PCApplication::ReadyToRun() B_TRANSLATE("ProcessController is already installed in Deskbar."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/apps/processcontroller/Preferences.cpp b/src/apps/processcontroller/Preferences.cpp index 8b4ca9b34d..3eb8d53bb9 100644 --- a/src/apps/processcontroller/Preferences.cpp +++ b/src/apps/processcontroller/Preferences.cpp @@ -115,8 +115,7 @@ Preferences::~Preferences() BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"), error.String(), B_TRANSLATE("Damned!"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); - + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index 168a4ef78b..8f9417554c 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -280,7 +280,7 @@ ProcessController::MessageReceived(BMessage *message) B_TRANSLATE("This team is already gone"B_UTF8_ELLIPSIS), B_TRANSLATE("Ok!"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -298,6 +298,8 @@ ProcessController::MessageReceived(BMessage *message) B_TRANSLATE("Cancel"), B_TRANSLATE("Debug this thread!"), B_TRANSLATE("Kill this thread!"), B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(0, B_ESCAPE); + #define KILL 2 #else snprintf(question, sizeof(question), @@ -306,6 +308,8 @@ ProcessController::MessageReceived(BMessage *message) alert = new BAlert(B_TRANSLATE("Please confirm"), question, B_TRANSLATE("Cancel"), B_TRANSLATE("Kill this thread!"), NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(0, B_ESCAPE); + #define KILL 1 #endif alert->SetShortcut(0, B_ESCAPE); @@ -330,7 +334,7 @@ ProcessController::MessageReceived(BMessage *message) B_TRANSLATE("This thread is already gone"B_UTF8_ELLIPSIS), B_TRANSLATE("Ok!"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -408,7 +412,7 @@ ProcessController::MessageReceived(BMessage *message) "You can't turn it off!"), B_TRANSLATE("That's no Fun!"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } else _kern_set_cpu_enabled(cpu, !_kern_cpu_enabled(cpu)); @@ -893,6 +897,7 @@ thread_debug_thread(void *arg) alert = new BAlert("", "The semaphore wasn't released, " "because it wasn't necessary anymore!", "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/apps/pulse/CPUButton.cpp b/src/apps/pulse/CPUButton.cpp index 2d18eedd6c..3852a85f45 100644 --- a/src/apps/pulse/CPUButton.cpp +++ b/src/apps/pulse/CPUButton.cpp @@ -243,7 +243,7 @@ CPUButton::Invoke(BMessage *message) BAlert *alert = new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can't disable the last active CPU."), B_TRANSLATE("OK")); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); SetValue(!Value()); } diff --git a/src/apps/pulse/DeskbarPulseView.cpp b/src/apps/pulse/DeskbarPulseView.cpp index 802f7bb757..959c49daca 100644 --- a/src/apps/pulse/DeskbarPulseView.cpp +++ b/src/apps/pulse/DeskbarPulseView.cpp @@ -182,7 +182,7 @@ void DeskbarPulseView::Remove() { str.UnlockBuffer(); BAlert *alert = new BAlert(B_TRANSLATE("Info"), str.String(), B_TRANSLATE("OK")); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } delete deskbar; diff --git a/src/apps/pulse/PulseApp.cpp b/src/apps/pulse/PulseApp.cpp index 9006f2fbb3..659762c2ba 100644 --- a/src/apps/pulse/PulseApp.cpp +++ b/src/apps/pulse/PulseApp.cpp @@ -193,7 +193,7 @@ PulseApp::ShowAbout(bool asApplication) font.SetSize(18); font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, name.Length(), &font); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); // Use the asynchronous version so we don't block the window's thread alert->Go(NULL); } @@ -278,7 +278,7 @@ LoadInDeskbar() message.UnlockBuffer(); BAlert *alert = new BAlert(B_TRANSLATE("Error"), message.String(), B_TRANSLATE("OK")); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); return false; } diff --git a/src/apps/pulse/PulseView.cpp b/src/apps/pulse/PulseView.cpp index d14037a1c6..bc5969a0af 100644 --- a/src/apps/pulse/PulseView.cpp +++ b/src/apps/pulse/PulseView.cpp @@ -130,7 +130,7 @@ void PulseView::ChangeCPUState(BMessage *message) { BAlert *alert = new BAlert(B_TRANSLATE("Info"), B_TRANSLATE("You can't disable the last active CPU."), B_TRANSLATE("OK")); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } diff --git a/src/apps/resedit/BitmapView.cpp b/src/apps/resedit/BitmapView.cpp index 57e928bc96..007fc60459 100644 --- a/src/apps/resedit/BitmapView.cpp +++ b/src/apps/resedit/BitmapView.cpp @@ -250,8 +250,9 @@ BitmapView::MessageReceived(BMessage *msg) switch (msg->what) { case M_REMOVE_IMAGE: { - BAlert *alert = new BAlert("Mr. Peeps!", "This cannot be undone. Remove the image?", - "Remove", "Cancel"); + BAlert *alert = new BAlert("Mr. Peeps!", "This cannot be undone. " + "Remove the image?", "Remove", "Cancel"); + alert->SetShortcut(1, B_ESCAPE); int32 value = alert->Go(); if (value == 0) { SetBitmap(NULL); diff --git a/src/apps/resedit/ResWindow.cpp b/src/apps/resedit/ResWindow.cpp index f306837293..4f5fea524a 100644 --- a/src/apps/resedit/ResWindow.cpp +++ b/src/apps/resedit/ResWindow.cpp @@ -34,7 +34,10 @@ bool ResWindow::QuitRequested(void) { if (fView->GetSaveStatus() == FILE_DIRTY) { - BAlert *alert = new BAlert("ResEdit","Save your changes?","Cancel","Don't Save","Save"); + BAlert *alert = new BAlert("ResEdit", "Save your changes?", "Cancel", + "Don't Save", "Save"); + alert->SetShortcut(0, B_ESCAPE); + switch (alert->Go()) { case 0: return false; diff --git a/src/apps/screenshot/ScreenshotWindow.cpp b/src/apps/screenshot/ScreenshotWindow.cpp index f3bee39381..4bca590da6 100644 --- a/src/apps/screenshot/ScreenshotWindow.cpp +++ b/src/apps/screenshot/ScreenshotWindow.cpp @@ -669,6 +669,7 @@ ScreenshotWindow::_ShowSettings(bool activate) &rect); if (err < B_OK || view == NULL) { BAlert *alert = new BAlert(NULL, strerror(err), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } else { if (fSettingsWindow) { diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 86b3ee4c8a..e6d9a70ace 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -953,6 +953,7 @@ ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap, snprintf(buffer, sizeof(buffer), B_TRANSLATE("The file '%s' could not " "be written."), name); BAlert* palert = new BAlert("", buffer, B_TRANSLATE("OK")); + palert->SetFlags(palert->Flags() | B_CLOSE_ON_ESCAPE); palert->Go(); } diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index 6aa6e9f613..22144762b3 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -1108,6 +1108,7 @@ ShowImageWindow::_LoadError(const entry_ref& ref) "LoadAlerts"), B_TRANSLATE_CONTEXT("OK", "Alerts"), NULL, NULL, B_WIDTH_AS_USUAL, B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -1216,6 +1217,8 @@ ShowImageWindow::_ClosePrompt() BAlert* alert = new BAlert(B_TRANSLATE("Close document"), prompt.String(), B_TRANSLATE("Cancel"), B_TRANSLATE("Close")); + alert->SetShortcut(0, B_ESCAPE); + if (alert->Go() == 0) { // Cancel return false; diff --git a/src/apps/soundrecorder/RecorderWindow.cpp b/src/apps/soundrecorder/RecorderWindow.cpp index 11b5a92997..49a182b299 100644 --- a/src/apps/soundrecorder/RecorderWindow.cpp +++ b/src/apps/soundrecorder/RecorderWindow.cpp @@ -1175,7 +1175,9 @@ RecorderWindow::ErrorAlert(const char * action, status_t err) sprintf(msg, "%s: %s. [%lx]", action, strerror(err), (int32) err); else sprintf(msg, "%s.", action); - (new BAlert("", msg, B_TRANSLATE("Stop")))->Go(); + BAlert* alert = new BAlert("", msg, B_TRANSLATE("Stop")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } @@ -1334,15 +1336,20 @@ RecorderWindow::RefsReceived(BMessage *msg) } if (countBad > 0 && countGood == 0) { - (new BAlert(B_TRANSLATE("Nothing to play"), B_TRANSLATE("None of the " - "files appear to be audio files"), B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Nothing to play"), + B_TRANSLATE("None of the files appear to be audio files"), + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } else if (countGood > 0) { - if (countBad > 0) - (new BAlert(B_TRANSLATE("Invalid audio files"), B_TRANSLATE("Some " - "of the files don't appear to be audio files"), + if (countBad > 0) { + BAlert* alert = new BAlert(B_TRANSLATE("Invalid audio files"), + B_TRANSLATE("Some of the files don't appear to be audio files"), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); + } fSoundList->Select(fSoundList->CountItems() - 1); } } diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp index 0601b0bdec..0789d3a754 100644 --- a/src/apps/stylededit/StyledEditWindow.cpp +++ b/src/apps/stylededit/StyledEditWindow.cpp @@ -1640,7 +1640,8 @@ StyledEditWindow::_ShowStatistics() BAlert* alert = new BAlert("Statistics", result, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_INFO_ALERT); - + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + return alert->Go(); } diff --git a/src/apps/sudoku/SudokuWindow.cpp b/src/apps/sudoku/SudokuWindow.cpp index 9a7f9a713f..135568b12a 100644 --- a/src/apps/sudoku/SudokuWindow.cpp +++ b/src/apps/sudoku/SudokuWindow.cpp @@ -411,9 +411,11 @@ SudokuWindow::_MessageDropped(BMessage* message) strerror(status)); } - (new BAlert(B_TRANSLATE("Sudoku request"), + BAlert* alert = new BAlert(B_TRANSLATE("Sudoku request"), buffer, B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } @@ -554,11 +556,15 @@ SudokuWindow::MessageReceived(BMessage* message) } case kMsgSudokuSolved: - (new BAlert(B_TRANSLATE("Sudoku request"), + { + BAlert* alert = new BAlert(B_TRANSLATE("Sudoku request"), B_TRANSLATE("Sudoku solved - congratulations!\n"), B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_IDEA_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_IDEA_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; + } case B_OBSERVER_NOTICE_CHANGE: { diff --git a/src/apps/terminal/TermApp.cpp b/src/apps/terminal/TermApp.cpp index 20436f2215..1f8cfb62cd 100644 --- a/src/apps/terminal/TermApp.cpp +++ b/src/apps/terminal/TermApp.cpp @@ -104,7 +104,7 @@ TermApp::ReadyToRun() B_TRANSLATE("Terminal couldn't start the shell. Sorry."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL, B_INFO_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); PostMessage(B_QUIT_REQUESTED); return; diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp index be789f1fa3..8b1a2cecd4 100644 --- a/src/apps/terminal/TermWindow.cpp +++ b/src/apps/terminal/TermWindow.cpp @@ -711,7 +711,7 @@ TermWindow::MessageReceived(BMessage *message) BAlert* alert = new BAlert(B_TRANSLATE("Find failed"), errorMsg, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fFindPreviousMenuItem->SetEnabled(false); @@ -729,7 +729,7 @@ TermWindow::MessageReceived(BMessage *message) B_TRANSLATE("Text not found."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fFindPreviousMenuItem->SetEnabled(false); fFindNextMenuItem->SetEnabled(false); @@ -751,7 +751,7 @@ TermWindow::MessageReceived(BMessage *message) BAlert* alert = new BAlert(B_TRANSLATE("Find failed"), B_TRANSLATE("Not found."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } break; diff --git a/src/apps/text_search/GrepWindow.cpp b/src/apps/text_search/GrepWindow.cpp index 928bd69501..bb6fc836fc 100644 --- a/src/apps/text_search/GrepWindow.cpp +++ b/src/apps/text_search/GrepWindow.cpp @@ -1290,6 +1290,7 @@ GrepWindow::_OnTrimSelection() text << "\n"; BAlert* alert = new BAlert(NULL, text.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); return; } @@ -1382,6 +1383,7 @@ GrepWindow::_OnSelectInTracker() B_TRANSLATE("Please select the files you wish to have selected for you in " "Tracker."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); return; } @@ -1446,6 +1448,7 @@ GrepWindow::_OnSelectInTracker() str1.ReplaceFirst("%APP_NAME",APP_NAME); BAlert* alert = new BAlert(NULL, str1.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); goto out; } diff --git a/src/apps/tv/MainWin.cpp b/src/apps/tv/MainWin.cpp index 63db99e696..e3283a9bdc 100644 --- a/src/apps/tv/MainWin.cpp +++ b/src/apps/tv/MainWin.cpp @@ -375,7 +375,9 @@ MainWin::SelectInterface(int i) BString s; s << B_TRANSLATE("Error, interface is busy:\n\n"); s << gDeviceRoster->DeviceName(i); - (new BAlert("error", s.String(), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("error", s.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } @@ -384,7 +386,9 @@ MainWin::SelectInterface(int i) BString s; s << B_TRANSLATE("Error, connecting to interface failed:\n\n"); s << gDeviceRoster->DeviceName(i); - (new BAlert("error", s.String(), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("error", s.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } done: diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index c4291675ff..02616b8bba 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -103,6 +103,7 @@ BrowserApp::AboutRequested() BAlert* alert = new BAlert("About WebPositive", aboutText.String(), "Sweet!"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 92bd86b8e9..3e4da40d18 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -680,6 +680,8 @@ BrowserWindow::MessageReceived(BMessage* message) B_TRANSLATE("Do you really want to " "clear the browsing history?"), B_TRANSLATE("Clear"), B_TRANSLATE("Cancel")); + alert->SetShortcut(1, B_ESCAPE); + if (alert->Go() == 0) history->Clear(); break; @@ -732,6 +734,7 @@ BrowserWindow::MessageReceived(BMessage* message) BAlert* alert = new BAlert(B_TRANSLATE("Open bookmarks confirmation"), string.String(), B_TRANSLATE("Cancel"), B_TRANSLATE("Open all")); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 0) break; } @@ -1586,6 +1589,7 @@ BrowserWindow::_CreateBookmark() BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), message.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -1615,6 +1619,7 @@ BrowserWindow::_CreateBookmark() message.ReplaceFirst("%bookmarkName", bookmarkName); BAlert* alert = new BAlert(B_TRANSLATE("Bookmark info"), message.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -1709,6 +1714,7 @@ BrowserWindow::_CreateBookmark() BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), message.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -1734,6 +1740,7 @@ BrowserWindow::_ShowBookmarks() BAlert* alert = new BAlert(B_TRANSLATE("Bookmark error"), message.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -2226,6 +2233,7 @@ BrowserWindow::_HandlePageSourceResult(const BMessage* message) "page source: %s\n", strerror(ret)); BAlert* alert = new BAlert(B_TRANSLATE("Page source error"), buffer, B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } diff --git a/src/apps/webpositive/DownloadProgressView.cpp b/src/apps/webpositive/DownloadProgressView.cpp index 16c0ff103d..8bdbd69322 100644 --- a/src/apps/webpositive/DownloadProgressView.cpp +++ b/src/apps/webpositive/DownloadProgressView.cpp @@ -412,6 +412,7 @@ DownloadProgressView::MessageReceived(BMessage* message) BAlert* alert = new BAlert(B_TRANSLATE("Open download error"), B_TRANSLATE("The download could not be opened."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } break; diff --git a/src/apps/webpositive/DownloadWindow.cpp b/src/apps/webpositive/DownloadWindow.cpp index 72c7663697..dee9867602 100644 --- a/src/apps/webpositive/DownloadWindow.cpp +++ b/src/apps/webpositive/DownloadWindow.cpp @@ -286,6 +286,7 @@ DownloadWindow::MessageReceived(BMessage* message) errorString.ReplaceFirst("%error", strerror(status)); BAlert* alert = new BAlert(B_TRANSLATE("Error opening downloads " "folder"), errorString.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } break; diff --git a/src/apps/webwatch/WatchView.cpp b/src/apps/webwatch/WatchView.cpp index 99d889cef6..3488baecc4 100644 --- a/src/apps/webwatch/WatchView.cpp +++ b/src/apps/webwatch/WatchView.cpp @@ -159,7 +159,9 @@ void WatchView::OnAboutRequested() "mahlzeit@users.sourceforge.net\n\n" "Thanks to Jason Parks for his help.\n"); text.ReplaceFirst("%1", VERSION); - (new BAlert(NULL, text.String(), B_TRANSLATE("OK")))->Go(NULL); + BAlert* alert = new BAlert(NULL, text.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/apps/workspaces/Workspaces.cpp b/src/apps/workspaces/Workspaces.cpp index 9ca9071754..0c3ea0fc75 100644 --- a/src/apps/workspaces/Workspaces.cpp +++ b/src/apps/workspaces/Workspaces.cpp @@ -420,6 +420,7 @@ WorkspacesView::_AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 10, &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/bin/checkitout.cpp b/src/bin/checkitout.cpp index 9de9bb7308..c068706b36 100644 --- a/src/bin/checkitout.cpp +++ b/src/bin/checkitout.cpp @@ -57,6 +57,7 @@ CheckItOut::_Warn(const char* url) message << "Proceed anyway?"; BAlert* alert = new BAlert("Warning", message.String(), "Proceed", "Stop", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); int32 button; button = alert->Go(); if (button == 0) diff --git a/src/bin/desklink/MediaReplicant.cpp b/src/bin/desklink/MediaReplicant.cpp index f9a379accc..e408e25b85 100644 --- a/src/bin/desklink/MediaReplicant.cpp +++ b/src/bin/desklink/MediaReplicant.cpp @@ -390,8 +390,10 @@ MediaReplicant::_Launch(const char* prettyName, const char* signature, BString message = B_TRANSLATE("Couldn't launch "); message << prettyName; - (new BAlert(B_TRANSLATE("desklink"), message.String(), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("desklink"), message.String(), + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } diff --git a/src/bin/mail_utils/spamdbm.cpp b/src/bin/mail_utils/spamdbm.cpp index ebe549b2f6..f483d06ca0 100644 --- a/src/bin/mail_utils/spamdbm.cpp +++ b/src/bin/mail_utils/spamdbm.cpp @@ -1503,8 +1503,10 @@ DisplayErrorMessage ( { AlertPntr = new BAlert (TitleString, MessageString, "Acknowledge", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - if (AlertPntr != NULL) + if (AlertPntr != NULL) { + AlertPntr->SetFlags(AlertPntr->Flags() | B_CLOSE_ON_ESCAPE); AlertPntr->Go (); + } } } @@ -1839,8 +1841,10 @@ EstimateRefFilesAndDisplay (BMessage *MessagePntr) g_MaxInterestingWords - j); AlertPntr = new BAlert ("Estimate", TempString, "OK"); - if (AlertPntr != NULL) + if (AlertPntr != NULL) { + AlertPntr->SetFlags(AlertPntr->Flags() | B_CLOSE_ON_ESCAPE); AlertPntr->Go (); + } } } @@ -2533,7 +2537,7 @@ uses to extract words from messages. In particular, HTML is now handled.\n\n" "Compiled on " __DATE__ " at " __TIME__ ".", "Done"); if (AboutAlertPntr != NULL) { - AboutAlertPntr->SetShortcut (0, B_ESCAPE); + AboutAlertPntr->SetFlags(AboutAlertPntr->Flags() | B_CLOSE_ON_ESCAPE); AboutAlertPntr->Go (); } } diff --git a/src/bin/screenmode/screenmode.cpp b/src/bin/screenmode/screenmode.cpp index 512ac32996..f3127a18fa 100644 --- a/src/bin/screenmode/screenmode.cpp +++ b/src/bin/screenmode/screenmode.cpp @@ -335,6 +335,7 @@ main(int argc, char** argv) BAlert* alert = new BAlert("screenmode", "You have used the shortcut to reset the " "screen mode to a safe fallback.", "Keep", "Revert"); + alert->SetShortcut(1, B_ESCAPE); if (alert->Go() == 1) screenMode.Revert(); } diff --git a/src/bin/urlwrapper.cpp b/src/bin/urlwrapper.cpp index 6c610e99d5..57f9806d7f 100644 --- a/src/bin/urlwrapper.cpp +++ b/src/bin/urlwrapper.cpp @@ -58,6 +58,7 @@ UrlWrapper::_Warn(const char* url) message << "Proceed anyway?"; BAlert* alert = new BAlert("Warning", message.String(), "Proceed", "Stop", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); int32 button; button = alert->Go(); if (button == 0) diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 4d68d63422..386e7e50c8 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -649,6 +649,7 @@ BApplication::AboutRequested() thread_info info; if (get_thread_info(Thread(), &info) == B_OK) { BAlert *alert = new BAlert("_about_", info.name, "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } diff --git a/src/kits/interface/Dragger.cpp b/src/kits/interface/Dragger.cpp index 37f92d68db..a61e552e66 100644 --- a/src/kits/interface/Dragger.cpp +++ b/src/kits/interface/Dragger.cpp @@ -303,11 +303,13 @@ BDragger::MessageReceived(BMessage* msg) if (fShelf != NULL) Window()->PostMessage(kDeleteReplicant, fTarget, NULL); else { - (new BAlert(B_TRANSLATE("Warning"), + BAlert* alert = new BAlert(B_TRANSLATE("Warning"), B_TRANSLATE("Can't delete this replicant from its original " "application. Life goes on."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, - B_WARNING_ALERT))->Go(NULL); + B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } break; diff --git a/src/kits/interface/PrintJob.cpp b/src/kits/interface/PrintJob.cpp index d21f27fa09..e037fc9862 100644 --- a/src/kits/interface/PrintJob.cpp +++ b/src/kits/interface/PrintJob.cpp @@ -103,6 +103,7 @@ static void ShowError(const char* message) { BAlert* alert = new BAlert(B_TRANSLATE("Error"), message, B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -748,6 +749,7 @@ PrintServerMessenger::RejectUserInput() fHiddenApplicationModalWindow = new BAlert("bogus", "app_modal", "OK"); fHiddenApplicationModalWindow->DefaultButton()->SetEnabled(false); fHiddenApplicationModalWindow->SetDefaultButton(NULL); + fHiddenApplicationModalWindow->SetFlags(fHiddenApplicationModalWindow->Flags() | B_CLOSE_ON_ESCAPE); fHiddenApplicationModalWindow->MoveTo(-65000, -65000); fHiddenApplicationModalWindow->Go(NULL); } diff --git a/src/kits/interface/ZombieReplicantView.cpp b/src/kits/interface/ZombieReplicantView.cpp index 400a2db953..4e46884156 100644 --- a/src/kits/interface/ZombieReplicantView.cpp +++ b/src/kits/interface/ZombieReplicantView.cpp @@ -70,6 +70,7 @@ _BZombieReplicantView_::MessageReceived(BMessage* msg) BAlert* alert = new (std::nothrow) BAlert(B_TRANSLATE("Error"), error.String(), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); if (alert != NULL) alert->Go(); diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp index c5dd25501e..07930ecc3d 100644 --- a/src/kits/shared/AboutWindow.cpp +++ b/src/kits/shared/AboutWindow.cpp @@ -88,6 +88,7 @@ BAboutWindow::Show() font.SetFace(B_BOLD_FACE); font.SetSize(font.Size() * 1.7); view->SetFontAndColor(0, fAppName->Length(), &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/kits/tracker/AutoMounterSettings.cpp b/src/kits/tracker/AutoMounterSettings.cpp index da9fed63d8..9b01563a11 100644 --- a/src/kits/tracker/AutoMounterSettings.cpp +++ b/src/kits/tracker/AutoMounterSettings.cpp @@ -335,10 +335,12 @@ AutomountSettingsDialog::RunAutomountSettings(const BMessenger& target) BMessage reply; status_t ret = target.SendMessage(&message, &reply, 2500000); if (ret != B_OK) { - (new BAlert(B_TRANSLATE("Mount server error"), + BAlert* alert = new BAlert(B_TRANSLATE("Mount server error"), B_TRANSLATE("The mount server could not be contacted."), B_TRANSLATE("OK"), - NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 33ec87306f..fe161831e0 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -286,7 +286,7 @@ AddOnThread(BMessage* refsMessage, entry_ref addonRef, entry_ref dirRef) BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return result; @@ -3213,7 +3213,7 @@ BContainerWindow::LoadAddOn(BMessage* message) BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp index f250aa884a..00958c4e0d 100644 --- a/src/kits/tracker/FSClipboard.cpp +++ b/src/kits/tracker/FSClipboard.cpp @@ -479,7 +479,7 @@ FSClipboardPaste(Model* model, uint32 linksMode) B_TRANSLATE("You must drop items on one of the disk icons " "in the \"Disks\" window."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); okToMove = false; } @@ -493,7 +493,7 @@ FSClipboardPaste(Model* model, uint32 linksMode) B_TRANSLATE("Sorry, you can't copy items to the Trash."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); okToMove = false; } diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index 2e462e1ac7..021825dd24 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -357,7 +357,7 @@ TrackerCopyLoopControl::FileError(const char* message, const char* name, BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } @@ -736,7 +736,7 @@ InitCopy(CopyLoopControl* loopControl, uint32 moveMode, BAlert* alert = new BAlert("", B_TRANSLATE("You can't move or copy items to read-only volumes."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return B_ERROR; } @@ -762,7 +762,7 @@ InitCopy(CopyLoopControl* loopControl, uint32 moveMode, BAlert* alert = new BAlert("", errorStr.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return B_ERROR; } @@ -820,7 +820,7 @@ InitCopy(CopyLoopControl* loopControl, uint32 moveMode, B_TRANSLATE_NOCOLLECT(kNoFreeSpace), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return B_ERROR; } @@ -993,7 +993,7 @@ MoveTask(BObjectList* srcList, BEntry* destEntry, BList* pointList, BAlert* alert = new BAlert("", error.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); break; } @@ -1012,7 +1012,7 @@ MoveTask(BObjectList* srcList, BEntry* destEntry, BList* pointList, BAlert* alert = new BAlert("", error.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); break; } @@ -1742,8 +1742,10 @@ MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode, } catch (MoveError error) { BString errorString(B_TRANSLATE("Error moving \"%name\"")); errorString.ReplaceFirst("%name", ref.name); - (new BAlert("", errorString.String(), B_TRANSLATE("OK"), 0, 0, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert("", errorString.String(), B_TRANSLATE("OK"), + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return error.fError; } catch (FailWithAlert error) { BString buffer(error.fString); @@ -1751,8 +1753,10 @@ MoveItem(BEntry* entry, BDirectory* destDir, BPoint* loc, uint32 moveMode, buffer.ReplaceFirst("%name", error.fName); else buffer << error.fString; - (new BAlert("", buffer.String(), B_TRANSLATE("OK"), 0, 0, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("OK"), + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return error.fError; } @@ -1890,7 +1894,7 @@ MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo) BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } else { BMessage message(kUnmountVolume); @@ -1910,11 +1914,13 @@ MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo) trash_dir.GetEntry(&trashEntry); if (dir == trash_dir || dir.Contains(&trashEntry)) { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("You cannot put the Trash, home or Desktop " "directory into the trash."), B_TRANSLATE("OK"), - 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); // return no error so we don't get two dialogs return B_OK; @@ -2062,20 +2068,24 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry, && moveMode != kCreateRelativeLink && (srcDirectory == *destDir || srcDirectory.Contains(&destEntry))) { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("You can't move a folder into itself " "or any of its own sub-folders."), B_TRANSLATE("OK"), - 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } } if (FSIsTrashDir(sourceEntry) && moveMode != kCreateLink && moveMode != kCreateRelativeLink) { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("You can't move or copy the trash."), B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } @@ -2098,11 +2108,12 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry, if (destIsDir) { BDirectory test_dir(&entry); if (test_dir.Contains(sourceEntry)) { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("You can't replace a folder " "with one of its sub-folders."), - B_TRANSLATE("OK"), - 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } } @@ -2112,12 +2123,14 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry, if (moveMode != kCreateLink && moveMode != kCreateRelativeLink && destIsDir != sourceIsDirectory) { - (new BAlert("", sourceIsDirectory + BAlert* alert = new BAlert("", sourceIsDirectory ? B_TRANSLATE("You cannot replace a file with a folder or a " "symbolic link.") : B_TRANSLATE("You cannot replace a folder or a symbolic link " "with a file."), B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return B_ERROR; } @@ -2196,7 +2209,7 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry, error.ReplaceFirst("%name", name);; BAlert* alert = new BAlert("", error.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -2815,9 +2828,10 @@ empty_trash(void*) } if (err != B_OK && err != kTrashCanceled && err != kUserCanceled) { - (new BAlert("", B_TRANSLATE("Error emptying Trash"), - B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert("", B_TRANSLATE("Error emptying Trash"), + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } return B_OK; @@ -2887,10 +2901,12 @@ _DeleteTask(BObjectList* list, bool confirm) err = entry.Remove(); } - if (err != kTrashCanceled && err != kUserCanceled && err != B_OK) - (new BAlert("", B_TRANSLATE("Error deleting items"), - B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + if (err != kTrashCanceled && err != kUserCanceled && err != B_OK) { + BAlert* alert = new BAlert("", B_TRANSLATE("Error deleting items"), + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); + } } delete list; @@ -3081,7 +3097,7 @@ FSCreateNewFolderIn(const node_ref* dirNode, entry_ref* newRef, BAlert* alert = new BAlert("", B_TRANSLATE("Sorry, could not create a new folder."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return result; } @@ -3254,7 +3270,7 @@ _TrackerLaunchAppWithDocuments(const entry_ref* appRef, const BMessage* refs, BAlert* alert = new BAlert("", alertString.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -3557,7 +3573,7 @@ _TrackerLaunchDocuments(const entry_ref* /*doNotUse*/, const BMessage* refs, BAlert* alert = new BAlert("", alertString.String(), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index 15138419c0..7fd11debd1 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -1985,11 +1985,13 @@ AttributeView::FinishEditingTitle(bool commit) if (entry.InitCheck() == B_OK && entry.GetParent(&parent) == B_OK) { if (parent.Contains(text)) { - (new BAlert("", + BAlert* alert = new BAlert("", B_TRANSLATE("That name is already taken. " "Please type another one."), B_TRANSLATE("OK"), - 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); reopen = true; } else { if (fModel->IsVolume()) { @@ -2009,11 +2011,12 @@ AttributeView::FinishEditingTitle(bool commit) } } } else if (length >= B_FILE_NAME_LENGTH) { - (new BAlert("", - B_TRANSLATE("That name is too long. " - "Please type another one."), + BAlert* alert = new BAlert("", + B_TRANSLATE("That name is too long. Please type another one."), B_TRANSLATE("OK"), - 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); reopen = true; } diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index 7d5456dcb6..f14f59999e 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -672,8 +672,10 @@ OpenWithPoseView::OpenSelection(BPose* pose, int32*) B_TRANSLATE("Could not find application \"%appname\"")); errorString.ReplaceFirst("%appname", pose->TargetModel()->Name()); - (new BAlert("", errorString.String(), B_TRANSLATE("OK"), 0, 0, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert("", errorString.String(), B_TRANSLATE("OK"), + 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 7430bff230..7a8562f2c4 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -2609,7 +2609,7 @@ BPoseView::RemoveColumn(BColumn* columnToRemove, bool runAlert) BAlert* alert = new BAlert("", B_TRANSLATE("You must have at least one attribute showing."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -4832,7 +4832,7 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow, B_TRANSLATE("You must drop items on one of the disk icons " "in the \"Disks\" window."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); okToMove = false; } @@ -4843,7 +4843,7 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow, B_TRANSLATE("Sorry, you can't copy items to the Trash."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); okToMove = false; } @@ -4854,7 +4854,7 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow, B_TRANSLATE("Sorry, you can't create links in the Trash."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); okToMove = false; } @@ -5744,7 +5744,7 @@ CheckVolumeReadOnly(const entry_ref* ref) B_TRANSLATE("Files cannot be moved or deleted from a read-only " "volume."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } @@ -6084,8 +6084,10 @@ BPoseView::SelectMatchingEntries(const BMessage* message) BString message( B_TRANSLATE("Error in regular expression:\n\n'%errstring'")); message.ReplaceFirst("%errstring", regExpression.ErrorString()); - (new BAlert("", message.String(), B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + BAlert* alert = new BAlert("", message.String(), B_TRANSLATE("OK"), + NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return 0; } } @@ -8076,7 +8078,7 @@ BPoseView::OpenInfoWindows() B_TRANSLATE("The Tracker must be running to see Info windows."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } @@ -8093,7 +8095,7 @@ BPoseView::SetDefaultPrinter() B_TRANSLATE("The Tracker must be running to see set the default " "printer."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index bf44a53b39..38e96e03d7 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -704,7 +704,7 @@ TTracker::OpenRef(const entry_ref* ref, const node_ref* nodeToClose, B_TRANSLATE("There was an error resolving the link."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return result; } diff --git a/src/kits/tracker/TrackerInitialState.cpp b/src/kits/tracker/TrackerInitialState.cpp index 7bc3c893e8..f4e1c1847d 100644 --- a/src/kits/tracker/TrackerInitialState.cpp +++ b/src/kits/tracker/TrackerInitialState.cpp @@ -641,8 +641,10 @@ TTracker::InstallTemporaryBackgroundImages() "failed. \nReason: %error")); errorMessage.ReplaceFirst("%func", __PRETTY_FUNCTION__); errorMessage.ReplaceFirst("%error", strerror(status)); - (new BAlert("AlertError", errorMessage.String(), B_TRANSLATE("OK"), - NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + BAlert* alert = new BAlert("AlertError", errorMessage.String(), + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); return; } path.Append("artwork"); diff --git a/src/kits/tracker/WidgetAttributeText.cpp b/src/kits/tracker/WidgetAttributeText.cpp index 3e6c25d32c..deaa71be06 100644 --- a/src/kits/tracker/WidgetAttributeText.cpp +++ b/src/kits/tracker/WidgetAttributeText.cpp @@ -1661,7 +1661,7 @@ GenericAttributeText::CommitEditedTextFlavor(BTextView* textView) B_TRANSLATE("Sorry, you cannot edit that attribute."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } @@ -1698,7 +1698,7 @@ GenericAttributeText::CommitEditedTextFlavor(BTextView* textView) "attribute cannot store a multi-byte glyph."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return false; } @@ -1806,7 +1806,7 @@ GenericAttributeText::CommitEditedTextFlavor(BTextView* textView) B_TRANSLATE("There was an error writing the attribute."), B_TRANSLATE("Cancel"), 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); fValueIsDefined = false; diff --git a/src/libs/print/libprint/BlockingWindow.cpp b/src/libs/print/libprint/BlockingWindow.cpp index 82cb54620e..dfc4924fde 100644 --- a/src/libs/print/libprint/BlockingWindow.cpp +++ b/src/libs/print/libprint/BlockingWindow.cpp @@ -131,6 +131,7 @@ HWindow::AboutRequested() font.SetSize(12); // font.SetFace(B_OUTLINED_FACE); v->SetFontAndColor(0, s-text+1, &font, B_FONT_SIZE); }; + about->SetFlags(about->Flags() | B_CLOSE_ON_ESCAPE); about->Go(); } diff --git a/src/libs/print/libprint/GraphicsDriver.cpp b/src/libs/print/libprint/GraphicsDriver.cpp index 8340b8a29b..aa6994f95e 100644 --- a/src/libs/print/libprint/GraphicsDriver.cpp +++ b/src/libs/print/libprint/GraphicsDriver.cpp @@ -702,6 +702,7 @@ GraphicsDriver::_PrintJob(BFile* spoolFile) alert = new BAlert("", fTransport->LastError().c_str(), "OK"); else alert = new BAlert("", "Printer not responding.", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/appearance/CurView.cpp b/src/preferences/appearance/CurView.cpp index f0340060fb..b13021c3d1 100644 --- a/src/preferences/appearance/CurView.cpp +++ b/src/preferences/appearance/CurView.cpp @@ -238,6 +238,7 @@ printf("Loading cursor sets from disk\n"); "Please contact OpenBeOS about Appearance Preferences::CurView::" "LoadCursorSets::B_NAME_TOO_LONG for a bugfix", "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + a->SetFlags(a->Flags() | B_CLOSE_ON_ESCAPE); a->Go(); break; } @@ -267,6 +268,7 @@ printf("Loading cursor sets from disk\n"); "because of a file error. Perhaps there is a file (instead of a folder) at " COLOR_SET_DIR "? You will be able to change system cursors, but be unable to save them to a cursor set. ", "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + a->SetFlags(a->Flags() | B_CLOSE_ON_ESCAPE); a->Go(); break; } @@ -276,6 +278,7 @@ printf("Loading cursor sets from disk\n"); "because there are too many open files. Please close some files and restart " " this application.", "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + a->SetFlags(a->Flags() | B_CLOSE_ON_ESCAPE); a->Go(); if(Window()) Window()->PostMessage(B_QUIT_REQUESTED); diff --git a/src/preferences/appearance/DecorSettingsView.cpp b/src/preferences/appearance/DecorSettingsView.cpp index 86882be123..711c534a7d 100644 --- a/src/preferences/appearance/DecorSettingsView.cpp +++ b/src/preferences/appearance/DecorSettingsView.cpp @@ -120,7 +120,7 @@ DecorSettingsView::MessageReceived(BMessage *msg) BAlert *infoAlert = new BAlert(B_TRANSLATE("About Decorator"), infoText.String(), B_TRANSLATE("OK")); - infoAlert->SetShortcut(0, B_ESCAPE); + infoAlert->SetFlags(infoAlert->Flags() | B_CLOSE_ON_ESCAPE); infoAlert->Go(); break; diff --git a/src/preferences/bluetooth/BluetoothMain.cpp b/src/preferences/bluetooth/BluetoothMain.cpp index c76142f883..0b71630b3f 100644 --- a/src/preferences/bluetooth/BluetoothMain.cpp +++ b/src/preferences/bluetooth/BluetoothMain.cpp @@ -27,13 +27,14 @@ void BluetoothApplication::ReadyToRun() { if (!be_roster->IsRunning(BLUETOOTH_SIGNATURE)) { - - int32 choice = (new BAlert("bluetooth_server not running", + BAlert* alert = new BAlert("bluetooth_server not running", B_TRANSLATE("bluetooth_server has not been found running on the " "system. Should be started, or stay offline"), B_TRANSLATE("Work offline"), B_TRANSLATE("Quit"), B_TRANSLATE("Start please"), B_WIDTH_AS_USUAL, - B_WARNING_ALERT))->Go(); + B_WARNING_ALERT); + alert->SetShortcut(2, B_ESCAPE); + int32 choice = alert->Go(); switch (choice) { @@ -90,8 +91,8 @@ BluetoothApplication::MessageReceived(BMessage* message) void BluetoothApplication::AboutRequested() { - - (new BAlert("about", B_TRANSLATE("Haiku Bluetooth system, (ARCE)\n\n" + BAlert* alert = new BAlert("about", B_TRANSLATE( + "Haiku Bluetooth system, (ARCE)\n\n" "Created by Oliver Ruiz Dorantes\n\n" "With support of:\n" " - Mika Lindqvist\n" @@ -121,8 +122,9 @@ BluetoothApplication::AboutRequested() " - Petter H. Juliussen\n" "Who gave me all the knowledge:\n" " - the yellowTAB team"), - B_TRANSLATE("OK")))->Go(); - + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/preferences/cpufrequency/StatusView.cpp b/src/preferences/cpufrequency/StatusView.cpp index 3d7a651b66..9fc7e819a7 100644 --- a/src/preferences/cpufrequency/StatusView.cpp +++ b/src/preferences/cpufrequency/StatusView.cpp @@ -429,7 +429,7 @@ StatusView::_AboutRequested() BAlert *alert = new BAlert("about", B_TRANSLATE("CPUFrequency\n" "\twritten by Clemens Zeidler\n" "\tCopyright 2009, Haiku, Inc.\n"), - B_TRANSLATE("Ok")); + B_TRANSLATE("OK")); BTextView *view = alert->TextView(); BFont font; @@ -440,6 +440,7 @@ StatusView::_AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 13, &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -689,9 +690,10 @@ StatusView::_OpenPreferences() "Launching the CPU frequency preflet failed.\n\nError: ")); errorMessage << strerror(ret); BAlert* alert = new BAlert("launch error", errorMessage.String(), - "Ok"); + "OK"); // asynchronous alert in order to not block replicant host // application + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } } diff --git a/src/preferences/datatranslations/DataTranslations.cpp b/src/preferences/datatranslations/DataTranslations.cpp index 2c9ff0157e..4044a818fa 100644 --- a/src/preferences/datatranslations/DataTranslations.cpp +++ b/src/preferences/datatranslations/DataTranslations.cpp @@ -53,6 +53,7 @@ DataTranslationsApplication::_InstallError(const char* name, status_t status) text.UnlockBuffer(); BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Error"), text.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -83,7 +84,8 @@ DataTranslationsApplication::_NoTranslatorError(const char* name) B_TRANSLATE("The item '%name' does not appear to be a Translator and " "will not be installed.")); text.ReplaceAll("%name", name); - BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok")); + BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -152,6 +154,7 @@ DataTranslationsApplication::RefsReceived(BMessage* message) BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"), B_TRANSLATE("The new translator has been installed " "successfully."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } else _InstallError(ref.name, status); diff --git a/src/preferences/datatranslations/DataTranslationsWindow.cpp b/src/preferences/datatranslations/DataTranslationsWindow.cpp index 41e8bb326d..7cf78d856a 100644 --- a/src/preferences/datatranslations/DataTranslationsWindow.cpp +++ b/src/preferences/datatranslations/DataTranslationsWindow.cpp @@ -282,6 +282,7 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id) view->SetFontAndColor(index, index + strlen(labels[i]), &font); } + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/dun/DUNWindow.cpp b/src/preferences/dun/DUNWindow.cpp index f8d8f6c81d..f04c533b52 100644 --- a/src/preferences/dun/DUNWindow.cpp +++ b/src/preferences/dun/DUNWindow.cpp @@ -357,7 +357,7 @@ void DUNWindow::MessageReceived (BMessage *message) connectbutton->SetEnabled(false); //debug 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); - errormsg->SetShortcut(0, B_ESCAPE); + errormsg->SetFlags(errormsg->Flags() | B_CLOSE_ON_ESCAPE); errormsg->Go(); } break; @@ -367,7 +367,7 @@ void DUNWindow::MessageReceived (BMessage *message) disconnectbutton->SetEnabled(false); connectbutton->SetEnabled(true); 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); - errormsg->SetShortcut(0, B_ESCAPE); + errormsg->SetFlags(errormsg->Flags() | B_CLOSE_ON_ESCAPE); errormsg->Go(); } break; @@ -376,7 +376,7 @@ void DUNWindow::MessageReceived (BMessage *message) { // debug 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); - errormsg->SetShortcut(0, B_ESCAPE); + errormsg->SetFlags(errormsg->Flags() | B_CLOSE_ON_ESCAPE); errormsg->Go(); } break; @@ -385,7 +385,7 @@ void DUNWindow::MessageReceived (BMessage *message) { // debug 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); - errormsg->SetShortcut(0, B_ESCAPE); + errormsg->SetFlags(errormsg->Flags() | B_CLOSE_ON_ESCAPE); errormsg->Go(); } break; diff --git a/src/preferences/filetypes/ApplicationTypeWindow.cpp b/src/preferences/filetypes/ApplicationTypeWindow.cpp index 5ceaaed2c6..77fc74f06d 100644 --- a/src/preferences/filetypes/ApplicationTypeWindow.cpp +++ b/src/preferences/filetypes/ApplicationTypeWindow.cpp @@ -1025,6 +1025,8 @@ ApplicationTypeWindow::QuitRequested() B_TRANSLATE("Do you want to save the changes?"), B_TRANSLATE("Quit, don't save"), B_TRANSLATE("Cancel"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); + int32 choice = alert->Go(); switch (choice) { case 0: diff --git a/src/preferences/filetypes/FileTypes.cpp b/src/preferences/filetypes/FileTypes.cpp index 91ec41bc2f..de5e722b22 100644 --- a/src/preferences/filetypes/FileTypes.cpp +++ b/src/preferences/filetypes/FileTypes.cpp @@ -227,9 +227,11 @@ FileTypes::RefsReceived(BMessage* message) "%s"), ref.name, strerror(status)); - (new BAlert(B_TRANSLATE("FileTypes request"), + BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), buffer, B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); message->RemoveData("refs", --index); continue; @@ -475,9 +477,11 @@ error_alert(const char* message, status_t status, alert_type type) strerror(status)); } - (new BAlert(B_TRANSLATE("FileTypes request"), + BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), status == B_OK ? message : warning, - B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, type))->Go(); + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, type); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/preferences/filetypes/FileTypesWindow.cpp b/src/preferences/filetypes/FileTypesWindow.cpp index 6d8d9defbb..ed2b153be3 100644 --- a/src/preferences/filetypes/FileTypesWindow.cpp +++ b/src/preferences/filetypes/FileTypesWindow.cpp @@ -679,12 +679,14 @@ FileTypesWindow::MessageReceived(BMessage* message) "group, hold down the Shift key and press \"Remove\"."), B_TRANSLATE("Remove"), B_SHIFT_KEY, B_TRANSLATE("Cancel"), 0, NULL, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetShortcut(1, B_ESCAPE); } else { alert = new BAlert(B_TRANSLATE("FileTypes request"), B_TRANSLATE("Removing a file type cannot be reverted.\n" "Are you sure you want to remove it?"), B_TRANSLATE("Remove"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); } if (alert->Go()) break; diff --git a/src/preferences/filetypes/PreferredAppMenu.cpp b/src/preferences/filetypes/PreferredAppMenu.cpp index 55933b319a..2ff8154520 100644 --- a/src/preferences/filetypes/PreferredAppMenu.cpp +++ b/src/preferences/filetypes/PreferredAppMenu.cpp @@ -291,8 +291,9 @@ retrieve_preferred_app(BMessage* message, bool sameAs, const char* forType, description[0] ? description : preferred); BAlert* alert = new BAlert(B_TRANSLATE("FileTypes request"), warning, - B_TRANSLATE("Set Preferred Application"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Set preferred application"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); if (alert->Go() == 1) return B_ERROR; } diff --git a/src/preferences/fonts/main.cpp b/src/preferences/fonts/main.cpp index c46fa4ab57..8736f47cc7 100644 --- a/src/preferences/fonts/main.cpp +++ b/src/preferences/fonts/main.cpp @@ -50,7 +50,8 @@ FontsApp::AboutRequested() font.SetSize(18); font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 5, &font); - + + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/joysticks/JoyWin.cpp b/src/preferences/joysticks/JoyWin.cpp index fb03fea1c3..ed8b6388d0 100644 --- a/src/preferences/joysticks/JoyWin.cpp +++ b/src/preferences/joysticks/JoyWin.cpp @@ -49,7 +49,7 @@ static int ShowMessage(char* string) { BAlert *alert = new BAlert("Message", string, "OK"); - alert->SetShortcut(1, B_ESCAPE); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); return alert->Go(); } @@ -437,7 +437,7 @@ JoyWin::_ShowNoCompatibleJoystickMessage() str << " for a driver designed for Haiku or BeOS."; BAlert *alert = new BAlert("test1", str.String(), "OK"); - alert->SetShortcut(0, B_ENTER); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } @@ -448,7 +448,7 @@ JoyWin::_ShowNoDeviceConnectedMessage(const char* joy, const char* port) str << joy << " device connected to the port '" << port << "'."; BAlert *alert = new BAlert("test1", str.String(), "Stop"); - alert->SetShortcut(0, B_ENTER); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/keyboard/Keyboard.cpp b/src/preferences/keyboard/Keyboard.cpp index 91c8d74314..cbe1d6aa25 100644 --- a/src/preferences/keyboard/Keyboard.cpp +++ b/src/preferences/keyboard/Keyboard.cpp @@ -35,6 +35,7 @@ KeyboardApplication::MessageReceived(BMessage* message) B_TRANSLATE("Something has gone wrong!"), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); + errorAlert->SetFlags(errorAlert->Flags() | B_CLOSE_ON_ESCAPE); errorAlert->Go(); be_app->PostMessage(B_QUIT_REQUESTED); break; @@ -49,8 +50,10 @@ KeyboardApplication::MessageReceived(BMessage* message) void KeyboardApplication::AboutRequested() { - (new BAlert("about", B_TRANSLATE("Written by Andrew Edward McCall"), - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("about", + B_TRANSLATE("Written by Andrew Edward McCall"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp index a112a9cffc..97933bd6e3 100644 --- a/src/preferences/locale/LocaleWindow.cpp +++ b/src/preferences/locale/LocaleWindow.cpp @@ -147,6 +147,7 @@ LocaleWindow::LocaleWindow() "use this preflet!"), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/mail/AutoConfigWindow.cpp b/src/preferences/mail/AutoConfigWindow.cpp index 2ffeb8d56b..6898cccc21 100644 --- a/src/preferences/mail/AutoConfigWindow.cpp +++ b/src/preferences/mail/AutoConfigWindow.cpp @@ -95,6 +95,7 @@ AutoConfigWindow::MessageReceived(BMessage* msg) invalidMailAlert = new BAlert("invalidMailAlert", B_TRANSLATE("Enter a valid e-mail address."), B_TRANSLATE("OK")); + invalidMailAlert->SetFlags(invalidMailAlert->Flags() | B_CLOSE_ON_ESCAPE); invalidMailAlert->Go(); return; } diff --git a/src/preferences/mail/ConfigWindow.cpp b/src/preferences/mail/ConfigWindow.cpp index e3b4ce3698..8007d45bff 100644 --- a/src/preferences/mail/ConfigWindow.cpp +++ b/src/preferences/mail/ConfigWindow.cpp @@ -866,8 +866,10 @@ ConfigWindow::_RevertToLastSettings() "\nThe general settings couldn't be reverted.\n\n" "Error retrieving general settings:\n%s\n"), strerror(status)); - (new BAlert(B_TRANSLATE("Error"), text, B_TRANSLATE("OK"), NULL, NULL, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Error"), text, + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } // revert account data diff --git a/src/preferences/mail/FilterConfigView.cpp b/src/preferences/mail/FilterConfigView.cpp index ce330b8858..eb4f1272a5 100644 --- a/src/preferences/mail/FilterConfigView.cpp +++ b/src/preferences/mail/FilterConfigView.cpp @@ -460,8 +460,11 @@ FiltersConfigView::MessageReceived(BMessage *msg) MailAddonSettings* mailSettings = _GetCurrentMailSettings(); if (!mailSettings->MoveFilterSettings(from, to)) { - (new BAlert("E-mail", B_TRANSLATE("The filter could not be " - "moved. Deleting filter."), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("E-mail", + B_TRANSLATE("The filter could not be moved. Deleting " + "filter."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); fListView->RemoveItem(to); break; } diff --git a/src/preferences/media/MediaWindow.cpp b/src/preferences/media/MediaWindow.cpp index a9efbc12ec..c283904d17 100644 --- a/src/preferences/media/MediaWindow.cpp +++ b/src/preferences/media/MediaWindow.cpp @@ -436,7 +436,8 @@ MediaWindow::InitMedia(bool first) B_TRANSLATE("Quit"), B_TRANSLATE("Start media server"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - if (alert->Go()==0) + alert->SetShortcut(0, B_ESCAPE); + if (alert->Go() == 0) return B_ERROR; fAlert = new MediaAlert(BRect(0, 0, 300, 60), @@ -565,6 +566,7 @@ ErrorAlert(char* errorMessage) { printf("%s\n", errorMessage); BAlert* alert = new BAlert("BAlert", errorMessage, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); exit(1); } diff --git a/src/preferences/mouse/Mouse.cpp b/src/preferences/mouse/Mouse.cpp index e6a20e7895..17f796b3b7 100644 --- a/src/preferences/mouse/Mouse.cpp +++ b/src/preferences/mouse/Mouse.cpp @@ -34,8 +34,10 @@ MouseApplication::MouseApplication() void MouseApplication::AboutRequested() { - (new BAlert("about", B_TRANSLATE("...by Andrew Edward McCall"), - B_TRANSLATE("Dig Deal")))->Go(); + BAlert* alert = new BAlert("about", + B_TRANSLATE("...by Andrew Edward McCall"), B_TRANSLATE("Dig Deal")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/preferences/network/EthernetSettingsView.cpp b/src/preferences/network/EthernetSettingsView.cpp index 8a238938ba..f098797b0b 100644 --- a/src/preferences/network/EthernetSettingsView.cpp +++ b/src/preferences/network/EthernetSettingsView.cpp @@ -589,12 +589,16 @@ EthernetSettingsView::_TriggerAutoConfig(const char* device) status_t status = interface.AutoConfigure(AF_INET); if (status == B_BAD_PORT_ID) { - (new BAlert("error", B_TRANSLATE("The net_server needs to run for " - "the auto configuration!"), B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert("error", B_TRANSLATE("The net_server needs to run for " + "the auto configuration!"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } else if (status != B_OK) { BString errorMessage(B_TRANSLATE("Auto-configuring failed: ")); errorMessage << strerror(status); - (new BAlert("error", errorMessage.String(), "OK"))->Go(); + BAlert* alert = new BAlert("error", errorMessage.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } return status; diff --git a/src/preferences/network_old/BackupWindow.cpp b/src/preferences/network_old/BackupWindow.cpp index c494f67228..58ce15a5d2 100644 --- a/src/preferences/network_old/BackupWindow.cpp +++ b/src/preferences/network_old/BackupWindow.cpp @@ -63,6 +63,7 @@ BackupWin::MessageReceived(BMessage *message) } else { BAlert *alert = new BAlert("Backup Info Alert","You must specify a name.","OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } break; diff --git a/src/preferences/network_old/LoginInfo.cpp b/src/preferences/network_old/LoginInfo.cpp index 36d7d6f006..d14cf0f5b7 100644 --- a/src/preferences/network_old/LoginInfo.cpp +++ b/src/preferences/network_old/LoginInfo.cpp @@ -63,13 +63,17 @@ void LoginInfo::MessageReceived(BMessage *message) else { BAlert *alert = new BAlert("Login Info Alert", "Passwords don't match. Please try again","OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } else { - BAlert *alert = new BAlert("Login Info Alert","You didn't fill all the fields","Oups...",NULL,NULL,B_WIDTH_FROM_WIDEST,B_INFO_ALERT); + BAlert *alert = new BAlert("Login Info Alert", + "You didn't fill in all the fields","Oops...", NULL, NULL, + B_WIDTH_FROM_WIDEST,B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } break; diff --git a/src/preferences/network_old/NetworkWindow.cpp b/src/preferences/network_old/NetworkWindow.cpp index da8e5f3d17..c7dd8c697e 100644 --- a/src/preferences/network_old/NetworkWindow.cpp +++ b/src/preferences/network_old/NetworkWindow.cpp @@ -457,8 +457,9 @@ bool NetworkWindow::QuitRequested(void) { if (fSave->IsEnabled() == true) { - BAlert *alert = new BAlert("Save Info Alert","Save changes before quitting?", - "Don't Save","Cancel","Save"); + BAlert *alert = new BAlert("Save Info Alert", "Save changes before " + quitting?", "Don't Save", "Cancel", "Save"); + alert->SetShortcut(1, B_ESCAPE); int32 result = alert->Go(); switch (result) { @@ -486,8 +487,9 @@ NetworkWindow::QuitRequested(void) void NetworkWindow::DeleteConfigFile() { - BAlert *alert = new BAlert("Alert","Really delete networking configuration?", - "Delete","Cancel"); + BAlert *alert = new BAlert("Alert", "Really delete networking configuration?", + "Delete", "Cancel"); + alert->SetShortcut(1, B_ESCAPE); int32 result = alert->Go(); if (result == 0) { diff --git a/src/preferences/notifications/DisplayView.cpp b/src/preferences/notifications/DisplayView.cpp index cde5bcfe36..85e4a8589e 100644 --- a/src/preferences/notifications/DisplayView.cpp +++ b/src/preferences/notifications/DisplayView.cpp @@ -107,6 +107,7 @@ DisplayView::Load() "It's possible you don't have write access to the " "settings directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); } @@ -176,6 +177,7 @@ DisplayView::Save() B_TRANSLATE("Can't save preferenes, you probably don't have " "write access to the settings directory or the disk is full."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return ret; } diff --git a/src/preferences/notifications/GeneralView.cpp b/src/preferences/notifications/GeneralView.cpp index 7d1eb8df6f..6145e8d3b9 100644 --- a/src/preferences/notifications/GeneralView.cpp +++ b/src/preferences/notifications/GeneralView.cpp @@ -136,6 +136,7 @@ GeneralView::MessageReceived(BMessage* msg) " found, this means your InfoPopper installation was" " not successfully completed."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return; } @@ -153,6 +154,7 @@ GeneralView::MessageReceived(BMessage* msg) "cannot be stopped, because the server can't be" " reached."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return; } @@ -164,6 +166,7 @@ GeneralView::MessageReceived(BMessage* msg) " notifications because the server can't be " "reached."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return; } @@ -181,6 +184,7 @@ GeneralView::MessageReceived(BMessage* msg) " was not successfully completed."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return; } @@ -215,6 +219,7 @@ GeneralView::Load() "It's possible you don't have write access to the " "settings directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); } @@ -270,6 +275,7 @@ GeneralView::Save() B_TRANSLATE("An error occurred saving the preferences.\n" "It's possible you are running out of disk space."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return ret; } @@ -296,6 +302,7 @@ GeneralView::Save() "write access to the boot settings directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return ret; } @@ -316,6 +323,7 @@ GeneralView::Save() "you probably don't have write permission to the boot settings" " directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return ret; } diff --git a/src/preferences/notifications/NotificationsView.cpp b/src/preferences/notifications/NotificationsView.cpp index b032666a50..ea1a1b0b62 100644 --- a/src/preferences/notifications/NotificationsView.cpp +++ b/src/preferences/notifications/NotificationsView.cpp @@ -184,6 +184,7 @@ NotificationsView::_LoadAppUsage() "It's possible you don't have write access to the " "settings directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); (void)alert->Go(); return B_ERROR; } diff --git a/src/preferences/screen/ScreenApplication.cpp b/src/preferences/screen/ScreenApplication.cpp index fc87e7a33b..3461a77ee9 100644 --- a/src/preferences/screen/ScreenApplication.cpp +++ b/src/preferences/screen/ScreenApplication.cpp @@ -40,7 +40,7 @@ ScreenApplication::AboutRequested() BAlert *aboutAlert = new BAlert(B_TRANSLATE("About"), B_TRANSLATE("Screen preferences by the Haiku team"), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); - aboutAlert->SetShortcut(0, B_OK); + aboutAlert->SetFlags(aboutAlert->Flags() | B_CLOSE_ON_ESCAPE); aboutAlert->Go(); } diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp index f2199d9312..5055cdbfc7 100644 --- a/src/preferences/screen/ScreenWindow.cpp +++ b/src/preferences/screen/ScreenWindow.cpp @@ -520,8 +520,11 @@ ScreenWindow::QuitRequested() BString warning = B_TRANSLATE("Could not write VESA mode settings" " file:\n\t"); warning << strerror(status); - (new BAlert(B_TRANSLATE("Warning"), warning.String(), B_TRANSLATE("OK"), NULL, - NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Warning"), + warning.String(), B_TRANSLATE("OK"), NULL, + NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } } @@ -1303,6 +1306,7 @@ ScreenWindow::_Apply() BAlert* alert = new BAlert(B_TRANSLATE("Warning"), message, B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/preferences/screensaver/PasswordWindow.cpp b/src/preferences/screensaver/PasswordWindow.cpp index 661ff4d18b..c845908a0f 100644 --- a/src/preferences/screensaver/PasswordWindow.cpp +++ b/src/preferences/screensaver/PasswordWindow.cpp @@ -184,6 +184,7 @@ PasswordWindow::MessageReceived(BMessage *message) BAlert *alert = new BAlert("noMatch", B_TRANSLATE("Passwords don't match. Please try again."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); break; } diff --git a/src/preferences/shortcuts/ShortcutsWindow.cpp b/src/preferences/shortcuts/ShortcutsWindow.cpp index 6632f2e190..e389a4df94 100644 --- a/src/preferences/shortcuts/ShortcutsWindow.cpp +++ b/src/preferences/shortcuts/ShortcutsWindow.cpp @@ -286,6 +286,7 @@ ShortcutsWindow::QuitRequested() B_TRANSLATE("Really quit without saving your changes?"), B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); + alert->SetShortcut(1, B_ESCAPE); switch(alert->Go()) { case 1: ret = false; @@ -296,10 +297,12 @@ ShortcutsWindow::QuitRequested() // up the file requester if (fLastSaved.InitCheck() == B_OK) { if (_SaveKeySet(fLastSaved) == false) { - (new BAlert(ERROR, + BAlert* alert = new BAlert(ERROR, B_TRANSLATE("Shortcuts was unable to save your " "KeySet file!"), - B_TRANSLATE("Oh no")))->Go(); + B_TRANSLATE("Oh no")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); ret = true; //quit anyway } } else { @@ -550,9 +553,11 @@ ShortcutsWindow::MessageReceived(BMessage* msg) fLastSaved = BEntry(&ref); break; } else { - (new BAlert(ERROR, + BAlert* alert = new BAlert(ERROR, B_TRANSLATE("Shortcuts was couldn't open your " - "KeySet file!"), B_TRANSLATE("OK")))->Go(NULL); + "KeySet file!"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); break; } } @@ -576,10 +581,11 @@ ShortcutsWindow::MessageReceived(BMessage* msg) _GetSettingsFile(&eref); if (ref == eref) fKeySetModified = false; } else { - (new BAlert(ERROR, + BAlert* alert = new BAlert(ERROR, B_TRANSLATE("Shortcuts was unable to parse your " - "KeySet file!"), - B_TRANSLATE("OK")))->Go(NULL); + "KeySet file!"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); break; } } @@ -629,9 +635,11 @@ ShortcutsWindow::MessageReceived(BMessage* msg) } else PostMessage(SAVE_KEYSET_AS); // open the save requester... if (showSaveError) { - (new BAlert(ERROR, + BAlert* alert = new BAlert(ERROR, B_TRANSLATE("Shortcuts wasn't able to save your keyset."), - B_TRANSLATE("OK")))->Go(NULL); + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } break; } diff --git a/src/preferences/sounds/HApp.cpp b/src/preferences/sounds/HApp.cpp index bdc2409b65..14efcbc68c 100644 --- a/src/preferences/sounds/HApp.cpp +++ b/src/preferences/sounds/HApp.cpp @@ -49,6 +49,7 @@ HApp::AboutRequested() " Original work from Atsushi Takamatsu.\n" "Copyright ©2003-2006 Haiku"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/sounds/HEventList.cpp b/src/preferences/sounds/HEventList.cpp index afb04edc61..8c178ffd29 100644 --- a/src/preferences/sounds/HEventList.cpp +++ b/src/preferences/sounds/HEventList.cpp @@ -127,6 +127,7 @@ HEventList::SelectionChanged() BMediaFiles().RemoveRefFor(fType, row->Name(), ref); BAlert* alert = new BAlert("alert", B_TRANSLATE("No such file or directory"), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); return; } diff --git a/src/preferences/sounds/HWindow.cpp b/src/preferences/sounds/HWindow.cpp index 06efd30f28..13b8503724 100644 --- a/src/preferences/sounds/HWindow.cpp +++ b/src/preferences/sounds/HWindow.cpp @@ -212,6 +212,7 @@ HWindow::MessageReceived(BMessage* message) B_TRANSLATE("This is not an audio file."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); break; } diff --git a/src/preferences/time/NetworkTimeView.cpp b/src/preferences/time/NetworkTimeView.cpp index 49a34dd4e0..55efc8cc0a 100644 --- a/src/preferences/time/NetworkTimeView.cpp +++ b/src/preferences/time/NetworkTimeView.cpp @@ -377,8 +377,10 @@ NetworkTimeView::MessageReceived(BMessage* message) "while synchronizing:\r\n%s"), errorString); - (new BAlert(B_TRANSLATE("Time"), buffer, - B_TRANSLATE("OK")))->Go(); + BAlert* alert = new BAlert(B_TRANSLATE("Time"), buffer, + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } break; } diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp index 6fb180540e..10c462df03 100644 --- a/src/preferences/time/Time.cpp +++ b/src/preferences/time/Time.cpp @@ -59,6 +59,7 @@ TimeApplication::AboutRequested() "Time & Date, written by:\n\n\tAndrew Edward McCall\n\tMike Berg\n\t" "Julun\n\tPhilippe Saint-Pierre\n\nCopyright 2004-2012, Haiku."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/preferences/touchpad/TouchpadPrefView.cpp b/src/preferences/touchpad/TouchpadPrefView.cpp index 713d92b1e6..b53ce2d029 100644 --- a/src/preferences/touchpad/TouchpadPrefView.cpp +++ b/src/preferences/touchpad/TouchpadPrefView.cpp @@ -106,6 +106,7 @@ TouchpadView::MouseUp(BPoint point) "normal mouse operation. Do you really want to change it?"), B_TRANSLATE("OK"), B_TRANSLATE("Cancel"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); result = alert->Go(); } if (result == 0) { diff --git a/src/preferences/virtualmemory/SettingsWindow.cpp b/src/preferences/virtualmemory/SettingsWindow.cpp index 7328806bd6..3443d9a31e 100644 --- a/src/preferences/virtualmemory/SettingsWindow.cpp +++ b/src/preferences/virtualmemory/SettingsWindow.cpp @@ -237,12 +237,14 @@ SettingsWindow::SettingsWindow() status_t result = fSettings.SwapVolume().InitCheck(); if (result != B_OK) { - int32 choice = (new BAlert("VirtualMemory", B_TRANSLATE( + BAlert* alert = new BAlert("VirtualMemory", B_TRANSLATE( "The swap volume specified in the settings file is invalid.\n" "You can keep the current setting or switch to the " "default swap volume."), B_TRANSLATE("Keep"), B_TRANSLATE("Switch"), NULL, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + int32 choice = alert->Go(); if (choice == 1) { BVolumeRoster volumeRoster; BVolume bootVolume; @@ -293,7 +295,7 @@ SettingsWindow::MessageReceived(BMessage* message) // ToDo: maybe we want to remove this possibility in the GUI // as Be did, but I thought a proper warning could be helpful // (for those that want to change that anyway) - int32 choice = (new BAlert("VirtualMemory", + BAlert* alert = new BAlert("VirtualMemory", B_TRANSLATE( "Disabling virtual memory will have unwanted effects on " "system stability once the memory is used up.\n" @@ -301,7 +303,9 @@ SettingsWindow::MessageReceived(BMessage* message) "until this point is reached.\n\n" "Are you really sure you want to turn it off?"), B_TRANSLATE("Turn off"), B_TRANSLATE("Keep enabled"), NULL, - B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); + B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetShortcut(1, B_ESCAPE); + int32 choice = alert->Go(); if (choice == 1) { fSwapEnabledCheckBox->SetValue(1); break; diff --git a/src/preferences/virtualmemory/VirtualMemory.cpp b/src/preferences/virtualmemory/VirtualMemory.cpp index 60fdfdaeee..d599bc6376 100644 --- a/src/preferences/virtualmemory/VirtualMemory.cpp +++ b/src/preferences/virtualmemory/VirtualMemory.cpp @@ -50,6 +50,7 @@ VirtualMemory::AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 13, &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } diff --git a/src/servers/bluetooth/DeskbarReplicant.cpp b/src/servers/bluetooth/DeskbarReplicant.cpp index 67f999d717..b5a57e1272 100644 --- a/src/servers/bluetooth/DeskbarReplicant.cpp +++ b/src/servers/bluetooth/DeskbarReplicant.cpp @@ -242,6 +242,7 @@ DeskbarReplicant::_ShowErrorAlert(BString msg, status_t status) { msg << "\n\nError: " << strerror(status); BAlert* alert = new BAlert("Bluetooth error", msg.String(), "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } diff --git a/src/servers/debug/DebugServer.cpp b/src/servers/debug/DebugServer.cpp index 83e49709c5..26f542128b 100644 --- a/src/servers/debug/DebugServer.cpp +++ b/src/servers/debug/DebugServer.cpp @@ -689,6 +689,7 @@ TeamDebugHandler::_HandleMessage(DebugMessage *message) BAlert *alert = new BAlert(NULL, buffer.String(), B_TRANSLATE("Debug"), B_TRANSLATE("OK"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); int32 result = alert->Go(); kill = (result == 1); _NotifyRegistrar(fTeam, false, !kill); diff --git a/src/servers/input/MethodReplicant.cpp b/src/servers/input/MethodReplicant.cpp index 2a6c9dfc0e..9210cfc2da 100644 --- a/src/servers/input/MethodReplicant.cpp +++ b/src/servers/input/MethodReplicant.cpp @@ -137,11 +137,15 @@ MethodReplicant::MessageReceived(BMessage* message) switch (message->what) { case B_ABOUT_REQUESTED: - (new BAlert("About Method Replicant", + { + BAlert* alert = new BAlert("About Method Replicant", "Method Replicant (Replicant)\n" " Brought to you by Jérôme DUVAL.\n\n" - "Haiku, 2004-2009", "OK"))->Go(); + "Haiku, 2004-2009", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); break; + } case IS_UPDATE_NAME: UpdateMethodName(message); break; diff --git a/src/servers/mail/MailDaemon.cpp b/src/servers/mail/MailDaemon.cpp index b12bcbe7fa..05586c5a5b 100644 --- a/src/servers/mail/MailDaemon.cpp +++ b/src/servers/mail/MailDaemon.cpp @@ -306,6 +306,7 @@ MailDaemonApp::MessageReceived(BMessage* msg) BAlert* alert = new BAlert(B_TRANSLATE("New Messages"), fAlertString.String(), "OK", NULL, NULL, B_WIDTH_AS_USUAL); alert->SetFeel(B_NORMAL_WINDOW_FEEL); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); fAlertString = B_EMPTY_STRING; } diff --git a/src/servers/media/media_server.cpp b/src/servers/media/media_server.cpp index fd51cf7742..f1cc958a97 100644 --- a/src/servers/media/media_server.cpp +++ b/src/servers/media/media_server.cpp @@ -219,8 +219,10 @@ ServerApp::_LaunchAddOnServer() if (err == B_OK) return; - (new BAlert("media_server", "Launching media_addon_server failed.\n\n" - "media_server will terminate", "OK"))->Go(); + BAlert* alert = new BAlert("media_server", "Launching media_addon_server " + "failed.\n\nmedia_server will terminate", "OK"); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); fprintf(stderr, "Launching media_addon_server (%s) failed: %s\n", B_MEDIA_ADDON_SERVER_SIGNATURE, strerror(err)); exit(1); diff --git a/src/servers/midi/MidiServerApp.cpp b/src/servers/midi/MidiServerApp.cpp index 28fa74ac7c..4e547c6268 100644 --- a/src/servers/midi/MidiServerApp.cpp +++ b/src/servers/midi/MidiServerApp.cpp @@ -62,13 +62,15 @@ MidiServerApp::~MidiServerApp() void MidiServerApp::AboutRequested() { - (new BAlert(0, + BAlert* alert = new BAlert(0, "Haiku midi_server 1.0.0 alpha\n\n" "notes disguised as bytes\n" "propagating to endpoints,\n" "an aural delight", - "Okay", 0, 0, B_WIDTH_AS_USUAL, - B_INFO_ALERT))->Go(); + "OK", 0, 0, B_WIDTH_AS_USUAL, + B_INFO_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(); } diff --git a/src/servers/mount/AutoMounter.cpp b/src/servers/mount/AutoMounter.cpp index 65afd9079a..cf6fb72163 100644 --- a/src/servers/mount/AutoMounter.cpp +++ b/src/servers/mount/AutoMounter.cpp @@ -569,8 +569,10 @@ AutoMounter::_MountVolume(const BMessage* message) char text[512]; snprintf(text, sizeof(text), B_TRANSLATE("Error mounting volume:\n\n%s"), strerror(status)); - (new BAlert(B_TRANSLATE("Mount error"), text, - B_TRANSLATE("OK")))->Go(NULL); + BAlert* alert = new BAlert(B_TRANSLATE("Mount error"), text, + B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } } @@ -603,8 +605,10 @@ AutoMounter::_ReportUnmountError(const char* name, status_t error) snprintf(text, sizeof(text), B_TRANSLATE("Could not unmount disk " "\"%s\":\n\t%s"), name, strerror(error)); - (new BAlert(B_TRANSLATE("Unmount error"), text, B_TRANSLATE("OK"), - NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); + BAlert* alert = new BAlert(B_TRANSLATE("Unmount error"), text, + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); + alert->Go(NULL); } diff --git a/src/servers/net/NetServer.cpp b/src/servers/net/NetServer.cpp index e30db4aa97..2e9c045f09 100644 --- a/src/servers/net/NetServer.cpp +++ b/src/servers/net/NetServer.cpp @@ -238,6 +238,7 @@ NetServer::AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, 17, &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } diff --git a/src/servers/notification/NotificationWindow.cpp b/src/servers/notification/NotificationWindow.cpp index 39bdf1eaa8..5a901469b8 100644 --- a/src/servers/notification/NotificationWindow.cpp +++ b/src/servers/notification/NotificationWindow.cpp @@ -440,6 +440,7 @@ NotificationWindow::_LoadAppFilters(bool startMonitor) BAlert* alert = new BAlert(B_TRANSLATE("Warning"), B_TRANSLATE("Couldn't start filter monitor." " Live filter changes disabled."), B_TRANSLATE("Darn.")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -504,6 +505,7 @@ NotificationWindow::_LoadGeneralSettings(bool startMonitor) BAlert* alert = new BAlert(B_TRANSLATE("Warning"), B_TRANSLATE("Couldn't start general settings monitor.\n" "Live filter changes disabled."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } @@ -555,6 +557,7 @@ NotificationWindow::_LoadDisplaySettings(bool startMonitor) BAlert* alert = new BAlert(B_TRANSLATE("Warning"), B_TRANSLATE("Couldn't start display settings monitor.\n" "Live filter changes disabled."), B_TRANSLATE("OK")); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(); } } diff --git a/src/servers/print/ConfigWindow.cpp b/src/servers/print/ConfigWindow.cpp index a88ea61c1d..eebea2dee2 100644 --- a/src/servers/print/ConfigWindow.cpp +++ b/src/servers/print/ConfigWindow.cpp @@ -309,6 +309,7 @@ ConfigWindow::AboutRequested() BAlert *about = new BAlert("About printer server", text.String(), B_TRANSLATE("OK")); + about->SetFlags(about->Flags() | B_CLOSE_ON_ESCAPE); about->Go(); } diff --git a/src/servers/print/PrintServerApp.R5.cpp b/src/servers/print/PrintServerApp.R5.cpp index c89948f29a..bf466ae3a9 100644 --- a/src/servers/print/PrintServerApp.R5.cpp +++ b/src/servers/print/PrintServerApp.R5.cpp @@ -97,6 +97,7 @@ PrintServerApp::async_thread(void* data) B_TRANSLATE("Would you like to set one up now?")); BAlert* alert = new BAlert("Info", alertText.String(), B_TRANSLATE("No"), B_TRANSLATE("Yes")); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 1) { if (count == 0) run_add_printer_panel(); @@ -143,6 +144,7 @@ PrintServerApp::async_thread(void* data) text.ReplaceFirst("@", printerName.String()); BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("No"), B_TRANSLATE("Yes")); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 1) p->app->SelectPrinter(printerName.String()); } diff --git a/src/servers/registrar/ShutdownProcess.cpp b/src/servers/registrar/ShutdownProcess.cpp index 02a2a719e1..e3d2ea21e5 100644 --- a/src/servers/registrar/ShutdownProcess.cpp +++ b/src/servers/registrar/ShutdownProcess.cpp @@ -1256,13 +1256,12 @@ ShutdownProcess::_WorkerDoShutdown() BAlert* alert = new BAlert(title.String(), text, B_TRANSLATE("Cancel"), otherText, defaultText, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, B_ESCAPE); // We want the alert to behave more like a regular window... alert->SetFeel(B_NORMAL_WINDOW_FEEL); // ...but not quit. Minimizing the alert would prevent the user from // finding it again, since registrar does not have an entry in the // Deskbar. - alert->SetFlags(alert->Flags() | B_NOT_MINIMIZABLE); + alert->SetFlags(alert->Flags() | B_NOT_MINIMIZABLE | B_CLOSE_ON_ESCAPE); alert->SetWorkspaces(B_ALL_WORKSPACES); int32 result = alert->Go(); diff --git a/src/servers/syslog_daemon/SyslogDaemon.cpp b/src/servers/syslog_daemon/SyslogDaemon.cpp index 993638df48..4a696d91e3 100644 --- a/src/servers/syslog_daemon/SyslogDaemon.cpp +++ b/src/servers/syslog_daemon/SyslogDaemon.cpp @@ -73,6 +73,7 @@ SyslogDaemon::AboutRequested() font.SetFace(B_BOLD_FACE); view->SetFontAndColor(0, name.Length(), &font); + alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->Go(NULL); } From 7483c98dece8f3606fc5d3fd746c0544f7e4b6dd Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 5 Aug 2012 23:54:35 +0200 Subject: [PATCH 4/8] Debugger (and some friends): 64 bit fixes --- .../debuganalyzer/gui/table/TableColumns.cpp | 6 +- src/apps/debuganalyzer/util/TimeUtils.h | 12 +- src/apps/debugger/BreakpointManager.cpp | 6 +- src/apps/debugger/Debugger.cpp | 21 +- src/apps/debugger/TeamDebugger.cpp | 89 ++++----- src/apps/debugger/ThreadHandler.cpp | 12 +- src/apps/debugger/Worker.h | 6 +- .../debugger/arch/x86/ArchitectureX86.cpp | 6 +- src/apps/debugger/arch/x86/CpuStateX86.cpp | 4 +- src/apps/debugger/arch/x86/CpuStateX86.h | 7 +- .../arch/x86/disasm/DisassemblerX86.cpp | 4 +- .../debug_info/DwarfImageDebugInfo.cpp | 55 +++--- .../debugger/debug_info/DwarfTypeFactory.cpp | 7 +- src/apps/debugger/debug_info/DwarfTypes.cpp | 15 +- .../debugger_interface/DebuggerInterface.cpp | 8 +- src/apps/debugger/dwarf/AbbreviationTable.cpp | 8 +- src/apps/debugger/dwarf/AttributeValue.cpp | 11 +- src/apps/debugger/dwarf/DataReader.h | 4 +- .../dwarf/DwarfExpressionEvaluator.cpp | 10 +- src/apps/debugger/dwarf/DwarfFile.cpp | 180 ++++++++++-------- src/apps/debugger/model/Team.cpp | 8 +- src/apps/debugger/model/TypeComponentPath.cpp | 8 +- src/apps/debugger/model/TypeComponentPath.h | 2 +- src/apps/debugger/types/ValueLocation.cpp | 12 +- src/apps/debugger/types/ValueLocation.h | 2 +- .../gui/inspector_window/MemoryView.cpp | 2 +- .../gui/team_window/RegistersView.cpp | 8 +- .../gui/team_window/SourceView.cpp | 10 +- .../gui/team_window/StackTraceView.cpp | 4 +- .../gui/team_window/TeamWindow.cpp | 5 +- .../gui/util/TargetAddressTableColumn.cpp | 4 +- src/apps/debugger/util/IntegerFormatter.cpp | 7 +- src/apps/debugger/value/ValueLoader.cpp | 18 +- .../value/value_nodes/BMessageValueNode.cpp | 17 +- .../value/value_nodes/CompoundValueNode.cpp | 6 +- .../debugger/value/values/AddressValue.cpp | 4 +- src/bin/debug/debug_utils.cpp | 2 +- 37 files changed, 313 insertions(+), 277 deletions(-) diff --git a/src/apps/debuganalyzer/gui/table/TableColumns.cpp b/src/apps/debuganalyzer/gui/table/TableColumns.cpp index 6f3e940e94..7bd940665b 100644 --- a/src/apps/debuganalyzer/gui/table/TableColumns.cpp +++ b/src/apps/debuganalyzer/gui/table/TableColumns.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -144,7 +144,7 @@ BField* Int32TableColumn::PrepareField(const BVariant& value) const { char buffer[16]; - snprintf(buffer, sizeof(buffer), "%ld", value.ToInt32()); + snprintf(buffer, sizeof(buffer), "%" B_PRId32, value.ToInt32()); return StringTableColumn::PrepareField( BVariant(buffer, B_VARIANT_DONT_COPY_DATA)); } @@ -174,7 +174,7 @@ BField* Int64TableColumn::PrepareField(const BVariant& value) const { char buffer[32]; - snprintf(buffer, sizeof(buffer), "%lld", value.ToInt64()); + snprintf(buffer, sizeof(buffer), "%" B_PRId64, value.ToInt64()); return StringTableColumn::PrepareField( BVariant(buffer, B_VARIANT_DONT_COPY_DATA)); } diff --git a/src/apps/debuganalyzer/util/TimeUtils.h b/src/apps/debuganalyzer/util/TimeUtils.h index b890d8b2b9..027dc172de 100644 --- a/src/apps/debuganalyzer/util/TimeUtils.h +++ b/src/apps/debuganalyzer/util/TimeUtils.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef TIME_UTILS_H @@ -65,8 +65,9 @@ format_bigtime(bigtime_t time, char* buffer, size_t bufferSize) decomposed_bigtime decomposed; decompose_time(time, decomposed); - snprintf(buffer, bufferSize, "%02lld:%02d:%02d:%06d", decomposed.hours, - decomposed.minutes, decomposed.seconds, decomposed.micros); + snprintf(buffer, bufferSize, "%02" B_PRId64 ":%02d:%02d:%06d", + decomposed.hours, decomposed.minutes, decomposed.seconds, + decomposed.micros); return buffer; } @@ -86,8 +87,9 @@ format_nanotime(nanotime_t time, char* buffer, size_t bufferSize) decomposed_nanotime decomposed; decompose_time(time, decomposed); - snprintf(buffer, bufferSize, "%02lld:%02d:%02d:%09d", decomposed.hours, - decomposed.minutes, decomposed.seconds, decomposed.nanos); + snprintf(buffer, bufferSize, "%02" B_PRId64 ":%02d:%02d:%09d", + decomposed.hours, decomposed.minutes, decomposed.seconds, + decomposed.nanos); return buffer; } diff --git a/src/apps/debugger/BreakpointManager.cpp b/src/apps/debugger/BreakpointManager.cpp index 1c653bc6d0..998f9fcd04 100644 --- a/src/apps/debugger/BreakpointManager.cpp +++ b/src/apps/debugger/BreakpointManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -499,7 +499,7 @@ BreakpointManager::_UpdateBreakpointInstallation(Breakpoint* breakpoint) if (error != B_OK) return error; - TRACE_CONTROL("BREAKPOINT at %#llx installed: %s\n", + TRACE_CONTROL("BREAKPOINT at %#" B_PRIx64 " installed: %s\n", breakpoint->Address(), strerror(error)); breakpoint->SetInstalled(true); @@ -507,7 +507,7 @@ BreakpointManager::_UpdateBreakpointInstallation(Breakpoint* breakpoint) // uninstall fDebuggerInterface->UninstallBreakpoint(breakpoint->Address()); - TRACE_CONTROL("BREAKPOINT at %#llx uninstalled\n", + TRACE_CONTROL("BREAKPOINT at %#" B_PRIx64 " uninstalled\n", breakpoint->Address()); breakpoint->SetInstalled(false); diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp index 645151d84e..9a25be1108 100644 --- a/src/apps/debugger/Debugger.cpp +++ b/src/apps/debugger/Debugger.cpp @@ -240,14 +240,14 @@ get_debugged_program(const Options& options, DebuggedProgramInfo& _info) status_t error = get_thread_info(thread, &threadInfo); if (error != B_OK) { // TODO: Notify the user! - fprintf(stderr, "Error: Failed to get info for thread \"%ld\": " - "%s\n", thread, strerror(error)); + fprintf(stderr, "Error: Failed to get info for thread \"%" B_PRId32 + "\": %s\n", thread, strerror(error)); return false; } team = threadInfo.team; } - printf("team: %ld, thread: %ld\n", team, thread); + printf("team: %" B_PRId32 ", thread: %" B_PRId32 "\n", team, thread); _info.team = team; _info.thread = thread; @@ -289,13 +289,13 @@ start_team_debugger(team_id teamID, SettingsManager* settingsManager, error = debugger->Init(teamID, threadID, stopInMain); if (error != B_OK) { - printf("Error: debugger for team %ld failed to init: %s!\n", + printf("Error: debugger for team %" B_PRId32 " failed to init: %s!\n", teamID, strerror(error)); delete debugger; return NULL; } else - printf("debugger for team %ld created and initialized successfully!\n", - teamID); + printf("debugger for team %" B_PRId32 " created and initialized " + "successfully!\n", teamID); return debugger; } @@ -458,7 +458,8 @@ Debugger::ArgvReceived(int32 argc, char** argv) TeamDebugger* debugger = _FindTeamDebugger(programInfo.team); if (debugger != NULL) { - printf("There's already a debugger for team: %ld\n", programInfo.team); + printf("There's already a debugger for team: %" B_PRId32 "\n", + programInfo.team); debugger->Activate(); return; } @@ -471,8 +472,7 @@ Debugger::ArgvReceived(int32 argc, char** argv) void Debugger::TeamDebuggerStarted(TeamDebugger* debugger) { - printf("debugger for team %ld started...\n", - debugger->TeamID()); + printf("debugger for team %" B_PRId32 " started...\n", debugger->TeamID()); // Note: see TeamDebuggerQuit() note about locking AutoLocker locker(this); @@ -489,8 +489,7 @@ Debugger::TeamDebuggerQuit(TeamDebugger* debugger) // way around. If we even need to do that, we'll have to introduce a // separate lock to protect the list. - printf("debugger for team %ld quit.\n", - debugger->TeamID()); + printf("debugger for team %" B_PRId32 " quit.\n", debugger->TeamID()); AutoLocker locker(this); fTeamDebuggers.RemoveItem(debugger); diff --git a/src/apps/debugger/TeamDebugger.cpp b/src/apps/debugger/TeamDebugger.cpp index f0853fb296..58eb10d880 100644 --- a/src/apps/debugger/TeamDebugger.cpp +++ b/src/apps/debugger/TeamDebugger.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2010-2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -363,7 +363,8 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, bool stopInMain) // create the debug event listener char buffer[128]; - snprintf(buffer, sizeof(buffer), "team %ld debug listener", fTeamID); + snprintf(buffer, sizeof(buffer), "team %" B_PRId32 " debug listener", + fTeamID); fDebugEventListener = spawn_thread(_DebugEventListenerEntry, buffer, B_NORMAL_PRIORITY, this); if (fDebugEventListener < 0) @@ -842,8 +843,8 @@ TeamDebugger::_DebugEventListener() // TODO: Error handling! if (event->Team() != fTeamID) { - TRACE_EVENTS("TeamDebugger for team %ld: received event from team " - "%ld!\n", fTeamID, event->Team()); + TRACE_EVENTS("TeamDebugger for team %" B_PRId32 ": received event " + "from team %" B_PRId32 "!\n", fTeamID, event->Team()); continue; } @@ -862,7 +863,7 @@ TeamDebugger::_DebugEventListener() void TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) { - TRACE_EVENTS("TeamDebugger::_HandleDebuggerMessage(): %ld\n", + TRACE_EVENTS("TeamDebugger::_HandleDebuggerMessage(): %" B_PRId32 "\n", event->EventType()); bool handled = false; @@ -872,8 +873,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) switch (event->EventType()) { case B_DEBUGGER_MESSAGE_THREAD_DEBUGGED: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_DEBUGGED: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_DEBUGGED: thread: %" + B_PRId32 "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleThreadDebugged( @@ -881,8 +882,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) } break; case B_DEBUGGER_MESSAGE_DEBUGGER_CALL: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_DEBUGGER_CALL: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_DEBUGGER_CALL: thread: %" B_PRId32 + "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleDebuggerCall( @@ -890,8 +891,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) } break; case B_DEBUGGER_MESSAGE_BREAKPOINT_HIT: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_BREAKPOINT_HIT: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_BREAKPOINT_HIT: thread: %" B_PRId32 + "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleBreakpointHit( @@ -899,8 +900,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) } break; case B_DEBUGGER_MESSAGE_WATCHPOINT_HIT: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_WATCHPOINT_HIT: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_WATCHPOINT_HIT: thread: %" B_PRId32 + "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleWatchpointHit( @@ -908,8 +909,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) } break; case B_DEBUGGER_MESSAGE_SINGLE_STEP: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_SINGLE_STEP: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_SINGLE_STEP: thread: %" B_PRId32 + "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleSingleStep( @@ -917,8 +918,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) } break; case B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED: thread: %" + B_PRId32 "\n", event->Thread()); if (handler != NULL) { handled = handler->HandleExceptionOccurred( @@ -930,11 +931,11 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) // break; case B_DEBUGGER_MESSAGE_TEAM_DELETED: // TODO: Handle! - TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_DELETED: team: %ld\n", - event->Team()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_DELETED: team: %" B_PRId32 + "\n", event->Team()); break; case B_DEBUGGER_MESSAGE_TEAM_EXEC: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_EXEC: team: %ld\n", + TRACE_EVENTS("B_DEBUGGER_MESSAGE_TEAM_EXEC: team: %" B_PRId32 "\n", event->Team()); // TODO: Handle! break; @@ -942,8 +943,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) { ThreadCreatedEvent* threadEvent = dynamic_cast(event); - TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_CREATED: thread: %ld\n", - threadEvent->NewThread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_CREATED: thread: %" B_PRId32 + "\n", threadEvent->NewThread()); handled = _HandleThreadCreated(threadEvent); break; } @@ -951,8 +952,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) { ThreadRenamedEvent* threadEvent = dynamic_cast(event); - TRACE_EVENTS("DEBUGGER_MESSAGE_THREAD_RENAMED: thread: %ld " - "(\"%s\")\n", + TRACE_EVENTS("DEBUGGER_MESSAGE_THREAD_RENAMED: thread: %" B_PRId32 + " (\"%s\")\n", threadEvent->RenamedThread(), threadEvent->NewName()); handled = _HandleThreadRenamed(threadEvent); break; @@ -962,13 +963,13 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) ThreadPriorityChangedEvent* threadEvent = dynamic_cast(event); TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED: thread:" - " %ld\n", threadEvent->ChangedThread()); + " %" B_PRId32 "\n", threadEvent->ChangedThread()); handled = _HandleThreadPriorityChanged(threadEvent); break; } case B_DEBUGGER_MESSAGE_THREAD_DELETED: - TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_DELETED: thread: %ld\n", - event->Thread()); + TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_DELETED: thread: %" B_PRId32 + "\n", event->Thread()); handled = _HandleThreadDeleted( dynamic_cast(event)); break; @@ -977,7 +978,7 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) ImageCreatedEvent* imageEvent = dynamic_cast(event); TRACE_EVENTS("B_DEBUGGER_MESSAGE_IMAGE_CREATED: image: \"%s\" " - "(%ld)\n", imageEvent->GetImageInfo().Name().String(), + "(%" B_PRId32 ")\n", imageEvent->GetImageInfo().Name().String(), imageEvent->GetImageInfo().ImageID()); handled = _HandleImageCreated(imageEvent); break; @@ -987,7 +988,7 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) ImageDeletedEvent* imageEvent = dynamic_cast(event); TRACE_EVENTS("B_DEBUGGER_MESSAGE_IMAGE_DELETED: image: \"%s\" " - "(%ld)\n", imageEvent->GetImageInfo().Name().String(), + "(%" B_PRId32 ")\n", imageEvent->GetImageInfo().Name().String(), imageEvent->GetImageInfo().ImageID()); handled = _HandleImageDeleted(imageEvent); break; @@ -1000,8 +1001,8 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) // not interested break; default: - WARNING("TeamDebugger for team %ld: unknown event type: " - "%ld\n", fTeamID, event->EventType()); + WARNING("TeamDebugger for team %" B_PRId32 ": unknown event type: " + "%" B_PRId32 "\n", fTeamID, event->EventType()); break; } @@ -1124,7 +1125,8 @@ TeamDebugger::_HandleImageDebugInfoChanged(image_id imageID) void TeamDebugger::_HandleImageFileChanged(image_id imageID) { - TRACE_IMAGES("TeamDebugger::_HandleImageFileChanged(%ld)\n", imageID); + TRACE_IMAGES("TeamDebugger::_HandleImageFileChanged(%" B_PRId32 ")\n", + imageID); // TODO: Reload the debug info! } @@ -1132,8 +1134,8 @@ TeamDebugger::_HandleImageFileChanged(image_id imageID) void TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) { - TRACE_CONTROL("TeamDebugger::_HandleSetUserBreakpoint(%#llx, %d)\n", - address, enabled); + TRACE_CONTROL("TeamDebugger::_HandleSetUserBreakpoint(%#" B_PRIx64 + ", %d)\n", address, enabled); // check whether there already is a breakpoint AutoLocker< ::Team> locker(fTeam); @@ -1187,9 +1189,9 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) target_addr_t relativeAddress = address - functionInstance->Address(); - TRACE_CONTROL(" relative address: %#llx, source location: " - "(%ld, %ld)\n", relativeAddress, sourceLocation.Line(), - sourceLocation.Column()); + TRACE_CONTROL(" relative address: %#" B_PRIx64 ", source location: " + "(%" B_PRId32 ", %" B_PRId32 ")\n", relativeAddress, + sourceLocation.Line(), sourceLocation.Column()); // get function id FunctionID* functionID = functionInstance->GetFunctionID(); @@ -1212,8 +1214,8 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) for (FunctionInstanceList::ConstIterator it = function->Instances().GetIterator(); FunctionInstance* instance = it.Next();) { - TRACE_CONTROL(" function instance %p: range: %#llx - %#llx\n", - instance, instance->Address(), + TRACE_CONTROL(" function instance %p: range: %#" B_PRIx64 " - %#" + B_PRIx64 "\n", instance, instance->Address(), instance->Address() + instance->Size()); // get the breakpoint address for the instance @@ -1235,8 +1237,8 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) } } - TRACE_CONTROL(" breakpoint address using source info: %llx\n", - instanceAddress); + TRACE_CONTROL(" breakpoint address using source info: %" B_PRIx64 + "\n", instanceAddress); if (instanceAddress == 0) { // No source file (or we failed getting the statement), so try @@ -1246,7 +1248,7 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) instanceAddress = instance->Address() + relativeAddress; } - TRACE_CONTROL(" final breakpoint address: %llx\n", + TRACE_CONTROL(" final breakpoint address: %" B_PRIx64 "\n", instanceAddress); UserBreakpointInstance* breakpointInstance = new(std::nothrow) @@ -1282,7 +1284,8 @@ TeamDebugger::_HandleSetUserBreakpoint(UserBreakpoint* breakpoint, bool enabled) void TeamDebugger::_HandleClearUserBreakpoint(target_addr_t address) { - TRACE_CONTROL("TeamDebugger::_HandleClearUserBreakpoint(%#llx)\n", address); + TRACE_CONTROL("TeamDebugger::_HandleClearUserBreakpoint(%#" B_PRIx64 ")\n", + address); AutoLocker< ::Team> locker(fTeam); diff --git a/src/apps/debugger/ThreadHandler.cpp b/src/apps/debugger/ThreadHandler.cpp index c1932f2ebb..366c3923b9 100644 --- a/src/apps/debugger/ThreadHandler.cpp +++ b/src/apps/debugger/ThreadHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2010-2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -117,7 +117,7 @@ ThreadHandler::HandleBreakpointHit(BreakpointHitEvent* event) CpuState* cpuState = event->GetCpuState(); target_addr_t instructionPointer = cpuState->InstructionPointer(); - TRACE_EVENTS("ThreadHandler::HandleBreakpointHit(): ip: %llx\n", + TRACE_EVENTS("ThreadHandler::HandleBreakpointHit(): ip: %" B_PRIx64 "\n", instructionPointer); // check whether this is a temporary breakpoint we're waiting for @@ -265,7 +265,7 @@ ThreadHandler::HandleThreadAction(uint32 action) StackFrame* frame = stackTrace->FrameAt(0); - TRACE_CONTROL(" ip: %#llx\n", frame->InstructionPointer()); + TRACE_CONTROL(" ip: %#" B_PRIx64 "\n", frame->InstructionPointer()); // When the thread is in a syscall, do the same for all step kinds: Stop it // when it returns by means of a breakpoint. @@ -315,7 +315,7 @@ ThreadHandler::HandleThreadAction(uint32 action) return; } - TRACE_CONTROL(" statement: %#llx - %#llx\n", + TRACE_CONTROL(" statement: %#" B_PRIx64 " - %#" B_PRIx64 "\n", fStepStatement->CoveringAddressRange().Start(), fStepStatement->CoveringAddressRange().End()); @@ -481,7 +481,7 @@ ThreadHandler::_DoStepOver(CpuState* cpuState) } TRACE_CONTROL(" subroutine call -- installing breakpoint at address " - "%#llx\n", info.Address() + info.Size()); + "%#" B_PRIx64 "\n", info.Address() + info.Size()); if (_InstallTemporaryBreakpoint(info.Address() + info.Size()) != B_OK) return false; @@ -633,7 +633,7 @@ ThreadHandler::_HandleBreakpointHitStep(CpuState* cpuState) bool ThreadHandler::_HandleSingleStepStep(CpuState* cpuState) { - TRACE_CONTROL("ThreadHandler::_HandleSingleStepStep(): ip: %llx\n", + TRACE_CONTROL("ThreadHandler::_HandleSingleStepStep(): ip: %" B_PRIx64 "\n", cpuState->InstructionPointer()); switch (fStepMode) { diff --git a/src/apps/debugger/Worker.h b/src/apps/debugger/Worker.h index 7e356992a7..411b9cba03 100644 --- a/src/apps/debugger/Worker.h +++ b/src/apps/debugger/Worker.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef WORKER_H @@ -40,7 +40,7 @@ class JobKey { public: virtual ~JobKey(); - virtual uint32 HashValue() const = 0; + virtual size_t HashValue() const = 0; virtual bool operator==(const JobKey& other) const = 0; }; @@ -54,7 +54,7 @@ public: SimpleJobKey(void* object, uint32 type); SimpleJobKey(const SimpleJobKey& other); - virtual uint32 HashValue() const; + virtual size_t HashValue() const; virtual bool operator==(const JobKey& other) const; diff --git a/src/apps/debugger/arch/x86/ArchitectureX86.cpp b/src/apps/debugger/arch/x86/ArchitectureX86.cpp index cc856cedce..9fd80cfa7a 100644 --- a/src/apps/debugger/arch/x86/ArchitectureX86.cpp +++ b/src/apps/debugger/arch/x86/ArchitectureX86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -250,11 +250,11 @@ status_t ArchitectureX86::CreateCpuState(const void* cpuStateData, size_t size, CpuState*& _state) { - if (size != sizeof(debug_cpu_state_x86)) + if (size != sizeof(x86_debug_cpu_state)) return B_BAD_VALUE; CpuStateX86* state = new(std::nothrow) CpuStateX86( - *(const debug_cpu_state_x86*)cpuStateData); + *(const x86_debug_cpu_state*)cpuStateData); if (state == NULL) return B_NO_MEMORY; diff --git a/src/apps/debugger/arch/x86/CpuStateX86.cpp b/src/apps/debugger/arch/x86/CpuStateX86.cpp index c51ee9df40..236c5054c3 100644 --- a/src/apps/debugger/arch/x86/CpuStateX86.cpp +++ b/src/apps/debugger/arch/x86/CpuStateX86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -17,7 +17,7 @@ CpuStateX86::CpuStateX86() } -CpuStateX86::CpuStateX86(const debug_cpu_state_x86& state) +CpuStateX86::CpuStateX86(const x86_debug_cpu_state& state) : fSetRegisters(), fInterruptVector(0) diff --git a/src/apps/debugger/arch/x86/CpuStateX86.h b/src/apps/debugger/arch/x86/CpuStateX86.h index dde5537ef5..795d331f82 100644 --- a/src/apps/debugger/arch/x86/CpuStateX86.h +++ b/src/apps/debugger/arch/x86/CpuStateX86.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -13,9 +13,6 @@ #include "CpuState.h" -typedef debug_cpu_state debug_cpu_state_x86; - // TODO: Should be defined by ! - enum { X86_REGISTER_EIP = 0, X86_REGISTER_ESP, @@ -44,7 +41,7 @@ enum { class CpuStateX86 : public CpuState { public: CpuStateX86(); - CpuStateX86(const debug_cpu_state_x86& state); + CpuStateX86(const x86_debug_cpu_state& state); virtual ~CpuStateX86(); virtual target_addr_t InstructionPointer() const; diff --git a/src/apps/debugger/arch/x86/disasm/DisassemblerX86.cpp b/src/apps/debugger/arch/x86/disasm/DisassemblerX86.cpp index 31f4fe819f..f20838e31e 100644 --- a/src/apps/debugger/arch/x86/disasm/DisassemblerX86.cpp +++ b/src/apps/debugger/arch/x86/disasm/DisassemblerX86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2008, François Revol, revol@free.fr * Distributed under the terms of the MIT License. */ @@ -73,7 +73,7 @@ DisassemblerX86::GetNextInstruction(BString& line, target_addr_t& _address, uint32 address = (uint32)ud_insn_off(fUdisData); char buffer[256]; - snprintf(buffer, sizeof(buffer), "0x%08lx: %16.16s %s", address, + snprintf(buffer, sizeof(buffer), "0x%08" B_PRIx32 ": %16.16s %s", address, ud_insn_hex(fUdisData), ud_insn_asm(fUdisData)); // TODO: Resolve symbols! diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index befa138729..04f57608ee 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -290,7 +290,8 @@ status_t DwarfImageDebugInfo::GetFunctions(BObjectList& functions) { TRACE_IMAGES("DwarfImageDebugInfo::GetFunctions()\n"); - TRACE_IMAGES(" %ld compilation units\n", fFile->CountCompilationUnits()); + TRACE_IMAGES(" %" B_PRId32 " compilation units\n", + fFile->CountCompilationUnits()); for (int32 i = 0; CompilationUnit* unit = fFile->CompilationUnitAt(i); i++) { @@ -368,7 +369,7 @@ DwarfImageDebugInfo::GetFunctions(BObjectList& functions) DwarfFunctionDebugInfo* function = new(std::nothrow) DwarfFunctionDebugInfo(this, unit, subprogramEntry, rangeList, name, file, - SourceLocation(line, std::max(column, 0L))); + SourceLocation(line, std::max(column, (int32)0))); if (function == NULL || !functions.AddItem(function)) { delete function; return B_NO_MEMORY; @@ -568,9 +569,10 @@ DwarfImageDebugInfo::CreateFrame(Image* image, for (int32 i = 0; i < registerCount; i++) { const Register* reg = registers + i; BVariant value; - if (previousCpuState->GetRegisterValue(reg, value)) - TRACE_CFI(" %3s: %#lx\n", reg->Name(), value.ToUInt32()); - else + if (previousCpuState->GetRegisterValue(reg, value)) { + TRACE_CFI(" %3s: %#" B_PRIx32 "\n", reg->Name(), + value.ToUInt32()); + } else TRACE_CFI(" %3s: undefined\n", reg->Name()); } ) @@ -649,8 +651,8 @@ status_t DwarfImageDebugInfo::GetStatement(FunctionDebugInfo* _function, target_addr_t address, Statement*& _statement) { - TRACE_CODE("DwarfImageDebugInfo::GetStatement(function: %p, address: %#llx)\n", - _function, address); + TRACE_CODE("DwarfImageDebugInfo::GetStatement(function: %p, address: %#" + B_PRIx64 ")\n", _function, address); DwarfFunctionDebugInfo* function = dynamic_cast(_function); @@ -719,7 +721,7 @@ DwarfImageDebugInfo::GetStatement(FunctionDebugInfo* _function, if (state.isStatement) { statementAddress = state.address; statementLine = state.line - 1; - statementColumn = std::max(state.column - 1, 0L); + statementColumn = std::max(state.column - 1, (int32)0); } } @@ -741,8 +743,8 @@ DwarfImageDebugInfo::GetStatementAtSourceLocation(FunctionDebugInfo* _function, target_addr_t functionEndAddress = functionStartAddress + function->Size(); TRACE_LINES2("DwarfImageDebugInfo::GetStatementAtSourceLocation(%p, " - "(%ld, %ld)): function range: %#llx - %#llx\n", function, - sourceLocation.Line(), sourceLocation.Column(), + "(%" B_PRId32 ", %" B_PRId32 ")): function range: %#" B_PRIx64 " - %#" + B_PRIx64 "\n", function, sourceLocation.Line(), sourceLocation.Column(), functionStartAddress, functionEndAddress); AutoLocker locker(fLock); @@ -778,9 +780,10 @@ DwarfImageDebugInfo::GetStatementAtSourceLocation(FunctionDebugInfo* _function, target_addr_t endAddress = state.address; if (statementAddress < endAddress) { - TRACE_LINES2(" statement: %#llx - %#llx, location: " - "(%ld, %ld)\n", statementAddress, endAddress, statementLine, - statementColumn); + TRACE_LINES2(" statement: %#" B_PRIx64 " - %#" B_PRIx64 + ", location: (%" B_PRId32 ", %" B_PRId32 ")\n", + statementAddress, endAddress, statementLine, + statementColumn); } if (statementAddress < endAddress @@ -812,7 +815,7 @@ DwarfImageDebugInfo::GetStatementAtSourceLocation(FunctionDebugInfo* _function, if (state.isStatement) { statementAddress = state.address; statementLine = state.line - 1; - statementColumn = std::max(state.column - 1, 0L); + statementColumn = std::max(state.column - 1, (int32)0); } } @@ -902,8 +905,9 @@ DwarfImageDebugInfo::_AddSourceCodeInfo(CompilationUnit* unit, int32 statementLine = -1; int32 statementColumn = -1; while (program.GetNextRow(state)) { - TRACE_LINES2(" %#llx (%ld, %ld, %ld) %d\n", state.address, - state.file, state.line, state.column, state.isStatement); + TRACE_LINES2(" %#" B_PRIx64 " (%" B_PRId32 ", %" B_PRId32 ", %" + B_PRId32 ") %d\n", state.address, state.file, state.line, + state.column, state.isStatement); bool isOurFile = state.file == fileIndex; @@ -917,9 +921,10 @@ DwarfImageDebugInfo::_AddSourceCodeInfo(CompilationUnit* unit, if (error != B_OK) return error; - TRACE_LINES2(" -> statement: %#llx - %#llx, source location: " - "(%ld, %ld)\n", statementAddress, endAddress, statementLine, - statementColumn); + TRACE_LINES2(" -> statement: %#" B_PRIx64 " - %#" B_PRIx64 + ", source location: (%" B_PRId32 ", %" B_PRId32 ")\n", + statementAddress, endAddress, statementLine, + statementColumn); } statementAddress = 0; @@ -932,7 +937,7 @@ DwarfImageDebugInfo::_AddSourceCodeInfo(CompilationUnit* unit, if (state.isStatement) { statementAddress = state.address; statementLine = state.line - 1; - statementColumn = std::max(state.column - 1, 0L); + statementColumn = std::max(state.column - 1, (int32)0); } } @@ -969,16 +974,16 @@ DwarfImageDebugInfo::_CreateLocalVariables(CompilationUnit* unit, target_addr_t lowPC, const EntryListWrapper& variableEntries, const EntryListWrapper& blockEntries) { - TRACE_LOCALS("DwarfImageDebugInfo::_CreateLocalVariables(): ip: %#llx, " - "low PC: %#llx\n", instructionPointer, lowPC); + TRACE_LOCALS("DwarfImageDebugInfo::_CreateLocalVariables(): ip: %#" B_PRIx64 + ", low PC: %#" B_PRIx64 "\n", instructionPointer, lowPC); // iterate through the variables and add the ones in scope for (DebugInfoEntryList::ConstIterator it = variableEntries.list.GetIterator(); DIEVariable* variableEntry = dynamic_cast(it.Next());) { - TRACE_LOCALS(" variableEntry %p, scope start: %llu\n", variableEntry, - variableEntry->StartScope()); + TRACE_LOCALS(" variableEntry %p, scope start: %" B_PRIu64 "\n", + variableEntry, variableEntry->StartScope()); // check the variable's scope if (instructionPointer < lowPC + variableEntry->StartScope()) diff --git a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp index d6a633dc73..7bd2292985 100644 --- a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp +++ b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -1304,7 +1304,8 @@ DwarfTypeFactory::_ResolveTypeByteSize(DIEType* typeEntry, case DW_TAG_ptr_to_member_type: _size = fTypeContext->GetCompilationUnit()->AddressSize(); - TRACE_LOCALS(" pointer/reference type: size: %llu\n", _size); + TRACE_LOCALS(" pointer/reference type: size: %" B_PRIu64 "\n", + _size); return B_OK; default: @@ -1327,7 +1328,7 @@ DwarfTypeFactory::_ResolveTypeByteSize(DIEType* typeEntry, _size = size.ToUInt64(); - TRACE_LOCALS(" -> size: %llu\n", _size); + TRACE_LOCALS(" -> size: %" B_PRIu64 "\n", _size); return B_OK; } diff --git a/src/apps/debugger/debug_info/DwarfTypes.cpp b/src/apps/debugger/debug_info/DwarfTypes.cpp index 01450bdf0a..c1544960ce 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.cpp +++ b/src/apps/debugger/debug_info/DwarfTypes.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -346,7 +346,8 @@ DwarfType::ResolveLocation(DwarfTypeContext* typeContext, // TODO: Use bit size and bit offset, if specified! _location.SetPieceAt(0, piece); - TRACE_LOCALS(" set single piece size to %llu\n", ByteSize()); + TRACE_LOCALS(" set single piece size to %" B_PRIu64 "\n", + ByteSize()); } } @@ -670,8 +671,8 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, bitSize = value.ToUInt64(); } - TRACE_LOCALS("bit field: byte size: %llu, bit offset/size: %llu/%llu\n", - byteSize, bitOffset, bitSize); + TRACE_LOCALS("bit field: byte size: %" B_PRIu64 ", bit offset/size: %" + B_PRIu64 "/%" B_PRIu64 "\n", byteSize, bitOffset, bitSize); if (bitOffset + bitSize > byteSize * 8) return B_BAD_VALUE; @@ -942,8 +943,8 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, // doesn't have a stride and the previous dimension's element count is // not known), we can only resolve the first element. if (dimensionStride == 0 && index != 0) { - WARNING("No dimension bit stride for dimension %ld and element " - "index is not 0.\n", dimensionIndex); + WARNING("No dimension bit stride for dimension %" B_PRId32 " and " + "element index is not 0.\n", dimensionIndex); return B_BAD_VALUE; } @@ -953,7 +954,7 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, previousDimensionStride = dimensionStride; } - TRACE_LOCALS("total element bit offset: %lld\n", elementOffset); + TRACE_LOCALS("total element bit offset: %" B_PRId64 "\n", elementOffset); // create the value location object for the element ValueLocation* location = new(std::nothrow) ValueLocation( diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index a1c9a05d62..ae3eb33993 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2010, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -266,7 +266,7 @@ DebuggerInterface::Init() // create debugger port char buffer[128]; - snprintf(buffer, sizeof(buffer), "team %ld debugger", fTeamID); + snprintf(buffer, sizeof(buffer), "team %" B_PRId32 " debugger", fTeamID); fDebuggerPort = create_port(100, buffer); if (fDebuggerPort < 0) return fDebuggerPort; @@ -719,8 +719,8 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode, break; } default: - printf("DebuggerInterface for team %ld: unknown message from " - "kernel: %ld\n", fTeamID, messageCode); + printf("DebuggerInterface for team %" B_PRId32 ": unknown message " + "from kernel: %" B_PRId32 "\n", fTeamID, messageCode); // fall through... case B_DEBUGGER_MESSAGE_TEAM_CREATED: case B_DEBUGGER_MESSAGE_PRE_SYSCALL: diff --git a/src/apps/debugger/dwarf/AbbreviationTable.cpp b/src/apps/debugger/dwarf/AbbreviationTable.cpp index 158a854fec..337e10c26f 100644 --- a/src/apps/debugger/dwarf/AbbreviationTable.cpp +++ b/src/apps/debugger/dwarf/AbbreviationTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -116,8 +116,10 @@ AbbreviationTable::_ParseAbbreviationEntry(DataReader& abbrevReader, return B_NO_MEMORY; fEntryTable.Insert(entry); - } else - fprintf(stderr, "Duplicate abbreviation table entry %lu!\n", code); + } else { + fprintf(stderr, "Duplicate abbreviation table entry %" B_PRIu32 "!\n", + code); + } _nullEntry = false; return B_OK; diff --git a/src/apps/debugger/dwarf/AttributeValue.cpp b/src/apps/debugger/dwarf/AttributeValue.cpp index 2e052ca5ea..67b05f14cd 100644 --- a/src/apps/debugger/dwarf/AttributeValue.cpp +++ b/src/apps/debugger/dwarf/AttributeValue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -15,13 +15,14 @@ AttributeValue::ToString(char* buffer, size_t size) { switch (attributeClass) { case ATTRIBUTE_CLASS_ADDRESS: - snprintf(buffer, size, "%#llx", address); + snprintf(buffer, size, "%#" B_PRIx64, address); return buffer; case ATTRIBUTE_CLASS_BLOCK: - snprintf(buffer, size, "(%p, %#llx)", block.data, block.length); + snprintf(buffer, size, "(%p, %#" B_PRIx64 ")", block.data, + block.length); return buffer; case ATTRIBUTE_CLASS_CONSTANT: - snprintf(buffer, size, "%#llx", constant); + snprintf(buffer, size, "%#" B_PRIx64, constant); return buffer; case ATTRIBUTE_CLASS_FLAG: snprintf(buffer, size, "%s", flag ? "true" : "false"); @@ -30,7 +31,7 @@ AttributeValue::ToString(char* buffer, size_t size) case ATTRIBUTE_CLASS_LOCLISTPTR: case ATTRIBUTE_CLASS_MACPTR: case ATTRIBUTE_CLASS_RANGELISTPTR: - snprintf(buffer, size, "%#llx", pointer); + snprintf(buffer, size, "%#" B_PRIx64, pointer); return buffer; case ATTRIBUTE_CLASS_REFERENCE: snprintf(buffer, size, "%p", reference); diff --git a/src/apps/debugger/dwarf/DataReader.h b/src/apps/debugger/dwarf/DataReader.h index e6c2e8d765..3b38e802ea 100644 --- a/src/apps/debugger/dwarf/DataReader.h +++ b/src/apps/debugger/dwarf/DataReader.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef DATA_READER_H @@ -100,7 +100,7 @@ public: template Type Read(const Type& defaultValue) { - if (fSize < sizeof(Type)) { + if (fSize < (off_t)sizeof(Type)) { fOverflow = true; fSize = 0; return defaultValue; diff --git a/src/apps/debugger/dwarf/DwarfExpressionEvaluator.cpp b/src/apps/debugger/dwarf/DwarfExpressionEvaluator.cpp index 00256826bd..e1a431d08a 100644 --- a/src/apps/debugger/dwarf/DwarfExpressionEvaluator.cpp +++ b/src/apps/debugger/dwarf/DwarfExpressionEvaluator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -267,7 +267,7 @@ status_t DwarfExpressionEvaluator::_Evaluate(ValuePieceLocation* _piece) { TRACE_EXPR_ONLY({ - TRACE_EXPR("DwarfExpressionEvaluator::_Evaluate(%p, %lld)\n", + TRACE_EXPR("DwarfExpressionEvaluator::_Evaluate(%p, %" B_PRIdOFF ")\n", fDataReader.Data(), fDataReader.BytesRemaining()); const uint8* data = (const uint8*)fDataReader.Data(); int32 count = fDataReader.BytesRemaining(); @@ -557,7 +557,7 @@ DwarfExpressionEvaluator::_Evaluate(ValuePieceLocation* _piece) case DW_OP_fbreg: { int64 offset = fDataReader.ReadSignedLEB128(0); - TRACE_EXPR(" DW_OP_fbreg(%lld)\n", offset); + TRACE_EXPR(" DW_OP_fbreg(%" B_PRId64 ")\n", offset); target_addr_t address; if (!fContext->GetFrameBaseAddress(address)) { throw EvaluationException( @@ -644,8 +644,8 @@ DwarfExpressionEvaluator::_Evaluate(ValuePieceLocation* _piece) } } else if (opcode >= DW_OP_breg0 && opcode <= DW_OP_breg31) { int64 offset = fDataReader.ReadSignedLEB128(0); - TRACE_EXPR(" DW_OP_breg%u(%lld)\n", opcode - DW_OP_breg0, - offset); + TRACE_EXPR(" DW_OP_breg%u(%" B_PRId64 ")\n", + opcode - DW_OP_breg0, offset); _PushRegister(opcode - DW_OP_breg0, offset); } else { WARNING("DwarfExpressionEvaluator::_Evaluate(): " diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 636b1fa937..80650ce13e 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -134,7 +134,7 @@ public: if (error != B_OK) return false; - TRACE_EXPR(" -> frame base: %llx\n", fFrameBasePointer); + TRACE_EXPR(" -> frame base: %" B_PRIx64 "\n", fFrameBasePointer); _address = fFrameBasePointer; return true; @@ -420,9 +420,9 @@ DwarfFile::Load(const char* fileName) break; } - TRACE_DIE("DWARF%d compilation unit: version %d, length: %lld, " - "abbrevOffset: %lld, address size: %d\n", dwarf64 ? 64 : 32, - version, unitLength, abbrevOffset, addressSize); + TRACE_DIE("DWARF%d compilation unit: version %d, length: %" B_PRIu64 + ", abbrevOffset: %" B_PRIdOFF ", address size: %d\n", + dwarf64 ? 64 : 32, version, unitLength, abbrevOffset, addressSize); if (version != 2 && version != 3) { WARNING("\"%s\": Unsupported compilation unit version: %d\n", @@ -818,7 +818,7 @@ DwarfFile::_ParseCompilationUnit(CompilationUnit* unit) unit->SetUnitEntry(unitEntry); TRACE_DIE_ONLY( - TRACE_DIE("remaining bytes in unit: %lld\n", + TRACE_DIE("remaining bytes in unit: %" B_PRIdOFF "\n", dataReader.BytesRemaining()); if (dataReader.HasData()) { TRACE_DIE(" "); @@ -853,7 +853,7 @@ DwarfFile::_ParseDebugInfoEntry(DataReader& dataReader, // get the corresponding abbreviation entry AbbreviationEntry abbreviationEntry; if (!abbreviationTable->GetAbbreviationEntry(code, abbreviationEntry)) { - WARNING("No abbreviation entry for code %lu\n", code); + WARNING("No abbreviation entry for code %" B_PRIu32 "\n", code); return B_BAD_DATA; } @@ -861,17 +861,17 @@ DwarfFile::_ParseDebugInfoEntry(DataReader& dataReader, status_t error = fDebugInfoFactory.CreateDebugInfoEntry( abbreviationEntry.Tag(), entry); if (error != B_OK) { - WARNING("Failed to generate entry for tag %lu, code %lu\n", - abbreviationEntry.Tag(), code); + WARNING("Failed to generate entry for tag %" B_PRIu32 ", code %" + B_PRIu32 "\n", abbreviationEntry.Tag(), code); return error; } ObjectDeleter entryDeleter(entry); - TRACE_DIE("%*sentry %p at %lld: %lu, tag: %s (%lu), children: %d\n", - level * 2, "", entry, entryOffset, abbreviationEntry.Code(), - get_entry_tag_name(abbreviationEntry.Tag()), abbreviationEntry.Tag(), - abbreviationEntry.HasChildren()); + TRACE_DIE("%*sentry %p at %" B_PRIdOFF ": %" B_PRIu32 ", tag: %s (%" + B_PRIu32 "), children: %d\n", level * 2, "", entry, entryOffset, + abbreviationEntry.Code(), get_entry_tag_name(abbreviationEntry.Tag()), + abbreviationEntry.Tag(), abbreviationEntry.HasChildren()); error = fCurrentCompilationUnit->AddDebugInfoEntry(entry, entryOffset); if (error != B_OK) @@ -943,7 +943,7 @@ DwarfFile::_FinishCompilationUnit(CompilationUnit* unit) off_t offset; unit->GetEntryAt(i, entry, offset); - TRACE_DIE("entry %p at %lld\n", entry, offset); + TRACE_DIE("entry %p at %" B_PRIdOFF "\n", entry, offset); // seek the reader to the entry dataReader.SeekAbsolute(offset); @@ -1069,7 +1069,8 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, ? (off_t)dataReader.Read(0) : (off_t)dataReader.Read(0); if (offset >= fDebugStringSection->Size()) { - WARNING("Invalid DW_FORM_strp offset: %lld\n", offset); + WARNING("Invalid DW_FORM_strp offset: %" B_PRIdOFF "\n", + offset); return B_BAD_DATA; } attributeValue.SetToString( @@ -1106,7 +1107,8 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, break; case DW_FORM_indirect: default: - WARNING("Unsupported attribute form: %lu\n", attributeForm); + WARNING("Unsupported attribute form: %" B_PRIu32 "\n", + attributeForm); return B_BAD_DATA; } @@ -1115,10 +1117,10 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, uint8 attributeClass = get_attribute_class(attributeName, attributeForm); if (attributeClass == ATTRIBUTE_CLASS_UNKNOWN) { - TRACE_DIE("skipping attribute with unrecognized class: %s (%#lx) " - "%s (%#lx)\n", get_attribute_name_name(attributeName), - attributeName, get_attribute_form_name(attributeForm), - attributeForm); + TRACE_DIE("skipping attribute with unrecognized class: %s (%#" + B_PRIx32 ") %s (%#" B_PRIx32 ")\n", + get_attribute_name_name(attributeName), attributeName, + get_attribute_form_name(attributeForm), attributeForm); continue; } // attributeValue.attributeClass = attributeClass; @@ -1158,8 +1160,8 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, if (attributeName == DW_AT_sibling) continue; - WARNING("Failed to resolve reference: %s (%#lx) " - "%s (%#lx): value: %llu\n", + WARNING("Failed to resolve reference: %s (%#" B_PRIx32 + ") %s (%#" B_PRIx32 "): value: %" B_PRIu64 "\n", get_attribute_name_name(attributeName), attributeName, get_attribute_form_name(attributeForm), @@ -1220,7 +1222,8 @@ DwarfFile::_ParseLineInfo(CompilationUnit* unit) { off_t offset = unit->UnitEntry()->StatementListOffset(); - TRACE_LINES("DwarfFile::_ParseLineInfo(%p), offset: %lld\n", unit, offset); + TRACE_LINES("DwarfFile::_ParseLineInfo(%p), offset: %" B_PRIdOFF "\n", unit, + offset); DataReader dataReader((uint8*)fDebugLineSection->Data() + offset, fDebugLineSection->Size() - offset, unit->AddressSize()); @@ -1268,9 +1271,9 @@ DwarfFile::_ParseLineInfo(CompilationUnit* unit) if (version != 2 && version != 3) return B_UNSUPPORTED; - TRACE_LINES(" unitLength: %llu\n", unitLength); + TRACE_LINES(" unitLength: %" B_PRIu64 "\n", unitLength); TRACE_LINES(" version: %u\n", version); - TRACE_LINES(" headerLength: %llu\n", headerLength); + TRACE_LINES(" headerLength: %" B_PRIu64 "\n", headerLength); TRACE_LINES(" minInstructionLength: %u\n", minInstructionLength); TRACE_LINES(" defaultIsStatement: %d\n", defaultIsStatement); TRACE_LINES(" lineBase: %d\n", lineBase); @@ -1302,8 +1305,9 @@ DwarfFile::_ParseLineInfo(CompilationUnit* unit) if (dataReader.HasOverflow()) return B_BAD_DATA; - TRACE_LINES(" \"%s\", dir index: %llu, mtime: %llu, length: %llu\n", - file, dirIndex, modificationTime, fileLength); + TRACE_LINES(" \"%s\", dir index: %" B_PRIu64 ", mtime: %" B_PRIu64 + ", length: %" B_PRIu64 "\n", file, dirIndex, modificationTime, + fileLength); if (!unit->AddFile(file, dirIndex)) return B_NO_MEMORY; @@ -1343,7 +1347,7 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, // the ones generated by GCC 4 aren't. } - TRACE_CFI("DwarfFile::_UnwindCallFrame(%#llx)\n", location); + TRACE_CFI("DwarfFile::_UnwindCallFrame(%#" B_PRIx64 ")\n", location); DataReader dataReader((uint8*)currentFrameSection->Data(), currentFrameSection->Size(), unit->AddressSize()); @@ -1426,8 +1430,9 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, cieID = lengthOffset - cieID; } - TRACE_CFI(" found fde: length: %llu (%lld), CIE offset: %#llx, " - "location: %#llx, range: %#llx\n", length, remaining, cieID, + TRACE_CFI(" found fde: length: %" B_PRIu64 " (%" B_PRIdOFF + "), CIE offset: %#" B_PRIx64 ", location: %#" B_PRIx64 ", " + "range: %#" B_PRIx64 "\n", length, remaining, cieID, initialLocation, addressRange); CfaContext context(location, initialLocation); @@ -1505,11 +1510,11 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, return B_BAD_VALUE; } - TRACE_CFI(" frame address: %#llx\n", frameAddress); + TRACE_CFI(" frame address: %#" B_PRIx64 "\n", frameAddress); // apply the register rules for (uint32 i = 0; i < registerCount; i++) { - TRACE_CFI(" reg %lu\n", i); + TRACE_CFI(" reg %" B_PRIu32 "\n", i); uint32 valueType = outputInterface->RegisterValueType(i); if (valueType == 0) @@ -1532,8 +1537,8 @@ DwarfFile::_UnwindCallFrame(bool usingEHFrameSection, CompilationUnit* unit, } case CFA_RULE_LOCATION_OFFSET: { - TRACE_CFI(" -> CFA_RULE_LOCATION_OFFSET: %lld\n", - rule->Offset()); + TRACE_CFI(" -> CFA_RULE_LOCATION_OFFSET: %" + B_PRId64 "\n", rule->Offset()); BVariant value; if (inputInterface->ReadValueFromMemory( @@ -1642,8 +1647,8 @@ DwarfFile::_ParseCIE(ElfSection* debugFrameSection, bool usingEHFrameSection, uint8 version = dataReader.Read(0); if (version != 1) { - TRACE_CFI(" cie: length: %llu, offset: %#llx, version: %u " - "-- unsupported\n", length, cieOffset, version); + TRACE_CFI(" cie: length: %" B_PRIu64 ", offset: %#" B_PRIx64 ", " + "version: %u -- unsupported\n", length, (uint64)cieOffset, version); return B_UNSUPPORTED; } @@ -1660,16 +1665,18 @@ DwarfFile::_ParseCIE(ElfSection* debugFrameSection, bool usingEHFrameSection, context.SetDataAlignment(dataReader.ReadSignedLEB128(0)); context.SetReturnAddressRegister(dataReader.ReadUnsignedLEB128(0)); - TRACE_CFI(" cie: length: %llu, offset: %#llx, version: %u, augmentation: " - "\"%s\", aligment: code: %lu, data: %ld, return address reg: %lu\n", - length, cieOffset, version, cieAugmentation.String(), + TRACE_CFI(" cie: length: %" B_PRIu64 ", offset: %#" B_PRIx64 ", version: " + "%u, augmentation: \"%s\", aligment: code: %" B_PRIu32 ", data: %" + B_PRId32 ", return address reg: %" B_PRIu32 "\n", length, + (uint64)cieOffset, version, cieAugmentation.String(), context.CodeAlignment(), context.DataAlignment(), context.ReturnAddressRegister()); status_t error = cieAugmentation.Read(dataReader); if (error != B_OK) { - TRACE_CFI(" cie: length: %llu, version: %u, augmentation: \"%s\" " - "-- unsupported\n", length, version, cieAugmentation.String()); + TRACE_CFI(" cie: length: %" B_PRIu64 ", version: %u, augmentation: " + "\"%s\" -- unsupported\n", length, version, + cieAugmentation.String()); return error; } @@ -1690,7 +1697,7 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, CfaContext& context, DataReader& dataReader) { while (dataReader.BytesRemaining() > 0) { - TRACE_CFI(" [%2lld]", dataReader.BytesRemaining()); + TRACE_CFI(" [%2" B_PRId64 "]", dataReader.BytesRemaining()); uint8 opcode = dataReader.Read(0); if ((opcode >> 6) != 0) { @@ -1699,7 +1706,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, switch (opcode >> 6) { case DW_CFA_advance_loc: { - TRACE_CFI(" DW_CFA_advance_loc: %#lx\n", operand); + TRACE_CFI(" DW_CFA_advance_loc: %#" B_PRIx32 "\n", + operand); target_addr_t location = context.Location() + operand * context.CodeAlignment(); @@ -1711,8 +1719,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, case DW_CFA_offset: { uint64 offset = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_offset: reg: %lu, offset: %llu\n", - operand, offset); + TRACE_CFI(" DW_CFA_offset: reg: %" B_PRIu32 ", offset: " + "%" B_PRIu64 "\n", operand, offset); if (CfaRule* rule = context.RegisterRule(operand)) { rule->SetToLocationOffset( @@ -1722,7 +1730,7 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, } case DW_CFA_restore: { - TRACE_CFI(" DW_CFA_restore: %#lx\n", operand); + TRACE_CFI(" DW_CFA_restore: %#" B_PRIx32 "\n", operand); context.RestoreRegisterRule(operand); break; @@ -1739,7 +1747,7 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { target_addr_t location = dataReader.ReadAddress(0); - TRACE_CFI(" DW_CFA_set_loc: %#llx\n", location); + TRACE_CFI(" DW_CFA_set_loc: %#" B_PRIx64 "\n", location); if (location < context.Location()) return B_BAD_VALUE; @@ -1752,7 +1760,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 delta = dataReader.Read(0); - TRACE_CFI(" DW_CFA_advance_loc1: %#lx\n", delta); + TRACE_CFI(" DW_CFA_advance_loc1: %#" B_PRIx32 "\n", + delta); target_addr_t location = context.Location() + delta * context.CodeAlignment(); @@ -1765,7 +1774,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 delta = dataReader.Read(0); - TRACE_CFI(" DW_CFA_advance_loc2: %#lx\n", delta); + TRACE_CFI(" DW_CFA_advance_loc2: %#" B_PRIx32 "\n", + delta); target_addr_t location = context.Location() + delta * context.CodeAlignment(); @@ -1778,7 +1788,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 delta = dataReader.Read(0); - TRACE_CFI(" DW_CFA_advance_loc4: %#lx\n", delta); + TRACE_CFI(" DW_CFA_advance_loc4: %#" B_PRIx32 "\n", + delta); target_addr_t location = context.Location() + delta * context.CodeAlignment(); @@ -1792,8 +1803,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); uint64 offset = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_offset_extended: reg: %lu, " - "offset: %llu\n", reg, offset); + TRACE_CFI(" DW_CFA_offset_extended: reg: %" B_PRIu32 ", " + "offset: %" B_PRIu64 "\n", reg, offset); if (CfaRule* rule = context.RegisterRule(reg)) { rule->SetToLocationOffset( @@ -1805,7 +1816,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 reg = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_restore_extended: %#lx\n", reg); + TRACE_CFI(" DW_CFA_restore_extended: %#" B_PRIx32 "\n", + reg); context.RestoreRegisterRule(reg); break; @@ -1814,7 +1826,7 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 reg = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_undefined: %lu\n", reg); + TRACE_CFI(" DW_CFA_undefined: %" B_PRIu32 "\n", reg); if (CfaRule* rule = context.RegisterRule(reg)) rule->SetToUndefined(); @@ -1824,7 +1836,7 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 reg = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_same_value: %lu\n", reg); + TRACE_CFI(" DW_CFA_same_value: %" B_PRIu32 "\n", reg); if (CfaRule* rule = context.RegisterRule(reg)) rule->SetToSameValue(); @@ -1835,7 +1847,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg1 = dataReader.ReadUnsignedLEB128(0); uint32 reg2 = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_register: reg1: %lu, reg2: %lu\n", reg1, reg2); + TRACE_CFI(" DW_CFA_register: reg1: %" B_PRIu32 ", reg2: " + "%" B_PRIu32 "\n", reg1, reg2); if (CfaRule* rule = context.RegisterRule(reg1)) rule->SetToValueOffset(reg2); @@ -1864,8 +1877,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); uint64 offset = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_def_cfa: reg: %lu, offset: %llu\n", - reg, offset); + TRACE_CFI(" DW_CFA_def_cfa: reg: %" B_PRIu32 ", offset: " + "%" B_PRIu64 "\n", reg, offset); context.GetCfaCfaRule()->SetToRegisterOffset(reg, offset); break; @@ -1874,7 +1887,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint32 reg = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_def_cfa_register: %lu\n", reg); + TRACE_CFI(" DW_CFA_def_cfa_register: %" B_PRIu32 "\n", + reg); if (context.GetCfaCfaRule()->Type() != CFA_CFA_RULE_REGISTER_OFFSET) { @@ -1887,7 +1901,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint64 offset = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_def_cfa_offset: %llu\n", offset); + TRACE_CFI(" DW_CFA_def_cfa_offset: %" B_PRIu64 "\n", + offset); if (context.GetCfaCfaRule()->Type() != CFA_CFA_RULE_REGISTER_OFFSET) { @@ -1902,8 +1917,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint8* block = (uint8*)dataReader.Data(); dataReader.Skip(blockLength); - TRACE_CFI(" DW_CFA_def_cfa_expression: %p, %llu\n", - block, blockLength); + TRACE_CFI(" DW_CFA_def_cfa_expression: %p, %" B_PRIu64 + "\n", block, blockLength); context.GetCfaCfaRule()->SetToExpression(block, blockLength); @@ -1916,8 +1931,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint8* block = (uint8*)dataReader.Data(); dataReader.Skip(blockLength); - TRACE_CFI(" DW_CFA_expression: reg: %lu, block: %p, " - "%llu\n", reg, block, blockLength); + TRACE_CFI(" DW_CFA_expression: reg: %" B_PRIu32 ", " + "block: %p, %" B_PRIu64 "\n", reg, block, blockLength); if (CfaRule* rule = context.RegisterRule(reg)) rule->SetToLocationExpression(block, blockLength); @@ -1928,8 +1943,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); int64 offset = dataReader.ReadSignedLEB128(0); - TRACE_CFI(" DW_CFA_offset_extended: reg: %lu, " - "offset: %lld\n", reg, offset); + TRACE_CFI(" DW_CFA_offset_extended: reg: %" B_PRIu32 ", " + "offset: %" B_PRId64 "\n", reg, offset); if (CfaRule* rule = context.RegisterRule(reg)) { rule->SetToLocationOffset( @@ -1942,8 +1957,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); int64 offset = dataReader.ReadSignedLEB128(0); - TRACE_CFI(" DW_CFA_def_cfa_sf: reg: %lu, offset: %lld\n", - reg, offset); + TRACE_CFI(" DW_CFA_def_cfa_sf: reg: %" B_PRIu32 ", " + "offset: %" B_PRId64 "\n", reg, offset); context.GetCfaCfaRule()->SetToRegisterOffset(reg, offset * (int32)context.DataAlignment()); @@ -1953,7 +1968,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { int64 offset = dataReader.ReadSignedLEB128(0); - TRACE_CFI(" DW_CFA_def_cfa_offset: %lld\n", offset); + TRACE_CFI(" DW_CFA_def_cfa_offset: %" B_PRId64 "\n", + offset); if (context.GetCfaCfaRule()->Type() != CFA_CFA_RULE_REGISTER_OFFSET) { @@ -1968,8 +1984,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); uint64 offset = dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_val_offset: reg: %lu, offset: %llu\n", - reg, offset); + TRACE_CFI(" DW_CFA_val_offset: reg: %" B_PRIu32 ", " + "offset: %" B_PRIu64 "\n", reg, offset); if (CfaRule* rule = context.RegisterRule(reg)) { rule->SetToValueOffset( @@ -1982,8 +1998,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint32 reg = dataReader.ReadUnsignedLEB128(0); int64 offset = dataReader.ReadSignedLEB128(0); - TRACE_CFI(" DW_CFA_val_offset_sf: reg: %lu, " - "offset: %lld\n", reg, offset); + TRACE_CFI(" DW_CFA_val_offset_sf: reg: %" B_PRIu32 ", " + "offset: %" B_PRId64 "\n", reg, offset); if (CfaRule* rule = context.RegisterRule(reg)) { rule->SetToValueOffset( @@ -1998,8 +2014,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, uint8* block = (uint8*)dataReader.Data(); dataReader.Skip(blockLength); - TRACE_CFI(" DW_CFA_val_expression: reg: %lu, block: %p, " - "%llu\n", reg, block, blockLength); + TRACE_CFI(" DW_CFA_val_expression: reg: %" B_PRIu32 ", " + "block: %p, %" B_PRIu64 "\n", reg, block, blockLength); if (CfaRule* rule = context.RegisterRule(reg)) rule->SetToValueExpression(block, blockLength); @@ -2011,7 +2027,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, { uint64 delta = dataReader.Read(0); - TRACE_CFI(" DW_CFA_MIPS_advance_loc8: %#llx\n", delta); + TRACE_CFI(" DW_CFA_MIPS_advance_loc8: %#" B_PRIx64 "\n", + delta); target_addr_t location = context.Location() + delta * context.CodeAlignment(); @@ -2034,7 +2051,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, TRACE_CFI_ONLY(uint64 size =) dataReader.ReadUnsignedLEB128(0); - TRACE_CFI(" DW_CFA_GNU_args_size: %llu\n", size); + TRACE_CFI(" DW_CFA_GNU_args_size: %" B_PRIu64 "\n", + size); // TODO: Implement! break; } @@ -2045,7 +2063,8 @@ DwarfFile::_ParseFrameInfoInstructions(CompilationUnit* unit, int64 offset = dataReader.ReadSignedLEB128(0); TRACE_CFI(" DW_CFA_GNU_negative_offset_extended: " - "reg: %lu, offset: %lld\n", reg, offset); + "reg: %" B_PRIu32 ", offset: %" B_PRId64 "\n", reg, + offset); if (CfaRule* rule = context.RegisterRule(reg)) { rule->SetToLocationOffset( @@ -2125,7 +2144,8 @@ DwarfFile::_ParsePublicTypesInfo(DataReader& dataReader, bool dwarf64) return B_BAD_DATA; TRACE_PUBTYPES("DwarfFile::_ParsePublicTypesInfo(): compilation unit debug " - "info: (%lld, %lld)\n", debugInfoOffset, debugInfoSize); + "info: (%" B_PRIdOFF ", %" B_PRIdOFF ")\n", debugInfoOffset, + debugInfoSize); while (dataReader.BytesRemaining() > 0) { off_t entryOffset = dwarf64 @@ -2136,7 +2156,7 @@ DwarfFile::_ParsePublicTypesInfo(DataReader& dataReader, bool dwarf64) TRACE_PUBTYPES_ONLY(const char* name =) dataReader.ReadString(); - TRACE_PUBTYPES(" \"%s\" -> %lld\n", name, entryOffset); + TRACE_PUBTYPES(" \"%s\" -> %" B_PRIdOFF "\n", name, entryOffset); } return B_OK; diff --git a/src/apps/debugger/model/Team.cpp b/src/apps/debugger/model/Team.cpp index 6e2fad0771..d4868ee11f 100644 --- a/src/apps/debugger/model/Team.cpp +++ b/src/apps/debugger/model/Team.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -367,7 +367,7 @@ status_t Team::GetStatementAtAddress(target_addr_t address, FunctionInstance*& _function, Statement*& _statement) { - TRACE_CODE("Team::GetStatementAtAddress(%#llx)\n", address); + TRACE_CODE("Team::GetStatementAtAddress(%#" B_PRIx64 ")\n", address); // get the image at the address Image* image = ImageByAddress(address); @@ -422,8 +422,8 @@ status_t Team::GetStatementAtSourceLocation(SourceCode* sourceCode, const SourceLocation& location, Statement*& _statement) { - TRACE_CODE("Team::GetStatementAtSourceLocation(%p, (%ld, %ld))\n", - sourceCode, location.Line(), location.Column()); + TRACE_CODE("Team::GetStatementAtSourceLocation(%p, (%" B_PRId32 ", %" + B_PRId32 "))\n", sourceCode, location.Line(), location.Column()); // If we're lucky the source code can provide us with a statement. if (DisassembledCode* code = dynamic_cast(sourceCode)) { diff --git a/src/apps/debugger/model/TypeComponentPath.cpp b/src/apps/debugger/model/TypeComponentPath.cpp index 286e6031ec..0377e29762 100644 --- a/src/apps/debugger/model/TypeComponentPath.cpp +++ b/src/apps/debugger/model/TypeComponentPath.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -82,13 +82,13 @@ TypeComponent::Dump() const printf("undefined"); break; case TYPE_COMPONENT_BASE_TYPE: - printf("base %llu \"%s\"", index, name.String()); + printf("base %" B_PRIu64 " \"%s\"", index, name.String()); break; case TYPE_COMPONENT_DATA_MEMBER: - printf("member %llu \"%s\"", index, name.String()); + printf("member %" B_PRIu64 " \"%s\"", index, name.String()); break; case TYPE_COMPONENT_ARRAY_ELEMENT: - printf("element %llu \"%s\"", index, name.String()); + printf("element %" B_PRIu64 " \"%s\"", index, name.String()); break; } } diff --git a/src/apps/debugger/model/TypeComponentPath.h b/src/apps/debugger/model/TypeComponentPath.h index 5df4649052..0ded421df1 100644 --- a/src/apps/debugger/model/TypeComponentPath.h +++ b/src/apps/debugger/model/TypeComponentPath.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef TYPE_COMPONENT_PATH_H diff --git a/src/apps/debugger/types/ValueLocation.cpp b/src/apps/debugger/types/ValueLocation.cpp index 453de97a28..887b63bf5e 100644 --- a/src/apps/debugger/types/ValueLocation.cpp +++ b/src/apps/debugger/types/ValueLocation.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -240,7 +240,7 @@ void ValueLocation::Dump() const { int32 count = fPieces.Size(); - printf("ValueLocation: %s endian, %ld pieces:\n", + printf("ValueLocation: %s endian, %" B_PRId32 " pieces:\n", fBigEndian ? "big" : "little", count); for (int32 i = 0; i < count; i++) { @@ -253,14 +253,14 @@ ValueLocation::Dump() const printf(" unknown"); break; case VALUE_PIECE_LOCATION_MEMORY: - printf(" address %#llx", piece.address); + printf(" address %#" B_PRIx64, piece.address); break; case VALUE_PIECE_LOCATION_REGISTER: - printf(" register %lu", piece.reg); + printf(" register %" B_PRIu32, piece.reg); break; } - printf(" size: %llu (%llu bits), offset: %llu bits\n", piece.size, - piece.bitSize, piece.bitOffset); + printf(" size: %" B_PRIu64 " (%" B_PRIu64 " bits), offset: %" B_PRIu64 + " bits\n", piece.size, piece.bitSize, piece.bitOffset); } } diff --git a/src/apps/debugger/types/ValueLocation.h b/src/apps/debugger/types/ValueLocation.h index 5b598d9cdc..1ff9f6116e 100644 --- a/src/apps/debugger/types/ValueLocation.h +++ b/src/apps/debugger/types/ValueLocation.h @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef VALUE_LOCATION_H diff --git a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp index 5164c14447..9717a18dcf 100644 --- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp +++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp @@ -161,7 +161,7 @@ MemoryView::Draw(BRect rect) const char* blockAddress = currentAddress + (j * blockByteSize); _GetNextHexBlock(buffer, - std::min(hexBlockSize, sizeof(buffer)), + std::min((size_t)hexBlockSize, sizeof(buffer)), blockAddress); DrawString(buffer, drawPoint); if (targetAddress >= blockAddress && targetAddress < diff --git a/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp b/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp index a2349e0089..b6e0c0dd8b 100644 --- a/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -96,12 +96,14 @@ private: break; case B_INT32_TYPE: case B_UINT32_TYPE: - snprintf(buffer, bufferSize, "0x%08lx", value.ToUInt32()); + snprintf(buffer, bufferSize, "0x%08" B_PRIx32, + value.ToUInt32()); break; case B_INT64_TYPE: case B_UINT64_TYPE: default: - snprintf(buffer, bufferSize, "0x%016llx", value.ToUInt64()); + snprintf(buffer, bufferSize, "0x%016" B_PRIx64, + value.ToUInt64()); break; } diff --git a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp index 831c0895f9..24a515044c 100644 --- a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2009, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -384,7 +384,7 @@ SourceView::BaseView::GetLineRange(BRect rect, int32& minLine, int32 lineHeight = (int32)fFontInfo->lineHeight; minLine = (int32)rect.top / lineHeight; maxLine = ((int32)ceilf(rect.bottom) + lineHeight - 1) / lineHeight; - minLine = std::max(minLine, 0L); + minLine = std::max(minLine, (int32)0); maxLine = std::min(maxLine, fSourceCode->CountLines() - 1); } @@ -1772,7 +1772,7 @@ SourceView::UserBreakpointChanged(UserBreakpoint* breakpoint) bool SourceView::ScrollToAddress(target_addr_t address) { - TRACE_GUI("SourceView::ScrollToAddress(%#llx)\n", address); + TRACE_GUI("SourceView::ScrollToAddress(%#" B_PRIx64 ")\n", address); if (fSourceCode == NULL) return false; @@ -1794,7 +1794,7 @@ SourceView::ScrollToAddress(target_addr_t address) bool SourceView::ScrollToLine(uint32 line) { - TRACE_GUI("SourceView::ScrollToLine(%lu)\n", line); + TRACE_GUI("SourceView::ScrollToLine(%" B_PRIu32 ")\n", line); if (fSourceCode == NULL || line >= (uint32)fSourceCode->CountLines()) return false; @@ -1804,7 +1804,7 @@ SourceView::ScrollToLine(uint32 line) BRect visible = Bounds(); - TRACE_GUI("SourceView::ScrollToLine(%ld)\n", line); + TRACE_GUI("SourceView::ScrollToLine(%" B_PRId32 ")\n", line); TRACE_GUI(" visible: (%f, %f) - (%f, %f), line: %f - %f\n", visible.left, visible.top, visible.right, visible.bottom, top, bottom); diff --git a/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp b/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp index 70cb01afe2..698c9a2f8a 100644 --- a/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -95,7 +95,7 @@ public: } char offset[32]; - snprintf(offset, sizeof(offset), " + %#llx", + snprintf(offset, sizeof(offset), " + %#" B_PRIx64, frame->InstructionPointer() - baseAddress); name << offset; diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp index 9c0338ce37..4da2045c39 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2010-2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -1191,7 +1191,8 @@ TeamWindow::_HandleStackTraceChanged(thread_id threadID) void TeamWindow::_HandleImageDebugInfoChanged(image_id imageID) { - TRACE_GUI("TeamWindow::_HandleImageDebugInfoChanged(%ld)\n", imageID); + TRACE_GUI("TeamWindow::_HandleImageDebugInfoChanged(%" B_PRId32 ")\n", + imageID); // We're only interested in the currently selected thread if (fActiveImage == NULL || imageID != fActiveImage->ID()) diff --git a/src/apps/debugger/user_interface/gui/util/TargetAddressTableColumn.cpp b/src/apps/debugger/user_interface/gui/util/TargetAddressTableColumn.cpp index 8c5f6adca7..aa11674863 100644 --- a/src/apps/debugger/user_interface/gui/util/TargetAddressTableColumn.cpp +++ b/src/apps/debugger/user_interface/gui/util/TargetAddressTableColumn.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -23,7 +23,7 @@ BField* TargetAddressTableColumn::PrepareField(const BVariant& value) const { char buffer[64]; - snprintf(buffer, sizeof(buffer), "%#llx", value.ToUInt64()); + snprintf(buffer, sizeof(buffer), "%#" B_PRIx64, value.ToUInt64()); return StringTableColumn::PrepareField( BVariant(buffer, B_VARIANT_DONT_COPY_DATA)); diff --git a/src/apps/debugger/util/IntegerFormatter.cpp b/src/apps/debugger/util/IntegerFormatter.cpp index 8ae05d1217..c6c70df5cd 100644 --- a/src/apps/debugger/util/IntegerFormatter.cpp +++ b/src/apps/debugger/util/IntegerFormatter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -130,11 +130,12 @@ IntegerFormatter::FormatValue(const BVariant& value, integer_format format, snprintf(buffer, bufferSize, "%#x", (uint16)value.ToUInt64()); break; case INTEGER_FORMAT_HEX_32: - snprintf(buffer, bufferSize, "%#lx", (uint32)value.ToUInt64()); + snprintf(buffer, bufferSize, "%#" B_PRIx32, + (uint32)value.ToUInt64()); break; case INTEGER_FORMAT_HEX_64: default: - snprintf(buffer, bufferSize, "%#llx", value.ToUInt64()); + snprintf(buffer, bufferSize, "%#" B_PRIx64, value.ToUInt64()); break; } diff --git a/src/apps/debugger/value/ValueLoader.cpp b/src/apps/debugger/value/ValueLoader.cpp index 5c6232de65..81b7bfb22e 100644 --- a/src/apps/debugger/value/ValueLoader.cpp +++ b/src/apps/debugger/value/ValueLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -77,7 +77,7 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType, } if (piece.size > kMaxPieceSize) { - TRACE_LOCALS(" -> overly long piece size (%llu bytes)\n", + TRACE_LOCALS(" -> overly long piece size (%" B_PRIu64 " bytes)\n", piece.size); return B_UNSUPPORTED; } @@ -85,7 +85,7 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType, totalBitSize += piece.bitSize; } - TRACE_LOCALS(" -> totalBitSize: %llu\n", totalBitSize); + TRACE_LOCALS(" -> totalBitSize: %" B_PRIu64 "\n", totalBitSize); if (totalBitSize == 0) { TRACE_LOCALS(" -> no size\n"); @@ -99,8 +99,8 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType, uint64 valueBitSize = BVariant::SizeOfType(valueType) * 8; if (!shortValueIsFine && totalBitSize < valueBitSize) { - TRACE_LOCALS(" -> too short for value type (%llu vs. %llu bits)\n", - totalBitSize, valueBitSize); + TRACE_LOCALS(" -> too short for value type (%" B_PRIu64 " vs. %" + B_PRIu64 " bits)\n", totalBitSize, valueBitSize); return B_BAD_VALUE; } @@ -130,8 +130,8 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType, { target_addr_t address = piece.address; - TRACE_LOCALS(" piece %ld: memory address: %#llx, bits: %lu\n", - i, address, bitSize); + TRACE_LOCALS(" piece %" B_PRId32 ": memory address: %#" + B_PRIx64 ", bits: %" B_PRIu32 "\n", i, address, bitSize); uint8 pieceBuffer[kMaxPieceSize]; ssize_t bytesRead = fTeamMemory->ReadMemory(address, @@ -161,8 +161,8 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType, } case VALUE_PIECE_LOCATION_REGISTER: { - TRACE_LOCALS(" piece %ld: register: %lu, bits: %lu\n", i, - piece.reg, bitSize); + TRACE_LOCALS(" piece %" B_PRId32 ": register: %" B_PRIu32 + ", bits: %" B_PRIu32 "\n", i, piece.reg, bitSize); if (fCpuState == NULL) { WARNING("ValueLoader::LoadValue(): register piece, but no " diff --git a/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp b/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp index b805a35332..d53f87093a 100644 --- a/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp +++ b/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp @@ -255,8 +255,8 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader, return B_NO_MEMORY; error = valueLoader->LoadRawValue(headerAddress, sizeof( BMessage::message_header), fHeader); - TRACE_LOCALS("BMessage: Header Address: 0x%" B_PRIx64 ", result: %ld\n", - headerAddress.ToUInt64(), error); + TRACE_LOCALS("BMessage: Header Address: 0x%" B_PRIx64 ", result: %s\n", + headerAddress.ToUInt64(), strerror(error)); if (error != B_OK) return error; @@ -269,15 +269,16 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader, else fHeader->what = what.ToUInt32(); - TRACE_LOCALS("BMessage: what: 0x%" B_PRIx32 ", result: %ld\n", - what.ToUInt32(), error); + TRACE_LOCALS("BMessage: what: 0x%" B_PRIx32 ", result: %s\n", + what.ToUInt32(), strerror(error)); size_t fieldsSize = fHeader->field_count * sizeof( BMessage::field_header); if (fIsFlatMessage) fDataLocation.SetTo(fieldAddress.ToUInt64() + fieldsSize); - size_t totalSize = sizeof(BMessage::message_header) + fieldsSize + fHeader->data_size; + size_t totalSize = sizeof(BMessage::message_header) + fieldsSize + + fHeader->data_size; uint8* messageBuffer = new(std::nothrow) uint8[totalSize]; if (messageBuffer == NULL) return B_NO_MEMORY; @@ -296,7 +297,7 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader, error = valueLoader->LoadRawValue(fieldAddress, fieldsSize, fFields); TRACE_LOCALS("BMessage: Field Header Address: 0x%" B_PRIx64 - ", result: %ld\n", headerAddress.ToUInt64(), error); + ", result: %s\n", headerAddress.ToUInt64(), strerror(error)); if (error != B_OK) return error; @@ -307,7 +308,7 @@ BMessageValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader, error = valueLoader->LoadRawValue(fDataLocation, fHeader->data_size, fData); TRACE_LOCALS("BMessage: Data Address: 0x%" B_PRIx64 - ", result: %ld\n", fDataLocation.ToUInt64(), error); + ", result: %s\n", fDataLocation.ToUInt64(), strerror(error)); if (error != B_OK) return error; memcpy(tempBuffer, fFields, fieldsSize); @@ -710,7 +711,7 @@ BMessageValueNode::BMessageFieldNodeChild::BMessageFieldNodeChild( fType->AcquireReference(); if (fFieldIndex >= 0) - fPresentationName.SetToFormat("[%ld]", fFieldIndex); + fPresentationName.SetToFormat("[%" B_PRId32 "]", fFieldIndex); } diff --git a/src/apps/debugger/value/value_nodes/CompoundValueNode.cpp b/src/apps/debugger/value/value_nodes/CompoundValueNode.cpp index ee375de417..6e208e754a 100644 --- a/src/apps/debugger/value/value_nodes/CompoundValueNode.cpp +++ b/src/apps/debugger/value/value_nodes/CompoundValueNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -198,7 +198,7 @@ CompoundValueNode::CreateChildren() // base types for (int32 i = 0; BaseType* baseType = fType->BaseTypeAt(i); i++) { - TRACE_LOCALS(" base %ld\n", i); + TRACE_LOCALS(" base %" B_PRId32 "\n", i); BaseTypeChild* child = new(std::nothrow) BaseTypeChild(this, baseType); if (child == NULL || !fChildren.AddItem(child)) { @@ -211,7 +211,7 @@ CompoundValueNode::CreateChildren() // members for (int32 i = 0; DataMember* member = fType->DataMemberAt(i); i++) { - TRACE_LOCALS(" member %ld: \"%s\"\n", i, member->Name()); + TRACE_LOCALS(" member %" B_PRId32 ": \"%s\"\n", i, member->Name()); MemberChild* child = new(std::nothrow) MemberChild(this, member); if (child == NULL || !fChildren.AddItem(child)) { diff --git a/src/apps/debugger/value/values/AddressValue.cpp b/src/apps/debugger/value/values/AddressValue.cpp index 0e90bbc4a7..5495b270f1 100644 --- a/src/apps/debugger/value/values/AddressValue.cpp +++ b/src/apps/debugger/value/values/AddressValue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -28,7 +28,7 @@ AddressValue::ToString(BString& _string) const return false; char buffer[32]; - snprintf(buffer, sizeof(buffer), "%#llx", fValue.ToUInt64()); + snprintf(buffer, sizeof(buffer), "%#" B_PRIx64, fValue.ToUInt64()); BString string(buffer); if (string.Length() == 0) diff --git a/src/bin/debug/debug_utils.cpp b/src/bin/debug/debug_utils.cpp index 8ce6ec0cfa..fa9d431b43 100644 --- a/src/bin/debug/debug_utils.cpp +++ b/src/bin/debug/debug_utils.cpp @@ -176,7 +176,7 @@ continue_thread(port_id nubPort, thread_id thread) return; if (error != B_INTERRUPTED) { - fprintf(stderr, "%s: Failed to run thread %ld: %s\n", + fprintf(stderr, "%s: Failed to run thread %" B_PRId32 ": %s\n", kCommandName, thread, strerror(error)); exit(1); } From 57c5b09e1a3d0f36f94cbab11c96842d782b8eaf Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Sun, 5 Aug 2012 17:55:37 -0400 Subject: [PATCH 5/8] Use be_control_look != NULL everywhere in the Interface Kit. Should not be a functional change. It is not in the Haiku Coding Guidelines but I feel like 'if (object != NULL)' is generally preferred to 'if (object)', plus in this case of be_control_look that is the more common style. --- src/kits/interface/BMCPrivate.cpp | 2 +- src/kits/interface/CheckBox.cpp | 2 +- src/kits/interface/RadioButton.cpp | 2 +- src/kits/interface/ScrollBar.cpp | 2 +- src/kits/interface/Slider.cpp | 2 +- src/kits/interface/StatusBar.cpp | 2 +- src/kits/interface/TextInput.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kits/interface/BMCPrivate.cpp b/src/kits/interface/BMCPrivate.cpp index ed270412ed..56c4efaf57 100644 --- a/src/kits/interface/BMCPrivate.cpp +++ b/src/kits/interface/BMCPrivate.cpp @@ -407,7 +407,7 @@ _BMCMenuBar_::_Init(bool setMaxContentWidth) bottom--; #endif - if (be_control_look) + if (be_control_look != NULL) left = right = be_control_look->DefaultLabelSpacing(); SetItemMargins(left, top, right + fShowPopUpMarker ? 10 : 0, bottom); diff --git a/src/kits/interface/CheckBox.cpp b/src/kits/interface/CheckBox.cpp index 2501327a47..cde4220fbd 100644 --- a/src/kits/interface/CheckBox.cpp +++ b/src/kits/interface/CheckBox.cpp @@ -96,7 +96,7 @@ BCheckBox::Archive(BMessage *archive, bool deep) const void BCheckBox::Draw(BRect updateRect) { - if (be_control_look) { + if (be_control_look != NULL) { rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); uint32 flags = be_control_look->Flags(this); diff --git a/src/kits/interface/RadioButton.cpp b/src/kits/interface/RadioButton.cpp index 191d28e6f5..e3b3cfbee4 100644 --- a/src/kits/interface/RadioButton.cpp +++ b/src/kits/interface/RadioButton.cpp @@ -89,7 +89,7 @@ BRadioButton::Draw(BRect updateRect) font_height fontHeight; GetFontHeight(&fontHeight); - if (be_control_look) { + if (be_control_look != NULL) { rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); uint32 flags = be_control_look->Flags(this); diff --git a/src/kits/interface/ScrollBar.cpp b/src/kits/interface/ScrollBar.cpp index a12fdd3b9d..971c59676e 100644 --- a/src/kits/interface/ScrollBar.cpp +++ b/src/kits/interface/ScrollBar.cpp @@ -1081,7 +1081,7 @@ BScrollBar::Draw(BRect updateRect) } // fill the clickable surface of the thumb - if (be_control_look) { + if (be_control_look != NULL) { be_control_look->DrawButtonBackground(this, rect, updateRect, normal, 0, BControlLook::B_ALL_BORDERS, fOrientation); } else { diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 063c52bee2..a91b973261 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -1000,7 +1000,7 @@ BSlider::DrawHashMarks() BRect frame = HashMarksFrame(); BView* view = OffscreenView(); - if (be_control_look) { + if (be_control_look != NULL) { rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); uint32 flags = be_control_look->Flags(this); be_control_look->DrawSliderHashMarks(view, frame, frame, base, diff --git a/src/kits/interface/StatusBar.cpp b/src/kits/interface/StatusBar.cpp index b17062f908..d346f11608 100644 --- a/src/kits/interface/StatusBar.cpp +++ b/src/kits/interface/StatusBar.cpp @@ -574,7 +574,7 @@ BStatusBar::SetTo(float value, const char* text, const char* trailingText) } // TODO: Ask the BControlLook in the first place about dirty rect. - if (be_control_look) + if (be_control_look != NULL) update.InsetBy(-1, -1); Invalidate(update); diff --git a/src/kits/interface/TextInput.cpp b/src/kits/interface/TextInput.cpp index c1d8ce1857..9b1b570e81 100644 --- a/src/kits/interface/TextInput.cpp +++ b/src/kits/interface/TextInput.cpp @@ -174,7 +174,7 @@ _BTextInput_::AlignTextRect() float vInset = max_c(1, floorf((textRect.Height() - LineHeight(0)) / 2.0)); float hInset = 2; - if (be_control_look) + if (be_control_look != NULL) hInset = be_control_look->DefaultLabelSpacing(); textRect.InsetBy(hInset, vInset); From 7753c3829cea3c485592db8940f75c2b0beacd40 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Mon, 6 Aug 2012 06:27:35 +0200 Subject: [PATCH 6/8] Update translations from Pootle --- .../inbound_filters/notifier/fr.catkeys | 2 +- .../outbound_filters/fortune/fr.catkeys | 2 +- .../add-ons/screen_savers/glife/fr.catkeys | 8 ++ .../add-ons/translators/jpeg2000/fr.catkeys | 2 +- .../add-ons/translators/sgi/fr.catkeys | 2 +- .../add-ons/translators/stxt/fr.catkeys | 2 +- .../add-ons/translators/tiff/fr.catkeys | 2 +- .../translators/wonderbrush/fr.catkeys | 2 +- data/catalogs/apps/aboutsystem/fr.catkeys | 4 +- data/catalogs/apps/aboutsystem/ru.catkeys | 6 +- data/catalogs/apps/activitymonitor/ru.catkeys | 4 +- data/catalogs/apps/bootmanager/ru.catkeys | 2 +- data/catalogs/apps/charactermap/fr.catkeys | 3 +- data/catalogs/apps/codycam/fr.catkeys | 12 +- data/catalogs/apps/deskbar/fr.catkeys | 12 +- data/catalogs/apps/deskcalc/de.catkeys | 4 +- data/catalogs/apps/deskcalc/fr.catkeys | 4 +- data/catalogs/apps/devices/fr.catkeys | 12 +- data/catalogs/apps/diskusage/fr.catkeys | 3 +- data/catalogs/apps/diskusage/ru.catkeys | 2 +- data/catalogs/apps/drivesetup/be.catkeys | 8 +- data/catalogs/apps/drivesetup/de.catkeys | 8 +- data/catalogs/apps/drivesetup/el.catkeys | 7 +- data/catalogs/apps/drivesetup/fi.catkeys | 8 +- data/catalogs/apps/drivesetup/fr.catkeys | 12 +- data/catalogs/apps/drivesetup/ja.catkeys | 8 +- data/catalogs/apps/drivesetup/lt.catkeys | 8 +- data/catalogs/apps/drivesetup/nb.catkeys | 8 +- data/catalogs/apps/drivesetup/nl.catkeys | 8 +- data/catalogs/apps/drivesetup/pl.catkeys | 8 +- data/catalogs/apps/drivesetup/ro.catkeys | 8 +- data/catalogs/apps/drivesetup/ru.catkeys | 14 +- data/catalogs/apps/drivesetup/sk.catkeys | 8 +- data/catalogs/apps/drivesetup/uk.catkeys | 6 +- data/catalogs/apps/drivesetup/zh-Hans.catkeys | 8 +- data/catalogs/apps/expander/fr.catkeys | 8 +- data/catalogs/apps/fontdemo/fr.catkeys | 20 +++ data/catalogs/apps/glteapot/fr.catkeys | 9 +- data/catalogs/apps/icon-o-matic/fr.catkeys | 2 +- .../apps/installedpackages/fr.catkeys | 2 +- data/catalogs/apps/installer/fr.catkeys | 15 ++- data/catalogs/apps/installer/ru.catkeys | 2 +- data/catalogs/apps/launchbox/fr.catkeys | 4 +- data/catalogs/apps/magnify/fr.catkeys | 13 +- data/catalogs/apps/mediaplayer/fr.catkeys | 45 ++++++- data/catalogs/apps/midiplayer/fr.catkeys | 2 +- data/catalogs/apps/networkstatus/fr.catkeys | 3 +- .../catalogs/apps/packageinstaller/fr.catkeys | 8 +- .../catalogs/apps/packageinstaller/ru.catkeys | 7 +- data/catalogs/apps/people/fr.catkeys | 4 +- data/catalogs/apps/poorman/fr.catkeys | 12 +- data/catalogs/apps/powerstatus/fr.catkeys | 21 +-- .../apps/screenshot/Screenshot/fr.catkeys | 5 +- data/catalogs/apps/soundrecorder/fr.catkeys | 31 +++-- data/catalogs/apps/stylededit/fr.catkeys | 2 +- data/catalogs/apps/terminal/fr.catkeys | 8 +- data/catalogs/apps/tv/fr.catkeys | 4 +- data/catalogs/apps/webpositive/de.catkeys | 3 +- data/catalogs/apps/webpositive/fr.catkeys | 123 ++++++++++++++++++ data/catalogs/bin/desklink/fr.catkeys | 2 +- data/catalogs/bin/dstcheck/fr.catkeys | 2 +- data/catalogs/bin/filepanel/fr.catkeys | 2 +- data/catalogs/kits/ru.catkeys | 8 +- data/catalogs/kits/textencoding/fr.catkeys | 10 +- data/catalogs/kits/tracker/de.catkeys | 7 +- data/catalogs/kits/tracker/fr.catkeys | 8 +- data/catalogs/kits/tracker/ru.catkeys | 8 +- .../preferences/3drendering/fr.catkeys | 6 +- .../preferences/appearance/fr.catkeys | 5 +- .../catalogs/preferences/filetypes/ru.catkeys | 2 +- data/catalogs/preferences/keymap/fr.catkeys | 17 ++- data/catalogs/preferences/mail/fr.catkeys | 16 ++- data/catalogs/preferences/media/fr.catkeys | 4 +- .../preferences/notifications/fr.catkeys | 6 +- data/catalogs/preferences/printers/ru.catkeys | 2 +- .../catalogs/preferences/shortcuts/fr.catkeys | 6 +- data/catalogs/preferences/time/fr.catkeys | 4 +- .../preferences/virtualmemory/ru.catkeys | 6 +- data/catalogs/servers/notification/fr.catkeys | 2 +- .../catalogs/tests/kits/game/chart/fr.catkeys | 11 +- 80 files changed, 472 insertions(+), 232 deletions(-) create mode 100644 data/catalogs/add-ons/screen_savers/glife/fr.catkeys create mode 100644 data/catalogs/apps/fontdemo/fr.catkeys create mode 100644 data/catalogs/apps/webpositive/fr.catkeys diff --git a/data/catalogs/add-ons/mail_daemon/inbound_filters/notifier/fr.catkeys b/data/catalogs/add-ons/mail_daemon/inbound_filters/notifier/fr.catkeys index db4f439791..a0079703ef 100644 --- a/data/catalogs/add-ons/mail_daemon/inbound_filters/notifier/fr.catkeys +++ b/data/catalogs/add-ons/mail_daemon/inbound_filters/notifier/fr.catkeys @@ -12,5 +12,5 @@ Central alert ConfigView Alerte générale Alert ConfigView Alerte none ConfigView aucune New messages filter Nouveaux messages -New mails notification ConfigView Notification de nouveaux courriels +New mails notification ConfigView Notification de nouveaux courriers OK filter OK diff --git a/data/catalogs/add-ons/mail_daemon/outbound_filters/fortune/fr.catkeys b/data/catalogs/add-ons/mail_daemon/outbound_filters/fortune/fr.catkeys index d91eba6b29..f13aa922a4 100644 --- a/data/catalogs/add-ons/mail_daemon/outbound_filters/fortune/fr.catkeys +++ b/data/catalogs/add-ons/mail_daemon/outbound_filters/fortune/fr.catkeys @@ -1,3 +1,3 @@ 1 french x-vnd.Haiku-Fortune 3795320632 Fortune file: ConfigView Fichier de Fortune : -Fortune cookie says:\n\n ConfigView Le cookie de Fortune indique:\n\n +Fortune cookie says:\n\n ConfigView Le cookie de Fortune indique :\n\n diff --git a/data/catalogs/add-ons/screen_savers/glife/fr.catkeys b/data/catalogs/add-ons/screen_savers/glife/fr.catkeys new file mode 100644 index 0000000000..dfa27a238d --- /dev/null +++ b/data/catalogs/add-ons/screen_savers/glife/fr.catkeys @@ -0,0 +1,8 @@ +1 french x-vnd.Haiku-GLifeScreensaver 2208227714 +Grid Border: %li GLife ScreenSaver Bordure de la grille : %li +Grid Width: GLife ScreenSaver Largeur de la grille : +Grid Height: GLife ScreenSaver Hauteur de la grille : +Grid Width: %li GLife ScreenSaver Largeur de la grille : %li +Grid Height: %li GLife ScreenSaver Hauteur de la grille : %li +Grid Border: GLife ScreenSaver Bordure de la grille : +by Aaron Hill GLife ScreenSaver par Aaron Hill diff --git a/data/catalogs/add-ons/translators/jpeg2000/fr.catkeys b/data/catalogs/add-ons/translators/jpeg2000/fr.catkeys index 24d8b25888..4295913f79 100644 --- a/data/catalogs/add-ons/translators/jpeg2000/fr.catkeys +++ b/data/catalogs/add-ons/translators/jpeg2000/fr.catkeys @@ -10,4 +10,4 @@ Be Bitmap Format (JPEG2000Translator) JPEG2000Translator Format Bitmap Be (Trad Low JPEG2000Translator Basse About JPEG2000Translator À propos High JPEG2000Translator Haute -Read greyscale images as RGB32 JPEG2000Translator Lire les images en nuances de gris en RVB24 +Read greyscale images as RGB32 JPEG2000Translator Lire les images en nuances de gris en RVB32 diff --git a/data/catalogs/add-ons/translators/sgi/fr.catkeys b/data/catalogs/add-ons/translators/sgi/fr.catkeys index a25d102787..5bd817fb88 100644 --- a/data/catalogs/add-ons/translators/sgi/fr.catkeys +++ b/data/catalogs/add-ons/translators/sgi/fr.catkeys @@ -9,5 +9,5 @@ SGI image SGITranslator Image SGI RLE SGIView RLE SGI Settings SGIMain Réglages SGI \n\nbased on GIMP SGI plugin v1.5:\n SGIView \n\nbasé sur le plugin SGI v1.5 de GIMP :\n -written by:\n SGIView Écrit par :\n +written by:\n SGIView écrit par :\n SGI image translator SGIView Traducteur d'images SGI diff --git a/data/catalogs/add-ons/translators/stxt/fr.catkeys b/data/catalogs/add-ons/translators/stxt/fr.catkeys index 9da324ae07..c2bc6a541f 100644 --- a/data/catalogs/add-ons/translators/stxt/fr.catkeys +++ b/data/catalogs/add-ons/translators/stxt/fr.catkeys @@ -4,5 +4,5 @@ StyledEdit files translator STXTTranslator Traducteur de fichiers textes stylé Plain text file STXTTranslator Fichier de texte brut StyledEdit files translator STXTView Traducteur de fichiers textes stylés STXTTranslator Settings STXTTranslator Réglages du traducteur STXT -StyledEdit files STXTTranslator Fichiers texte stylé +StyledEdit files STXTTranslator Fichiers texte stylé STXT Settings STXTMain Réglages STXT diff --git a/data/catalogs/add-ons/translators/tiff/fr.catkeys b/data/catalogs/add-ons/translators/tiff/fr.catkeys index a124a19195..371f399664 100644 --- a/data/catalogs/add-ons/translators/tiff/fr.catkeys +++ b/data/catalogs/add-ons/translators/tiff/fr.catkeys @@ -1,6 +1,6 @@ 1 french x-vnd.Haiku-TIFFTranslator 292291870 LZW TIFFView LZW -identify_tiff_header: couldn't set directory\n TIFFTranslator identification de l'entête TIFF : impossible de déterminer l'annuaire +identify_tiff_header: couldn't set directory\n TIFFTranslator identification de l'entête TIFF : impossible de déterminer l'annuaire\n TIFF image TIFFTranslator Image TIFF TIFF Library: TIFFView Bibliothèque TIFF : TIFF Image Translator TIFFView Traducteur d'images TIFF diff --git a/data/catalogs/add-ons/translators/wonderbrush/fr.catkeys b/data/catalogs/add-ons/translators/wonderbrush/fr.catkeys index 01e1431b36..8f1b1e9d18 100644 --- a/data/catalogs/add-ons/translators/wonderbrush/fr.catkeys +++ b/data/catalogs/add-ons/translators/wonderbrush/fr.catkeys @@ -6,4 +6,4 @@ Version %d.%d.%d %s WonderBrushView Version %d.%d.%d %s WonderBrush images WonderBrushTranslator Images WonderBrush WonderBrush image WonderBrushTranslator Image WonderBrush WonderBrush image translator WonderBrushView Traducteur d'images WonderBrush -written by: WonderBrushView Écrit par : +written by: WonderBrushView écrit par : diff --git a/data/catalogs/apps/aboutsystem/fr.catkeys b/data/catalogs/apps/aboutsystem/fr.catkeys index 464f9170f4..39813a6b6c 100644 --- a/data/catalogs/apps/aboutsystem/fr.catkeys +++ b/data/catalogs/apps/aboutsystem/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-About 3434348710 +1 french x-vnd.Haiku-About 519561637 Copyright © 1999-2010 by the authors of Gutenprint. All rights reserved. AboutView Copyright © 1999-2010 par les auteurs de Gutenprint. Tous droits réservés. Travis Geiselbrecht (and his NewOS kernel)\n AboutView Travis Geiselbrecht (et son noyau, NewOS)\n BSD (4-clause) AboutView BSD (4-clauses) @@ -11,6 +11,7 @@ The Haiku-Ports team\n AboutView L'équipe de Haiku-Ports\n Copyright © 1998-2003 Daniel Veillard. All rights reserved. AboutView Copyright © 1998-2003 Daniel Veillard. Tous droits réservés. %d MiB used (%d%%) AboutView %d Mio utilisés (%d%%) Website, marketing & documentation:\n AboutView Site web, publicité & documentation :\n +GNU LGPL v2.1 AboutView GNU LGPL v2.1 AboutSystem System name À propos du système MIT (no promotion) AboutView MIT (aucune promotion) Copyright © 2003 Peter Hanappe and others. AboutView Copyright © 2003 Peter Hanappe et d'autres. @@ -39,6 +40,7 @@ Copyright © 2002-2004 Vivek Mohan. All rights reserved. AboutView Copyright © %.2f GHz AboutView %.2f GHz Memory: AboutView Mémoire : Copyright © 1996-1997 Jeff Prosise. All rights reserved. AboutView Copyright © 1996-1997 Jeff Prosise. Tous droits réservés. +Copyright © 2006-2012 Kentaro Fukuchi AboutView Copyright © 2006-2012 Kentaro Fukuchi Copyright © 1994-2009, Thomas G. Lane, Guido Vollbeding. This software is based in part on the work of the Independent JPEG Group. AboutView Copyright © 1994-2009, Thomas G. Lane, Guido Vollbeding. Ce logiciel est basé en partie sur le travail de l'Independent JPEG Group. Past maintainers:\n AboutView Précédents développeurs :\n \n\nSpecial thanks to:\n AboutView \n\nRemerciements spéciaux à :\n diff --git a/data/catalogs/apps/aboutsystem/ru.catkeys b/data/catalogs/apps/aboutsystem/ru.catkeys index c10f58f726..c43d289705 100644 --- a/data/catalogs/apps/aboutsystem/ru.catkeys +++ b/data/catalogs/apps/aboutsystem/ru.catkeys @@ -4,11 +4,11 @@ Travis Geiselbrecht (and his NewOS kernel)\n AboutView Travis Geiselbrecht (з BSD (4-clause) AboutView 4-пунктовая BSD %ld Processors: AboutView Процессоров: %ld Copyright © 1996-2005 Julian R Seward. All rights reserved. AboutView Все права защищены © 1996-2005 Julian R Seward. -%d MiB total AboutView Всего %d Мбайт +%d MiB total AboutView Всего %d МБ Michael Phipps (project founder)\n\n AboutView Michael Phipps (основателю проекта)\n\n The Haiku-Ports team\n AboutView Команде Haiku-Ports\n Copyright © 1998-2003 Daniel Veillard. All rights reserved. AboutView Все права защищены © 1998-2003 Daniel Veillard. -%d MiB used (%d%%) AboutView %d Мбайт использовано (%d%%) +%d MiB used (%d%%) AboutView %d МБ использовано (%d%%) Website, marketing & documentation:\n AboutView Веб-сайт, маркетинг и документация:\n AboutSystem System name О системе Copyright © 2003 Peter Hanappe and others. AboutView Все права защищены © 2003 Peter Hanappe и другие. @@ -20,7 +20,7 @@ Source Code: AboutView Исходный код: Processor: AboutView Процессор: Kernel: AboutView Ядро: BSD (3-clause) AboutView 3-пунктовая BSD -%total MiB total, %inaccessible MiB inaccessible AboutView %total Мбайт всего, %inaccessible Мбайт недоступно +%total MiB total, %inaccessible MiB inaccessible AboutView %total МБ всего, %inaccessible МБ недоступно Copyright © 2000-2007 Fabrice Bellard, et al. AboutView Все права защищены © 2000-2007 Fabrice Bellard и другие. Contributors:\n AboutView Внесли вклад в развитие:\n Unknown AboutView Неизвестен diff --git a/data/catalogs/apps/activitymonitor/ru.catkeys b/data/catalogs/apps/activitymonitor/ru.catkeys index 628e851cf9..b6757b2058 100644 --- a/data/catalogs/apps/activitymonitor/ru.catkeys +++ b/data/catalogs/apps/activitymonitor/ru.catkeys @@ -27,7 +27,7 @@ TX DataSource Shorter version for Sending Передача Quit ActivityWindow Выход Block cache memory DataSource Память блокового кэша Remove graph ActivityView Удалить график -%.1f MB DataSource %.1f Мбайт +%.1f MB DataSource %.1f МБ %lld sec. SettingsWindow %lld сек. %lld ms SettingsWindow %lld мс CPU usage DataSource Использование ЦПУ @@ -43,6 +43,6 @@ File ActivityWindow Файл usage DataSource (загрузка) Additional items ActivityView Дополнительные графики Network receive DataSource Входящий трафик -%.1f KB/s DataSource %.1f Кбайт/с +%.1f KB/s DataSource %.1f КБ/с Memory DataSource Память RX DataSource Shorter version for Receiving. Прием diff --git a/data/catalogs/apps/bootmanager/ru.catkeys b/data/catalogs/apps/bootmanager/ru.catkeys index 98eb5074ba..b5332a0fde 100644 --- a/data/catalogs/apps/bootmanager/ru.catkeys +++ b/data/catalogs/apps/bootmanager/ru.catkeys @@ -23,7 +23,7 @@ Uninstallation of boot menu completed BootManagerController Title Удалени Please select the drive you want the boot manager to be installed to or uninstalled from. DrivesPage Пожалуйста, выберите диск, на который вы хотите установить или с которого вы хотите удалить менеджер загрузки. Please specify a default partition and a timeout.\nThe boot menu will load the default partition after the timeout unless you select another partition. You can also have the boot menu wait indefinitely for you to select a partition.\nKeep the 'ALT' key pressed to disable the timeout at boot time. DefaultPartitionPage Пожалуйста, укажите раздел по умолчанию и время ожидания.\nЗагрузочное меню передаст управление этому разделу по истечении времени ожидания, если только вы не выберите другой раздел.\nЗажмите клавишу 'ALT' при загрузке для отключения ожидания. After one second DefaultPartitionPage 1 секунда -The partition table of the first hard disk is not compatible with Boot Manager.\nBoot Manager needs 2 KB available space before the first partition. BootManagerController Таблица разделов первого жесткого диска несовместима с менеджером загрузки.\nМенеджеру загрузки требуется 2 Кбайт свободного места перед первым разделом. +The partition table of the first hard disk is not compatible with Boot Manager.\nBoot Manager needs 2 KB available space before the first partition. BootManagerController Таблица разделов первого жесткого диска несовместима с менеджером загрузки.\nМенеджеру загрузки требуется 2 КБ свободного места перед первым разделом. The following partitions were detected. Please check the box next to the partitions to be included in the boot menu. You can also set the names of the partitions as you would like them to appear in the boot menu. PartitionsPage Были обнаружены следующие разделы. Пожалуйста, отметьте разделы, которые должны отображаться в загрузочном меню. Вы также можете присвоить имена разделам, которые будут отображаться в этом меню. After one minute DefaultPartitionPage 1 минута The Master Boot Record of the boot device (%DISK) has been successfully restored from %FILE. BootManagerController Загрузочная запись (MBR) устройства (%DISK) была успешна восстановлена из файла %s. diff --git a/data/catalogs/apps/charactermap/fr.catkeys b/data/catalogs/apps/charactermap/fr.catkeys index ea2b61bd58..2eec45f1ee 100644 --- a/data/catalogs/apps/charactermap/fr.catkeys +++ b/data/catalogs/apps/charactermap/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-CharacterMap 1545664922 +1 french x-vnd.Haiku-CharacterMap 2745781253 Enclosed alphanumerics UnicodeBlocks Alphanumériques cerclés Basic Latin UnicodeBlocks Latin basic View CharacterWindow Vue @@ -40,6 +40,7 @@ Tagbanwa UnicodeBlocks Tagbanoua Kanbun UnicodeBlocks Kanboun Syriac UnicodeBlocks Syriaque CJK compatibility ideographs Supplement UnicodeBlocks Supplément d'idéogrammes de compatibilité CJC +Musical symbols UnicodeBlocks Symboles musicaux Hangul syllables UnicodeBlocks Syllabes hangûl Coptic UnicodeBlocks Copte Tai Le UnicodeBlocks Taï-le diff --git a/data/catalogs/apps/codycam/fr.catkeys b/data/catalogs/apps/codycam/fr.catkeys index 8badb54f63..287a32daab 100644 --- a/data/catalogs/apps/codycam/fr.catkeys +++ b/data/catalogs/apps/codycam/fr.catkeys @@ -9,7 +9,7 @@ Login: CodyCam Identifiant : Format: CodyCam Format : Every 2 hours CodyCam Toutes les 2 heures Closing the window\n VideoConsumer.cpp Fermeture de la fenêtre\n -login ID expected CodyCam Identifiant attendu +login ID expected CodyCam identifiant attendu Rate: CodyCam Vitesse : JPEG image CodyCam image JPEG Capture Rate Menu CodyCam Menu de vitesse de capture @@ -68,19 +68,19 @@ OK CodyCam OK Capture controls CodyCam Contrôles de capture Every hour CodyCam Toutes les heures Cannot connect the video source to the video window CodyCam Impossible de connecter la source vidéo à la fenêtre vidéo -capture rate expected CodyCam Taux de capture attendu +capture rate expected CodyCam vitesse de capture attendu Error getting initial latency for the capture node CodyCam Erreur de récupération de la latence initiale du nœud de capture Send to… CodyCam Envoyer à… on or off expected Settings Do not translate 'on' and 'off' on ou off attendu Quit CodyCam Quitter -cmd: '%s'\n FtpClient commande : '%s'\n +cmd: '%s'\n FtpClient cmd : '%s'\n Never CodyCam Jamais Cannot create a video window CodyCam Impossible de créer une fenêtre vidéo Every 10 minutes CodyCam Toutes les 10 minutes Cannot start the video source CodyCam Impossible d'initier la source vidéo Cannot start the video window CodyCam Impossible d'initier la fenêtre vidéo -password expected CodyCam Mot de passe attendu -reply: %d, %d\n FtpClient Réponse : %d, %d\n +password expected CodyCam mot de passe attendu +reply: %d, %d\n FtpClient réponse : %d, %d\n Cannot find the media roster CodyCam Impossible de trouver le diagramme des médias Every 4 hours CodyCam Toutes les 4 heures FTP CodyCam FTP @@ -88,5 +88,5 @@ File transmission failed VideoConsumer.cpp Erreur dans la transmission du fichi File CodyCam Fichier Image Format Menu CodyCam Menu de formats d'images Every 30 minutes CodyCam Toutes les 30 minutes -reply: '%s'\n SftpClient Réponse : '%s'\n +reply: '%s'\n SftpClient réponse : '%s'\n Start video CodyCam Démarrer la vidéo diff --git a/data/catalogs/apps/deskbar/fr.catkeys b/data/catalogs/apps/deskbar/fr.catkeys index 9cd5a86b1f..5d0ba4d1f8 100644 --- a/data/catalogs/apps/deskbar/fr.catkeys +++ b/data/catalogs/apps/deskbar/fr.catkeys @@ -1,15 +1,21 @@ -1 french x-vnd.Be-TSKB 1095421712 +1 french x-vnd.Be-TSKB 3197510812 Power off DeskbarMenu Éteindre +Show day of week PreferencesWindow Afficher le jour de la semaine Edit menu… PreferencesWindow Éditer le menu… +Suspend DeskbarMenu Mettre en veille Applications PreferencesWindow Applications +Time preferences… TimeView Préférences de l'heure… +About Haiku DeskbarMenu À propos de Haiku Recent documents: PreferencesWindow Documents récents : Recent applications DeskbarMenu Applications récentes Sort running applications PreferencesWindow Trier les applications lancées +Show time Tray Afficher l'heure Applications B_USER_DESKBAR_DIRECTORY/Applications Applications Find… DeskbarMenu Rechercher… Window PreferencesWindow Fenêtre Menu PreferencesWindow Menu Recent documents DeskbarMenu Documents récents +Show seconds PreferencesWindow Afficher les secondes Auto-hide PreferencesWindow Masquer automatiquement Always on top PreferencesWindow Toujours au dessus DeskbarMenu @@ -17,6 +23,7 @@ Show all WindowMenu Montrer tout No windows WindowMenu Pas de fenêtres Deskbar System name Deskbar Restart system DeskbarMenu Redémarrer l'ordinateur +Large PreferencesWindow Grande Auto-raise PreferencesWindow Rehausser automatiquement Hide time TimeView Cacher l'heure Recent folders: PreferencesWindow Dossiers récents : @@ -25,6 +32,7 @@ Restart Tracker DeskbarMenu Redémarrer le Tracker Close all WindowMenu Tout fermer Deskbar preferences PreferencesWindow Réglages de la Deskbar Mount DeskbarMenu Monter +Small PreferencesWindow Petite Recent applications: PreferencesWindow Applications récentes : Shutdown… DeskbarMenu Arrêter… Tracker always first PreferencesWindow Lister le Tracker en premier @@ -35,8 +43,10 @@ Show calendar… TimeView Montrer le calendrier… Deskbar preferences… DeskbarMenu Réglages de la Deskbar… Expand new applications PreferencesWindow Développer les nouvelles applications Show replicants DeskbarMenu Afficher les réplicants +Hide application names PreferencesWindow Cacher le nom des applications Clock PreferencesWindow Horloge Demos B_USER_DESKBAR_DIRECTORY/Demos Démos +Icon size PreferencesWindow Taille des icônes Desktop applets B_USER_DESKBAR_DIRECTORY/Desktop applets Gadgets Hide all WindowMenu Tout cacher Quit application WindowMenu Quitter l'application diff --git a/data/catalogs/apps/deskcalc/de.catkeys b/data/catalogs/apps/deskcalc/de.catkeys index 3dab75f814..d2743ef922 100644 --- a/data/catalogs/apps/deskcalc/de.catkeys +++ b/data/catalogs/apps/deskcalc/de.catkeys @@ -1,7 +1,9 @@ -1 german x-vnd.Haiku-DeskCalc 1916192649 +1 german x-vnd.Haiku-DeskCalc 3276968552 Compact CalcView Kompakt Scientific CalcView Wissenschaftlich DeskCalc System name Rechner Basic CalcView Einfach +Radians CalcView Radiant Enable Num Lock on startup CalcView Num-Lock beim Start aktivieren +Degrees CalcView Grad Audio Feedback CalcView Audiorückmeldung diff --git a/data/catalogs/apps/deskcalc/fr.catkeys b/data/catalogs/apps/deskcalc/fr.catkeys index ece5182189..8f5ae6b72b 100644 --- a/data/catalogs/apps/deskcalc/fr.catkeys +++ b/data/catalogs/apps/deskcalc/fr.catkeys @@ -1,7 +1,9 @@ -1 french x-vnd.Haiku-DeskCalc 1916192649 +1 french x-vnd.Haiku-DeskCalc 3276968552 Compact CalcView Compact Scientific CalcView Scientifique DeskCalc System name Calculatrice Basic CalcView Basique +Radians CalcView Radians Enable Num Lock on startup CalcView Verrouiller le pavé numérique au démarrage +Degrees CalcView Degrés Audio Feedback CalcView Échos sonores diff --git a/data/catalogs/apps/devices/fr.catkeys b/data/catalogs/apps/devices/fr.catkeys index 222a0197dd..5da59e267b 100644 --- a/data/catalogs/apps/devices/fr.catkeys +++ b/data/catalogs/apps/devices/fr.catkeys @@ -1,9 +1,10 @@ -1 french x-vnd.Haiku-Devices 2109382396 +1 french x-vnd.Haiku-Devices 2511616912 Manufacturer DeviceSCSI Fabricant Order by: DevicesView Trier par : ACPI controller Device Contrôleur ACPI Memory controller Device Contrôleur mémoire Driver used DevicePCI Pilote utilisé +CD-ROM DeviceSCSI CD-ROM ISA bus Device Bus ISA ACPI bus Device Bus ACPI ISA bus DevicesView Bus ISA @@ -12,25 +13,31 @@ Computer Device Ordinateur Unknown device Device Périphérique inconnu Class Info:\t\t\t\t: %classInfo% DeviceACPI Information de classe\t\t\t: %classInfo% Processor DeviceSCSI Microprocesseur +RBC DeviceSCSI RBC Detailed DevicesView Détail Category DevicesView Catégorie Quit DevicesView Quitter Device paths Device Chemin des périphériques +Printer DeviceSCSI Imprimante Processor Device Microprocesseur +Optical Drive DeviceSCSI Lecteur optique ACPI Processor Namespace '%2' DeviceACPI Espace de nom ACPI du processeur « %2 » Bridge DeviceSCSI Pont unknown Device inconnu ACPI Information DeviceACPI Informations ACPI Generic system peripheral Device Périphérique système générique Not implemented DevicePCI Non implémenté +Disk Drive DeviceSCSI Unité de disque Not implemented DeviceACPI Non implémenté Device name DevicePCI Nom du périphérique Display controller Device Contrôleur d'affichage Mass storage controller Device Contrôleur de mémoire de masse Input device controller Device Contrôleur de périphérique d'entrée Network controller Device Adaptateur réseau +Device class DeviceSCSI Classe de périphérique Device name DeviceACPI Nom du périphérique Driver used Device Pilote utilisé +Other DeviceSCSI Autre Device Name\t\t\t\t: %Name%\nManufacturer\t\t\t: %Manufacturer%\nDriver used\t\t\t\t: %DriverUsed%\nDevice paths\t: %DevicePaths% Device Nom du périphérique\t\t\t\t\t: %Name%\nFabricant\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: %Manufacturer%\nPilote utilisé\t\t\t\t\t\t\t\t\t\t: %DriverUsed%\nChemins du périphérique\t: %DevicePaths% ACPI Thermal Zone DeviceACPI Zone thermique ACPI Bus DevicesView Bus @@ -68,12 +75,15 @@ SCSI Information DeviceSCSI Informations SCSI Bridge Device Pont Refresh devices DevicesView Rafraichir les périphériques Unknown device DevicesView Périphérique inconnu +Graphics Peripheral DeviceSCSI Périphérique graphique +Tape Drive DeviceSCSI Lecteur de bandes Bus Information Device Informations du bus Connection DevicesView Connexion Generate system information DevicesView Générer les informations systèmes Encryption controller Device Contrôleur de chiffrement Unclassified device Device Périphérique inclassable Device name DeviceSCSI Nom du périphérique +Card Reader DeviceSCSI Lecteur de cartes Class info DevicePCI Information de classe Device paths DevicePCI Chemin des périphériques Devices DevicesView Périphériques diff --git a/data/catalogs/apps/diskusage/fr.catkeys b/data/catalogs/apps/diskusage/fr.catkeys index 96560a8338..8bb795841d 100644 --- a/data/catalogs/apps/diskusage/fr.catkeys +++ b/data/catalogs/apps/diskusage/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-DiskUsage 3634416251 +1 french x-vnd.Haiku-DiskUsage 3399777733 Scanning %refName% Scanner Examen de %refName% Size Info Window Taille Rescan Pie View Réexaminer @@ -14,6 +14,7 @@ Scan Status View Examiner file unavailable Status View fichier indisponible Get Info Pie View Obtenir des informations DiskUsage System name Utilisation Disque + in %d files Info Window dans %d fichiers %d files Status View %d fichiers Created Info Window Créé Modified Info Window Modifié diff --git a/data/catalogs/apps/diskusage/ru.catkeys b/data/catalogs/apps/diskusage/ru.catkeys index 7589725d99..368242471a 100644 --- a/data/catalogs/apps/diskusage/ru.catkeys +++ b/data/catalogs/apps/diskusage/ru.catkeys @@ -10,7 +10,7 @@ no supporting apps Pie View нет поддерживающих програм %d file Status View %d файл Path Info Window Путь Scan Status View Сканировать -9999.99 GB Status View 9999.99 Гбайт +9999.99 GB Status View 9999.99 ГБ file unavailable Status View файл недоступен Get Info Pie View Информация DiskUsage System name Использование диска diff --git a/data/catalogs/apps/drivesetup/be.catkeys b/data/catalogs/apps/drivesetup/be.catkeys index 0d8b8faa3f..32b7e3da9a 100644 --- a/data/catalogs/apps/drivesetup/be.catkeys +++ b/data/catalogs/apps/drivesetup/be.catkeys @@ -1,4 +1,4 @@ -1 belarusian x-vnd.Haiku-DriveSetup 1209826930 +1 belarusian x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Рэдыктар дыскаў Delete MainWindow Выдаліць Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Сапрўды жадаеце запісаць змены на дыск?\n\nУсе данные на абраным падзеле будуць беззваротна згублены! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Імя падзелу: Initialize InitParamsPanel Ініцыялізаваць Could not mount partition %s. MainWindow Не ўдалося змантаваць падзел %s. The partition %s is already unmounted. MainWindow Падзел %s ужо змантаваны. -Failed to initialize the partition. No changes have been written to disk. MainWindow Не ўдалося ініцыялізіраваць падзел. Змены не былі запісаны на дыск. Failed to delete the partition. No changes have been written to disk. MainWindow Не ўдалося выдаліць падзел. Змены не былі запісаны на дыск. Partition type: CreateParamsPanel Тып падзелу: Could not delete the selected partition. MainWindow Немагчыма выдаліць абраны падзел. Initialize MainWindow Ініцыялізіраваць Error: MainWindow in any error alert Памылка: Partition %ld DiskView Падзел %ld -The partition %s has been successfully initialized.\n MainWindow Падзел %s паспяхова ініцыялізаваны.\n DiskView <пуста> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Не ўдалося ініцыялізіраваць падзел %s. (На дыск нічога не запісана.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Сапрўды жадаеце запісаць змены на дыск?\n\nУсе данные на абраным падзеле будуць беззваротна згублены! Mounted at PartitionList Змантавана ў -Failed to initialize the partition %s!\n MainWindow Не ўдалося ініцыялізіраваць падзел %s!\n There was an error acquiring the partition row. MainWindow Адбылася памылка пры атрыманні раду падзелаў. You need to select a partition entry from the list. MainWindow Вам патрэбна абраць падзел са спісу. -Format (not implemented) MainWindow Фарматавать (неажыццявіма) The currently selected partition does not have a parent partition. MainWindow Абраны падзел не мае бацькоўскага падзелу. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Сапрўды жадаеце запісаць змены на дыск?\n\nУсе данные на абраным падзеле будуць беззваротна згублены! Offset: %ld MB Support Адступ: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Зманатаваць усё Cancel MainWindow Адмяніць Delete partition MainWindow Выдаліць падзел End: %ld MB Support Канец %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Сапраўды ініцыялізаваць падзел \"%s\"? У вас спытаюць яшчэ, перад тым як запісаць змены на дыск. Eject MainWindow Выцягнуць Partition MainWindow Падзел File system PartitionList Файлавая сістэма -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Сапраўды ініцыялізаваць падзел? У вас спытаюць яшчэ, перад тым як запісаць змены на дыск. Validation of the given creation parameters failed. MainWindow Не удалася праверка дадзеных параметраў стварэння падзелу. Size PartitionList Памер Validation of the given initialization parameters failed. MainWindow Не удалася праверка дадзеных параметраў ініцыялізацыі падзелу. diff --git a/data/catalogs/apps/drivesetup/de.catkeys b/data/catalogs/apps/drivesetup/de.catkeys index 5a8f932fc9..9daa58d7c3 100644 --- a/data/catalogs/apps/drivesetup/de.catkeys +++ b/data/catalogs/apps/drivesetup/de.catkeys @@ -1,4 +1,4 @@ -1 german x-vnd.Haiku-DriveSetup 1209826930 +1 german x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Datenträgerverwaltung Delete MainWindow Löschen Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Soll die Änderungen jetzt auf den Datenträger geschrieben werden?\n\nAlle Daten auf der gewählten Partition gehen dabei unwiderruflich verloren! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Partitionsname: Initialize InitParamsPanel Initialisieren Could not mount partition %s. MainWindow Die Partition \"%s\" konnte nicht eingehangen werden. The partition %s is already unmounted. MainWindow Die Partition \"%s\" ist bereits ausgehangen. -Failed to initialize the partition. No changes have been written to disk. MainWindow Die Initialisierung der Partition ist fehlgeschlagen. Der Datenträger blieb unverändert. Failed to delete the partition. No changes have been written to disk. MainWindow Das Löschen der Partition ist fehlgeschlagen. Der Datenträger blieb unverändert. Partition type: CreateParamsPanel Partitionstyp: Could not delete the selected partition. MainWindow Die gewählte Partition konnte nicht gelöscht werden. Initialize MainWindow Initialisieren Error: MainWindow in any error alert Fehler: Partition %ld DiskView Partition %ld -The partition %s has been successfully initialized.\n MainWindow Die Partition %s wurde erfolgreich initialisiert.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Initialisierung der Partition \"%s\" fehlgeschlagen. Der Datenträger blieb unverändert. Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Sollen die Änderungen wirklich auf den Datenträger geschrieben werden?\n\nAlle Daten auf der Partition gehen dabei unwiderruflich verloren! Mounted at PartitionList Eingehangen als -Failed to initialize the partition %s!\n MainWindow Initialisierung der Partition \"%s\" fehlgeschlagen!\n There was an error acquiring the partition row. MainWindow Es ist ein interner Fehler aufgetreten. You need to select a partition entry from the list. MainWindow Bitte einen Partitionseintrag aus der Liste wählen. -Format (not implemented) MainWindow Formatieren (nicht implementiert) The currently selected partition does not have a parent partition. MainWindow Die ausgewählte Partition hat keine übergeordnete Partition. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Sollen die Änderungen wirklich auf den Datenträger geschrieben werden?\n\nAlle Daten auf dem gewählten Datenträger gehen dabei unwiderruflich verloren! Offset: %ld MB Support Versatz: %ld MiB @@ -56,11 +52,9 @@ Mount all MainWindow Alle einhängen Cancel MainWindow Abbrechen Delete partition MainWindow Partition löschen End: %ld MB Support Ende: %ld MiB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Soll die Partition \"%s\" wirklich initialisiert werden?\nDie Änderungen werden erst auf den Datenträger geschrieben, wenn sie nochmals bestätigt werden. Eject MainWindow Auswerfen Partition MainWindow Partition File system PartitionList Dateisystem -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Soll die Partition wirklich initialisiert werden?\nDie Änderungen werden erst auf den Datenträger geschrieben, wenn sie nochmals bestätigt werden. Validation of the given creation parameters failed. MainWindow Die Überprüfung der zum Anlegen angegebenen Parameter ist fehlgeschlagen. Size PartitionList Größe Validation of the given initialization parameters failed. MainWindow Die Überprüfung der zum Initialisieren angegebenen Parameter ist fehlgeschlagen. diff --git a/data/catalogs/apps/drivesetup/el.catkeys b/data/catalogs/apps/drivesetup/el.catkeys index 6a2db63f52..03ef513de4 100644 --- a/data/catalogs/apps/drivesetup/el.catkeys +++ b/data/catalogs/apps/drivesetup/el.catkeys @@ -1,4 +1,4 @@ -1 greek, modern (1453-) x-vnd.Haiku-DriveSetup 2126646325 +1 greek, modern (1453-) x-vnd.Haiku-DriveSetup 2952850782 DriveSetup System name Εγκατάσταση Οδηγού Delete MainWindow Διαγραφή Rescan MainWindow Επανάληψη σάρωσης @@ -15,21 +15,17 @@ Partition name: CreateParamsPanel Όνομα κατάτμησης: Initialize InitParamsPanel Αρχικοποίηση Could not mount partition %s. MainWindow Αδυναμία προσάρτησης της κατάτμησης %s. The partition %s is already unmounted. MainWindow Η κατάτμηση %s είναι ήδη αποπροσαρτημένη -Failed to initialize the partition. No changes have been written to disk. MainWindow Αποτυχία αρχικοποίησης της κατάτμησης. Καμία τροποποίηση δεν έχει γραφτεί στο δίσκο. Failed to delete the partition. No changes have been written to disk. MainWindow Αποτυχία διαγραφής της κατάτμησης. Καμία τροποποίηση δεν έχει γραφτεί στο δίσκο. Partition type: CreateParamsPanel Τύπος κατάτμησης: Could not delete the selected partition. MainWindow Αδυναμία διαγραφής της επιλεγμένης κατάτμησης. Initialize MainWindow Αρχικοποίηση Error: MainWindow in any error alert Σφάλμα: Partition %ld DiskView Κατάτμηση %ld -The partition %s has been successfully initialized.\n MainWindow Η κατάτμηση %s αρχικοποιήθηκε επιτυχώς.\n DiskView <άδειο> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Η αρχικοποίηση της κατάτμησης %s απέτυχε. (Τίποτα δεν γράφτηκε στο δίσκο.) Mounted at PartitionList Προσαρτήθηκε στο -Failed to initialize the partition %s!\n MainWindow Αποτυχία αρχικοποίησης της κατάτμησης %s!\n There was an error acquiring the partition row. MainWindow Υπήρξε ένα σφάλμα κατά την απόκτηση της σειράς κατάτμησης. You need to select a partition entry from the list. MainWindow Θα χρειαστεί να επιλέξετε μια καταχωρημένη κατάτμηση από τη λίστα. -Format (not implemented) MainWindow Μορφοποίηση (δεν υλοποιήθηκε) The currently selected partition does not have a parent partition. MainWindow Η τρέχουσα επιλεγμένη κατάτμηση δεν έχει κατάτμηση γονέα. Offset: %ld MB Support Μετατόπιση: %ld MB Write changes MainWindow Εγγραφή αλλαγών @@ -55,7 +51,6 @@ Delete partition MainWindow Διαγραφή κατάτμησης End: %ld MB Support Τέλος: %ld MB Eject MainWindow Εξαγωγή Partition MainWindow Κατάτμηση -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Είστε σίγουρος ότι θέλετε να αρχικοποιήσετε την κατάτμηση; Θα ερωτηθείτε ξανά πριν καταγραφούν οι αλλαγές στον δίσκο. Validation of the given creation parameters failed. MainWindow Η επικύρωση των δοθέντων παραμέτρων δημιουργίας απέτυχε. Size PartitionList Μέγεθος Validation of the given initialization parameters failed. MainWindow Η επικύρωση των δοθέντων παραμέτρων αρχικοποίησης απέτυχε. diff --git a/data/catalogs/apps/drivesetup/fi.catkeys b/data/catalogs/apps/drivesetup/fi.catkeys index 8a28c856fd..829f754947 100644 --- a/data/catalogs/apps/drivesetup/fi.catkeys +++ b/data/catalogs/apps/drivesetup/fi.catkeys @@ -1,4 +1,4 @@ -1 finnish x-vnd.Haiku-DriveSetup 1209826930 +1 finnish x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Levyasema-asetukset Delete MainWindow Poista Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Oletko varma, että haluat nyt kirjoittaa muutokset takaisin levylle?\n\nKaikki valitun osion tiedot katoavat palauttamattomasti, jos teet niin! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Osionimi: Initialize InitParamsPanel Alusta Could not mount partition %s. MainWindow Ei voitu liittää osiota %s. The partition %s is already unmounted. MainWindow Osio %s on jo liitetty. -Failed to initialize the partition. No changes have been written to disk. MainWindow Osion alustus epäonnistui. Levylle ei ole kirjoitettu mitään muutoksia. Failed to delete the partition. No changes have been written to disk. MainWindow Osion poistaminen epäonnistui. Mitään muutoksia ei ole kirjoitettu levylle. Partition type: CreateParamsPanel Osiotyyppi: Could not delete the selected partition. MainWindow Ei voitu poistaa valittua osiota. Initialize MainWindow Alusta Error: MainWindow in any error alert Virhe: Partition %ld DiskView Osio %ld -The partition %s has been successfully initialized.\n MainWindow Osion %s alustus onnistui.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Osion %s alustus epäonnistui. (Mitään ei ole kirjoitettu levylle.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Oletko varma, että haluat nyt kirjoittaa muutokset takaisin levylle?\n\nKaikki osion tiedot katoavat palauttamattomasti, jos teet niin! Mounted at PartitionList Liittämispiste: -Failed to initialize the partition %s!\n MainWindow Osion %s alustus epäonnistui!\n There was an error acquiring the partition row. MainWindow Osioriviä haettaessa syntyi virhe. You need to select a partition entry from the list. MainWindow Sinun täytyy valita osiorivi luettelosta. -Format (not implemented) MainWindow Formatoi (ei ole toteutettu) The currently selected partition does not have a parent partition. MainWindow Nykyisellä valitulla osiolla ei ole yläosiota. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Oletko varma, että haluat nyt kirjoittaa muutokset takaisin levylle?\n\nKaikki valitun osion tiedot katoavat palauttamattomasti, jos teet niin! Offset: %ld MB Support Siirros: %ld mebitavua @@ -56,11 +52,9 @@ Mount all MainWindow Liitä kaikki Cancel MainWindow Peru Delete partition MainWindow Poista osio End: %ld MB Support Loppu: %ld mebitavua -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Oletko varma, että haluat alustaa osion ”%s”? Sinulta kysytään uudelleen ennen kuin muutokset kirjoitetaan levylle. Eject MainWindow Poista asemasta Partition MainWindow Osio File system PartitionList Tiedostojärjestelmä -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Oletko varma, että haluat alustaa osion? Sinulta kysytään uudelleen ennen kuin muutokset kirjoitetaan levylle. Validation of the given creation parameters failed. MainWindow Annettujen luontiparametrien todentaminen epäonnistui. Size PartitionList Koko Validation of the given initialization parameters failed. MainWindow Annettujen alustusparametrien todentaminen epäonnistui. diff --git a/data/catalogs/apps/drivesetup/fr.catkeys b/data/catalogs/apps/drivesetup/fr.catkeys index 7c8671975a..e7aabb7caa 100644 --- a/data/catalogs/apps/drivesetup/fr.catkeys +++ b/data/catalogs/apps/drivesetup/fr.catkeys @@ -1,10 +1,10 @@ -1 french x-vnd.Haiku-DriveSetup 1209826930 +1 french x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Gestionnaire de disque Delete MainWindow Supprimer Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Êtes-vous sûr de vouloir écrire les changements sur le disque ?\n\nToutes les données de la partition sélectionnée seront effacées si vous le faites ! Rescan MainWindow Analyser OK MainWindow OK -Could not aquire partitioning information. MainWindow Impossible de récupérer les informations sur les partitions +Could not aquire partitioning information. MainWindow Impossible de récupérer les informations sur les partitions. There's no space on the partition where a child partition could be created. MainWindow Il n'y a pas de place dans cette partition pour créer une partition fille. %ld MiB Support %ld Mio PartitionList @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Nom de la partition : Initialize InitParamsPanel Initialiser Could not mount partition %s. MainWindow Impossible de monter la partition %s. The partition %s is already unmounted. MainWindow La partition %s est déjà démontée. -Failed to initialize the partition. No changes have been written to disk. MainWindow Impossible d'initialiser la partition. Aucun changement n'a été enregistré sur le disque. Failed to delete the partition. No changes have been written to disk. MainWindow Impossible de supprimer la partition. Aucun changement n'a été enregistré sur le disque. Partition type: CreateParamsPanel Type de partition : Could not delete the selected partition. MainWindow Impossible de supprimer la partition sélectionnée. Initialize MainWindow Initialiser Error: MainWindow in any error alert Erreur : Partition %ld DiskView Partition %ld -The partition %s has been successfully initialized.\n MainWindow La partition %s a été correctement initialisée.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow L'initialisation de la partition %s a échoué. (Aucune modification n'a été apportée au disque.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Êtes-vous sur de vouloir enregistrer les changements sur le disque ?\n\nToutes les données de la partition seront définitivement perdues si vous le faites ! Mounted at PartitionList Montée en -Failed to initialize the partition %s!\n MainWindow Impossible d'initialiser la partition %s !\n There was an error acquiring the partition row. MainWindow Erreur de lecture des informations de la partition. You need to select a partition entry from the list. MainWindow Sélectionnez d'abord une entrée de la table des partitions. -Format (not implemented) MainWindow Format (non implémenté) The currently selected partition does not have a parent partition. MainWindow La partition sélectionnée n'a pas de partition parente. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Êtes-vous sur de vouloir enregistrer les changements sur le disque ?\n\nToutes les données du disque seront définitivement perdues si vous le faites ! Offset: %ld MB Support Déplacement : %ld Mo @@ -52,15 +48,13 @@ Active PartitionList Active Volume name PartitionList Nom de volume Continue MainWindow Continuer Cannot delete the selected partition. MainWindow La partition sélectionnée ne peut pas être supprimée. -Mount all MainWindow Monter Tout +Mount all MainWindow Monter tout Cancel MainWindow Annuler Delete partition MainWindow Supprimer la partition End: %ld MB Support Fin : %ld Mo -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Êtes-vous sûr de vouloir initialiser la partition « %s » ? La question vous sera à nouveau posée avant que les modifications ne soient écrites sur le disque. Eject MainWindow Éjecter Partition MainWindow Partition File system PartitionList Système de fichiers -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Êtes-vous sûr de vouloir initialiser la partition ? La question vous sera à nouveau posée avant que les modifications ne soient écrites sur le disque. Validation of the given creation parameters failed. MainWindow Le contrôle des paramètres de création donnés a échoué. Size PartitionList Taille Validation of the given initialization parameters failed. MainWindow Le contrôle des paramètres d'initialisation donnés a échoué. diff --git a/data/catalogs/apps/drivesetup/ja.catkeys b/data/catalogs/apps/drivesetup/ja.catkeys index 502e18024f..e88af98cd4 100644 --- a/data/catalogs/apps/drivesetup/ja.catkeys +++ b/data/catalogs/apps/drivesetup/ja.catkeys @@ -1,4 +1,4 @@ -1 japanese x-vnd.Haiku-DriveSetup 1209826930 +1 japanese x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name DriveSetup Delete MainWindow 削除 Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow 変更を本当にディスクに保存しますか?\n\nその場合、選択されたパーティションのすべてのデータが失われますので、ご注意ください。 @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel パーティション名 : Initialize InitParamsPanel 初期化 Could not mount partition %s. MainWindow パーティション %s をマウントできませんでした。 The partition %s is already unmounted. MainWindow パーティション %s は既にマウント解除されています。 -Failed to initialize the partition. No changes have been written to disk. MainWindow パーティションの初期化に失敗しました。変更は保存されていません。 Failed to delete the partition. No changes have been written to disk. MainWindow パーティションの削除に失敗しました。変更は保存されていません。 Partition type: CreateParamsPanel パーティション種別 : Could not delete the selected partition. MainWindow 選択されたパーティションを削除できませんでした。 Initialize MainWindow 初期化 Error: MainWindow in any error alert エラー : Partition %ld DiskView パーティション %ld -The partition %s has been successfully initialized.\n MainWindow %s パーティションの初期化に成功しました。\n DiskView <空> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow %s パーティションの初期化に失敗しました。(ディスクに何も書き込まれていません) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow 変更をすぐにディスクに保存しますか?\n\nその場合、ディスクのすべてのデータが失われますので、ご注意ください。 Mounted at PartitionList マウント先 -Failed to initialize the partition %s!\n MainWindow パーティション %s の初期化に失敗しました!\n There was an error acquiring the partition row. MainWindow パーティション情報を取得の際、エラーが発生しました。 You need to select a partition entry from the list. MainWindow 一覧からパーティションを一つ選択してください。 -Format (not implemented) MainWindow フォーマット(実装されていません) The currently selected partition does not have a parent partition. MainWindow 選択されたパーティションには親パーティションがありません。 Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow 変更をすぐにディスクに保存しますか?\n\nその場合、選択されたディスクのデータがすべて失われますので、ご注意ください。 Offset: %ld MB Support オフセット: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow すべてマウント Cancel MainWindow 中止 Delete partition MainWindow パーティションを削除 End: %ld MB Support 末端: %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow 本当にパーティション \"%s\" を初期化して良いですか? 変更をディスクに書き込む直前に再度確認します。 Eject MainWindow 取り出す Partition MainWindow パーティション File system PartitionList ファイルシステム -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow 本当にパーティションを初期化して良いですか? 変更をディスクに書き込む直前に再度確認します。 Validation of the given creation parameters failed. MainWindow 作成パラメーターの検証に失敗しました。 Size PartitionList サイズ Validation of the given initialization parameters failed. MainWindow 初期化パラメーターの検証に失敗しました diff --git a/data/catalogs/apps/drivesetup/lt.catkeys b/data/catalogs/apps/drivesetup/lt.catkeys index b552aacd9d..9bc04be660 100644 --- a/data/catalogs/apps/drivesetup/lt.catkeys +++ b/data/catalogs/apps/drivesetup/lt.catkeys @@ -1,4 +1,4 @@ -1 lithuanian x-vnd.Haiku-DriveSetup 1209826930 +1 lithuanian x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Diskų ženklintuvas Delete MainWindow Šalinti Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Ar tikrai norite pakeitimus dabar įrašyti į diską?\n\nJei tęsite toliau – visi duomenys, esantys pasirinktame skaidinyje, bus negrįžtamai prarasti! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Skaidinio pavadinimas: Initialize InitParamsPanel Ženklinti Could not mount partition %s. MainWindow Skaidinio „%s“ prijungti nepavyko. The partition %s is already unmounted. MainWindow Skaidinys „%s“ jau atjungtas. -Failed to initialize the partition. No changes have been written to disk. MainWindow Skaidinio suženklinti nepavyko. Pakeitimai į diską neįrašyti. Failed to delete the partition. No changes have been written to disk. MainWindow Skaidinio pašalinti nepavyko. Pakeitimai į diską neįrašyti. Partition type: CreateParamsPanel Skaidinio tipas: Could not delete the selected partition. MainWindow Pasirinkto skaidinio pašalinti nepavyko. Initialize MainWindow Ženklinti Error: MainWindow in any error alert Klaida: Partition %ld DiskView Skaidinys %ld -The partition %s has been successfully initialized.\n MainWindow Skaidinys „%s“ sėkmingai suženklintas.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Skaidinio „%s“ suženklinti nepavyko. Pakeitimai į diską neįrašyti. Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Ar tikrai norite pakeitimus dabar įrašyti į diską?\n\nJei tęsite toliau – visi duomenys, esantys skaidinyje, bus negrįžtamai prarasti! Mounted at PartitionList Prijungtas kaip -Failed to initialize the partition %s!\n MainWindow Nepavyko suženklinti skaidinio „%s“!\n There was an error acquiring the partition row. MainWindow Klaida gaunant skaidinių sąrašą. You need to select a partition entry from the list. MainWindow Būtina iš sąrašo pasirinkti skaidinį. -Format (not implemented) MainWindow Ženklinti (dar nerealizuota) The currently selected partition does not have a parent partition. MainWindow Pasirinkas skaidinys nėra loginis diskas kitame skaidinyje. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Ar tikrai norite pakeitimus dabar įrašyti į diską?\n\nJei tęsite toliau – visi duomenys, esantys pasirinktame diske, bus negrįžtamai prarasti! Offset: %ld MB Support Poslinkis: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Prijungti visus Cancel MainWindow Atsisakyti Delete partition MainWindow Šalinti skaidinį End: %ld MB Support Pabaiga: %ld MiB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Ar tikrai norite suženklinti skaidinį „%s“? Prieš įrašant pakeitimus į diską, Jūsų bus paklausta dar kartą. Eject MainWindow Išimti Partition MainWindow Skaidinys File system PartitionList Failų sistema -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Ar tikrai norite suženklinti skaidinį? Prieš įrašant pakeitimus į diską, Jūsų bus paklausta dar kartą. Validation of the given creation parameters failed. MainWindow Nurodyti netinkami kūrimo parametrai. Size PartitionList Dydis Validation of the given initialization parameters failed. MainWindow Nurodyti netinkami ženklinimo parametrai. diff --git a/data/catalogs/apps/drivesetup/nb.catkeys b/data/catalogs/apps/drivesetup/nb.catkeys index 1016945585..b42e8c4e7e 100644 --- a/data/catalogs/apps/drivesetup/nb.catkeys +++ b/data/catalogs/apps/drivesetup/nb.catkeys @@ -1,4 +1,4 @@ -1 bokmål, norwegian; norwegian bokmål x-vnd.Haiku-DriveSetup 1209826930 +1 bokmål, norwegian; norwegian bokmål x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Diskoppsett Delete MainWindow Slett Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Er du sikker på at du vil skrive endringene til disken nå?\n\nAlle data på den valgte partisjonen vil gå tapt for godt hvis du gjør det! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Partisjonsnavn: Initialize InitParamsPanel Initialiser Could not mount partition %s. MainWindow Kunne ikke montere partisjonen %s The partition %s is already unmounted. MainWindow Partisjonen %s er allerede avmontert. -Failed to initialize the partition. No changes have been written to disk. MainWindow Klarte ikke å initialisere partisjonen. Ingen endringer er skrevet til disken. Failed to delete the partition. No changes have been written to disk. MainWindow Klarte ikke å slette partisjonen. Ingen endringer er skrevet til disken. Partition type: CreateParamsPanel Partisjonstype: Could not delete the selected partition. MainWindow Kunne ikke slette valgt partisjon. Initialize MainWindow Initialiser Error: MainWindow in any error alert Feil: Partition %ld DiskView Partisjon %ld -The partition %s has been successfully initialized.\n MainWindow Initialisering av partisjonen %s var vellykket.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Initialisering av partisjonen %s var mislykket. (ingenting ble skrevet til disken.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Er du sikker på at du vil skrive endringene til disken nå?\n\nAlle data på partisjonen vil gå tapt for godt hvis du gjør det! Mounted at PartitionList Monteringspunkt -Failed to initialize the partition %s!\n MainWindow Klarte ikke å initialisere partisjonen %s!\n There was an error acquiring the partition row. MainWindow Det var en feil ved tilegning av partisjonsrad. You need to select a partition entry from the list. MainWindow Du må velge en partisjon fra listen. -Format (not implemented) MainWindow Formatere (ikke implementert) The currently selected partition does not have a parent partition. MainWindow Den valgte partisjonen har ingen forelderpartisjon. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Er du sikker på at du vil skrive endringene til disken nå?\n\nAlle data på den valgte disken vil gå tapt for godt hvis du gjør det! Offset: %ld MB Support Offset: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Monter alle Cancel MainWindow Avbryt Delete partition MainWindow Slett partisjon End: %ld MB Support Slutt: %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Er du sikker på at du vil initialisere partisjonen \"%s\"? Du vil bli spurt igjen før endringene blir skrevet til disken. Eject MainWindow Løs ut Partition MainWindow Partisjon File system PartitionList Filsystem -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Er du sikker på at du vil initialisere partisjonen? Du vil bli spurt igjen før endringene blir skrevet til disken. Validation of the given creation parameters failed. MainWindow Mislykket validering av de oppgitte opprettingsparametrene. Size PartitionList Størrelse Validation of the given initialization parameters failed. MainWindow Mislykket validering av de oppgitte initialiseringsparametrene. diff --git a/data/catalogs/apps/drivesetup/nl.catkeys b/data/catalogs/apps/drivesetup/nl.catkeys index 6fccd65f1f..d33150a6ca 100644 --- a/data/catalogs/apps/drivesetup/nl.catkeys +++ b/data/catalogs/apps/drivesetup/nl.catkeys @@ -1,4 +1,4 @@ -1 dutch; flemish x-vnd.Haiku-DriveSetup 1209826930 +1 dutch; flemish x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name DriveSetup Delete MainWindow Verwijderen Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Bent u zeker dat u de veranderingen nu wilt terugschrijven naar de schijf?\n\nU zult alle gegevens op de geselecteerde partitie onherroepelijk kwijt zijn als u dit doet! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Partitienaam: Initialize InitParamsPanel Initialiseer Could not mount partition %s. MainWindow Kon partitie %s niet betrekken. The partition %s is already unmounted. MainWindow De partitie %s is al onttrokken. -Failed to initialize the partition. No changes have been written to disk. MainWindow Kon de partitie niet initialiseren. Er werden geen veranderingen naar de schijf geschreven. Failed to delete the partition. No changes have been written to disk. MainWindow Kon de partitie niet verwijderen. Er werden geen veranderingen naar de schijf geschreven. Partition type: CreateParamsPanel Partitiesoort: Could not delete the selected partition. MainWindow Kon de geselecteerde partitie niet verwijderen. Initialize MainWindow Initialiseren Error: MainWindow in any error alert Fout: Partition %ld DiskView Partitie %ld -The partition %s has been successfully initialized.\n MainWindow De partitie %s werd met succes geïnitialiseerd.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Initialisatie van de partitie %s is mislukt. (Er werd niets naar de schijf geschreven.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Bent u zeker dat u de veranderingen nu wilt terugschrijven naar de schijf?\n\nU zult alle gegevens op de partitie onherroepelijk kwijt zijn als u dit doet! Mounted at PartitionList Betrokken bij -Failed to initialize the partition %s!\n MainWindow Initialisatie van partitie %s is mislukt!\n There was an error acquiring the partition row. MainWindow Er is een fout ontstaan bij het verkrijgen van de partitieregel. You need to select a partition entry from the list. MainWindow U dient een partitie uit de lijst te selecteren. -Format (not implemented) MainWindow Formatteren (niet geïmplementeerd) The currently selected partition does not have a parent partition. MainWindow De nu geselecteerde partitie heeft geen bovenliggende partitie. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Bent u zeker dat u de veranderingen nu wilt terugschrijven naar de schijf?\n\nU zult alle gegevens op de geselecteerde schijf onherroepelijk kwijt zijn als u dit doet! Offset: %ld MB Support Offset: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Alles betrekken Cancel MainWindow Annuleren Delete partition MainWindow Partitie verwijderen End: %ld MB Support Einde: %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Weet u zeker dat u de partitie \"%s\" wilt initialiseren? Het zal nog een keer gevraagd worden voordat veranderingen naar de schijf worden geschreven. Eject MainWindow Uitwerpen Partition MainWindow Partitie File system PartitionList Bestandssysteem -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Weet u zeker dat u de partitie wilt initialiseren? Het zal nog een keer gevraagd worden voordat veranderingen naar de schijf worden geschreven. Validation of the given creation parameters failed. MainWindow Natrekken van de gegeven creatieparameters is mislukt. Size PartitionList Grootte Validation of the given initialization parameters failed. MainWindow Natrekken van de opgegeven initialisatieparameters is mislukt. diff --git a/data/catalogs/apps/drivesetup/pl.catkeys b/data/catalogs/apps/drivesetup/pl.catkeys index e9f367330c..5f365116fe 100644 --- a/data/catalogs/apps/drivesetup/pl.catkeys +++ b/data/catalogs/apps/drivesetup/pl.catkeys @@ -1,4 +1,4 @@ -1 polish x-vnd.Haiku-DriveSetup 1209826930 +1 polish x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name DriveSetup Delete MainWindow Usuń Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Na pewno chcesz zapisać zmiany na dysk?\n\nWszystkie dane na wybranej partycji bedą bezpowrotnie utracone! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Nazwa partycji: Initialize InitParamsPanel Inicjalizacja Could not mount partition %s. MainWindow Nie można zamontować partycji %s. The partition %s is already unmounted. MainWindow Partycja %s została już odmontowana. -Failed to initialize the partition. No changes have been written to disk. MainWindow Błąd podczas inicjalizacji partycji. Żadne zmiany nie zostały zapisane na dysk. Failed to delete the partition. No changes have been written to disk. MainWindow Błąd podczas usuwaniu partycji. Żadne zmiany nie zostały zapisane na dysk. Partition type: CreateParamsPanel Typ partycji: Could not delete the selected partition. MainWindow Nie można usunąć wybranej partycji. Initialize MainWindow Inicjalizacja Error: MainWindow in any error alert Błąd: Partition %ld DiskView Partycja %ld -The partition %s has been successfully initialized.\n MainWindow Partycja %s została poprawnie zainicjalizowana.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Inicjalizacja partycji %s nie powiodła się. (Żadne zmiany nie zostały zapisane na dysku.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Na pewno chcesz zapisać zmiany na dysk?\n\nWszystkie dane na wybranej partycji bedą bezpowrotnie utracone! Mounted at PartitionList Zamontowany jako -Failed to initialize the partition %s!\n MainWindow Błąd podczas inicjalizacji partycji %s!\n There was an error acquiring the partition row. MainWindow Wystąpił błąd podczas pobierania informacji o partycji. You need to select a partition entry from the list. MainWindow Musisz wybrać partycję docelową z listy. -Format (not implemented) MainWindow Formatuj (nie zaimplementowane) The currently selected partition does not have a parent partition. MainWindow Wybrana partycja nie posiada partycji nadrzędnej. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Na pewno chcesz zapisać zmiany na dysk?\n\nWszystkie dane na wybranym dysku bedą bezpowrotnie utracone! Offset: %ld MB Support Przesunięcie: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Zamontuj wszystko Cancel MainWindow Anuluj Delete partition MainWindow Usuń partycję End: %ld MB Support Koniec: %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Czy na pewno chcesz zainicjalizować partycję \"%s\"? Zostaniesz spytany ponownie zanim zmiany zostaną zapisane na dysk twardy. Eject MainWindow Wysuń Partition MainWindow Partycja File system PartitionList System plików -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Czy jesteś pewien decyzji o zainicjalizowaniu partycji? Zostaniesz spytany ponownie zanim zmiany zostaną zapisane na dysk twardy. Validation of the given creation parameters failed. MainWindow Sprawdzenie poprawności parametrów tworzenia partycji nie powiodło się. Size PartitionList Rozmiar Validation of the given initialization parameters failed. MainWindow Sprawdzenie poprawności parametrów inicjalizacji nie powiodło się. diff --git a/data/catalogs/apps/drivesetup/ro.catkeys b/data/catalogs/apps/drivesetup/ro.catkeys index 0e3c71a018..8934628d45 100644 --- a/data/catalogs/apps/drivesetup/ro.catkeys +++ b/data/catalogs/apps/drivesetup/ro.catkeys @@ -1,4 +1,4 @@ -1 romanian x-vnd.Haiku-DriveSetup 1209826930 +1 romanian x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name ConfigurareDiscuri Delete MainWindow Șterge Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Sigur doriți să scrieți modificările înapoi pe disc acum?\n\nToate datele de pe partiția selectată vor fi pierdute fără posibilitatea de a le recupera dacă faceți acest lucru! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Nume partiție: Initialize InitParamsPanel Inițializează Could not mount partition %s. MainWindow Nu s-a putut monta partiția %s. The partition %s is already unmounted. MainWindow Partiția %s este deja demontată. -Failed to initialize the partition. No changes have been written to disk. MainWindow Inițializarea partiției a eșuat. Nu s-au scris modificări pe disc. Failed to delete the partition. No changes have been written to disk. MainWindow Ștergerea partiției a eșuat. Nu s-au scris modificări pe disc. Partition type: CreateParamsPanel Tip de partiție: Could not delete the selected partition. MainWindow Nu s-a putut șterge partiția selectată. Initialize MainWindow Inițializează Error: MainWindow in any error alert Eroare: Partition %ld DiskView Partiție %ld -The partition %s has been successfully initialized.\n MainWindow Partiția %s a fost inițializată cu succes.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Inițializarea partiției %s a eșuat. (Nu s-a scris nimic pe disk.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Sigur doriți să scrieți modificările înapoi pe disc acum?\n\nToate datele de pe partiție vor fi pierdute fără posibilitatea de a le recupera dacă faceți acest lucru! Mounted at PartitionList Montat la -Failed to initialize the partition %s!\n MainWindow Inițializarea partiției %s a eșuat!\n There was an error acquiring the partition row. MainWindow A apărut o eroare la obținerea rândului partiției. You need to select a partition entry from the list. MainWindow Trebuie să selectați o intrare de partiție din listă. -Format (not implemented) MainWindow Format (nu este implementat) The currently selected partition does not have a parent partition. MainWindow Partiția selectată curent nu are o partiție superioară. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Sigur doriți să scrieți modificările înapoi pe disc acum?\n\nToate datele de pe discul selectat vor fi pierdute fără posibilitatea de a le recupera dacă faceți acest lucru! Offset: %ld MB Support Decalaj: %ld MiB @@ -56,11 +52,9 @@ Mount all MainWindow Montează tot Cancel MainWindow Anulează Delete partition MainWindow Șterge partiție End: %ld MB Support Final: %ld MiB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Sigur doriți să inițializați partiția \„%s\”? Veți fi întrebat din nou înainte ca modificările să fie scrise pe disc. Eject MainWindow Scoate Partition MainWindow Partiție File system PartitionList Sistem de fișiere -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Sigur doriți să inițializați partiția? Veți fi întrebat din nou înainte ca modificările să fie scrise pe disc. Validation of the given creation parameters failed. MainWindow Validarea parametrilor de creare furnizați a eșuat. Size PartitionList Dimensiune Validation of the given initialization parameters failed. MainWindow Validarea parametrilor de inițializare furnizați a eșuat. diff --git a/data/catalogs/apps/drivesetup/ru.catkeys b/data/catalogs/apps/drivesetup/ru.catkeys index e65a2b9c5d..f091229935 100644 --- a/data/catalogs/apps/drivesetup/ru.catkeys +++ b/data/catalogs/apps/drivesetup/ru.catkeys @@ -1,4 +1,4 @@ -1 russian x-vnd.Haiku-DriveSetup 1209826930 +1 russian x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Разметка диска Delete MainWindow Удалить Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Вы уверены, что хотите записать изменения на диск прямо сейчас?\n\nЕсли вы продолжите, то все данные на выбранном разделе будут безвозвратно потеряны! @@ -6,7 +6,7 @@ Rescan MainWindow Пересканировать OK MainWindow ОК Could not aquire partitioning information. MainWindow Невозможно получить информацию о разделах. There's no space on the partition where a child partition could be created. MainWindow Недостаточно места на разделе, где можно было бы создать подраздел. -%ld MiB Support %ld Мбайт +%ld MiB Support %ld МБ PartitionList <пусто> Unable to find the selected partition by ID. MainWindow Невозможно найти выбранный раздел по ID. Select a partition from the list below. DiskView Выберите раздел из списка ниже @@ -16,25 +16,21 @@ Partition name: CreateParamsPanel Имя раздела: Initialize InitParamsPanel Инициализировать Could not mount partition %s. MainWindow Невозможно подключить раздел %s. The partition %s is already unmounted. MainWindow Раздел %s уже отключен. -Failed to initialize the partition. No changes have been written to disk. MainWindow Инициализация раздела не удалась. Изменения не были записаны на диск. Failed to delete the partition. No changes have been written to disk. MainWindow Не удалось удалить раздел. Изменения не были записаны на диск. Partition type: CreateParamsPanel Тип раздела: Could not delete the selected partition. MainWindow Невозможно удалить выбранный раздел. Initialize MainWindow Инициализировать Error: MainWindow in any error alert Ошибка: Partition %ld DiskView Раздел %ld -The partition %s has been successfully initialized.\n MainWindow Раздел %s был успешно инициализирован.\n DiskView <пусто> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Не удалось инициализировать раздел %s. (Изменения не были записаны на диск.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Вы уверены, что хотите записать изменения на диск прямо сейчас?\n\nЕсли вы продолжите, то все данные на выбранном разделе будут безвозвратно потеряны! Mounted at PartitionList Подключен в -Failed to initialize the partition %s!\n MainWindow Не удалось инициализировать раздел %s!\n There was an error acquiring the partition row. MainWindow Произошла ошибка при получении списка разделов. You need to select a partition entry from the list. MainWindow Вам нужно выбрать раздел из списка. -Format (not implemented) MainWindow Форматировать (еще не реализовано) The currently selected partition does not have a parent partition. MainWindow Выбранный раздел не имеет родительского раздела. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Вы уверены, что хотите записать изменения на диск прямо сейчас?\n\nВсе данные на выбранном диске будут безвозвратно потеряны, если вы продолжите! -Offset: %ld MB Support Смещение: %ld Мбайт +Offset: %ld MB Support Смещение: %ld МБ Write changes MainWindow Записать изменения There was an error preparing the disk for modifications. MainWindow Произошла ошибка при сохранении изменений на диск. The partition %s is already mounted. MainWindow Раздел %s уже отключен. @@ -55,12 +51,10 @@ Cannot delete the selected partition. MainWindow Невозможно удал Mount all MainWindow Подключить все Cancel MainWindow Отмена Delete partition MainWindow Удалить раздел -End: %ld MB Support Конец: %ld Мбайт -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Вы уверены, что хотите инициализировать раздел \"%s\"?\nПовторный запрос будет выдан непосредственно перед записью изменений на диск. +End: %ld MB Support Конец: %ld МБ Eject MainWindow Извлечь Partition MainWindow Раздел File system PartitionList Файловая система -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Вы уверены, что хотите инициализировать раздел?\nПовторный запрос будет выдан непосредственно перед записью изменений на диск. Validation of the given creation parameters failed. MainWindow Не удалось применить введённые при создании параметры. Size PartitionList Размер Validation of the given initialization parameters failed. MainWindow Не удалось применить параметры, введенные при инициализации. diff --git a/data/catalogs/apps/drivesetup/sk.catkeys b/data/catalogs/apps/drivesetup/sk.catkeys index 90ad4af38f..a45a3965ce 100644 --- a/data/catalogs/apps/drivesetup/sk.catkeys +++ b/data/catalogs/apps/drivesetup/sk.catkeys @@ -1,4 +1,4 @@ -1 slovak x-vnd.Haiku-DriveSetup 1209826930 +1 slovak x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name Nastavenie diskových oblastí Delete MainWindow Zmazať Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Ste si istý, že chcete tieto zmeny teraz zapísať na disk?\n\nAk tak urobíte, všetky údaje na vybranej diskovej oblasti budú nenávratne stratené! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel Názov oblasti: Initialize InitParamsPanel Inicializovať Could not mount partition %s. MainWindow Nepodarilo sa pripojiť oblasť %s. The partition %s is already unmounted. MainWindow Oblasť %s je už odpojená. -Failed to initialize the partition. No changes have been written to disk. MainWindow Nepodarilo sa inicializovať oblasť. Žiadne zmeny neboli zapísané na disk. Failed to delete the partition. No changes have been written to disk. MainWindow Nepodarilo sa zmazať oblasť. Žiadne zmeny neboli zapísané na disk. Partition type: CreateParamsPanel Typ oblasti: Could not delete the selected partition. MainWindow Nepodarilo sa zmazať vybranú oblasť. Initialize MainWindow Inicializovať Error: MainWindow in any error alert Chyba: Partition %ld DiskView Oblasť %ld -The partition %s has been successfully initialized.\n MainWindow Oblasť %s bola úspešne inicializovaná.\n DiskView Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Nepodarilo sa inicializovať oblasť %s. (Žiadne zmeny neboli zapísané na disk.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Ste si istý, že chcete tieto zmeny teraz zapísať na disk?\n\nAk tak urobíte, všetky údaje na vybranej diskovej oblasti budú nenávratne stratené! Mounted at PartitionList Pripojené na -Failed to initialize the partition %s!\n MainWindow Nepodarilo sa inicializovať oblasť %s!\n There was an error acquiring the partition row. MainWindow Vyskytla sa chyba pri získavaní radu oblasti. You need to select a partition entry from the list. MainWindow Musíte vybrať záznam oblasti zo zoznamu. -Format (not implemented) MainWindow Formát (neimplementované) The currently selected partition does not have a parent partition. MainWindow Momentálne vybraná oblasť nemá nadradenú oblasť. Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow Ste si istý, že chcete tieto zmeny teraz zapísať na disk?\n\nAk tak urobíte, všetky údaje na vybranom disku budú nenávratne stratené! Offset: %ld MB Support Ofset: %ld MB @@ -56,11 +52,9 @@ Mount all MainWindow Pripojiť všetky Cancel MainWindow Zrušiť Delete partition MainWindow Zmazať oblasť End: %ld MB Support Koniec: %ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow Ste si istý, že chcete inicializovať diskovú oblasť „%s“? Znova sa vás spýtame pred zapísaním zmien na disk. Eject MainWindow Vysunúť Partition MainWindow Oblasť File system PartitionList Súborový systém -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow Ste si istý, že chcete inicializovať diskovú oblasť? Znova sa vás spýtame pred zapísaním zmien na disk. Validation of the given creation parameters failed. MainWindow Overenie zadaných parametrov vytvorenia zlyhalo. Size PartitionList Veľkosť Validation of the given initialization parameters failed. MainWindow Overenie zadaných parametrov inicializácie zlyhalo. diff --git a/data/catalogs/apps/drivesetup/uk.catkeys b/data/catalogs/apps/drivesetup/uk.catkeys index 4d0f1b51e7..3ed19933c4 100644 --- a/data/catalogs/apps/drivesetup/uk.catkeys +++ b/data/catalogs/apps/drivesetup/uk.catkeys @@ -1,4 +1,4 @@ -1 ukrainian x-vnd.Haiku-DriveSetup 1911470348 +1 ukrainian x-vnd.Haiku-DriveSetup 58298917 DriveSetup System name DriveSetup Delete MainWindow Видалити Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow Ви впевнені, що бажаєте записати зміни на диск зараз?\n\nВсі дані на вибраному розділі будуть безповоротно втрачені! @@ -16,20 +16,16 @@ Partition name: CreateParamsPanel Ім'я розділу: Initialize InitParamsPanel Ініціалізувати Could not mount partition %s. MainWindow Неможливо підмонтувати розділ %s. The partition %s is already unmounted. MainWindow Розділ %s повністю відмонтований. -Failed to initialize the partition. No changes have been written to disk. MainWindow Ініціалізація розділу призупинена. Жодні зміни не були записані на диск. Failed to delete the partition. No changes have been written to disk. MainWindow Видалення розділу призупинене. Жодні зміни не були записані на диск. Partition type: CreateParamsPanel Тип розділу: Could not delete the selected partition. MainWindow Неможливо видалити вибраний розділ. Initialize MainWindow Ініціалізація Error: MainWindow in any error alert Помилка: Partition %ld DiskView Розділ %ld -The partition %s has been successfully initialized.\n MainWindow Розділ %s був успішно ініціалізований.\n DiskView <пусто> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow Ініціалізація розділу %s призупинена. (Нічого не було записано на диск.) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow Ви впевнені, що бажаєте записати зміни на диск?\n\nВсі дані на розділі будуть безповоротно втрачені! Mounted at PartitionList Змонтувати на -Failed to initialize the partition %s!\n MainWindow Призупинена ініціалізація розділу %s!\n There was an error acquiring the partition row. MainWindow Сталася помилка при одержанні параметрів розділу. You need to select a partition entry from the list. MainWindow Ви повинні вибрати розділ зі списку. -Format (not implemented) MainWindow Форматування(не підтримується) The currently selected partition does not have a parent partition. MainWindow Поточний розділ не має батіківського розділу. diff --git a/data/catalogs/apps/drivesetup/zh-Hans.catkeys b/data/catalogs/apps/drivesetup/zh-Hans.catkeys index bec8c0a857..6ba5ebc90c 100644 --- a/data/catalogs/apps/drivesetup/zh-Hans.catkeys +++ b/data/catalogs/apps/drivesetup/zh-Hans.catkeys @@ -1,4 +1,4 @@ -1 english x-vnd.Haiku-DriveSetup 1209826930 +1 english x-vnd.Haiku-DriveSetup 2908539543 DriveSetup System name 磁盘管理器 Delete MainWindow 删除 Are you sure you want to write the changes back to disk now?\n\nAll data on the selected partition will be irretrievably lost if you do so! MainWindow 您确定将所做修改写入磁盘吗?\n\n如果执行此操作,选中分区上的所有数据将丢失,无法恢复! @@ -16,22 +16,18 @@ Partition name: CreateParamsPanel 分区名称: Initialize InitParamsPanel 初始化 Could not mount partition %s. MainWindow 无法挂载分区 %s。 The partition %s is already unmounted. MainWindow 分区 %s 已经卸载。 -Failed to initialize the partition. No changes have been written to disk. MainWindow 初始化分区失败。所作修改未写入磁盘。 Failed to delete the partition. No changes have been written to disk. MainWindow 删除分区失败。所作修改未写入磁盘。 Partition type: CreateParamsPanel 分区类型: Could not delete the selected partition. MainWindow 无法删除所选分区。 Initialize MainWindow 初始化 Error: MainWindow in any error alert 错误: Partition %ld DiskView 分区 %ld -The partition %s has been successfully initialized.\n MainWindow 分区 %s 已被初始化。\n DiskView <空白> Initialization of the partition %s failed. (Nothing has been written to disk.) MainWindow 初始化分区 %s 失败。(修改未写入磁盘。) Are you sure you want to write the changes back to disk now?\n\nAll data on the partition will be irretrievably lost if you do so! MainWindow 您确定将所做修改写入磁盘吗?\n\n如果执行该操作,分区中的所有数据将丢失,无法恢复! Mounted at PartitionList 挂载于 -Failed to initialize the partition %s!\n MainWindow 无法初始化分区 %s!\n There was an error acquiring the partition row. MainWindow 获取分区序列出错。 You need to select a partition entry from the list. MainWindow 您需要从列表中选择一个分区。 -Format (not implemented) MainWindow 格式化(未执行) The currently selected partition does not have a parent partition. MainWindow 当前选中分区无父分区。 Are you sure you want to write the changes back to disk now?\n\nAll data on the selected disk will be irretrievably lost if you do so! MainWindow 您确定将所做修改写入磁盘吗?\n\n如果执行该操作,选中磁盘中的所有数据将丢失,无法恢复! Offset: %ld MB Support 偏移量:%ld MB @@ -56,11 +52,9 @@ Mount all MainWindow 挂载所有磁盘 Cancel MainWindow 取消 Delete partition MainWindow 删除分区 End: %ld MB Support 结束:%ld MB -Are you sure you want to initialize the partition \"%s\"? You will be asked again before changes are written to the disk. MainWindow 您确定初始化\"%s\"分区吗?在修改写入磁盘之前,您将会再次接受询问。 Eject MainWindow 弹出 Partition MainWindow 分区 File system PartitionList 文件系统 -Are you sure you want to initialize the partition? You will be asked again before changes are written to the disk. MainWindow 您确定初始化分区吗?在修改写入磁盘之前,您将会再次接受询问。 Validation of the given creation parameters failed. MainWindow 给定创建参数验证失败。 Size PartitionList 大小 Validation of the given initialization parameters failed. MainWindow 给定初始化参数验证失败。 diff --git a/data/catalogs/apps/expander/fr.catkeys b/data/catalogs/apps/expander/fr.catkeys index 5d4491c5d7..b25cfd5ade 100644 --- a/data/catalogs/apps/expander/fr.catkeys +++ b/data/catalogs/apps/expander/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-Expander 386826896 +1 french x-vnd.Haiku-Expander 2398100010 Expand ExpanderMenu Décompresser Close window when done expanding ExpanderPreferences Fermer la fenêtre après l'extraction Set destination… ExpanderMenu Choisir la destination… @@ -6,6 +6,7 @@ Use: ExpanderPreferences Utiliser : File expanded ExpanderWindow Fichier décompressé The destination is read only. ExpanderWindow La destination est en lecture seule. Expander: Open ExpanderWindow Expander : Ouvrir + is not supported ExpanderWindow n'est pas supporté Expander settings ExpanderPreferences Réglages du Décompresseur Select current DirectoryFilePanel Sélectionner le répertoire courant Source ExpanderWindow Source @@ -15,8 +16,11 @@ Cancel ExpanderWindow Annuler Automatically expand files ExpanderPreferences Décompresser les fichiers automatiquement Creating listing for '%s' ExpanderWindow Créer un inventaire pour « %s » Continue ExpanderWindow Continuer +Destination folder ExpanderPreferences Dossier de destination The destination folder does not exist. ExpanderWindow Le dossier de destination n'existe pas. +Other ExpanderPreferences Autre Cancel ExpanderPreferences Annuler +Expansion ExpanderPreferences Décompression Are you sure you want to stop expanding this\narchive? The expanded items may not be complete. ExpanderWindow Êtes vous sur de vouloir stopper la décompression cette\narchive? Les fichiers extraits seront peut être incomplets. Select DirectoryFilePanel Sélectionner Same directory as source (archive) file ExpanderPreferences Même répertoire que le fichier source archivé @@ -39,7 +43,7 @@ Close ExpanderMenu Fermer The destination is not a folder. ExpanderWindow La destination n'est pas un dossier. Open destination folder after extraction ExpanderPreferences Ouvrir le dossier de destination après l'extraction Set source… ExpanderMenu Choisir la source… -Select '%s' DirectoryFilePanel Selectionner '%s' +Select '%s' DirectoryFilePanel Sélectionner '%s' Show contents ExpanderMenu Montrer le contenu Stop ExpanderWindow Arrêt Destination ExpanderWindow Destination diff --git a/data/catalogs/apps/fontdemo/fr.catkeys b/data/catalogs/apps/fontdemo/fr.catkeys new file mode 100644 index 0000000000..1b91450ac8 --- /dev/null +++ b/data/catalogs/apps/fontdemo/fr.catkeys @@ -0,0 +1,20 @@ +1 french x-vnd.Haiku-FontDemo 3756411221 +Outline: ControlView Contour : +Size: 50 ControlView Taille : 50 +Stop cycling ControlView Arrêter de boucler +Shear: 90 ControlView Inclinaison : 90 +Spacing: 0 ControlView Espacement : 0 +Haiku, Inc. FontDemoView Haiku, Inc. +Rotation: %d ControlView Rotation : %d +Shear: %d ControlView Inclinaison : %d +Spacing: %d ControlView Espacement : %d +Cycle fonts ControlView Polices en boucle +Font: ControlView Police : +Rotation: 0 ControlView Rotation : 0 +Haiku, Inc. ControlView Haiku, Inc. +Controls FontDemo Contrôles +Outline: %d ControlView Contour : %d +Text: ControlView Texte : +Antialiased text ControlView Anticrénelage +Bounding boxes ControlView Boîtes englobantes +Size: %d ControlView Taille : %d diff --git a/data/catalogs/apps/glteapot/fr.catkeys b/data/catalogs/apps/glteapot/fr.catkeys index 89eb89ffb5..cd64cf4ad7 100644 --- a/data/catalogs/apps/glteapot/fr.catkeys +++ b/data/catalogs/apps/glteapot/fr.catkeys @@ -1,17 +1,24 @@ -1 french x-vnd.Haiku-GLTeapot 3661633351 +1 french x-vnd.Haiku-GLTeapot 2890609668 Upper center TeapotWindow En haut au centre Lighting TeapotWindow Éclairage +Off TeapotWindow Arrêt Lower left TeapotWindow En bas à gauche White TeapotWindow Blanc Yellow TeapotWindow Jaune Blue TeapotWindow Bleu +Gouraud shading TeapotWindow Ombrages de Gouraud Quit TeapotWindow Quitter +Filled polygons TeapotWindow Polygones pleins Fog TeapotWindow Brouillard +Backface culling TeapotWindow Abattage des faces arrières +Z-buffered TeapotWindow Tampon de profondeur File TeapotWindow Fichier Options TeapotWindow Options Perspective TeapotWindow Perspective GLTeapot System name GLTeapot Green TeapotWindow Vert Right TeapotWindow À droite +FPS display TeapotWindow Afficher la vitesse d'animation +Add a teapot TeapotWindow Ajouter une théière Red TeapotWindow Rouge Lights TeapotWindow Lumières diff --git a/data/catalogs/apps/icon-o-matic/fr.catkeys b/data/catalogs/apps/icon-o-matic/fr.catkeys index c20efc3e8b..5376580672 100644 --- a/data/catalogs/apps/icon-o-matic/fr.catkeys +++ b/data/catalogs/apps/icon-o-matic/fr.catkeys @@ -129,4 +129,4 @@ Color (#%02x%02x%02x) Icon-O-Matic-StyledTextImport Couleur (#%02x%02x%02x) Edit Gradient Icon-O-Matic-SetGradientCmd Éditer le dégadé Remove Shapes Icon-O-Matic-RemoveShapesCmd Enlever les formes Clean up Icon-O-Matic-PathsList Nettoyer -Detect Orient. Icon-O-Matic-PropertyNames Détecter l'orientation +Detect Orient. Icon-O-Matic-PropertyNames Détecter l'orientation. diff --git a/data/catalogs/apps/installedpackages/fr.catkeys b/data/catalogs/apps/installedpackages/fr.catkeys index 0c772f87f3..3e7791b673 100644 --- a/data/catalogs/apps/installedpackages/fr.catkeys +++ b/data/catalogs/apps/installedpackages/fr.catkeys @@ -1,5 +1,5 @@ 1 french x-vnd.Haiku-InstalledPackages 4131220089 -No package selected. UninstallView Aucun paquet sélectionné +No package selected. UninstallView Aucun paquet sélectionné. Remove UninstallView Enlever Package description UninstallView Description du paquet InstalledPackages System name Paquets Installés diff --git a/data/catalogs/apps/installer/fr.catkeys b/data/catalogs/apps/installer/fr.catkeys index aa3549b464..ea9031a2fb 100644 --- a/data/catalogs/apps/installer/fr.catkeys +++ b/data/catalogs/apps/installer/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-Installer 2099988747 +1 french x-vnd.Haiku-Installer 3488795908 So behind the other menu entries towards the bottom of the file, add something similar to these lines:\n\n InstallerApp Ainsi, après les autres entrées du menu vers la fin du fichier, ajouter quelque chose semblable à ces lignes :\n\n Are you sure you want to abort the installation and restart the system? InstallerWindow Êtes-vous sûr de vouloir abandonner l'installation et redémarrer le système ? \t}\n\n InstallerApp \t}\n\n @@ -12,6 +12,7 @@ With GRUB it's: (hdN,n)\n\n InstallerApp Avec GRUB c'est: (hdN,n)\n\n \tsudo update-grub\n\n\n InstallerApp \tsudo update-grub\n\n\n Stop InstallerWindow In alert after pressing Stop Arrêt Install progress: InstallerWindow Avancement de l'installation : +2.2) GRUB 1\n InstallerApp 2.2) GRUB 1\n Starting Installation. InstallProgress Début de l'installation. This is alpha-quality software! It means there is a high risk of losing important data. Make frequent backups! You have been warned.\n\n\n InstallerApp C'est un logiciel en version alpha ! Ce qui signifie qu'il existe un gros risque de perdre des données importantes. Faites des sauvegardes fréquemment ! Vous aurez été prévenu.\n\n\n Are you sure you want to abort the installation? InstallerWindow Êtes-vous sûr de vouloir abandonner l'installation ? @@ -37,6 +38,7 @@ Boot sector successfully written. InstallProgress Écriture du secteur d'amorce Performing installation. InstallProgress Installation en cours. scanning… InstallerWindow recherche… Set up boot menu InstallerWindow Mettre en place le menu de démarrage +2.1) GRUB (since os-prober v1.44)\n InstallerApp 2.1) GRUB (depuis os-prober v1.44)\n The first logical partition always has the number \"4\", regardless of the number of primary partitions.\n\n InstallerApp La première partition logique a toujours le numéro « 4 », quel que soit le nombre de partitions primaires.\n\n GRUB's naming scheme is still: (hdN,n)\n\n InstallerApp La convention de nommage de GRUB est toujours : (hdN,n)\n\n \tsudo /boot/grub/menu.lst\n\n InstallerApp \tsudo /boot/grub/menu.lst\n\n @@ -48,6 +50,7 @@ README InstallerApp LISEZ-MOI The destination disk may not have enough space. Try choosing a different disk or choose to not install optional items. InstallProgress Le disque de destination pourrait ne pas avoir assez de place. Sélectionnez un autre disque ou retirez certains objets optionnels. Please close the Boot Manager and DriveSetup windows before closing the Installer window. InstallerWindow Veuillez fermer les fenêtres du gestionnaire de démarrage et du gestionnaire de disques avant de quitter l'Installeur. Scanning for disks… InstallerWindow Recherche des disques… +2.3) GRUB 2\n InstallerApp 2.3) GRUB 2\n The disk can't be mounted. Please choose a different disk. InstallProgress Impossible de monter ce disque. Veuillez en choisir un autre. ?? of ?? InstallerWindow Unknown progress ?? sur ?? \tmenuentry \"Haiku Alpha\" {\n InstallerApp \tmenuentry \"Haiku Alpha\" {\n @@ -67,10 +70,11 @@ Installer System name Installeur You can't install the contents of a disk onto itself. Please choose a different disk. InstallProgress Vous ne pouvez pas installer le contenu d'un disque sur lui-même. Sélectionnez un autre disque. ??? InstallerWindow Unknown currently copied item ??? \"n\" is the partition number, which for GRUB 2 starts with \"1\"\n InstallerApp « n » est le numéro de la partition, numérotée à partir de « 1 » avec GRUB 2\n +Starting with os-prober v1.44 (e.g. in Ubuntu 11.04 or later), Haiku should be recognized out of the box. To add Haiku to the GRUB menu, open a Terminal and enter:\n\n InstallerApp A partir de os-prober v1.44 (par exemple dans Ubuntu 11.04 ou ultérieure), Haiku doit être reconnu nativement. Pour ajouter Haiku au menu GRUB, ouvrez un Terminal et tapez :\n\n Quit DriveSetup InstallerWindow Quitter le Gestionnaire de Disques \"N\" is the hard disk number, starting with \"0\".\n InstallerApp « N » est le numéro du disque dur, numéroté à partir de « 0 ».\n Hide optional packages InstallerWindow Cacher les paquets optionnels -Please close the DriveSetup window before closing the Installer window. InstallerWindow Veuillez fermer la fenêtre du Gestionnaire de Disques avant celle de l'Installeur +Please close the DriveSetup window before closing the Installer window. InstallerWindow Veuillez fermer la fenêtre du Gestionnaire de Disques avant celle de l'Installeur. Restart system InstallerWindow Redémarrer le système OK InstallerWindow OK Set up partitions… InstallerWindow Ajuster les partitions… @@ -85,8 +89,8 @@ Have fun and thanks a lot for trying out Haiku! We hope you like it! InstallerAp OK InstallProgress OK Please choose target InstallerWindow Veuillez sélectionner la destination ??? InstallerWindow Unknown partition name ??? -1) If you are installing Haiku onto real hardware (not inside an emulator) it is recommended that you have already prepared a hard disk partition. The Installer and the DriveSetup tool offer to initialize existing partitions with the Haiku native file system, but the options to change the actual partition layout may not have been tested on a sufficiently great variety of computer configurations so we do not recommend using it.\n InstallerApp 1) Si vous installez Haiku sur du matériel réel (pas dans un émulateur) il vous est recommandé de préparer au préalable une partition sur votre disque dur. L'installeur et le gestionnaire de disques permettent d'initialiser des partitions existantes au système de fichier natif de Haiku, mais les options pour changer la disposition actuelle des partitions peuvent ne pas avoir été testées sur un assez grand nombre d'ordinateurs donc il n'est pas conseillé de les utiliser.\n -2) The Installer will make the Haiku partition itself bootable, but takes no steps to integrate Haiku into an existing boot menu. If you have GRUB already installed, you can add Haiku to its boot menu. Depending on what version of GRUB you use, this is done differently.\n\n\n InstallerApp 2) L'installeur va rendre la partition Haiku amorçable, mais ne s'occupera pas d'intégrer Haiku à un menu de démarrage existant. Si vous avez déjà installé GRUB, vous pouvez ajouter Haiku à son menu de démarrage. Cela se fait différemment en fonction de la version de GRUB que vous utilisez.\n\n\n +1) If you are installing Haiku onto real hardware (not inside an emulator) it is recommended that you have already prepared a hard disk partition. The Installer and the DriveSetup tool offer to initialize existing partitions with the Haiku native file system, but the options to change the actual partition layout may not have been tested on a sufficiently great variety of computer configurations so we do not recommend using it.\n InstallerApp 1) Si vous installez Haiku sur du matériel réel (pas dans un émulateur) il vous est recommandé de préparer au préalable une partition sur votre disque dur. L'installeur et le gestionnaire de disques permettent d'initialiser des partitions existantes au système de fichier natif de Haiku, mais les options pour changer la disposition actuelle des partitions peuvent ne pas avoir été testées sur un assez grand nombre d'ordinateurs donc il n'est pas conseillé de les utiliser.\n +2) The Installer will make the Haiku partition itself bootable, but takes no steps to integrate Haiku into an existing boot menu. If you have GRUB already installed, you can add Haiku to its boot menu. Depending on what version of GRUB you use, this is done differently.\n\n\n InstallerApp 2) L'installeur va rendre la partition Haiku amorçable, mais ne s'occupera pas d'intégrer Haiku à un menu de démarrage existant. Si vous avez déjà installé GRUB, vous pouvez ajouter Haiku à son menu de démarrage. Cela se fait différemment en fonction de la version de GRUB que vous utilisez.\n\n\n Begin InstallerWindow Commencer Finally, you have to update the boot menu by entering:\n\n InstallerApp Finalement, vous devez mettre à jour le menu de démarrage en entrant :\n\n If you have not created a partition yet, simply reboot, create the partition using whatever tool you feel most comfortable with, and reboot into Haiku to continue with the installation. You could for example use the GParted Live-CD, it can also resize existing partitions to make room.\n\n\n InstallerApp Si vous n'avez pas encore créé de partition, redémarrez et créez-la avec votre outil préféré, puis revenez dans Haiku pour continuer l'installation. Vous pouvez par exemple utiliser le Live-CD GParted, qui permet au besoin, de redimensionner les partitions pour faire de la place.\n\n\n @@ -105,10 +109,11 @@ NOTE: While the naming strategy for hard disks is still as described under 2.1) Cancel InstallProgress Annuler Running Boot Manager and DriveSetup…\n\nClose both applications to continue with the installation. InstallerWindow Lancement du gestionnaire de démarrage et de DriveSetup…\n\nFermez ces deux applications pour poursuivre l'installation. Try installing anyway InstallProgress Essayer d'installer quand même -So below the heading that must not be edited, add something similar to these lines:\n\n InstallerApp En dessous de l'entête qui ne doit pas être modifiée, ajoutez quelque chose semblable à ces lignes:\n\n +So below the heading that must not be edited, add something similar to these lines:\n\n InstallerApp En dessous de l'entête qui ne doit pas être modifiée, ajoutez quelque chose semblable à ces lignes :\n\n Are you sure you want to to stop the installation? InstallerWindow Êtes vous sur de vouloir arrêter l'installation ? Onto: InstallerWindow Vers : Please close the Boot Manager window before closing the Installer window. InstallerWindow Veuillez fermer la fenêtre du gestionnaire de démarrage avant de fermer la fenêtre d'Installation. +3) When you successfully boot into Haiku for the first time, make sure to read our \"Welcome\" and \"Userguide\" documentation. There are links on the Desktop and in WebPositive's bookmarks.\n\n InstallerApp 3) Lorsque vous aurez démarré Haiku pour la première fois, prenez le temps de lire notre documentation de « Bienvenue » et le « Guide utilisateur ». Vous les trouverez en liens sur le bureau et en signet dans WebPositive.\n\n Tools InstallerWindow Outils The mount point could not be retrieved. InstallProgress Le point de montage n'a pu être récupéré. The target volume is not empty. Are you sure you want to install anyway?\n\nNote: The 'system' folder will be a clean copy from the source volume, all other folders will be merged, whereas files and links that exist on both the source and target volume will be overwritten with the source volume version. InstallProgress Le volume de destination n'est pas vide. Souhaitez-vous tout de même effectuer l'installation ?\n\nNote : le dossier 'system' sera une copie fidèle de celui du volume source, le contenu des autres dossiers sera fusionné, tandis que les fichiers ou liens du volume source remplaceront les fichiers ou les liens existants sur le volume de destination. diff --git a/data/catalogs/apps/installer/ru.catkeys b/data/catalogs/apps/installer/ru.catkeys index 7ab7f7d697..4fb9c90544 100644 --- a/data/catalogs/apps/installer/ru.catkeys +++ b/data/catalogs/apps/installer/ru.catkeys @@ -7,7 +7,7 @@ Newer versions of GRUB use an extra configuration file to add custom entries to Here you have to comment out the line \"GRUB_HIDDEN_TIMEOUT=0\" by putting a \"#\" in front of it in order to actually display the boot menu.\n\n InstallerApp Здесь вы должны закомментировать строку \"GRUB_HIDDEN_TIMEOUT=0\", поставив решетку \"#\" в начале этой строки, для того, чтобы появилось загрузочное меню.\n\n Installation completed. Boot sector has been written to '%s'. Press Quit to leave the Installer or choose a new target volume to perform another installation. InstallerWindow Установка завершена. Загрузочный сектор был записан на раздел '%s'. Нажмите \"Выход\" чтобы закрыть Установщик или выберите другой раздел, если хотите выполнить новую установку. Quit InstallerApp Выход -Additional disk space required: 0.0 KiB InstallerWindow Необходимо дополнительного пространства: 0.0 Кбайт +Additional disk space required: 0.0 KiB InstallerWindow Требуемое дополнительное пространство: 0.0 Кб With GRUB it's: (hdN,n)\n\n InstallerApp В GRUB это: (hdN,n)\n\n \tsudo update-grub\n\n\n InstallerApp \tsudo update-grub\n\n\n Stop InstallerWindow In alert after pressing Stop Остановить diff --git a/data/catalogs/apps/launchbox/fr.catkeys b/data/catalogs/apps/launchbox/fr.catkeys index 0abe51e453..231f6ae23b 100644 --- a/data/catalogs/apps/launchbox/fr.catkeys +++ b/data/catalogs/apps/launchbox/fr.catkeys @@ -1,4 +1,4 @@ -1 french x-vnd.Haiku-LaunchBox 3587127275 +1 french x-vnd.Haiku-LaunchBox 3016105370 New LaunchBox Nouveau Set description… LaunchBox Ajouter une description… Vertical layout LaunchBox Disposition verticale @@ -18,11 +18,13 @@ Bummer LaunchBox Zut Cancel LaunchBox Annuler Remove button LaunchBox Ôter le boutton Horizontal layout LaunchBox Disposition horizontale +\n\nFailed to launch application with signature '%2'.\n\nError: LaunchBox \n\nÉchec au lancement de l'application à la signature '%2'.\n\nErreur : Failed to launch '%1'.\n\nError: LaunchBox Impossible de lancer « %1 ».\n\nErreur : Name Panel LaunchBox Nom du panneau Add button here LaunchBox Ajouter un bouton ici Description for '%3' LaunchBox Description for « %3 » Settings LaunchBox Réglages +Failed to launch 'something', error in Pad data. LaunchBox Impossible de lancer «quelque chose» : erreur dans les données du Pad. Pad %1 LaunchBox Pavé %1 Close LaunchBox Fermer Failed to send 'open folder' command to Tracker.\n\nError: LaunchBox Impossible d'envoyer « ouvrir le dossier » au Tracker.\n\nErreur : diff --git a/data/catalogs/apps/magnify/fr.catkeys b/data/catalogs/apps/magnify/fr.catkeys index df20b8a680..16bef6518c 100644 --- a/data/catalogs/apps/magnify/fr.catkeys +++ b/data/catalogs/apps/magnify/fr.catkeys @@ -1,27 +1,28 @@ -1 french x-vnd.Haiku-Magnify 2227745383 -no clip msg\n In console, when clipboard is empty after clicking Copy image Aucun clip\n +1 french x-vnd.Haiku-Magnify 3515889001 +no clip msg\n In console, when clipboard is empty after clicking Copy image aucun clip\n Make square Magnify-Main Rendre carré Copy image Magnify-Main Copier l'image Magnify help Magnify-Help Aide de la Loupe usage: magnify [size] (magnify size * size pixels)\n Console utilisation : magnify [taille] (taille d'agrandissement * taille des pixels)\n Stick coordinates Magnify-Main Mémoriser les coordonnées -Info:\n hide/show info - hides/shows all these new features\n note: when showing, a red square will appear which signifies\n which pixel's rgb values will be displayed\n add/remove crosshairs - 2 crosshairs can be added (or removed)\n to aid in the alignment and placement of objects.\n The crosshairs are represented by blue squares and blue lines.\n hide/show grid - hides/shows the grid that separates each pixel\n Magnify-Help informations :\n Cacher/Afficher les informations - cache ou affiche toutes les nouvelles fonctionnalités\n note : Lorsqu'un carré rouge apparait.\n Il indique sur quel pixel la valeur de couleur RVB est mesurées.\n Ajouter/Enlever un viseur - 2 viseurs peuvent être ajoutés (ou retirés...)\n pour aider à aligner et placer des objets.\n Les viseurs sont représentés par des carrés bleus et des lignes bleus.\n montrer/cacher la grille - montre ou cache la grille séparant chaque pixel.\n +Info:\n hide/show info - hides/shows all these new features\n note: when showing, a red square will appear which signifies\n which pixel's rgb values will be displayed\n add/remove crosshairs - 2 crosshairs can be added (or removed)\n to aid in the alignment and placement of objects.\n The crosshairs are represented by blue squares and blue lines.\n hide/show grid - hides/shows the grid that separates each pixel\n Magnify-Help Informations :\n cacher/afficher les informations - cache ou affiche toutes les nouvelles fonctionnalités\n note : Lorsqu'un carré rouge apparait\n Il indique sur quel pixel la valeur de couleur RVB est mesurées\n Ajouter/Enlever un viseur - 2 viseurs peuvent être ajoutés (ou retirés...)\n pour aider à aligner et placer des objets\n les viseurs sont représentés par des carrés bleus et des lignes bleus\n montrer/cacher la grille - montre ou cache la grille séparant chaque pixel\n Hide/Show grid Magnify-Main Cacher/afficher la grille magnify: size must be a multiple of 4\n Console Loupe : la taille doit être un multiple de 4\n General:\n 32 x 32 - the top left numbers are the number of visible\n pixels (width x height)\n 8 pixels/pixel - represents the number of pixels that are\n used to magnify a pixel\n R:152 G:52 B:10 - the RGB values for the pixel under\n the red square\n Magnify-Help Général :\n 32⨯32 - les nombres dans le coin supérieur gauche représentent\n le nombre de pixels affichés (largeur ⨯ hauteur).\n 8 pixels/pixel - représente le facteur de grossissement des pixels.\n R:152 V:52 B:10 - les valeurs RVB du pixel sous le carré rouge.\n Help Magnify-Main Aide -Sizing/Resizing:\n make square - sets the width and the height to the larger\n of the two making a square image\n increase/decrease window size - grows or shrinks the window\n size by 4 pixels.\n note: this window can also be resized to any size via the\n resizing region of the window\n increase/decrease pixel size - increases or decreases the number\n of pixels used to magnify a 'real' pixel. Range is 1 to 16.\n Magnify-Help Dimensionnement/Redimensionnement :\n Rendre carré - définit la largeur et la hauteur à la plus grande\n des deux pour faire une image carrée\n Augmenter/Diminuer la taille de la fenêtre - augmente ou\n diminue la taille de la fenêtre de 4 pixels\n note : la fenêtre peut également être redimensionnée à\n n'importe quelle taille par l'intermédiaire de sa poignée.\n Augmenter/Réduire le grossissement - augmente ou diminue\n le nombre de pixels utilisés pour grossir un « vrai » pixel, le\n grossissement allant de 1 à 16.\n +Sizing/Resizing:\n make square - sets the width and the height to the larger\n of the two making a square image\n increase/decrease window size - grows or shrinks the window\n size by 4 pixels.\n note: this window can also be resized to any size via the\n resizing region of the window\n increase/decrease pixel size - increases or decreases the number\n of pixels used to magnify a 'real' pixel. Range is 1 to 16.\n Magnify-Help Dimensionnement/Redimensionnement :\n Rendre carré - définit la largeur et la hauteur à la plus grande\n des deux pour faire une image carrée.\n Augmenter/Diminuer la taille de la fenêtre - aug.mente ou\n diminue la taille de la fenêtre de 4 pixels.\n note : la fenêtre peut également être redimensionnée à\n n'importe quelle taille par l'intermédiaire de sa poignée.\n Augmenter/Réduire le grossissement - augmente ou diminue\n le nombre de pixels utilisés pour grossir un « vrai » pixel, le\n grossissement allant de 1 à 16.\n Decrease pixel size Magnify-Main Réduire le grossissement Magnify System name Loupe %width x %height @ %pixelSize pixels/pixel Magnify-Main %width ⨯ %height @ %pixelSize pixels/pixel Info Magnify-Main Information Remove a crosshair Magnify-Main Enlever un viseur Freeze/Unfreeze image Magnify-Main Gèle/Dégèle l'image -Copy/Save:\n copy - copies the current image to the clipboard\n save - prompts the user for a file to save to and writes out\n the bits of the image\n Magnify-Help Copier/Enregistrer :\n copier - copie l'image vers le presse-papier\n enregistrer : demande à l'utilisateur de spécifier un fichier de destination où\n enregistrer l'image.\n +Copy/Save:\n copy - copies the current image to the clipboard\n save - prompts the user for a file to save to and writes out\n the bits of the image\n Magnify-Help Copier/Enregistrer :\n copier - copie l'image vers le presse-papier\n enregistrer : demande à l'utilisateur de spécifier un fichier\n de destination où enregistrer l'image\n Hide/Show info Magnify-Main Cacher/Afficher les informations -Navigation:\n arrow keys - move the current selection (rgb indicator or crosshair)\n around 1 pixel at a time\n option-arrow key - moves the mouse location 1 pixel at a time\n x marks the selection - the current selection has an 'x' in it\n Magnify-Help Navigation :\n les flèches de direction - déplacent l'élément sélectionné (l'indicateur RVB ou les viseurs) pixel par pixel.\n les flèches de direction+