From be8fa2fb3088ab1921612b60f352dd9334b40b3d Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 2 Jul 2010 11:36:13 +0000 Subject: [PATCH] * Update all applications in tree to use the new localizing system * Remove the old one from the locale librairy, with some cleanup Known regressions : * readonlybootprompt will no longer update the locale settings : the method used messed with internal undocumented things * external localized apps (webpositive for example) will not run anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/locale/Catalog.h | 26 +--- headers/os/locale/CatalogInAddOn.h | 120 ------------------ headers/os/locale/Locale.h | 2 - headers/os/locale/LocaleRoster.h | 7 +- src/add-ons/tracker/zipomatic/Jamfile | 2 +- src/add-ons/tracker/zipomatic/ZipOMatic.cpp | 1 - src/add-ons/tracker/zipomatic/ZipOMatic.h | 2 - src/apps/aboutsystem/AboutSystem.cpp | 5 +- src/apps/aboutsystem/Jamfile | 2 +- src/apps/bootman/BootManager.cpp | 4 - src/apps/bootman/Jamfile | 2 +- src/apps/codycam/CodyCam.cpp | 5 +- src/apps/codycam/CodyCam.h | 1 - src/apps/codycam/Jamfile | 3 +- src/apps/deskbar/BarApp.cpp | 1 - src/apps/deskbar/BarApp.h | 2 - src/apps/deskbar/Jamfile | 2 +- src/apps/diskprobe/DiskProbe.cpp | 5 +- src/apps/diskprobe/Jamfile | 4 +- src/apps/drivesetup/DriveSetup.cpp | 2 - src/apps/drivesetup/DriveSetup.h | 1 - src/apps/drivesetup/Jamfile | 3 +- src/apps/expander/ExpanderApp.cpp | 2 - src/apps/expander/ExpanderApp.h | 1 - src/apps/expander/Jamfile | 2 +- src/apps/installer/InstallerApp.cpp | 3 - src/apps/installer/InstallerApp.h | 1 - src/apps/installer/Jamfile | 3 +- src/apps/mail/Jamfile | 4 +- src/apps/mail/MailApp.cpp | 2 - src/apps/mail/MailApp.h | 2 - src/apps/midiplayer/Jamfile | 2 +- src/apps/midiplayer/MidiPlayerApp.cpp | 1 - src/apps/midiplayer/MidiPlayerApp.h | 1 - src/apps/packageinstaller/Jamfile | 2 +- src/apps/packageinstaller/main.cpp | 5 +- src/apps/pairs/Jamfile | 2 +- src/apps/pairs/Pairs.cpp | 1 - src/apps/pairs/Pairs.h | 2 - src/apps/pulse/Jamfile | 2 +- src/apps/pulse/PulseApp.cpp | 2 - src/apps/pulse/PulseApp.h | 2 - .../readonlybootprompt/BootPromptWindow.cpp | 11 +- .../readonlybootprompt/BootPromptWindow.h | 1 - src/apps/readonlybootprompt/Jamfile | 2 +- src/apps/screenshot/Jamfile | 4 +- src/apps/screenshot/Screenshot.cpp | 1 - src/apps/screenshot/Screenshot.h | 1 - src/apps/screenshot/ScreenshotApp.cpp | 1 - src/apps/screenshot/ScreenshotApp.h | 1 - src/apps/showimage/Jamfile | 2 +- src/apps/showimage/ShowImageApp.cpp | 2 - src/apps/showimage/ShowImageApp.h | 1 - src/apps/soundrecorder/Jamfile | 2 +- src/apps/soundrecorder/RecorderWindow.cpp | 2 - src/apps/soundrecorder/RecorderWindow.h | 1 - src/apps/stylededit/Jamfile | 3 +- src/apps/stylededit/StyledEditApp.cpp | 2 - src/apps/stylededit/StyledEditApp.h | 1 - src/apps/terminal/Jamfile | 2 +- src/apps/terminal/TermApp.cpp | 5 +- src/apps/terminal/TermApp.h | 1 - src/apps/text_search/GrepWindow.cpp | 5 +- src/apps/text_search/GrepWindow.h | 1 - src/apps/text_search/Jamfile | 3 +- src/apps/tv/Jamfile | 2 +- src/apps/tv/MainApp.cpp | 2 - src/apps/tv/MainApp.h | 1 - src/apps/workspaces/Jamfile | 2 +- src/apps/workspaces/Workspaces.cpp | 2 - src/bin/Jamfile | 2 +- src/bin/dstcheck.cpp | 2 - src/kits/locale/Catalog.cpp | 54 -------- src/kits/locale/CatalogStub.cpp | 10 +- src/kits/locale/Locale.cpp | 12 -- src/kits/locale/LocaleRoster.cpp | 14 +- src/preferences/appearance/APRMain.cpp | 4 - src/preferences/appearance/APRMain.h | 1 - src/preferences/appearance/Jamfile | 2 +- src/preferences/backgrounds/Backgrounds.cpp | 2 - src/preferences/backgrounds/Jamfile | 2 +- src/preferences/cpufrequency/Jamfile | 2 +- src/preferences/cpufrequency/main.cpp | 3 - src/preferences/filetypes/FileTypes.cpp | 3 - src/preferences/filetypes/Jamfile | 2 +- src/preferences/fonts/Jamfile | 2 +- src/preferences/fonts/main.cpp | 4 - src/preferences/keyboard/Jamfile | 2 +- src/preferences/keyboard/Keyboard.cpp | 1 - src/preferences/keyboard/Keyboard.h | 3 - src/preferences/keymap/Jamfile | 2 +- src/preferences/keymap/KeymapApplication.cpp | 1 - src/preferences/keymap/KeymapApplication.h | 1 - src/preferences/locale/LanguageListView.cpp | 1 - src/preferences/locale/Locale.cpp | 3 - src/preferences/locale/LocaleWindow.cpp | 3 - .../locale/TimeFormatSettingsView.cpp | 3 - src/preferences/mail/Jamfile | 2 +- src/preferences/mail/main.cpp | 3 - src/preferences/media/Jamfile | 2 +- src/preferences/media/Media.cpp | 2 - src/preferences/media/Media.h | 1 - src/preferences/mouse/Jamfile | 2 +- src/preferences/mouse/Mouse.cpp | 4 +- src/preferences/mouse/Mouse.h | 2 - src/preferences/network/Jamfile | 2 +- src/preferences/network/NetworkApp.cpp | 1 - src/preferences/network/NetworkApp.h | 1 - src/preferences/opengl/Jamfile | 3 +- src/preferences/opengl/OpenGLApp.cpp | 2 - src/preferences/opengl/OpenGLApp.h | 1 - src/preferences/print/Jamfile | 2 +- src/preferences/print/Printers.cpp | 1 - src/preferences/print/Printers.h | 3 - src/preferences/shortcuts/Jamfile | 2 +- src/preferences/shortcuts/main.cpp | 3 - src/preferences/sounds/HApp.cpp | 2 - src/preferences/sounds/HApp.h | 3 - src/preferences/sounds/Jamfile | 2 +- src/preferences/touchpad/Jamfile | 2 +- src/preferences/touchpad/main.cpp | 3 - src/preferences/virtualmemory/Jamfile | 2 +- .../virtualmemory/VirtualMemory.cpp | 1 - src/preferences/virtualmemory/VirtualMemory.h | 1 - src/servers/mount/AutoMounter.cpp | 3 - src/servers/mount/Jamfile | 2 +- src/servers/print/ConfigWindow.cpp | 2 +- src/servers/print/Jamfile | 2 +- .../print/PrintServerApp.Scripting.cpp | 3 +- src/servers/print/PrintServerApp.cpp | 1 - src/servers/print/PrintServerApp.h | 1 - src/servers/print/Printer.Scripting.cpp | 3 +- src/servers/print/Transport.Scripting.cpp | 3 +- src/tools/locale/Catalog.cpp | 7 - src/tools/locale/collectcatkeys.cpp | 2 +- 135 files changed, 87 insertions(+), 446 deletions(-) delete mode 100644 headers/os/locale/CatalogInAddOn.h diff --git a/headers/os/locale/Catalog.h b/headers/os/locale/Catalog.h index 87dd55eb83..30db9861c8 100644 --- a/headers/os/locale/Catalog.h +++ b/headers/os/locale/Catalog.h @@ -45,8 +45,6 @@ class BCatalog { const BCatalog& operator= (const BCatalog&); // hide assignment and copy-constructor - static status_t GetAppCatalog(BCatalog*); - BCatalogAddOn *fCatalog; private: @@ -55,10 +53,6 @@ class BCatalog { }; -extern BCatalog* be_catalog; -extern BCatalog* be_app_catalog; - - // Proxy class for handling a "shared object local" catalog. // This must be included (statically linked) into each shared object needing // a catalog on its own (application, add-on, library, ...). The shared object @@ -70,6 +64,9 @@ class BCatalogStub { public: static BCatalog* GetCatalog(); + static void ForceReload(); + // Use this to force re-initialisation of the catalog (when there + // is a locale change for example) }; @@ -96,7 +93,6 @@ class BCatalogStub { // source-file. -#ifdef B_TRANSLATE_USE_NEW_MACROS // Translation macros which may be used to shorten translation requests: #undef B_TRANSLATE #define B_TRANSLATE(str) \ @@ -113,22 +109,6 @@ class BCatalogStub { #undef B_TRANSLATE_ID #define B_TRANSLATE_ID(id) \ BCatalogStub::GetCatalog()->GetString((id)) -#else -#define B_TRANSLATE(str) \ - be_catalog->GetString((str), B_TRANSLATE_CONTEXT) - -#undef B_TRANSLATE_COMMENT -#define B_TRANSLATE_COMMENT(str, cmt) \ - be_catalog->GetString((str), B_TRANSLATE_CONTEXT, (cmt)) - -#undef B_TRANSLATE_ALL -#define B_TRANSLATE_ALL(str, ctx, cmt) \ - be_catalog->GetString((str), (ctx), (cmt)) - -#undef B_TRANSLATE_ID -#define B_TRANSLATE_ID(id) \ - be_catalog->GetString((id)) -#endif // Translation markers which can be used to mark static strings/IDs which // are used as key for translation requests (at other places in the code): diff --git a/headers/os/locale/CatalogInAddOn.h b/headers/os/locale/CatalogInAddOn.h deleted file mode 100644 index 3b067723d8..0000000000 --- a/headers/os/locale/CatalogInAddOn.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef _CATALOG_IN_ADD_ON_H_ -#define _CATALOG_IN_ADD_ON_H_ - -#include -#include -#include -#include -#include -#include - -/* - * This header file is somewhat special... - * - * Since the TR-macros are referencing be_catalog, we want each add-on - * to have its own be_catalog (instead of sharing the one from the lib). - * In order to do so, we define another be_catalog in this file, which - * will override the one from liblocale.so. - * This way we implement something like add-on-local storage. It would - * be desirable to find a better way, so please tell us if you know one! - * - * Every add-on that wants to use the Locale Kit needs to include this - * file once (no more, exactly once!). - * You have to include it in the source-file that loads the add-on's - * catalog (by use of get_add_on_catalog(). - * - */ - -BCatalog *be_catalog = NULL; - // global that points to this add-on's catalog - - -/* - * utility function which determines the entry-ref for "this" add-on: - */ -static status_t -get_add_on_ref(entry_ref *ref) -{ - if (!ref) - return B_BAD_VALUE; - - image_info imageInfo; - int32 cookie = 0; - status_t res = B_ERROR; - void *dataPtr = static_cast(&be_catalog); - while ((res = get_next_image_info(0, &cookie, &imageInfo)) == B_OK) { - char *dataStart = static_cast(imageInfo.data); - if (imageInfo.type == B_ADD_ON_IMAGE && dataStart <= dataPtr - && dataStart+imageInfo.data_size > dataPtr) { - get_ref_for_path(imageInfo.name, ref); - break; - } - } - return res; -} - - -/* - * Every add-on should load its catalog through this function, since - * it does not only load the add-on's catalog, but it does several - * other useful things: - * - be_catalog (the one belonging to this add-on) is initialized - * such that the TR-macros use the add-on's catalog. - * - if givenSig is empty (NULL or "") the add-on's signature is - * used to determine the catalog-sig. - * - if the add-on's executable contains an embedded catalog, that - * one is loaded, too. - */ -status_t -get_add_on_catalog(BCatalog* cat, const char *givenSig) -{ - if (!cat) - return B_BAD_VALUE; - - // determine entry-ref of the add-on this code lives in: - entry_ref ref; - status_t res = get_add_on_ref(&ref); - if (res == B_OK) { - // ok, we have found the entry-ref for our add-on, - // so we try to fetch the fingerprint from our add-on-file: - int32 fp = 0; - BNode addOnNode(&ref); - addOnNode.ReadAttr(BLocaleRoster::kCatFingerprintAttr, - B_INT32_TYPE, 0, &fp, sizeof(int32)); - BString sig(givenSig); - if (sig.Length() == 0) { - res = addOnNode.ReadAttrString("BEOS:MIME", &sig); - if (res == B_OK) { - // drop supertype from mimetype (should be "application/"): - int32 pos = sig.FindFirst('/'); - if (pos >= 0) - sig.Remove(0, pos+1); - } - } - if (res == B_OK) { - // try to load it's catalog... - cat->fCatalog - = be_locale_roster->LoadCatalog(sig.String(), NULL, fp); - // ...and try to load an embedded catalog, too (if that exists): - BCatalogAddOn *embeddedCatalog - = be_locale_roster->LoadEmbeddedCatalog(&ref); - if (embeddedCatalog) { - if (!cat->fCatalog) - // embedded catalog is the only catalog that was found: - cat->fCatalog = embeddedCatalog; - else { - // append embedded catalog to list of loaded catalogs: - BCatalogAddOn *currCat = cat->fCatalog; - while (currCat->fNext) - currCat = currCat->fNext; - currCat->fNext = embeddedCatalog; - } - } - be_catalog = cat; - } - } - return cat->InitCheck(); -} - - -#endif /* _CATALOG_IN_ADD_ON_H_ */ diff --git a/headers/os/locale/Locale.h b/headers/os/locale/Locale.h index d4d2cfc053..ee0fc6a74f 100644 --- a/headers/os/locale/Locale.h +++ b/headers/os/locale/Locale.h @@ -45,8 +45,6 @@ class BLocale { void GetSortKey(const char *string, BString *key); - status_t GetAppCatalog(BCatalog *); - protected: BCollator *fCollator; BLanguage *fLanguage; diff --git a/headers/os/locale/LocaleRoster.h b/headers/os/locale/LocaleRoster.h index 001cc2b42e..33db25e4be 100644 --- a/headers/os/locale/LocaleRoster.h +++ b/headers/os/locale/LocaleRoster.h @@ -33,11 +33,6 @@ class BLocaleRoster { BLocaleRoster(); ~BLocaleRoster(); -// status_t GetCatalog(BLocale *,const char *mimeType, BCatalog *catalog); -// status_t GetCatalog(const char *mimeType, BCatalog *catalog); -// status_t SetCatalog(BLocale *,const char *mimeType, BCatalog *catalog); - BCatalog* GetCatalog(BCatalog* catalog, vint32* catalogInitStatus); - // status_t GetLocaleFor(const char *langCode, const char *countryCode); status_t GetSystemCatalog(BCatalogAddOn **) const; @@ -73,6 +68,7 @@ class BLocaleRoster { static int32 kEmbeddedCatResId; private: + BCatalog* GetCatalog(BCatalog* catalog, vint32* catalogInitStatus); BCatalogAddOn* LoadCatalog(const char *signature, const char *language = NULL, int32 fingerprint = 0); @@ -83,6 +79,7 @@ class BLocaleRoster { const char *signature, const char *language); friend class BCatalog; + friend class BCatalogStub; friend class BPrivate::EditableCatalog; friend status_t get_add_on_catalog(BCatalog*, const char *); }; diff --git a/src/add-ons/tracker/zipomatic/Jamfile b/src/add-ons/tracker/zipomatic/Jamfile index 0b76f6b6ed..f974e054c1 100644 --- a/src/add-ons/tracker/zipomatic/Jamfile +++ b/src/add-ons/tracker/zipomatic/Jamfile @@ -9,7 +9,7 @@ Application ZipOMatic-Z : ZipOMaticWindow.cpp ZipperThread.cpp - : be tracker $(TARGET_LIBSUPC++) liblocale.so + : be tracker $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : ZipOMatic.rdef ; diff --git a/src/add-ons/tracker/zipomatic/ZipOMatic.cpp b/src/add-ons/tracker/zipomatic/ZipOMatic.cpp index b2cc3e662e..ff314b63a7 100644 --- a/src/add-ons/tracker/zipomatic/ZipOMatic.cpp +++ b/src/add-ons/tracker/zipomatic/ZipOMatic.cpp @@ -37,7 +37,6 @@ ZipOMatic::ZipOMatic() fGotRefs(false), fInvoker(new BInvoker(new BMessage(ZIPPO_QUIT_OR_CONTINUE), NULL, this)) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/add-ons/tracker/zipomatic/ZipOMatic.h b/src/add-ons/tracker/zipomatic/ZipOMatic.h index b03e71e3bf..6e6307866b 100644 --- a/src/add-ons/tracker/zipomatic/ZipOMatic.h +++ b/src/add-ons/tracker/zipomatic/ZipOMatic.h @@ -28,8 +28,6 @@ private: bool fGotRefs; BInvoker* fInvoker; - - BCatalog fCatalog; }; #endif // _ZIPOMATIC_H_ diff --git a/src/apps/aboutsystem/AboutSystem.cpp b/src/apps/aboutsystem/AboutSystem.cpp index fdd94cd7b9..6bbdb2a480 100644 --- a/src/apps/aboutsystem/AboutSystem.cpp +++ b/src/apps/aboutsystem/AboutSystem.cpp @@ -191,9 +191,7 @@ TranslationComparator(const void* left, const void* right) class AboutApp : public BApplication { public: - AboutApp(); -private: - BCatalog fCatalog; + AboutApp(); }; @@ -292,7 +290,6 @@ private: AboutApp::AboutApp() : BApplication("application/x-vnd.Haiku-About") { - be_locale->GetAppCatalog(&fCatalog); AboutWindow *window = new(std::nothrow) AboutWindow(); if (window) window->Show(); diff --git a/src/apps/aboutsystem/Jamfile b/src/apps/aboutsystem/Jamfile index 06d9a1c5d2..12e05f2915 100644 --- a/src/apps/aboutsystem/Jamfile +++ b/src/apps/aboutsystem/Jamfile @@ -19,7 +19,7 @@ Application AboutSystem : HyperTextActions.cpp HyperTextView.cpp Utilities.cpp - : $(TARGET_LIBSTDC++) be translation liblocale.so + : $(TARGET_LIBSTDC++) be translation $(HAIKU_LOCALE_LIBS) : AboutSystem.rdef ; diff --git a/src/apps/bootman/BootManager.cpp b/src/apps/bootman/BootManager.cpp index 4a9484a4de..30bccf3536 100644 --- a/src/apps/bootman/BootManager.cpp +++ b/src/apps/bootman/BootManager.cpp @@ -30,16 +30,12 @@ public: virtual void ReadyToRun(); virtual void AboutRequested(); - -private: - BCatalog fCatalog; }; BootManager::BootManager() : BApplication(kSignature) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/apps/bootman/Jamfile b/src/apps/bootman/Jamfile index 96f9e71823..f9f8a2bccc 100644 --- a/src/apps/bootman/Jamfile +++ b/src/apps/bootman/Jamfile @@ -21,7 +21,7 @@ Application bootman : be textencoding tracker - liblocale.so + $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : bootman.rdef diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index f3d8b10e8f..cc92ca79b3 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -130,11 +130,8 @@ CodyCam::CodyCam() fVideoConsumer(NULL), fWindow(NULL), fPort(0), - fVideoControlWindow(NULL), - fAppCatalog(NULL) + fVideoControlWindow(NULL) { - be_locale->GetAppCatalog(&fAppCatalog); - int32 index = 0; kCaptureRate[index++] = B_TRANSLATE("Every 15 seconds"); kCaptureRate[index++] = B_TRANSLATE("Every 30 seconds"); diff --git a/src/apps/codycam/CodyCam.h b/src/apps/codycam/CodyCam.h index 3cfea00557..3cabae25fd 100644 --- a/src/apps/codycam/CodyCam.h +++ b/src/apps/codycam/CodyCam.h @@ -110,7 +110,6 @@ private: BWindow* fWindow; port_id fPort; BWindow* fVideoControlWindow; - BCatalog fAppCatalog; }; diff --git a/src/apps/codycam/Jamfile b/src/apps/codycam/Jamfile index c374670f84..0e2207a9b9 100644 --- a/src/apps/codycam/Jamfile +++ b/src/apps/codycam/Jamfile @@ -11,7 +11,8 @@ Application CodyCam : Settings.cpp SettingsHandler.cpp VideoConsumer.cpp - : be locale media translation $(TARGET_NETAPI_LIB) $(TARGET_LIBSTDC++) + : be $(HAIKU_LOCALE_LIBS) media translation $(TARGET_NETAPI_LIB) + $(TARGET_LIBSTDC++) : CodyCam.rdef ; diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp index 257a126f3b..bb7af8644f 100644 --- a/src/apps/deskbar/BarApp.cpp +++ b/src/apps/deskbar/BarApp.cpp @@ -95,7 +95,6 @@ TBarApp::TBarApp() InitSettings(); InitIconPreloader(); - be_locale->GetAppCatalog(&fCatalog); be_roster->StartWatching(this); sBarTeamInfoList.MakeEmpty(); diff --git a/src/apps/deskbar/BarApp.h b/src/apps/deskbar/BarApp.h index 7968f0bd87..1a8585f459 100644 --- a/src/apps/deskbar/BarApp.h +++ b/src/apps/deskbar/BarApp.h @@ -178,8 +178,6 @@ class TBarApp : public BApplication { static BLocker sSubscriberLock; static BList sBarTeamInfoList; static BList sSubscribers; - - BCatalog fCatalog; }; #endif // BAR_APP_H diff --git a/src/apps/deskbar/Jamfile b/src/apps/deskbar/Jamfile index 46c7b1ee79..01d0e135fb 100644 --- a/src/apps/deskbar/Jamfile +++ b/src/apps/deskbar/Jamfile @@ -39,7 +39,7 @@ Application Deskbar : ResourceSet.cpp Switcher.cpp $(targetSource) - : be tracker liblocale.so $(targetLib) $(TARGET_LIBSUPC++) + : be tracker $(HAIKU_LOCALE_LIBS) $(targetLib) $(TARGET_LIBSUPC++) ; DoCatalogs Deskbar : diff --git a/src/apps/diskprobe/DiskProbe.cpp b/src/apps/diskprobe/DiskProbe.cpp index f0189b3248..5cc7d25bd9 100644 --- a/src/apps/diskprobe/DiskProbe.cpp +++ b/src/apps/diskprobe/DiskProbe.cpp @@ -89,7 +89,6 @@ class DiskProbe : public BApplication { uint32 fWindowCount; BRect fWindowFrame; BMessenger fFindTarget; - BCatalog fAppCatalog; }; @@ -236,10 +235,8 @@ DiskProbe::DiskProbe() : BApplication(kSignature), fOpenWindow(NULL), fFindWindow(NULL), - fWindowCount(0), - fAppCatalog(NULL) + fWindowCount(0) { - be_locale->GetAppCatalog(&fAppCatalog); fFilePanel = new BFilePanel(); fWindowFrame = fSettings.Message().FindRect("window_frame"); } diff --git a/src/apps/diskprobe/Jamfile b/src/apps/diskprobe/Jamfile index 5e2257f2d5..42daf2fd55 100644 --- a/src/apps/diskprobe/Jamfile +++ b/src/apps/diskprobe/Jamfile @@ -16,8 +16,8 @@ Application DiskProbe : ProbeView.cpp OpenWindow.cpp FindWindow.cpp - : be locale tracker translation libexpression_parser.a libmapm.a - $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) tracker translation libexpression_parser.a + libmapm.a $(TARGET_LIBSUPC++) : DiskProbe.rdef ; diff --git a/src/apps/drivesetup/DriveSetup.cpp b/src/apps/drivesetup/DriveSetup.cpp index 9bc7171842..672d433405 100644 --- a/src/apps/drivesetup/DriveSetup.cpp +++ b/src/apps/drivesetup/DriveSetup.cpp @@ -36,8 +36,6 @@ DriveSetup::~DriveSetup() void DriveSetup::ReadyToRun() { - be_locale->GetAppCatalog(&fCatalog); - fWindow = new MainWindow(BRect(50, 50, 600, 450)); if (_RestoreSettings() != B_OK) fWindow->ApplyDefaultSettings(); diff --git a/src/apps/drivesetup/DriveSetup.h b/src/apps/drivesetup/DriveSetup.h index 68c704a49e..0d252383bb 100644 --- a/src/apps/drivesetup/DriveSetup.h +++ b/src/apps/drivesetup/DriveSetup.h @@ -32,7 +32,6 @@ private: MainWindow* fWindow; BMessage fSettings; - BCatalog fCatalog; }; diff --git a/src/apps/drivesetup/Jamfile b/src/apps/drivesetup/Jamfile index 1f8d8b1fb7..1e9b483d77 100644 --- a/src/apps/drivesetup/Jamfile +++ b/src/apps/drivesetup/Jamfile @@ -13,7 +13,8 @@ Preference DriveSetup : PartitionList.cpp Support.cpp - : be liblocale.so libcolumnlistview.a libshared.a $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) libcolumnlistview.a libshared.a + $(TARGET_LIBSUPC++) : DriveSetup.rdef ; diff --git a/src/apps/expander/ExpanderApp.cpp b/src/apps/expander/ExpanderApp.cpp index f99bbbd0d1..a05f8de965 100644 --- a/src/apps/expander/ExpanderApp.cpp +++ b/src/apps/expander/ExpanderApp.cpp @@ -15,8 +15,6 @@ ExpanderApp::ExpanderApp() : BApplication("application/x-vnd.Haiku-Expander") { - be_locale->GetAppCatalog(&fCatalog); - BPoint windowPosition = fSettings.Message().FindPoint("window_position"); BRect windowFrame(0, 0, 450, 120); windowFrame.OffsetBy(windowPosition); diff --git a/src/apps/expander/ExpanderApp.h b/src/apps/expander/ExpanderApp.h index 53593bbb59..3ac5af8da5 100644 --- a/src/apps/expander/ExpanderApp.h +++ b/src/apps/expander/ExpanderApp.h @@ -48,7 +48,6 @@ class ExpanderApp : public BApplication { void UpdateSettingsFrom(BMessage *message); private: ExpanderWindow *fWindow; - BCatalog fCatalog; }; #endif /* _ExpanderApp_h */ diff --git a/src/apps/expander/Jamfile b/src/apps/expander/Jamfile index aee2680436..860359abcf 100644 --- a/src/apps/expander/Jamfile +++ b/src/apps/expander/Jamfile @@ -9,7 +9,7 @@ Application Expander : ExpanderPreferences.cpp DirectoryFilePanel.cpp ExpanderRules.cpp - : be tracker liblocale.so $(TARGET_LIBSUPC++) + : be tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : Expander.rdef ; diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index 5439a9035d..e52f011d53 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -99,9 +99,6 @@ InstallerApp::AboutRequested() void InstallerApp::ReadyToRun() { - // Initilialize the Locale Kit - be_locale->GetAppCatalog(&fCatalog); - const char* infoText = B_TRANSLATE( "Welcome to the Haiku Installer!\n\n" diff --git a/src/apps/installer/InstallerApp.h b/src/apps/installer/InstallerApp.h index 1ac1154a46..de068ab858 100644 --- a/src/apps/installer/InstallerApp.h +++ b/src/apps/installer/InstallerApp.h @@ -21,7 +21,6 @@ public: private: BWindow* fEULAWindow; - BCatalog fCatalog; }; #endif // INSTALLER_APP_H diff --git a/src/apps/installer/Jamfile b/src/apps/installer/Jamfile index 53d7f75d69..ff7553f92f 100644 --- a/src/apps/installer/Jamfile +++ b/src/apps/installer/Jamfile @@ -12,7 +12,8 @@ Application Installer : ProgressReporter.cpp UnzipEngine.cpp WorkerThread.cpp - : be tracker translation libshared.a $(TARGET_LIBSTDC++) liblocale.so + : be tracker translation libshared.a $(TARGET_LIBSTDC++) + $(HAIKU_LOCALE_LIBS) : Installer.rdef ; diff --git a/src/apps/mail/Jamfile b/src/apps/mail/Jamfile index eb76e94ac2..38196c3f6d 100644 --- a/src/apps/mail/Jamfile +++ b/src/apps/mail/Jamfile @@ -33,8 +33,8 @@ Application Mail : WIndex.cpp Words.cpp KUndoBuffer.cpp - : be tracker $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) liblocale.so libmail.so - libtextencoding.so + : be tracker $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) + libmail.so libtextencoding.so : Mail.rdef ; diff --git a/src/apps/mail/MailApp.cpp b/src/apps/mail/MailApp.cpp index 77fde5951d..ea07108ceb 100644 --- a/src/apps/mail/MailApp.cpp +++ b/src/apps/mail/MailApp.cpp @@ -117,8 +117,6 @@ TMailApp::TMailApp() fMailCharacterSet(B_MS_WINDOWS_CONVERSION), fContentFont(be_fixed_font) { - be_locale->GetAppCatalog(&fCatalog); - // set default values fContentFont.SetSize(12.0); fAutoMarkRead = true; diff --git a/src/apps/mail/MailApp.h b/src/apps/mail/MailApp.h index aff0600119..c3999847a4 100644 --- a/src/apps/mail/MailApp.h +++ b/src/apps/mail/MailApp.h @@ -129,8 +129,6 @@ class TMailApp : public BApplication { int32 fUseAccountFrom; uint32 fMailCharacterSet; BFont fContentFont; - - BCatalog fCatalog; }; diff --git a/src/apps/midiplayer/Jamfile b/src/apps/midiplayer/Jamfile index 55b8a5b7d0..b2950da2bb 100644 --- a/src/apps/midiplayer/Jamfile +++ b/src/apps/midiplayer/Jamfile @@ -7,7 +7,7 @@ Application MidiPlayer : MidiPlayerWindow.cpp ScopeView.cpp SynthBridge.cpp - : be midi midi2 $(TARGET_LIBSUPC++) liblocale.so + : be midi midi2 $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : MidiPlayer.rdef ; diff --git a/src/apps/midiplayer/MidiPlayerApp.cpp b/src/apps/midiplayer/MidiPlayerApp.cpp index fe409d627f..3e2fb8a005 100644 --- a/src/apps/midiplayer/MidiPlayerApp.cpp +++ b/src/apps/midiplayer/MidiPlayerApp.cpp @@ -34,7 +34,6 @@ MidiPlayerApp::MidiPlayerApp() : BApplication(MIDI_PLAYER_SIGNATURE) { - be_locale->GetAppCatalog(&fCatalog); window = new MidiPlayerWindow; } diff --git a/src/apps/midiplayer/MidiPlayerApp.h b/src/apps/midiplayer/MidiPlayerApp.h index e0f95ccd84..32a03b7c0d 100644 --- a/src/apps/midiplayer/MidiPlayerApp.h +++ b/src/apps/midiplayer/MidiPlayerApp.h @@ -39,7 +39,6 @@ class MidiPlayerApp : public BApplication { private: typedef BApplication super; - BCatalog fCatalog; MidiPlayerWindow* window; }; diff --git a/src/apps/packageinstaller/Jamfile b/src/apps/packageinstaller/Jamfile index ea1d8d9522..f311818147 100644 --- a/src/apps/packageinstaller/Jamfile +++ b/src/apps/packageinstaller/Jamfile @@ -16,7 +16,7 @@ Application PackageInstaller : PackageTextViewer.cpp PackageImageViewer.cpp InstalledPackageInfo.cpp - : be locale tracker translation z $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) tracker translation z $(TARGET_LIBSUPC++) : PackageInstaller.rdef ; diff --git a/src/apps/packageinstaller/main.cpp b/src/apps/packageinstaller/main.cpp index db784b31d0..b87925ded5 100644 --- a/src/apps/packageinstaller/main.cpp +++ b/src/apps/packageinstaller/main.cpp @@ -40,18 +40,15 @@ class PackageInstaller : public BApplication { private: BFilePanel *fOpen; uint32 fWindowCount; - BCatalog fAppCatalog; }; PackageInstaller::PackageInstaller() : BApplication("application/x-vnd.Haiku-PackageInstaller"), fOpen(NULL), - fWindowCount(0), - fAppCatalog(NULL) + fWindowCount(0) { fOpen = new BFilePanel(B_OPEN_PANEL); - be_locale->GetAppCatalog(&fAppCatalog); } diff --git a/src/apps/pairs/Jamfile b/src/apps/pairs/Jamfile index cca7cbada9..47deaff0cd 100644 --- a/src/apps/pairs/Jamfile +++ b/src/apps/pairs/Jamfile @@ -8,7 +8,7 @@ Application Pairs : PairsView.cpp PairsTopButton.cpp - : be liblocale.so $(TARGET_LIBSTDC++) + : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++) : Pairs.rdef ; diff --git a/src/apps/pairs/Pairs.cpp b/src/apps/pairs/Pairs.cpp index 2bd2b9f334..7c3798edb3 100644 --- a/src/apps/pairs/Pairs.cpp +++ b/src/apps/pairs/Pairs.cpp @@ -20,7 +20,6 @@ Pairs::Pairs() BApplication(kSignature), fWindow(NULL) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/apps/pairs/Pairs.h b/src/apps/pairs/Pairs.h index 9b10209a41..0b58ec0c98 100644 --- a/src/apps/pairs/Pairs.h +++ b/src/apps/pairs/Pairs.h @@ -24,8 +24,6 @@ public: private: PairsWindow* fWindow; - BCatalog fCatalog; - }; #endif // PAIRS_H diff --git a/src/apps/pulse/Jamfile b/src/apps/pulse/Jamfile index 087d5c2d5a..feac93a547 100644 --- a/src/apps/pulse/Jamfile +++ b/src/apps/pulse/Jamfile @@ -23,7 +23,7 @@ Application Pulse : PulseView.cpp PulseWindow.cpp - : be locale $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : Pulse.rdef ; diff --git a/src/apps/pulse/PulseApp.cpp b/src/apps/pulse/PulseApp.cpp index 6db9c7669b..6c8f50884a 100644 --- a/src/apps/pulse/PulseApp.cpp +++ b/src/apps/pulse/PulseApp.cpp @@ -37,8 +37,6 @@ PulseApp::PulseApp(int argc, char **argv) : BApplication(APP_SIGNATURE) { - be_locale->GetAppCatalog(&fCatalog); - prefs = new Prefs(); int mini = false, deskbar = false, normal = false; diff --git a/src/apps/pulse/PulseApp.h b/src/apps/pulse/PulseApp.h index 59a524e4a1..1b98d165a4 100644 --- a/src/apps/pulse/PulseApp.h +++ b/src/apps/pulse/PulseApp.h @@ -27,8 +27,6 @@ public: private: void BuildPulse(); - - BCatalog fCatalog; }; extern bool LastEnabledCPU(int cpu); diff --git a/src/apps/readonlybootprompt/BootPromptWindow.cpp b/src/apps/readonlybootprompt/BootPromptWindow.cpp index ba6fefbc14..d578e91398 100644 --- a/src/apps/readonlybootprompt/BootPromptWindow.cpp +++ b/src/apps/readonlybootprompt/BootPromptWindow.cpp @@ -178,12 +178,7 @@ void BootPromptWindow::_InitCatalog(bool saveSettings) { // Initilialize the Locale Kit - // TODO: The below code is a work-around for not being able to - // call GetAppCatalog() more than once. - be_catalog = be_app_catalog = NULL; - // NOTE: be_catalog and be_app_catalog will point fo &fCatalog! - - be_locale->GetAppCatalog(&fCatalog); + BCatalogStub::ForceReload(); // Generate a settings file // TODO: This should not be necessary. @@ -191,6 +186,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings) if (!saveSettings) return; + /* BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK || path.Append("Locale settings") != B_OK) { @@ -204,7 +200,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings) settings.Unflatten(&file); BString language; - if (fCatalog.GetLanguage(&language) == B_OK) { + if (fCatalog->GetLanguage(&language) == B_OK) { settings.RemoveName("language"); settings.AddString("language", language.String()); } @@ -218,6 +214,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings) || settings.Flatten(&file) != B_OK) { fprintf(stderr, "Failed to write Local Kit settings!\n"); } + */ } diff --git a/src/apps/readonlybootprompt/BootPromptWindow.h b/src/apps/readonlybootprompt/BootPromptWindow.h index 3047261541..6236e47e08 100644 --- a/src/apps/readonlybootprompt/BootPromptWindow.h +++ b/src/apps/readonlybootprompt/BootPromptWindow.h @@ -30,7 +30,6 @@ private: status_t _GetCurrentKeymapRef(entry_ref& ref) const; private: - BCatalog fCatalog; BTextView* fInfoTextView; BStringView* fLanguagesLabelView; BListView* fLanguagesListView; diff --git a/src/apps/readonlybootprompt/Jamfile b/src/apps/readonlybootprompt/Jamfile index 2f1934e2fd..80b6e0c377 100644 --- a/src/apps/readonlybootprompt/Jamfile +++ b/src/apps/readonlybootprompt/Jamfile @@ -9,7 +9,7 @@ Application ReadOnlyBootPrompt : BootPromptWindow.cpp Keymap.cpp KeymapListItem.cpp - : be libshared.a $(TARGET_LIBSTDC++) liblocale.so + : be libshared.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) : BootPrompt.rdef ; diff --git a/src/apps/screenshot/Jamfile b/src/apps/screenshot/Jamfile index e2022ffd72..97a21b8d56 100644 --- a/src/apps/screenshot/Jamfile +++ b/src/apps/screenshot/Jamfile @@ -7,7 +7,7 @@ Application Screenshot : ScreenshotWindow.cpp PreviewView.cpp Utility.cpp - : be locale tracker translation $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++) : ScreenshotApp.rdef ; @@ -21,7 +21,7 @@ DoCatalogs Screenshot : Application screenshot : Screenshot.cpp Utility.cpp - : be locale translation $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) translation $(TARGET_LIBSUPC++) : Screenshot.rdef ; diff --git a/src/apps/screenshot/Screenshot.cpp b/src/apps/screenshot/Screenshot.cpp index 0e2f829dae..245cacd2e5 100644 --- a/src/apps/screenshot/Screenshot.cpp +++ b/src/apps/screenshot/Screenshot.cpp @@ -40,7 +40,6 @@ Screenshot::Screenshot() fUtility(new Utility()), fLaunchGui(true) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/apps/screenshot/Screenshot.h b/src/apps/screenshot/Screenshot.h index 94a71f46f6..30fb05d7a7 100644 --- a/src/apps/screenshot/Screenshot.h +++ b/src/apps/screenshot/Screenshot.h @@ -29,7 +29,6 @@ private: int32 _GetImageType(const char* name) const; Utility* fUtility; - BCatalog fCatalog; bool fLaunchGui; }; diff --git a/src/apps/screenshot/ScreenshotApp.cpp b/src/apps/screenshot/ScreenshotApp.cpp index e56e53e75d..2855508430 100644 --- a/src/apps/screenshot/ScreenshotApp.cpp +++ b/src/apps/screenshot/ScreenshotApp.cpp @@ -27,7 +27,6 @@ ScreenshotApp::ScreenshotApp() fSilent(false), fClipboard(false) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/apps/screenshot/ScreenshotApp.h b/src/apps/screenshot/ScreenshotApp.h index 32038857f4..a4302fdb39 100644 --- a/src/apps/screenshot/ScreenshotApp.h +++ b/src/apps/screenshot/ScreenshotApp.h @@ -26,7 +26,6 @@ public: void ReadyToRun(); private: - BCatalog fCatalog; Utility* fUtility; bool fSilent; bool fClipboard; diff --git a/src/apps/showimage/Jamfile b/src/apps/showimage/Jamfile index 8923343868..a017dbffa2 100644 --- a/src/apps/showimage/Jamfile +++ b/src/apps/showimage/Jamfile @@ -18,7 +18,7 @@ Application ShowImage : ShowImageView.cpp ShowImageWindow.cpp : libshared.a - be tracker translation liblocale.so $(TARGET_LIBSUPC++) + be tracker translation $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : ShowImage.rdef ; diff --git a/src/apps/showimage/ShowImageApp.cpp b/src/apps/showimage/ShowImageApp.cpp index 3d92f9e396..b62c6ffbb3 100644 --- a/src/apps/showimage/ShowImageApp.cpp +++ b/src/apps/showimage/ShowImageApp.cpp @@ -38,8 +38,6 @@ ShowImageApp::ShowImageApp() : BApplication(kApplicationSignature) { - be_locale->GetAppCatalog(&fCatalog); - fPulseStarted = false; fOpenPanel = new BFilePanel(B_OPEN_PANEL); } diff --git a/src/apps/showimage/ShowImageApp.h b/src/apps/showimage/ShowImageApp.h index 8d6566b0da..32b6716d7e 100644 --- a/src/apps/showimage/ShowImageApp.h +++ b/src/apps/showimage/ShowImageApp.h @@ -43,7 +43,6 @@ private: BFilePanel *fOpenPanel; bool fPulseStarted; ShowImageSettings fSettings; - BCatalog fCatalog; }; diff --git a/src/apps/soundrecorder/Jamfile b/src/apps/soundrecorder/Jamfile index 53cde7b9cf..139ea94573 100644 --- a/src/apps/soundrecorder/Jamfile +++ b/src/apps/soundrecorder/Jamfile @@ -20,7 +20,7 @@ Application SoundRecorder : UpDownButton.cpp VUView.cpp VolumeSlider.cpp - : be locale media tracker $(TARGET_LIBSTDC++) + : be $(HAIKU_LOCALE_LIBS) media tracker $(TARGET_LIBSTDC++) : SoundRecorder.rdef ; diff --git a/src/apps/soundrecorder/RecorderWindow.cpp b/src/apps/soundrecorder/RecorderWindow.cpp index c0d663f528..1abe5b27b0 100644 --- a/src/apps/soundrecorder/RecorderWindow.cpp +++ b/src/apps/soundrecorder/RecorderWindow.cpp @@ -128,8 +128,6 @@ RecorderWindow::RecorderWindow() : CalcSizes(MIN_WIDTH, MIN_HEIGHT); - be_locale->GetAppCatalog(&fAppCatalog); - SetTitle(B_TRANSLATE("SoundRecorder")); fInitCheck = InitWindow(); diff --git a/src/apps/soundrecorder/RecorderWindow.h b/src/apps/soundrecorder/RecorderWindow.h index 20f07fcbbe..1ad7c26005 100644 --- a/src/apps/soundrecorder/RecorderWindow.h +++ b/src/apps/soundrecorder/RecorderWindow.h @@ -169,7 +169,6 @@ static void NotifyPlayFile(void * cookie, BSoundPlayer::sound_player_notificatio void RefsReceived(BMessage *msg); void CopyTarget(BMessage *msg); - BCatalog fAppCatalog; }; #endif /* RECORDERWINDOW_H */ diff --git a/src/apps/stylededit/Jamfile b/src/apps/stylededit/Jamfile index a17bc59f2b..82e089d73e 100644 --- a/src/apps/stylededit/Jamfile +++ b/src/apps/stylededit/Jamfile @@ -16,7 +16,8 @@ Application StyledEdit : StyledEditApp.cpp StyledEditView.cpp StyledEditWindow.cpp - : be translation tracker libtextencoding.so liblocale.so $(TARGET_LIBSUPC++) + : be translation tracker libtextencoding.so $(HAIKU_LOCALE_LIBS) + $(TARGET_LIBSUPC++) : $(styled_edit_rsrc) ; diff --git a/src/apps/stylededit/StyledEditApp.cpp b/src/apps/stylededit/StyledEditApp.cpp index d78ee376cb..bf83e8fbbd 100644 --- a/src/apps/stylededit/StyledEditApp.cpp +++ b/src/apps/stylededit/StyledEditApp.cpp @@ -87,8 +87,6 @@ StyledEditApp::StyledEditApp() : BApplication(APP_SIGNATURE), fOpenPanel(NULL) { - be_locale->GetAppCatalog(&fCatalog); - fOpenPanel = new BFilePanel(); BMenuBar* menuBar = dynamic_cast(fOpenPanel->Window()->FindView("MenuBar")); diff --git a/src/apps/stylededit/StyledEditApp.h b/src/apps/stylededit/StyledEditApp.h index eb941a285c..664dc0cc61 100644 --- a/src/apps/stylededit/StyledEditApp.h +++ b/src/apps/stylededit/StyledEditApp.h @@ -49,7 +49,6 @@ class StyledEditApp : public BApplication { int32 fWindowCount; int32 fNextUntitledWindow; bool fBadArguments; - BCatalog fCatalog; }; extern StyledEditApp* styled_edit_app; diff --git a/src/apps/terminal/Jamfile b/src/apps/terminal/Jamfile index 8a8964c540..270f93db5a 100644 --- a/src/apps/terminal/Jamfile +++ b/src/apps/terminal/Jamfile @@ -26,7 +26,7 @@ Application Terminal : TermWindow.cpp VTKeyTbl.c VTPrsTbl.c - : be locale tracker textencoding $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) tracker textencoding $(TARGET_LIBSUPC++) : Terminal.rdef ; diff --git a/src/apps/terminal/TermApp.cpp b/src/apps/terminal/TermApp.cpp index cad2590bfb..b7f391e26d 100644 --- a/src/apps/terminal/TermApp.cpp +++ b/src/apps/terminal/TermApp.cpp @@ -61,8 +61,7 @@ TermApp::TermApp() fStartFullscreen(false), fWindowNumber(-1), fTermWindow(NULL), - fArgs(NULL), - fAppCatalog(NULL) + fArgs(NULL) { const char *defaultArgs[2]; defaultArgs[0] = kDefaultShell; @@ -76,8 +75,6 @@ TermApp::TermApp() defaultArgs[0] = passwdStruct.pw_shell; } - be_locale->GetAppCatalog(&fAppCatalog); - fArgs = new Arguments(2, defaultArgs); fWindowTitle = B_TRANSLATE("Terminal"); diff --git a/src/apps/terminal/TermApp.h b/src/apps/terminal/TermApp.h index 2580a5e69f..191d4f0ea6 100644 --- a/src/apps/terminal/TermApp.h +++ b/src/apps/terminal/TermApp.h @@ -77,7 +77,6 @@ class TermApp : public BApplication { BWindow* fTermWindow; BRect fTermFrame; Arguments *fArgs; - BCatalog fAppCatalog; }; #endif // TERM_APP_H diff --git a/src/apps/text_search/GrepWindow.cpp b/src/apps/text_search/GrepWindow.cpp index b1149eb187..94fb4fc59e 100644 --- a/src/apps/text_search/GrepWindow.cpp +++ b/src/apps/text_search/GrepWindow.cpp @@ -127,14 +127,11 @@ GrepWindow::GrepWindow(BMessage* message) fChangesIterator(NULL), fChangesPulse(NULL), - fFilePanel(NULL), - fAppCatalog(NULL) + fFilePanel(NULL) { if (fModel == NULL) return; - be_locale->GetAppCatalog(&fAppCatalog); - entry_ref directory; _InitRefsReceived(&directory, message); diff --git a/src/apps/text_search/GrepWindow.h b/src/apps/text_search/GrepWindow.h index 9221626485..67711de2d8 100644 --- a/src/apps/text_search/GrepWindow.h +++ b/src/apps/text_search/GrepWindow.h @@ -145,7 +145,6 @@ private: BMessageRunner* fChangesPulse; BFilePanel* fFilePanel; - BCatalog fAppCatalog; }; #endif // GREP_WINDOW_H diff --git a/src/apps/text_search/Jamfile b/src/apps/text_search/Jamfile index 39ae10880d..dddd9dea9c 100644 --- a/src/apps/text_search/Jamfile +++ b/src/apps/text_search/Jamfile @@ -24,7 +24,8 @@ Application TextSearch : $(additionalBeOSSources) - : be locale tracker textencoding libshared.a $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) tracker textencoding libshared.a + $(TARGET_LIBSUPC++) : TextSearch.rdef ; diff --git a/src/apps/tv/Jamfile b/src/apps/tv/Jamfile index e0c2ff2691..95a15fa211 100644 --- a/src/apps/tv/Jamfile +++ b/src/apps/tv/Jamfile @@ -8,7 +8,7 @@ Application TV : MainWin.cpp VideoNode.cpp VideoView.cpp - : be locale media $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) media $(TARGET_LIBSUPC++) : tv.rdef ; diff --git a/src/apps/tv/MainApp.cpp b/src/apps/tv/MainApp.cpp index 39fe10f6b9..80b6188337 100644 --- a/src/apps/tv/MainApp.cpp +++ b/src/apps/tv/MainApp.cpp @@ -47,8 +47,6 @@ MainApp::MainApp() { InitPrefs(); - be_locale->GetAppCatalog(&fAppCatalog); - gDeviceRoster = new DeviceRoster; fMainWindow = NewWindow(); diff --git a/src/apps/tv/MainApp.h b/src/apps/tv/MainApp.h index 3b8b3f6956..c7749184c7 100644 --- a/src/apps/tv/MainApp.h +++ b/src/apps/tv/MainApp.h @@ -38,7 +38,6 @@ public: private: BWindow * fMainWindow; - BCatalog fAppCatalog; }; extern MainApp *gMainApp; diff --git a/src/apps/workspaces/Jamfile b/src/apps/workspaces/Jamfile index 883c04fed8..e9fbe094b1 100644 --- a/src/apps/workspaces/Jamfile +++ b/src/apps/workspaces/Jamfile @@ -7,7 +7,7 @@ UsePrivateHeaders app interface ; Application Workspaces : Workspaces.cpp - : be locale $(TARGET_LIBSUPC++) + : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : Workspaces.rdef ; diff --git a/src/apps/workspaces/Workspaces.cpp b/src/apps/workspaces/Workspaces.cpp index 9b3494a54e..84d0727a49 100644 --- a/src/apps/workspaces/Workspaces.cpp +++ b/src/apps/workspaces/Workspaces.cpp @@ -149,7 +149,6 @@ class WorkspacesApp : public BApplication { private: WorkspacesWindow* fWindow; - BCatalog fAppCatalog; }; @@ -809,7 +808,6 @@ WorkspacesWindow::SetAutoRaise(bool enable) WorkspacesApp::WorkspacesApp() : BApplication(kSignature) { - be_locale->GetAppCatalog(&fAppCatalog); fWindow = new WorkspacesWindow(new WorkspacesSettings()); } diff --git a/src/bin/Jamfile b/src/bin/Jamfile index b646496087..3c0db5b270 100644 --- a/src/bin/Jamfile +++ b/src/bin/Jamfile @@ -129,7 +129,7 @@ StdBinCommands # commands that need libbe.so, libsupc++.so and liblocale.so StdBinCommands dstcheck.cpp - : be $(TARGET_LIBSUPC++) liblocale.so : $(haiku-utils_rsrc) ; + : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : $(haiku-utils_rsrc) ; # Haiku-specific apps which need libbe.so if $(TARGET_PLATFORM) = haiku { diff --git a/src/bin/dstcheck.cpp b/src/bin/dstcheck.cpp index 2eab9ef2d3..7cd780b769 100644 --- a/src/bin/dstcheck.cpp +++ b/src/bin/dstcheck.cpp @@ -101,7 +101,6 @@ TimedAlert::GetLabel(BString &string) int main(int argc, char **argv) { - BCatalog fCatalog; time_t t; struct tm tm; tzset(); @@ -136,7 +135,6 @@ main(int argc, char **argv) if (dst != tm.tm_isdst || argc > 1) { BApplication app("application/x-vnd.Haiku-cmd-dstconfig"); - be_locale->GetAppCatalog(&fCatalog); BString string; TimedAlert::GetLabel(string); diff --git a/src/kits/locale/Catalog.cpp b/src/kits/locale/Catalog.cpp index 58bcad0053..2e9fe2035c 100644 --- a/src/kits/locale/Catalog.cpp +++ b/src/kits/locale/Catalog.cpp @@ -15,13 +15,6 @@ #include -BCatalog* be_catalog = NULL; - // catalog used by translation macros -BCatalog* be_app_catalog = NULL; - // app-catalog (useful for accessing app's catalog from inside an add-on, - // since in an add-on, be_catalog will hold the add-on's catalog. - - //#pragma mark - BCatalog BCatalog::BCatalog() : @@ -39,8 +32,6 @@ BCatalog::BCatalog(const char *signature, const char *language, BCatalog::~BCatalog() { - if (be_catalog == this) - be_app_catalog = be_catalog = NULL; be_locale_roster->UnloadCatalog(fCatalog); } @@ -117,51 +108,6 @@ BCatalog::SetCatalog(const char* signature, uint32 fingerprint) } -status_t -BCatalog::GetAppCatalog(BCatalog* catalog) -{ - app_info appInfo; - if (!be_app || be_app->GetAppInfo(&appInfo) != B_OK) - return B_ENTRY_NOT_FOUND; - BString sig(appInfo.signature); - - // drop supertype from mimetype (should be "application/"): - int32 pos = sig.FindFirst('/'); - if (pos >= 0) - sig.Remove(0, pos+1); - - // try to fetch fingerprint from app-file (attribute): - uint32 fingerprint = 0; - BNode appNode(&appInfo.ref); - appNode.ReadAttr(BLocaleRoster::kCatFingerprintAttr, B_UINT32_TYPE, 0, - &fingerprint, sizeof(uint32)); - catalog->SetCatalog(sig.String(), fingerprint); - // try to load catalog (with given fingerprint): - - // load native embedded id-based catalog. If such a catalog exists, - // we can fall back to native strings for id-based access, too. - BCatalogAddOn *embeddedCatalog - = be_locale_roster->LoadEmbeddedCatalog(&appInfo.ref); - if (embeddedCatalog) { - if (!catalog->fCatalog) - // embedded catalog is the only catalog that was found: - catalog->fCatalog = embeddedCatalog; - else { - // append embedded catalog to list of loaded catalogs: - BCatalogAddOn *currCat = catalog->fCatalog; - while (currCat->fNext) - currCat = currCat->fNext; - currCat->fNext = embeddedCatalog; - } - } - - // make app-catalog the current catalog for translation-macros: - be_app_catalog = be_catalog = catalog; - - return catalog->InitCheck(); -} - - //#pragma mark - BCatalogAddOn BCatalogAddOn::BCatalogAddOn(const char *signature, const char *language, uint32 fingerprint) diff --git a/src/kits/locale/CatalogStub.cpp b/src/kits/locale/CatalogStub.cpp index 501f55356a..fea914c0d2 100644 --- a/src/kits/locale/CatalogStub.cpp +++ b/src/kits/locale/CatalogStub.cpp @@ -8,9 +8,6 @@ #define __CATALOG_STUB_H__ -#define B_TRANSLATE_USE_NEW_MACROS - - #include #include #include @@ -26,4 +23,11 @@ BCatalogStub::GetCatalog() } +/* static */ void +BCatalogStub::ForceReload() +{ + sCatalogInitOnce = false; +} + + #endif diff --git a/src/kits/locale/Locale.cpp b/src/kits/locale/Locale.cpp index 1ad2bf59ab..614af3bc4a 100644 --- a/src/kits/locale/Locale.cpp +++ b/src/kits/locale/Locale.cpp @@ -43,15 +43,3 @@ BLocale::GetString(uint32 id) return fCountry->GetString(id); } - -status_t -BLocale::GetAppCatalog(BCatalog *catalog) -{ - if (!catalog) - return B_BAD_VALUE; - // TODO: This is not so nice, and I don't know why it is here, but how - // is it envisioned to switch languages on the fly? - if (be_catalog) - debugger( "GetAppCatalog() has been called while be_catalog != NULL"); - return BCatalog::GetAppCatalog(catalog); -} diff --git a/src/kits/locale/LocaleRoster.cpp b/src/kits/locale/LocaleRoster.cpp index cacc8674a4..4038c59d48 100644 --- a/src/kits/locale/LocaleRoster.cpp +++ b/src/kits/locale/LocaleRoster.cpp @@ -425,11 +425,6 @@ BLocaleRoster::GetCatalog(BCatalog* catalog, vint32* catalogInitStatus) // This function is used in the translation macros, so it can't return a // status_t. Maybe it could throw exceptions ? - if (catalog == NULL) { - log_team(LOG_ERR, "GetCatalog called with a NULL catalog!"); - return catalog; - } - if (*catalogInitStatus == true) { // Catalog already loaded - nothing else to do return catalog; @@ -456,11 +451,16 @@ BLocaleRoster::GetCatalog(BCatalog* catalog, vint32* catalogInitStatus) BFile objectFile(info.name, B_READ_ONLY); BAppFileInfo objectInfo(&objectFile); char objectSignature[B_MIME_TYPE_LENGTH]; - objectInfo.GetSignature(objectSignature); + if (objectInfo.GetSignature(objectSignature) != B_OK) { + log_team(LOG_ERR, "File %s has no mimesignature, so it can't use" + "localization.", info.name); + return catalog; + } // drop supertype from mimetype (should be "application/"): char* stripSignature = objectSignature; - while(*(stripSignature++)!='/'); + while(*stripSignature != '/') + stripSignature ++; log_team(LOG_DEBUG, "Image %s (address %x) requested catalog with mimetype %s", diff --git a/src/preferences/appearance/APRMain.cpp b/src/preferences/appearance/APRMain.cpp index 649be76e85..c0d13b42eb 100644 --- a/src/preferences/appearance/APRMain.cpp +++ b/src/preferences/appearance/APRMain.cpp @@ -16,10 +16,6 @@ APRApplication::APRApplication(void) : BApplication(APPEARANCE_APP_SIGNATURE) { - // Do this now because we need to call BWindow constructor with a translated - // string. - be_locale->GetAppCatalog(&fCatalog); - fWindow = new APRWindow(BRect(100, 100, 550, 420)); fWindow->Show(); } diff --git a/src/preferences/appearance/APRMain.h b/src/preferences/appearance/APRMain.h index ce7dda0003..951f91f4cd 100644 --- a/src/preferences/appearance/APRMain.h +++ b/src/preferences/appearance/APRMain.h @@ -21,7 +21,6 @@ public: private: APRWindow *fWindow; - BCatalog fCatalog; }; #endif diff --git a/src/preferences/appearance/Jamfile b/src/preferences/appearance/Jamfile index 5d944cc7e0..4154204884 100644 --- a/src/preferences/appearance/Jamfile +++ b/src/preferences/appearance/Jamfile @@ -22,7 +22,7 @@ Preference Appearance : #FontMenu.cpp #MenuView.cpp - : be $(TARGET_LIBSTDC++) liblocale.so + : be $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) : Appearance.rdef ; diff --git a/src/preferences/backgrounds/Backgrounds.cpp b/src/preferences/backgrounds/Backgrounds.cpp index 965248ca3a..0abab951a8 100644 --- a/src/preferences/backgrounds/Backgrounds.cpp +++ b/src/preferences/backgrounds/Backgrounds.cpp @@ -48,7 +48,6 @@ public: private: BackgroundsWindow* fWindow; - BCatalog fCatalog; }; @@ -60,7 +59,6 @@ BackgroundsApplication::BackgroundsApplication() BApplication(kSignature), fWindow(NULL) { - be_locale->GetAppCatalog(&fCatalog); fWindow = new BackgroundsWindow(); fWindow->Show(); } diff --git a/src/preferences/backgrounds/Jamfile b/src/preferences/backgrounds/Jamfile index 77cd65aa2c..3677788c8b 100644 --- a/src/preferences/backgrounds/Jamfile +++ b/src/preferences/backgrounds/Jamfile @@ -7,7 +7,7 @@ Preference Backgrounds : Backgrounds.cpp BackgroundsView.cpp ImageFilePanel.cpp - : be tracker translation $(TARGET_LIBSUPC++) liblocale.so + : be tracker translation $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Backgrounds.rdef ; diff --git a/src/preferences/cpufrequency/Jamfile b/src/preferences/cpufrequency/Jamfile index 9ee1cbf17a..240b51dd20 100644 --- a/src/preferences/cpufrequency/Jamfile +++ b/src/preferences/cpufrequency/Jamfile @@ -8,7 +8,7 @@ Preference CPUFrequency : DriverInterface.cpp main.cpp StatusView.cpp - : be $(TARGET_LIBSUPC++) liblocale.so + : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : cpufrequency.rdef ; diff --git a/src/preferences/cpufrequency/main.cpp b/src/preferences/cpufrequency/main.cpp index d011f100dd..9cc9036aba 100644 --- a/src/preferences/cpufrequency/main.cpp +++ b/src/preferences/cpufrequency/main.cpp @@ -24,9 +24,6 @@ main(int argc, char* argv[]) { BApplication *app = new BApplication(kPrefSignature); - BCatalog cat; - be_locale->GetAppCatalog(&cat); - PreferencesWindow *window; window = new PreferencesWindow( B_TRANSLATE("CPU Frequency"), diff --git a/src/preferences/filetypes/FileTypes.cpp b/src/preferences/filetypes/FileTypes.cpp index 23f2da9a70..128a2f5dda 100644 --- a/src/preferences/filetypes/FileTypes.cpp +++ b/src/preferences/filetypes/FileTypes.cpp @@ -77,8 +77,6 @@ class FileTypes : public BApplication { BWindow *fApplicationTypesWindow; uint32 fWindowCount; uint32 fTypeWindowCount; - - BCatalog fCatalog; }; @@ -172,7 +170,6 @@ FileTypes::FileTypes() fWindowCount(0), fTypeWindowCount(0) { - be_locale->GetAppCatalog(&fCatalog); fFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, B_FILE_NODE | B_DIRECTORY_NODE, false); } diff --git a/src/preferences/filetypes/Jamfile b/src/preferences/filetypes/Jamfile index e9d55698bf..84be9f9882 100644 --- a/src/preferences/filetypes/Jamfile +++ b/src/preferences/filetypes/Jamfile @@ -25,7 +25,7 @@ Preference FileTypes : PreferredAppMenu.cpp StringView.cpp - : be tracker $(TARGET_LIBSUPC++) liblocale.so + : be tracker $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : FileTypes.rdef FileTypes.icons.rdef ; diff --git a/src/preferences/fonts/Jamfile b/src/preferences/fonts/Jamfile index 649ab35ef6..de445f592c 100644 --- a/src/preferences/fonts/Jamfile +++ b/src/preferences/fonts/Jamfile @@ -6,7 +6,7 @@ Preference Fonts : FontView.cpp main.cpp MainWindow.cpp - : be $(TARGET_LIBSUPC++) liblocale.so + : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Fonts.rdef ; diff --git a/src/preferences/fonts/main.cpp b/src/preferences/fonts/main.cpp index 4c95f8d905..70f7e3ef4b 100644 --- a/src/preferences/fonts/main.cpp +++ b/src/preferences/fonts/main.cpp @@ -25,16 +25,12 @@ class FontsApp : public BApplication { FontsApp(); virtual void AboutRequested(); - - private: - BCatalog fCatalog; }; FontsApp::FontsApp() : BApplication("application/x-vnd.Haiku-Fonts") { - be_locale->GetAppCatalog(&fCatalog); MainWindow *window = new MainWindow(); window->Show(); } diff --git a/src/preferences/keyboard/Jamfile b/src/preferences/keyboard/Jamfile index e32bf7736b..afd20f1402 100644 --- a/src/preferences/keyboard/Jamfile +++ b/src/preferences/keyboard/Jamfile @@ -14,7 +14,7 @@ Preference Keyboard : KeyboardSettings.cpp KeyboardView.cpp KeyboardWindow.cpp - : translation be $(TARGET_LIBSUPC++) liblocale.so + : translation be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Keyboard.rdef ; diff --git a/src/preferences/keyboard/Keyboard.cpp b/src/preferences/keyboard/Keyboard.cpp index e4fdd784ac..74d13a3f53 100644 --- a/src/preferences/keyboard/Keyboard.cpp +++ b/src/preferences/keyboard/Keyboard.cpp @@ -21,7 +21,6 @@ KeyboardApplication::KeyboardApplication() : BApplication("application/x-vnd.Haiku-Keyboard") { - be_locale->GetAppCatalog(&fCatalog); new KeyboardWindow(); } diff --git a/src/preferences/keyboard/Keyboard.h b/src/preferences/keyboard/Keyboard.h index debf7a6a51..9c3b844b68 100644 --- a/src/preferences/keyboard/Keyboard.h +++ b/src/preferences/keyboard/Keyboard.h @@ -21,9 +21,6 @@ public: void MessageReceived(BMessage* message); void AboutRequested(void); - -private: - BCatalog fCatalog; }; #endif diff --git a/src/preferences/keymap/Jamfile b/src/preferences/keymap/Jamfile index 5565e97e49..1fde8ed9d8 100644 --- a/src/preferences/keymap/Jamfile +++ b/src/preferences/keymap/Jamfile @@ -12,7 +12,7 @@ Preference Keymap : KeymapListItem.cpp KeymapWindow.cpp - : be tracker liblocale.so libshared.a $(TARGET_LIBSTDC++) + : be tracker $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSTDC++) : Keymap.rdef ; diff --git a/src/preferences/keymap/KeymapApplication.cpp b/src/preferences/keymap/KeymapApplication.cpp index 1ad46b9b2c..502fb0c517 100644 --- a/src/preferences/keymap/KeymapApplication.cpp +++ b/src/preferences/keymap/KeymapApplication.cpp @@ -13,7 +13,6 @@ KeymapApplication::KeymapApplication() : BApplication("application/x-vnd.Haiku-Keymap") { - be_locale->GetAppCatalog(&fCatalog); // create the window fWindow = new KeymapWindow(); fWindow->Show(); diff --git a/src/preferences/keymap/KeymapApplication.h b/src/preferences/keymap/KeymapApplication.h index e410be19ce..5e63315289 100644 --- a/src/preferences/keymap/KeymapApplication.h +++ b/src/preferences/keymap/KeymapApplication.h @@ -28,7 +28,6 @@ class KeymapApplication : public BApplication { private: KeymapWindow* fWindow; - BCatalog fCatalog; }; #endif // KEYMAP_APPLICATION_H diff --git a/src/preferences/locale/LanguageListView.cpp b/src/preferences/locale/LanguageListView.cpp index f8e41426ae..55db29f817 100644 --- a/src/preferences/locale/LanguageListView.cpp +++ b/src/preferences/locale/LanguageListView.cpp @@ -16,7 +16,6 @@ #include -#define B_TRANSLATE_USE_NEW_MACROS #include #include #include diff --git a/src/preferences/locale/Locale.cpp b/src/preferences/locale/Locale.cpp index 1068dbce5f..a9bf3f0bdd 100644 --- a/src/preferences/locale/Locale.cpp +++ b/src/preferences/locale/Locale.cpp @@ -4,9 +4,6 @@ */ -#define B_TRANSLATE_USE_NEW_MACROS - - #include "Locale.h" #include "LocaleWindow.h" diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp index fd750c2969..b375fde500 100644 --- a/src/preferences/locale/LocaleWindow.cpp +++ b/src/preferences/locale/LocaleWindow.cpp @@ -5,9 +5,6 @@ */ -#define B_TRANSLATE_USE_NEW_MACROS - - #include "Locale.h" #include "LocaleWindow.h" #include "LanguageListView.h" diff --git a/src/preferences/locale/TimeFormatSettingsView.cpp b/src/preferences/locale/TimeFormatSettingsView.cpp index dcf586fe8d..bff8580726 100644 --- a/src/preferences/locale/TimeFormatSettingsView.cpp +++ b/src/preferences/locale/TimeFormatSettingsView.cpp @@ -4,9 +4,6 @@ */ -#define B_TRANSLATE_USE_NEW_MACROS - - #include "TimeFormatSettingsView.h" #include diff --git a/src/preferences/mail/Jamfile b/src/preferences/mail/Jamfile index d4eb0b3149..bb2a4223ab 100644 --- a/src/preferences/mail/Jamfile +++ b/src/preferences/mail/Jamfile @@ -46,7 +46,7 @@ if $(HAIKU_OPENSSL_ENABLED) { Preference E-mail : $(sources) : be libmail.so $(HAIKU_NETWORK_LIBS) $(TARGET_NETAPI_LIB) - $(HAIKU_OPENSSL_LIBS) $(TARGET_LIBSUPC++) liblocale.so + $(HAIKU_OPENSSL_LIBS) $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : e-mail.rdef ; diff --git a/src/preferences/mail/main.cpp b/src/preferences/mail/main.cpp index a6919848e0..43a1b7d1f3 100644 --- a/src/preferences/mail/main.cpp +++ b/src/preferences/mail/main.cpp @@ -17,15 +17,12 @@ class MailConfigApp : public BApplication { public: MailConfigApp(); ~MailConfigApp(); - private: - BCatalog fCatalog; }; MailConfigApp::MailConfigApp() : BApplication("application/x-vnd.Haiku-Mail") { - be_locale->GetAppCatalog(&fCatalog); (new ConfigWindow())->Show(); } diff --git a/src/preferences/media/Jamfile b/src/preferences/media/Jamfile index 2e241706f7..3908c937ad 100644 --- a/src/preferences/media/Jamfile +++ b/src/preferences/media/Jamfile @@ -15,7 +15,7 @@ Preference Media : MediaViews.cpp MediaListItem.cpp MediaAlert.cpp - : media be liblocale.so $(TARGET_LIBSUPC++) + : media be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) : media.rdef ; diff --git a/src/preferences/media/Media.cpp b/src/preferences/media/Media.cpp index 2b3204a417..c98d155457 100644 --- a/src/preferences/media/Media.cpp +++ b/src/preferences/media/Media.cpp @@ -24,8 +24,6 @@ Media::Media() { BRect rect(32,64,637,462); - be_locale->GetAppCatalog(&fCatalog); - BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { path.Append(SETTINGS_FILE); diff --git a/src/preferences/media/Media.h b/src/preferences/media/Media.h index bc928b8d7d..3a54d329e7 100644 --- a/src/preferences/media/Media.h +++ b/src/preferences/media/Media.h @@ -27,7 +27,6 @@ class Media : public BApplication { private: MediaWindow* fWindow; - BCatalog fCatalog; }; #endif // MEDIA_H diff --git a/src/preferences/mouse/Jamfile b/src/preferences/mouse/Jamfile index eafeca20e3..d93d03d092 100644 --- a/src/preferences/mouse/Jamfile +++ b/src/preferences/mouse/Jamfile @@ -8,7 +8,7 @@ Preference Mouse : MouseWindow.cpp MouseView.cpp SettingsView.cpp - : translation be $(TARGET_LIBSUPC++) liblocale.so + : translation be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Mouse.rdef ; diff --git a/src/preferences/mouse/Mouse.cpp b/src/preferences/mouse/Mouse.cpp index 7bcc805c6e..ccc900aebb 100644 --- a/src/preferences/mouse/Mouse.cpp +++ b/src/preferences/mouse/Mouse.cpp @@ -25,8 +25,6 @@ MouseApplication::MouseApplication() : BApplication(kSignature) { - be_locale->GetAppCatalog(&fCatalog); - BRect rect(0, 0, 397, 293); MouseWindow *window = new MouseWindow(rect); window->Show(); @@ -45,7 +43,7 @@ MouseApplication::AboutRequested() int -main(int /*argc*/, char **/*argv*/) +main(int /*argc*/, char ** /*argv*/) { MouseApplication app; app.Run(); diff --git a/src/preferences/mouse/Mouse.h b/src/preferences/mouse/Mouse.h index 5edb1d5729..84db0dc492 100644 --- a/src/preferences/mouse/Mouse.h +++ b/src/preferences/mouse/Mouse.h @@ -21,8 +21,6 @@ public: MouseApplication(); virtual void AboutRequested(); -private: - BCatalog fCatalog; }; #endif /* MOUSE_H */ diff --git a/src/preferences/network/Jamfile b/src/preferences/network/Jamfile index 7099e617b3..9151c2d772 100644 --- a/src/preferences/network/Jamfile +++ b/src/preferences/network/Jamfile @@ -9,7 +9,7 @@ Preference Network : EthernetSettingsView.cpp Settings.cpp - : be $(HAIKU_NETWORK_LIBS) $(TARGET_LIBSUPC++) liblocale.so + : be $(HAIKU_NETWORK_LIBS) $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Network.rdef ; diff --git a/src/preferences/network/NetworkApp.cpp b/src/preferences/network/NetworkApp.cpp index 06a21fb052..e47942b824 100644 --- a/src/preferences/network/NetworkApp.cpp +++ b/src/preferences/network/NetworkApp.cpp @@ -15,7 +15,6 @@ NetworkApp::NetworkApp() : BApplication("application/x-vnd.Haiku-Network") { - be_locale->GetAppCatalog(&fCatalog); } NetworkApp::~NetworkApp() diff --git a/src/preferences/network/NetworkApp.h b/src/preferences/network/NetworkApp.h index 3b39bb33ee..be73cd88b0 100644 --- a/src/preferences/network/NetworkApp.h +++ b/src/preferences/network/NetworkApp.h @@ -28,7 +28,6 @@ class NetworkApp : public BApplication { virtual void ReadyToRun(); private: NetworkWindow *fEthWindow; - BCatalog fCatalog; }; diff --git a/src/preferences/opengl/Jamfile b/src/preferences/opengl/Jamfile index ba37216294..8701af5df7 100644 --- a/src/preferences/opengl/Jamfile +++ b/src/preferences/opengl/Jamfile @@ -11,7 +11,8 @@ Preference OpenGL : ExtensionsView.cpp InfoView.cpp LogoView.cpp - : be GL translation libcolumnlistview.a liblocale.so $(TARGET_LIBSUPC++) + : be GL translation libcolumnlistview.a $(HAIKU_LOCALE_LIBS) + $(TARGET_LIBSUPC++) : OpenGL.rdef ; diff --git a/src/preferences/opengl/OpenGLApp.cpp b/src/preferences/opengl/OpenGLApp.cpp index 0bbbadd60a..1e894cbd6c 100644 --- a/src/preferences/opengl/OpenGLApp.cpp +++ b/src/preferences/opengl/OpenGLApp.cpp @@ -26,10 +26,8 @@ OpenGLApp::~OpenGLApp() void OpenGLApp::ReadyToRun() { - be_locale->GetAppCatalog(&fCatalog); fWindow = new OpenGLWindow(); fWindow->Show(); - } diff --git a/src/preferences/opengl/OpenGLApp.h b/src/preferences/opengl/OpenGLApp.h index 8dc28f7267..62ee3193d5 100644 --- a/src/preferences/opengl/OpenGLApp.h +++ b/src/preferences/opengl/OpenGLApp.h @@ -24,7 +24,6 @@ public: private: OpenGLWindow* fWindow; - BCatalog fCatalog; }; #endif /* OPENGL_APP_H_ */ diff --git a/src/preferences/print/Jamfile b/src/preferences/print/Jamfile index e1d7757225..70f9e92545 100644 --- a/src/preferences/print/Jamfile +++ b/src/preferences/print/Jamfile @@ -15,7 +15,7 @@ Preference Printers : translation libprintutils.a $(TARGET_LIBSUPC++) - liblocale.so + $(HAIKU_LOCALE_LIBS) : Printers.rdef ; diff --git a/src/preferences/print/Printers.cpp b/src/preferences/print/Printers.cpp index 1cc0d07815..b6c64d8d65 100644 --- a/src/preferences/print/Printers.cpp +++ b/src/preferences/print/Printers.cpp @@ -28,7 +28,6 @@ main() PrintersApp::PrintersApp() : Inherited(PRINTERS_SIGNATURE) { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/preferences/print/Printers.h b/src/preferences/print/Printers.h index 83f7e71f20..7abb96f08a 100644 --- a/src/preferences/print/Printers.h +++ b/src/preferences/print/Printers.h @@ -22,9 +22,6 @@ public: PrintersApp(); void ReadyToRun(); void MessageReceived(BMessage* msg); - -private: - BCatalog fCatalog; }; #endif // _PRINTERS_H diff --git a/src/preferences/shortcuts/Jamfile b/src/preferences/shortcuts/Jamfile index a1bc20b89f..7c07270ad4 100644 --- a/src/preferences/shortcuts/Jamfile +++ b/src/preferences/shortcuts/Jamfile @@ -20,7 +20,7 @@ Preference Shortcuts : PrefilledBitmap.cpp ScrollViewCorner.cpp - : be locale tracker libshortcuts_shared.a $(TARGET_LIBSTDC++) + : be $(HAIKU_LOCALE_LIBS) tracker libshortcuts_shared.a $(TARGET_LIBSTDC++) : Shortcuts.rdef ; diff --git a/src/preferences/shortcuts/main.cpp b/src/preferences/shortcuts/main.cpp index 7e1793ea4c..745450a18e 100644 --- a/src/preferences/shortcuts/main.cpp +++ b/src/preferences/shortcuts/main.cpp @@ -20,9 +20,6 @@ main(int argc, char** argv) InitKeyIndices(); ShortcutsApp app; - BCatalog appCatalog; - be_locale->GetAppCatalog(&appCatalog); - app.Run(); } diff --git a/src/preferences/sounds/HApp.cpp b/src/preferences/sounds/HApp.cpp index 4f980eed3a..ff4be87976 100644 --- a/src/preferences/sounds/HApp.cpp +++ b/src/preferences/sounds/HApp.cpp @@ -25,8 +25,6 @@ HApp::HApp() : BApplication("application/x-vnd.Haiku-Sounds") { - be_locale->GetAppCatalog(&fCatalog); - BRect rect; rect.Set(200, 150, 590, 570); diff --git a/src/preferences/sounds/HApp.h b/src/preferences/sounds/HApp.h index afe552e6b4..9935f05c63 100644 --- a/src/preferences/sounds/HApp.h +++ b/src/preferences/sounds/HApp.h @@ -20,9 +20,6 @@ public: HApp(); virtual ~HApp(); virtual void AboutRequested(); - -private: - BCatalog fCatalog; }; diff --git a/src/preferences/sounds/Jamfile b/src/preferences/sounds/Jamfile index 706ba433a6..404fa4cd75 100644 --- a/src/preferences/sounds/Jamfile +++ b/src/preferences/sounds/Jamfile @@ -8,7 +8,7 @@ Preference Sounds : HApp.cpp HWindow.cpp HEventList.cpp - : be libcolumnlistview.a game locale tracker libmedia.so + : be libcolumnlistview.a game $(HAIKU_LOCALE_LIBS) tracker libmedia.so $(TARGET_LIBSUPC++) : Sounds.rdef ; diff --git a/src/preferences/touchpad/Jamfile b/src/preferences/touchpad/Jamfile index 165bee3b1d..f042b11a18 100644 --- a/src/preferences/touchpad/Jamfile +++ b/src/preferences/touchpad/Jamfile @@ -6,7 +6,7 @@ Preference Touchpad : TouchpadPref.cpp TouchpadPrefView.cpp main.cpp - : be $(TARGET_LIBSUPC++) liblocale.so + : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) : Touchpad.rdef ; diff --git a/src/preferences/touchpad/main.cpp b/src/preferences/touchpad/main.cpp index 69c59770ed..b1679150cd 100644 --- a/src/preferences/touchpad/main.cpp +++ b/src/preferences/touchpad/main.cpp @@ -44,9 +44,6 @@ main(int argc, char* argv[]) { BApplication* app = new BApplication("application/x-vnd.Haiku-Touchpad"); - BCatalog catalog; - be_locale->GetAppCatalog(&catalog); - TouchpadPrefWindow* window = new TouchpadPrefWindow(BRect(50, 50, 450, 350), B_TRANSLATE("Touchpad"), B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE diff --git a/src/preferences/virtualmemory/Jamfile b/src/preferences/virtualmemory/Jamfile index 488cbeabee..ca114bdd24 100644 --- a/src/preferences/virtualmemory/Jamfile +++ b/src/preferences/virtualmemory/Jamfile @@ -6,7 +6,7 @@ Preference VirtualMemory : Settings.cpp $(DRIVER_SETTINGS) - : be $(TARGET_LIBSTDC++) liblocale.so + : be $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) : VirtualMemory.rdef ; diff --git a/src/preferences/virtualmemory/VirtualMemory.cpp b/src/preferences/virtualmemory/VirtualMemory.cpp index 203e769849..333dd6a523 100644 --- a/src/preferences/virtualmemory/VirtualMemory.cpp +++ b/src/preferences/virtualmemory/VirtualMemory.cpp @@ -18,7 +18,6 @@ VirtualMemory::VirtualMemory() : BApplication("application/x-vnd.Haiku-VirtualMemory") { - be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/preferences/virtualmemory/VirtualMemory.h b/src/preferences/virtualmemory/VirtualMemory.h index c9d45c15a1..06e9f05da1 100644 --- a/src/preferences/virtualmemory/VirtualMemory.h +++ b/src/preferences/virtualmemory/VirtualMemory.h @@ -25,7 +25,6 @@ class VirtualMemory : public BApplication { void GetCurrentSettings(bool& enabled, off_t& size); VMSettings *fSettings; - BCatalog fCatalog; }; #endif /* VIRTUAL_MEMORY_H */ diff --git a/src/servers/mount/AutoMounter.cpp b/src/servers/mount/AutoMounter.cpp index 0c491d74d4..e14f5ea5fe 100644 --- a/src/servers/mount/AutoMounter.cpp +++ b/src/servers/mount/AutoMounter.cpp @@ -923,11 +923,8 @@ AutoMounter::_GetSettings(BMessage *message) int main(int argc, char* argv[]) { - BCatalog appCatalog; AutoMounter app; - be_locale->GetAppCatalog(&appCatalog); - app.Run(); return 0; } diff --git a/src/servers/mount/Jamfile b/src/servers/mount/Jamfile index a791a077a4..3a7b1b604d 100644 --- a/src/servers/mount/Jamfile +++ b/src/servers/mount/Jamfile @@ -7,7 +7,7 @@ Server mount_server AutoMounter.cpp # AutoMounterSettings.cpp : - libbe.so liblocale.so + libbe.so $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++) : mount_server.rdef diff --git a/src/servers/print/ConfigWindow.cpp b/src/servers/print/ConfigWindow.cpp index 7b462c41da..0cf30b57bb 100644 --- a/src/servers/print/ConfigWindow.cpp +++ b/src/servers/print/ConfigWindow.cpp @@ -102,7 +102,7 @@ GetPageFormat(float w, float h, BString& label) struct PageFormat& pf = pageFormat[i]; if ((pf.width == w && pf.height == h) || (pf.width == h && pf.height == w)) { - label = be_catalog->GetString(pf.label, B_TRANSLATE_CONTEXT); + label = B_TRANSLATE(pf.label); return; } } diff --git a/src/servers/print/Jamfile b/src/servers/print/Jamfile index 1c23a6aa5f..e1ede39e33 100644 --- a/src/servers/print/Jamfile +++ b/src/servers/print/Jamfile @@ -24,7 +24,7 @@ LinkAgainst print_server : be root translation - locale + $(HAIKU_LOCALE_LIBS) libprint.a libprintutils.a $(TARGET_LIBSUPC++) diff --git a/src/servers/print/PrintServerApp.Scripting.cpp b/src/servers/print/PrintServerApp.Scripting.cpp index 64df4478a2..a12f600e24 100644 --- a/src/servers/print/PrintServerApp.Scripting.cpp +++ b/src/servers/print/PrintServerApp.Scripting.cpp @@ -260,8 +260,7 @@ PrintServerApp::GetSupportedSuites(BMessage* msg) if (!localized) { localized = true; for (int i = 0; prop_list[i].name != NULL; i ++) - prop_list[i].usage = be_catalog->GetString(prop_list[i].usage, - B_TRANSLATE_CONTEXT); + prop_list[i].usage = B_TRANSLATE(prop_list[i].usage); } BPropertyInfo prop_info(prop_list); diff --git a/src/servers/print/PrintServerApp.cpp b/src/servers/print/PrintServerApp.cpp index 61cc39e972..f61c54ad24 100644 --- a/src/servers/print/PrintServerApp.cpp +++ b/src/servers/print/PrintServerApp.cpp @@ -100,7 +100,6 @@ PrintServerApp::PrintServerApp(status_t* err) fUseConfigWindow(true), fFolder(NULL) { - be_locale->GetAppCatalog(&fCatalog); fSettings = Settings::GetSettings(); LoadSettings(); diff --git a/src/servers/print/PrintServerApp.h b/src/servers/print/PrintServerApp.h index b7f529ca90..ed64ca2b74 100644 --- a/src/servers/print/PrintServerApp.h +++ b/src/servers/print/PrintServerApp.h @@ -95,7 +95,6 @@ class PrintServerApp : public BApplication, public FolderListener { Settings *fSettings; bool fUseConfigWindow; FolderWatcher *fFolder; - BCatalog fCatalog; }; #endif diff --git a/src/servers/print/Printer.Scripting.cpp b/src/servers/print/Printer.Scripting.cpp index b703818e91..2e863dddbe 100644 --- a/src/servers/print/Printer.Scripting.cpp +++ b/src/servers/print/Printer.Scripting.cpp @@ -110,8 +110,7 @@ Printer::GetSupportedSuites(BMessage* msg) if (!localized) { localized = true; for (int i = 0; prop_list[i].name != NULL; i ++) - prop_list[i].usage = be_catalog->GetString(prop_list[i].usage, - B_TRANSLATE_CONTEXT); + prop_list[i].usage = B_TRANSLATE(prop_list[i].usage); } BPropertyInfo prop_info(prop_list); diff --git a/src/servers/print/Transport.Scripting.cpp b/src/servers/print/Transport.Scripting.cpp index f56c0e7ba9..a0bd7a531f 100644 --- a/src/servers/print/Transport.Scripting.cpp +++ b/src/servers/print/Transport.Scripting.cpp @@ -104,8 +104,7 @@ Transport::GetSupportedSuites(BMessage* msg) if (!localized) { localized = true; for (int i = 0; prop_list[i].name != NULL; i ++) - prop_list[i].usage = be_catalog->GetString(prop_list[i].usage, - B_TRANSLATE_CONTEXT); + prop_list[i].usage = B_TRANSLATE(prop_list[i].usage); } BPropertyInfo prop_info(prop_list); diff --git a/src/tools/locale/Catalog.cpp b/src/tools/locale/Catalog.cpp index 9cf4534b99..d4ecaf3dfa 100644 --- a/src/tools/locale/Catalog.cpp +++ b/src/tools/locale/Catalog.cpp @@ -104,13 +104,6 @@ BCatalog::GetData(uint32 id, BMessage *msg) } -status_t -BCatalog::GetAppCatalog(BCatalog* catalog) -{ - return B_NOT_SUPPORTED; -} - - //#pragma mark - BCatalogAddOn BCatalogAddOn::BCatalogAddOn(const char *signature, const char *language, uint32 fingerprint) diff --git a/src/tools/locale/collectcatkeys.cpp b/src/tools/locale/collectcatkeys.cpp index 3fc7289e69..ca5d7c2021 100644 --- a/src/tools/locale/collectcatkeys.cpp +++ b/src/tools/locale/collectcatkeys.cpp @@ -28,7 +28,7 @@ const char *inputFile = NULL; BString outputFile; const char *catalogSig = NULL; const char *catalogLang = "English"; -BString rxString("(be_catalog\\s*->\\s*GetString\\s*" +BString rxString("(BCatalogStub::GetCatalog()\\s*->\\s*GetString\\s*" "|BCatalogAddOn\\s*::\\s*MarkForTranslation\\s*)");