From 066522e87b5aa9f25957e3f419ac3a0565edbb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Mon, 14 Mar 2011 14:41:13 +0000 Subject: [PATCH] Localization changes. Use of B_TRANSLATE_APP_NAME(). Small cleanups. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40949 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/cdplayer/CDPlayer.cpp | 7 ++++--- src/apps/charactermap/CharacterWindow.cpp | 5 +++-- src/apps/clock/Jamfile | 8 +++++++- src/apps/clock/clock.cpp | 4 +++- src/apps/codycam/CodyCam.cpp | 5 +++-- src/apps/deskbar/BarWindow.cpp | 8 ++++---- src/apps/devices/DevicesApplication.cpp | 2 +- src/apps/diskprobe/OpenWindow.cpp | 7 ++++--- src/apps/diskusage/MainWindow.cpp | 2 +- src/apps/drivesetup/MainWindow.cpp | 3 ++- src/apps/expander/ExpanderApp.cpp | 2 +- src/apps/expander/ExpanderWindow.cpp | 4 ++-- src/apps/glteapot/Jamfile | 8 +++++++- src/apps/glteapot/TeapotApp.cpp | 11 ++++++++--- src/apps/icon-o-matic/MainWindow.cpp | 4 ++-- 15 files changed, 52 insertions(+), 28 deletions(-) diff --git a/src/apps/cdplayer/CDPlayer.cpp b/src/apps/cdplayer/CDPlayer.cpp index eaeab74df5..87f0316a84 100644 --- a/src/apps/cdplayer/CDPlayer.cpp +++ b/src/apps/cdplayer/CDPlayer.cpp @@ -633,9 +633,10 @@ CDPlayer::_WatchCDState() CDPlayerWindow::CDPlayerWindow() - : BWindow(BRect (100, 100, 405, 280), B_TRANSLATE("CDPlayer"), - B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE | - B_ASYNCHRONOUS_CONTROLS) + : + BWindow(BRect (100, 100, 405, 280), B_TRANSLATE_APP_NAME("CDPlayer"), + B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE + | B_ASYNCHRONOUS_CONTROLS) { } diff --git a/src/apps/charactermap/CharacterWindow.cpp b/src/apps/charactermap/CharacterWindow.cpp index f08a5b5fd5..7f15c30431 100644 --- a/src/apps/charactermap/CharacterWindow.cpp +++ b/src/apps/charactermap/CharacterWindow.cpp @@ -122,9 +122,10 @@ private: CharacterWindow::CharacterWindow() - : BWindow(BRect(100, 100, 700, 550), B_TRANSLATE("CharacterMap"), + : + BWindow(BRect(100, 100, 700, 550), B_TRANSLATE_APP_NAME("CharacterMap"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE - | B_AUTO_UPDATE_SIZE_LIMITS) + | B_AUTO_UPDATE_SIZE_LIMITS) { BMessage settings; _LoadSettings(settings); diff --git a/src/apps/clock/Jamfile b/src/apps/clock/Jamfile index ca92df7afe..c01a0c3bec 100644 --- a/src/apps/clock/Jamfile +++ b/src/apps/clock/Jamfile @@ -6,6 +6,12 @@ Application Clock : cl_view.cpp cl_wind.cpp clock.cpp - : be $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : Clock.rdef ; + +DoCatalogs Clock : + x-vnd.Haiku-Clock + : + clock.cpp +; diff --git a/src/apps/clock/clock.cpp b/src/apps/clock/clock.cpp index 3c1c1aa724..6a775f3ee2 100644 --- a/src/apps/clock/clock.cpp +++ b/src/apps/clock/clock.cpp @@ -7,6 +7,7 @@ #include +#include #include "cl_wind.h" @@ -19,7 +20,8 @@ main(int argc, char* argv[]) { BApplication app(kAppSignature); - BWindow* clockWindow = new TClockWindow(BRect(100, 100, 182, 182), "Clock"); + BWindow* clockWindow = new TClockWindow(BRect(100, 100, 182, 182), + B_TRANSLATE_APP_NAME("Clock")); clockWindow->Show(); app.Run(); diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index 14a066a884..db18942bf7 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -56,7 +56,8 @@ namespace { void ErrorAlert(const char* message, status_t err, BWindow *window = NULL) { - BAlert *alert = new BAlert("", message, B_TRANSLATE("OK")); + BAlert *alert = new BAlert(B_TRANSLATE_APP_NAME("CodyCam"), message, + B_TRANSLATE("OK")); if (window != NULL) alert->CenterIn(window->Frame()); alert->Go(); @@ -190,7 +191,7 @@ void CodyCam::ReadyToRun() { fWindow = new VideoWindow(BRect(28, 28, 28, 28), - (const char*) B_TRANSLATE("CodyCam"), B_TITLED_WINDOW, + (const char*) B_TRANSLATE_APP_NAME("CodyCam"), B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort); _SetUpNodes(); diff --git a/src/apps/deskbar/BarWindow.cpp b/src/apps/deskbar/BarWindow.cpp index 39e7ce68e2..f6db5f45fe 100644 --- a/src/apps/deskbar/BarWindow.cpp +++ b/src/apps/deskbar/BarWindow.cpp @@ -85,11 +85,11 @@ TBeMenu* TBarWindow::sBeMenu = NULL; TBarWindow::TBarWindow() : - BWindow(BRect(-1000.0f, -1000.0f, -1000.0f, -1000.0f), B_TRANSLATE("Deskbar"), - B_BORDERED_WINDOW, + BWindow(BRect(-1000.0f, -1000.0f, -1000.0f, -1000.0f), + B_TRANSLATE_APP_NAME("Deskbar"), B_BORDERED_WINDOW, B_WILL_ACCEPT_FIRST_CLICK | B_NOT_ZOOMABLE | B_NOT_CLOSABLE - | B_NOT_MINIMIZABLE | B_NOT_MOVABLE | B_NOT_RESIZABLE - | B_AVOID_FRONT | B_ASYNCHRONOUS_CONTROLS, + | B_NOT_MINIMIZABLE | B_NOT_MOVABLE | B_NOT_RESIZABLE + | B_AVOID_FRONT | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES) { desk_settings* settings = ((TBarApp*)be_app)->Settings(); diff --git a/src/apps/devices/DevicesApplication.cpp b/src/apps/devices/DevicesApplication.cpp index 5d2ed6a5b9..d727d5a984 100644 --- a/src/apps/devices/DevicesApplication.cpp +++ b/src/apps/devices/DevicesApplication.cpp @@ -76,7 +76,7 @@ DevicesApplication::ShowAbout() DevicesWindow::DevicesWindow() : - BWindow(BRect(50, 50, 750, 550), B_TRANSLATE("Devices"), + BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_APP_NAME("Devices"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS | B_QUIT_ON_WINDOW_CLOSE) diff --git a/src/apps/diskprobe/OpenWindow.cpp b/src/apps/diskprobe/OpenWindow.cpp index ca96bc1371..ef4c47a194 100644 --- a/src/apps/diskprobe/OpenWindow.cpp +++ b/src/apps/diskprobe/OpenWindow.cpp @@ -32,9 +32,10 @@ static const uint32 kMsgProbeDevice = 'prFl'; OpenWindow::OpenWindow() - : BWindow(BRect(0, 0, 35, 10), B_TRANSLATE("DiskProbe"), B_TITLED_WINDOW, - B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS - | B_AUTO_UPDATE_SIZE_LIMITS) + : + BWindow(BRect(0, 0, 35, 10), B_TRANSLATE_APP_NAME("DiskProbe"), + B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE + | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS) { fDevicesMenu = new BPopUpMenu("devices"); CollectDevices(fDevicesMenu); diff --git a/src/apps/diskusage/MainWindow.cpp b/src/apps/diskusage/MainWindow.cpp index 2b9f8ec8e7..188f6176ae 100644 --- a/src/apps/diskusage/MainWindow.cpp +++ b/src/apps/diskusage/MainWindow.cpp @@ -25,7 +25,7 @@ MainWindow::MainWindow(BRect pieRect) : - BWindow(pieRect, B_TRANSLATE("DiskUsage"), B_TITLED_WINDOW, + BWindow(pieRect, B_TRANSLATE_APP_NAME("DiskUsage"), B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE | B_AUTO_UPDATE_SIZE_LIMITS) { diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp index 320701e12b..85b3880b57 100644 --- a/src/apps/drivesetup/MainWindow.cpp +++ b/src/apps/drivesetup/MainWindow.cpp @@ -160,7 +160,8 @@ enum { MainWindow::MainWindow(BRect frame) - : BWindow(frame, B_TRANSLATE("DriveSetup"), B_DOCUMENT_WINDOW, + : + BWindow(frame, B_TRANSLATE_APP_NAME("DriveSetup"), B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE), fCurrentDisk(NULL), fCurrentPartitionID(-1), diff --git a/src/apps/expander/ExpanderApp.cpp b/src/apps/expander/ExpanderApp.cpp index a05f8de965..d954cb6805 100644 --- a/src/apps/expander/ExpanderApp.cpp +++ b/src/apps/expander/ExpanderApp.cpp @@ -29,7 +29,7 @@ ExpanderApp::ExpanderApp() void ExpanderApp::AboutRequested() { - BString appName = B_TRANSLATE("Expander"); + BString appName = B_TRANSLATE_APP_NAME("Expander"); int nameLength = appName.CountChars(); BAlert* alert = new BAlert("about", appName.Append(B_TRANSLATE("\n\twritten by Jérôme Duval\n" diff --git a/src/apps/expander/ExpanderWindow.cpp b/src/apps/expander/ExpanderWindow.cpp index 6a622a8abd..7318155b40 100644 --- a/src/apps/expander/ExpanderWindow.cpp +++ b/src/apps/expander/ExpanderWindow.cpp @@ -50,8 +50,8 @@ const uint32 MSG_SHOWCONTENTS = 'mSCT'; ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref* ref, BMessage* settings) : - BWindow(frame, B_TRANSLATE_COMMENT("Expander", "!! Window Title !!"), - B_TITLED_WINDOW, B_NORMAL_WINDOW_FEEL), + BWindow(frame, B_TRANSLATE_APP_NAME("Expander"), B_TITLED_WINDOW, + B_NORMAL_WINDOW_FEEL), fSourcePanel(NULL), fDestPanel(NULL), fSourceChanged(true), diff --git a/src/apps/glteapot/Jamfile b/src/apps/glteapot/Jamfile index 8dcc073b4a..78b773bf18 100644 --- a/src/apps/glteapot/Jamfile +++ b/src/apps/glteapot/Jamfile @@ -9,6 +9,12 @@ Application GLTeapot : error.cpp TeapotWindow.cpp TeapotApp.cpp - : be GL game $(TARGET_LIBSUPC++) + : be GL game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : GLTeapot.rdef ; + +DoCatalogs GLTeapot : + x-vnd.Haiku-GLTeapot + : + TeapotApp.cpp +; diff --git a/src/apps/glteapot/TeapotApp.cpp b/src/apps/glteapot/TeapotApp.cpp index efefb9ad8f..16b4eaf608 100644 --- a/src/apps/glteapot/TeapotApp.cpp +++ b/src/apps/glteapot/TeapotApp.cpp @@ -3,8 +3,12 @@ This file may be used under the terms of the Be Sample Code License. */ + #include "TeapotApp.h" +#include + + int main(int argc, char** argv) { @@ -16,9 +20,11 @@ main(int argc, char** argv) TeapotApp::TeapotApp(const char* sign) - : BApplication(sign) + : + BApplication(sign) { - fTeapotWindow = new TeapotWindow(BRect(5, 25, 300, 315), "GLTeapot", B_TITLED_WINDOW, 0); + fTeapotWindow = new TeapotWindow(BRect(5, 25, 300, 315), + B_TRANSLATE_APP_NAME("GLTeapot"), B_TITLED_WINDOW, 0); fTeapotWindow->Show(); } @@ -26,7 +32,6 @@ TeapotApp::TeapotApp(const char* sign) void TeapotApp::MessageReceived(BMessage* msg) { -// msg->PrintToStream(); switch (msg->what) { default: diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp index b0e1932ab7..a03d5322be 100644 --- a/src/apps/icon-o-matic/MainWindow.cpp +++ b/src/apps/icon-o-matic/MainWindow.cpp @@ -89,9 +89,9 @@ enum { MainWindow::MainWindow(IconEditorApp* app, Document* document, const BMessage* settings) : - BWindow(BRect(50, 50, 900, 750), "Icon-O-Matic", + BWindow(BRect(50, 50, 900, 750), B_TRANSLATE_APP_NAME("Icon-O-Matic"), B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, - B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS), + B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS), fApp(app), fDocument(document), fIcon(NULL)