* 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
This commit is contained in:
Adrien Destugues
2010-07-02 11:36:13 +00:00
parent ba7d3b37f9
commit be8fa2fb30
135 changed files with 87 additions and 446 deletions
+3 -23
View File
@@ -45,8 +45,6 @@ class BCatalog {
const BCatalog& operator= (const BCatalog&); const BCatalog& operator= (const BCatalog&);
// hide assignment and copy-constructor // hide assignment and copy-constructor
static status_t GetAppCatalog(BCatalog*);
BCatalogAddOn *fCatalog; BCatalogAddOn *fCatalog;
private: 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. // Proxy class for handling a "shared object local" catalog.
// This must be included (statically linked) into each shared object needing // This must be included (statically linked) into each shared object needing
// a catalog on its own (application, add-on, library, ...). The shared object // a catalog on its own (application, add-on, library, ...). The shared object
@@ -70,6 +64,9 @@ class BCatalogStub {
public: public:
static BCatalog* GetCatalog(); 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. // source-file.
#ifdef B_TRANSLATE_USE_NEW_MACROS
// Translation macros which may be used to shorten translation requests: // Translation macros which may be used to shorten translation requests:
#undef B_TRANSLATE #undef B_TRANSLATE
#define B_TRANSLATE(str) \ #define B_TRANSLATE(str) \
@@ -113,22 +109,6 @@ class BCatalogStub {
#undef B_TRANSLATE_ID #undef B_TRANSLATE_ID
#define B_TRANSLATE_ID(id) \ #define B_TRANSLATE_ID(id) \
BCatalogStub::GetCatalog()->GetString((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 // 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): // are used as key for translation requests (at other places in the code):
-120
View File
@@ -1,120 +0,0 @@
#ifndef _CATALOG_IN_ADD_ON_H_
#define _CATALOG_IN_ADD_ON_H_
#include <Catalog.h>
#include <Entry.h>
#include <Locale.h>
#include <LocaleRoster.h>
#include <Node.h>
#include <TypeConstants.h>
/*
* 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<void*>(&be_catalog);
while ((res = get_next_image_info(0, &cookie, &imageInfo)) == B_OK) {
char *dataStart = static_cast<char*>(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_ */
-2
View File
@@ -45,8 +45,6 @@ class BLocale {
void GetSortKey(const char *string, BString *key); void GetSortKey(const char *string, BString *key);
status_t GetAppCatalog(BCatalog *);
protected: protected:
BCollator *fCollator; BCollator *fCollator;
BLanguage *fLanguage; BLanguage *fLanguage;
+2 -5
View File
@@ -33,11 +33,6 @@ class BLocaleRoster {
BLocaleRoster(); 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 GetLocaleFor(const char *langCode, const char *countryCode);
status_t GetSystemCatalog(BCatalogAddOn **) const; status_t GetSystemCatalog(BCatalogAddOn **) const;
@@ -73,6 +68,7 @@ class BLocaleRoster {
static int32 kEmbeddedCatResId; static int32 kEmbeddedCatResId;
private: private:
BCatalog* GetCatalog(BCatalog* catalog, vint32* catalogInitStatus);
BCatalogAddOn* LoadCatalog(const char *signature, BCatalogAddOn* LoadCatalog(const char *signature,
const char *language = NULL, int32 fingerprint = 0); const char *language = NULL, int32 fingerprint = 0);
@@ -83,6 +79,7 @@ class BLocaleRoster {
const char *signature, const char *language); const char *signature, const char *language);
friend class BCatalog; friend class BCatalog;
friend class BCatalogStub;
friend class BPrivate::EditableCatalog; friend class BPrivate::EditableCatalog;
friend status_t get_add_on_catalog(BCatalog*, const char *); friend status_t get_add_on_catalog(BCatalog*, const char *);
}; };
+1 -1
View File
@@ -9,7 +9,7 @@ Application ZipOMatic-Z :
ZipOMaticWindow.cpp ZipOMaticWindow.cpp
ZipperThread.cpp ZipperThread.cpp
: be tracker $(TARGET_LIBSUPC++) liblocale.so : be tracker $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: ZipOMatic.rdef : ZipOMatic.rdef
; ;
@@ -37,7 +37,6 @@ ZipOMatic::ZipOMatic()
fGotRefs(false), fGotRefs(false),
fInvoker(new BInvoker(new BMessage(ZIPPO_QUIT_OR_CONTINUE), NULL, this)) fInvoker(new BInvoker(new BMessage(ZIPPO_QUIT_OR_CONTINUE), NULL, this))
{ {
be_locale->GetAppCatalog(&fCatalog);
} }
@@ -28,8 +28,6 @@ private:
bool fGotRefs; bool fGotRefs;
BInvoker* fInvoker; BInvoker* fInvoker;
BCatalog fCatalog;
}; };
#endif // _ZIPOMATIC_H_ #endif // _ZIPOMATIC_H_
+1 -4
View File
@@ -191,9 +191,7 @@ TranslationComparator(const void* left, const void* right)
class AboutApp : public BApplication { class AboutApp : public BApplication {
public: public:
AboutApp(); AboutApp();
private:
BCatalog fCatalog;
}; };
@@ -292,7 +290,6 @@ private:
AboutApp::AboutApp() AboutApp::AboutApp()
: BApplication("application/x-vnd.Haiku-About") : BApplication("application/x-vnd.Haiku-About")
{ {
be_locale->GetAppCatalog(&fCatalog);
AboutWindow *window = new(std::nothrow) AboutWindow(); AboutWindow *window = new(std::nothrow) AboutWindow();
if (window) if (window)
window->Show(); window->Show();
+1 -1
View File
@@ -19,7 +19,7 @@ Application AboutSystem :
HyperTextActions.cpp HyperTextActions.cpp
HyperTextView.cpp HyperTextView.cpp
Utilities.cpp Utilities.cpp
: $(TARGET_LIBSTDC++) be translation liblocale.so : $(TARGET_LIBSTDC++) be translation $(HAIKU_LOCALE_LIBS)
: AboutSystem.rdef : AboutSystem.rdef
; ;
-4
View File
@@ -30,16 +30,12 @@ public:
virtual void ReadyToRun(); virtual void ReadyToRun();
virtual void AboutRequested(); virtual void AboutRequested();
private:
BCatalog fCatalog;
}; };
BootManager::BootManager() BootManager::BootManager()
: BApplication(kSignature) : BApplication(kSignature)
{ {
be_locale->GetAppCatalog(&fCatalog);
} }
+1 -1
View File
@@ -21,7 +21,7 @@ Application bootman :
be be
textencoding textencoding
tracker tracker
liblocale.so $(HAIKU_LOCALE_LIBS)
$(TARGET_LIBSUPC++) $(TARGET_LIBSUPC++)
: :
bootman.rdef bootman.rdef
+1 -4
View File
@@ -130,11 +130,8 @@ CodyCam::CodyCam()
fVideoConsumer(NULL), fVideoConsumer(NULL),
fWindow(NULL), fWindow(NULL),
fPort(0), fPort(0),
fVideoControlWindow(NULL), fVideoControlWindow(NULL)
fAppCatalog(NULL)
{ {
be_locale->GetAppCatalog(&fAppCatalog);
int32 index = 0; int32 index = 0;
kCaptureRate[index++] = B_TRANSLATE("Every 15 seconds"); kCaptureRate[index++] = B_TRANSLATE("Every 15 seconds");
kCaptureRate[index++] = B_TRANSLATE("Every 30 seconds"); kCaptureRate[index++] = B_TRANSLATE("Every 30 seconds");
-1
View File
@@ -110,7 +110,6 @@ private:
BWindow* fWindow; BWindow* fWindow;
port_id fPort; port_id fPort;
BWindow* fVideoControlWindow; BWindow* fVideoControlWindow;
BCatalog fAppCatalog;
}; };
+2 -1
View File
@@ -11,7 +11,8 @@ Application CodyCam :
Settings.cpp Settings.cpp
SettingsHandler.cpp SettingsHandler.cpp
VideoConsumer.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 : CodyCam.rdef
; ;
-1
View File
@@ -95,7 +95,6 @@ TBarApp::TBarApp()
InitSettings(); InitSettings();
InitIconPreloader(); InitIconPreloader();
be_locale->GetAppCatalog(&fCatalog);
be_roster->StartWatching(this); be_roster->StartWatching(this);
sBarTeamInfoList.MakeEmpty(); sBarTeamInfoList.MakeEmpty();
-2
View File
@@ -178,8 +178,6 @@ class TBarApp : public BApplication {
static BLocker sSubscriberLock; static BLocker sSubscriberLock;
static BList sBarTeamInfoList; static BList sBarTeamInfoList;
static BList sSubscribers; static BList sSubscribers;
BCatalog fCatalog;
}; };
#endif // BAR_APP_H #endif // BAR_APP_H
+1 -1
View File
@@ -39,7 +39,7 @@ Application Deskbar :
ResourceSet.cpp ResourceSet.cpp
Switcher.cpp Switcher.cpp
$(targetSource) $(targetSource)
: be tracker liblocale.so $(targetLib) $(TARGET_LIBSUPC++) : be tracker $(HAIKU_LOCALE_LIBS) $(targetLib) $(TARGET_LIBSUPC++)
; ;
DoCatalogs Deskbar : DoCatalogs Deskbar :
+1 -4
View File
@@ -89,7 +89,6 @@ class DiskProbe : public BApplication {
uint32 fWindowCount; uint32 fWindowCount;
BRect fWindowFrame; BRect fWindowFrame;
BMessenger fFindTarget; BMessenger fFindTarget;
BCatalog fAppCatalog;
}; };
@@ -236,10 +235,8 @@ DiskProbe::DiskProbe()
: BApplication(kSignature), : BApplication(kSignature),
fOpenWindow(NULL), fOpenWindow(NULL),
fFindWindow(NULL), fFindWindow(NULL),
fWindowCount(0), fWindowCount(0)
fAppCatalog(NULL)
{ {
be_locale->GetAppCatalog(&fAppCatalog);
fFilePanel = new BFilePanel(); fFilePanel = new BFilePanel();
fWindowFrame = fSettings.Message().FindRect("window_frame"); fWindowFrame = fSettings.Message().FindRect("window_frame");
} }
+2 -2
View File
@@ -16,8 +16,8 @@ Application DiskProbe :
ProbeView.cpp ProbeView.cpp
OpenWindow.cpp OpenWindow.cpp
FindWindow.cpp FindWindow.cpp
: be locale tracker translation libexpression_parser.a libmapm.a : be $(HAIKU_LOCALE_LIBS) tracker translation libexpression_parser.a
$(TARGET_LIBSUPC++) libmapm.a $(TARGET_LIBSUPC++)
: DiskProbe.rdef : DiskProbe.rdef
; ;
-2
View File
@@ -36,8 +36,6 @@ DriveSetup::~DriveSetup()
void void
DriveSetup::ReadyToRun() DriveSetup::ReadyToRun()
{ {
be_locale->GetAppCatalog(&fCatalog);
fWindow = new MainWindow(BRect(50, 50, 600, 450)); fWindow = new MainWindow(BRect(50, 50, 600, 450));
if (_RestoreSettings() != B_OK) if (_RestoreSettings() != B_OK)
fWindow->ApplyDefaultSettings(); fWindow->ApplyDefaultSettings();
-1
View File
@@ -32,7 +32,6 @@ private:
MainWindow* fWindow; MainWindow* fWindow;
BMessage fSettings; BMessage fSettings;
BCatalog fCatalog;
}; };
+2 -1
View File
@@ -13,7 +13,8 @@ Preference DriveSetup :
PartitionList.cpp PartitionList.cpp
Support.cpp Support.cpp
: be liblocale.so libcolumnlistview.a libshared.a $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) libcolumnlistview.a libshared.a
$(TARGET_LIBSUPC++)
: DriveSetup.rdef : DriveSetup.rdef
; ;
-2
View File
@@ -15,8 +15,6 @@
ExpanderApp::ExpanderApp() ExpanderApp::ExpanderApp()
: BApplication("application/x-vnd.Haiku-Expander") : BApplication("application/x-vnd.Haiku-Expander")
{ {
be_locale->GetAppCatalog(&fCatalog);
BPoint windowPosition = fSettings.Message().FindPoint("window_position"); BPoint windowPosition = fSettings.Message().FindPoint("window_position");
BRect windowFrame(0, 0, 450, 120); BRect windowFrame(0, 0, 450, 120);
windowFrame.OffsetBy(windowPosition); windowFrame.OffsetBy(windowPosition);
-1
View File
@@ -48,7 +48,6 @@ class ExpanderApp : public BApplication {
void UpdateSettingsFrom(BMessage *message); void UpdateSettingsFrom(BMessage *message);
private: private:
ExpanderWindow *fWindow; ExpanderWindow *fWindow;
BCatalog fCatalog;
}; };
#endif /* _ExpanderApp_h */ #endif /* _ExpanderApp_h */
+1 -1
View File
@@ -9,7 +9,7 @@ Application Expander :
ExpanderPreferences.cpp ExpanderPreferences.cpp
DirectoryFilePanel.cpp DirectoryFilePanel.cpp
ExpanderRules.cpp ExpanderRules.cpp
: be tracker liblocale.so $(TARGET_LIBSUPC++) : be tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: Expander.rdef : Expander.rdef
; ;
-3
View File
@@ -99,9 +99,6 @@ InstallerApp::AboutRequested()
void void
InstallerApp::ReadyToRun() InstallerApp::ReadyToRun()
{ {
// Initilialize the Locale Kit
be_locale->GetAppCatalog(&fCatalog);
const char* infoText = B_TRANSLATE( const char* infoText = B_TRANSLATE(
"Welcome to the Haiku Installer!\n\n" "Welcome to the Haiku Installer!\n\n"
-1
View File
@@ -21,7 +21,6 @@ public:
private: private:
BWindow* fEULAWindow; BWindow* fEULAWindow;
BCatalog fCatalog;
}; };
#endif // INSTALLER_APP_H #endif // INSTALLER_APP_H
+2 -1
View File
@@ -12,7 +12,8 @@ Application Installer :
ProgressReporter.cpp ProgressReporter.cpp
UnzipEngine.cpp UnzipEngine.cpp
WorkerThread.cpp WorkerThread.cpp
: be tracker translation libshared.a $(TARGET_LIBSTDC++) liblocale.so : be tracker translation libshared.a $(TARGET_LIBSTDC++)
$(HAIKU_LOCALE_LIBS)
: Installer.rdef : Installer.rdef
; ;
+2 -2
View File
@@ -33,8 +33,8 @@ Application Mail :
WIndex.cpp WIndex.cpp
Words.cpp Words.cpp
KUndoBuffer.cpp KUndoBuffer.cpp
: be tracker $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) liblocale.so libmail.so : be tracker $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
libtextencoding.so libmail.so libtextencoding.so
: Mail.rdef : Mail.rdef
; ;
-2
View File
@@ -117,8 +117,6 @@ TMailApp::TMailApp()
fMailCharacterSet(B_MS_WINDOWS_CONVERSION), fMailCharacterSet(B_MS_WINDOWS_CONVERSION),
fContentFont(be_fixed_font) fContentFont(be_fixed_font)
{ {
be_locale->GetAppCatalog(&fCatalog);
// set default values // set default values
fContentFont.SetSize(12.0); fContentFont.SetSize(12.0);
fAutoMarkRead = true; fAutoMarkRead = true;
-2
View File
@@ -129,8 +129,6 @@ class TMailApp : public BApplication {
int32 fUseAccountFrom; int32 fUseAccountFrom;
uint32 fMailCharacterSet; uint32 fMailCharacterSet;
BFont fContentFont; BFont fContentFont;
BCatalog fCatalog;
}; };
+1 -1
View File
@@ -7,7 +7,7 @@ Application MidiPlayer :
MidiPlayerWindow.cpp MidiPlayerWindow.cpp
ScopeView.cpp ScopeView.cpp
SynthBridge.cpp SynthBridge.cpp
: be midi midi2 $(TARGET_LIBSUPC++) liblocale.so : be midi midi2 $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: MidiPlayer.rdef : MidiPlayer.rdef
; ;
-1
View File
@@ -34,7 +34,6 @@
MidiPlayerApp::MidiPlayerApp() MidiPlayerApp::MidiPlayerApp()
: BApplication(MIDI_PLAYER_SIGNATURE) : BApplication(MIDI_PLAYER_SIGNATURE)
{ {
be_locale->GetAppCatalog(&fCatalog);
window = new MidiPlayerWindow; window = new MidiPlayerWindow;
} }
-1
View File
@@ -39,7 +39,6 @@ class MidiPlayerApp : public BApplication {
private: private:
typedef BApplication super; typedef BApplication super;
BCatalog fCatalog;
MidiPlayerWindow* window; MidiPlayerWindow* window;
}; };
+1 -1
View File
@@ -16,7 +16,7 @@ Application PackageInstaller :
PackageTextViewer.cpp PackageTextViewer.cpp
PackageImageViewer.cpp PackageImageViewer.cpp
InstalledPackageInfo.cpp InstalledPackageInfo.cpp
: be locale tracker translation z $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) tracker translation z $(TARGET_LIBSUPC++)
: PackageInstaller.rdef : PackageInstaller.rdef
; ;
+1 -4
View File
@@ -40,18 +40,15 @@ class PackageInstaller : public BApplication {
private: private:
BFilePanel *fOpen; BFilePanel *fOpen;
uint32 fWindowCount; uint32 fWindowCount;
BCatalog fAppCatalog;
}; };
PackageInstaller::PackageInstaller() PackageInstaller::PackageInstaller()
: BApplication("application/x-vnd.Haiku-PackageInstaller"), : BApplication("application/x-vnd.Haiku-PackageInstaller"),
fOpen(NULL), fOpen(NULL),
fWindowCount(0), fWindowCount(0)
fAppCatalog(NULL)
{ {
fOpen = new BFilePanel(B_OPEN_PANEL); fOpen = new BFilePanel(B_OPEN_PANEL);
be_locale->GetAppCatalog(&fAppCatalog);
} }
+1 -1
View File
@@ -8,7 +8,7 @@ Application Pairs :
PairsView.cpp PairsView.cpp
PairsTopButton.cpp PairsTopButton.cpp
: be liblocale.so $(TARGET_LIBSTDC++) : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
: Pairs.rdef : Pairs.rdef
; ;
-1
View File
@@ -20,7 +20,6 @@ Pairs::Pairs()
BApplication(kSignature), BApplication(kSignature),
fWindow(NULL) fWindow(NULL)
{ {
be_locale->GetAppCatalog(&fCatalog);
} }
-2
View File
@@ -24,8 +24,6 @@ public:
private: private:
PairsWindow* fWindow; PairsWindow* fWindow;
BCatalog fCatalog;
}; };
#endif // PAIRS_H #endif // PAIRS_H
+1 -1
View File
@@ -23,7 +23,7 @@ Application Pulse :
PulseView.cpp PulseView.cpp
PulseWindow.cpp PulseWindow.cpp
: be locale $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: Pulse.rdef : Pulse.rdef
; ;
-2
View File
@@ -37,8 +37,6 @@
PulseApp::PulseApp(int argc, char **argv) PulseApp::PulseApp(int argc, char **argv)
: BApplication(APP_SIGNATURE) : BApplication(APP_SIGNATURE)
{ {
be_locale->GetAppCatalog(&fCatalog);
prefs = new Prefs(); prefs = new Prefs();
int mini = false, deskbar = false, normal = false; int mini = false, deskbar = false, normal = false;
-2
View File
@@ -27,8 +27,6 @@ public:
private: private:
void BuildPulse(); void BuildPulse();
BCatalog fCatalog;
}; };
extern bool LastEnabledCPU(int cpu); extern bool LastEnabledCPU(int cpu);
@@ -178,12 +178,7 @@ void
BootPromptWindow::_InitCatalog(bool saveSettings) BootPromptWindow::_InitCatalog(bool saveSettings)
{ {
// Initilialize the Locale Kit // Initilialize the Locale Kit
// TODO: The below code is a work-around for not being able to BCatalogStub::ForceReload();
// 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);
// Generate a settings file // Generate a settings file
// TODO: This should not be necessary. // TODO: This should not be necessary.
@@ -191,6 +186,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings)
if (!saveSettings) if (!saveSettings)
return; return;
/*
BPath path; BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK
|| path.Append("Locale settings") != B_OK) { || path.Append("Locale settings") != B_OK) {
@@ -204,7 +200,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings)
settings.Unflatten(&file); settings.Unflatten(&file);
BString language; BString language;
if (fCatalog.GetLanguage(&language) == B_OK) { if (fCatalog->GetLanguage(&language) == B_OK) {
settings.RemoveName("language"); settings.RemoveName("language");
settings.AddString("language", language.String()); settings.AddString("language", language.String());
} }
@@ -218,6 +214,7 @@ BootPromptWindow::_InitCatalog(bool saveSettings)
|| settings.Flatten(&file) != B_OK) { || settings.Flatten(&file) != B_OK) {
fprintf(stderr, "Failed to write Local Kit settings!\n"); fprintf(stderr, "Failed to write Local Kit settings!\n");
} }
*/
} }
@@ -30,7 +30,6 @@ private:
status_t _GetCurrentKeymapRef(entry_ref& ref) const; status_t _GetCurrentKeymapRef(entry_ref& ref) const;
private: private:
BCatalog fCatalog;
BTextView* fInfoTextView; BTextView* fInfoTextView;
BStringView* fLanguagesLabelView; BStringView* fLanguagesLabelView;
BListView* fLanguagesListView; BListView* fLanguagesListView;
+1 -1
View File
@@ -9,7 +9,7 @@ Application ReadOnlyBootPrompt :
BootPromptWindow.cpp BootPromptWindow.cpp
Keymap.cpp Keymap.cpp
KeymapListItem.cpp KeymapListItem.cpp
: be libshared.a $(TARGET_LIBSTDC++) liblocale.so : be libshared.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: BootPrompt.rdef : BootPrompt.rdef
; ;
+2 -2
View File
@@ -7,7 +7,7 @@ Application Screenshot :
ScreenshotWindow.cpp ScreenshotWindow.cpp
PreviewView.cpp PreviewView.cpp
Utility.cpp Utility.cpp
: be locale tracker translation $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
: ScreenshotApp.rdef : ScreenshotApp.rdef
; ;
@@ -21,7 +21,7 @@ DoCatalogs Screenshot :
Application screenshot : Application screenshot :
Screenshot.cpp Screenshot.cpp
Utility.cpp Utility.cpp
: be locale translation $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) translation $(TARGET_LIBSUPC++)
: Screenshot.rdef : Screenshot.rdef
; ;
-1
View File
@@ -40,7 +40,6 @@ Screenshot::Screenshot()
fUtility(new Utility()), fUtility(new Utility()),
fLaunchGui(true) fLaunchGui(true)
{ {
be_locale->GetAppCatalog(&fCatalog);
} }
-1
View File
@@ -29,7 +29,6 @@ private:
int32 _GetImageType(const char* name) const; int32 _GetImageType(const char* name) const;
Utility* fUtility; Utility* fUtility;
BCatalog fCatalog;
bool fLaunchGui; bool fLaunchGui;
}; };
-1
View File
@@ -27,7 +27,6 @@ ScreenshotApp::ScreenshotApp()
fSilent(false), fSilent(false),
fClipboard(false) fClipboard(false)
{ {
be_locale->GetAppCatalog(&fCatalog);
} }
-1
View File
@@ -26,7 +26,6 @@ public:
void ReadyToRun(); void ReadyToRun();
private: private:
BCatalog fCatalog;
Utility* fUtility; Utility* fUtility;
bool fSilent; bool fSilent;
bool fClipboard; bool fClipboard;
+1 -1
View File
@@ -18,7 +18,7 @@ Application ShowImage :
ShowImageView.cpp ShowImageView.cpp
ShowImageWindow.cpp ShowImageWindow.cpp
: libshared.a : libshared.a
be tracker translation liblocale.so $(TARGET_LIBSUPC++) be tracker translation $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: ShowImage.rdef : ShowImage.rdef
; ;
-2
View File
@@ -38,8 +38,6 @@ ShowImageApp::ShowImageApp()
: :
BApplication(kApplicationSignature) BApplication(kApplicationSignature)
{ {
be_locale->GetAppCatalog(&fCatalog);
fPulseStarted = false; fPulseStarted = false;
fOpenPanel = new BFilePanel(B_OPEN_PANEL); fOpenPanel = new BFilePanel(B_OPEN_PANEL);
} }
-1
View File
@@ -43,7 +43,6 @@ private:
BFilePanel *fOpenPanel; BFilePanel *fOpenPanel;
bool fPulseStarted; bool fPulseStarted;
ShowImageSettings fSettings; ShowImageSettings fSettings;
BCatalog fCatalog;
}; };
+1 -1
View File
@@ -20,7 +20,7 @@ Application SoundRecorder :
UpDownButton.cpp UpDownButton.cpp
VUView.cpp VUView.cpp
VolumeSlider.cpp VolumeSlider.cpp
: be locale media tracker $(TARGET_LIBSTDC++) : be $(HAIKU_LOCALE_LIBS) media tracker $(TARGET_LIBSTDC++)
: SoundRecorder.rdef : SoundRecorder.rdef
; ;
@@ -128,8 +128,6 @@ RecorderWindow::RecorderWindow() :
CalcSizes(MIN_WIDTH, MIN_HEIGHT); CalcSizes(MIN_WIDTH, MIN_HEIGHT);
be_locale->GetAppCatalog(&fAppCatalog);
SetTitle(B_TRANSLATE("SoundRecorder")); SetTitle(B_TRANSLATE("SoundRecorder"));
fInitCheck = InitWindow(); fInitCheck = InitWindow();
-1
View File
@@ -169,7 +169,6 @@ static void NotifyPlayFile(void * cookie, BSoundPlayer::sound_player_notificatio
void RefsReceived(BMessage *msg); void RefsReceived(BMessage *msg);
void CopyTarget(BMessage *msg); void CopyTarget(BMessage *msg);
BCatalog fAppCatalog;
}; };
#endif /* RECORDERWINDOW_H */ #endif /* RECORDERWINDOW_H */
+2 -1
View File
@@ -16,7 +16,8 @@ Application StyledEdit :
StyledEditApp.cpp StyledEditApp.cpp
StyledEditView.cpp StyledEditView.cpp
StyledEditWindow.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) : $(styled_edit_rsrc)
; ;
-2
View File
@@ -87,8 +87,6 @@ StyledEditApp::StyledEditApp()
: BApplication(APP_SIGNATURE), : BApplication(APP_SIGNATURE),
fOpenPanel(NULL) fOpenPanel(NULL)
{ {
be_locale->GetAppCatalog(&fCatalog);
fOpenPanel = new BFilePanel(); fOpenPanel = new BFilePanel();
BMenuBar* menuBar = BMenuBar* menuBar =
dynamic_cast<BMenuBar*>(fOpenPanel->Window()->FindView("MenuBar")); dynamic_cast<BMenuBar*>(fOpenPanel->Window()->FindView("MenuBar"));
-1
View File
@@ -49,7 +49,6 @@ class StyledEditApp : public BApplication {
int32 fWindowCount; int32 fWindowCount;
int32 fNextUntitledWindow; int32 fNextUntitledWindow;
bool fBadArguments; bool fBadArguments;
BCatalog fCatalog;
}; };
extern StyledEditApp* styled_edit_app; extern StyledEditApp* styled_edit_app;
+1 -1
View File
@@ -26,7 +26,7 @@ Application Terminal :
TermWindow.cpp TermWindow.cpp
VTKeyTbl.c VTKeyTbl.c
VTPrsTbl.c VTPrsTbl.c
: be locale tracker textencoding $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) tracker textencoding $(TARGET_LIBSUPC++)
: Terminal.rdef : Terminal.rdef
; ;
+1 -4
View File
@@ -61,8 +61,7 @@ TermApp::TermApp()
fStartFullscreen(false), fStartFullscreen(false),
fWindowNumber(-1), fWindowNumber(-1),
fTermWindow(NULL), fTermWindow(NULL),
fArgs(NULL), fArgs(NULL)
fAppCatalog(NULL)
{ {
const char *defaultArgs[2]; const char *defaultArgs[2];
defaultArgs[0] = kDefaultShell; defaultArgs[0] = kDefaultShell;
@@ -76,8 +75,6 @@ TermApp::TermApp()
defaultArgs[0] = passwdStruct.pw_shell; defaultArgs[0] = passwdStruct.pw_shell;
} }
be_locale->GetAppCatalog(&fAppCatalog);
fArgs = new Arguments(2, defaultArgs); fArgs = new Arguments(2, defaultArgs);
fWindowTitle = B_TRANSLATE("Terminal"); fWindowTitle = B_TRANSLATE("Terminal");
-1
View File
@@ -77,7 +77,6 @@ class TermApp : public BApplication {
BWindow* fTermWindow; BWindow* fTermWindow;
BRect fTermFrame; BRect fTermFrame;
Arguments *fArgs; Arguments *fArgs;
BCatalog fAppCatalog;
}; };
#endif // TERM_APP_H #endif // TERM_APP_H
+1 -4
View File
@@ -127,14 +127,11 @@ GrepWindow::GrepWindow(BMessage* message)
fChangesIterator(NULL), fChangesIterator(NULL),
fChangesPulse(NULL), fChangesPulse(NULL),
fFilePanel(NULL), fFilePanel(NULL)
fAppCatalog(NULL)
{ {
if (fModel == NULL) if (fModel == NULL)
return; return;
be_locale->GetAppCatalog(&fAppCatalog);
entry_ref directory; entry_ref directory;
_InitRefsReceived(&directory, message); _InitRefsReceived(&directory, message);
-1
View File
@@ -145,7 +145,6 @@ private:
BMessageRunner* fChangesPulse; BMessageRunner* fChangesPulse;
BFilePanel* fFilePanel; BFilePanel* fFilePanel;
BCatalog fAppCatalog;
}; };
#endif // GREP_WINDOW_H #endif // GREP_WINDOW_H
+2 -1
View File
@@ -24,7 +24,8 @@ Application TextSearch :
$(additionalBeOSSources) $(additionalBeOSSources)
: be locale tracker textencoding libshared.a $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) tracker textencoding libshared.a
$(TARGET_LIBSUPC++)
: TextSearch.rdef : TextSearch.rdef
; ;
+1 -1
View File
@@ -8,7 +8,7 @@ Application TV :
MainWin.cpp MainWin.cpp
VideoNode.cpp VideoNode.cpp
VideoView.cpp VideoView.cpp
: be locale media $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) media $(TARGET_LIBSUPC++)
: tv.rdef : tv.rdef
; ;
-2
View File
@@ -47,8 +47,6 @@ MainApp::MainApp()
{ {
InitPrefs(); InitPrefs();
be_locale->GetAppCatalog(&fAppCatalog);
gDeviceRoster = new DeviceRoster; gDeviceRoster = new DeviceRoster;
fMainWindow = NewWindow(); fMainWindow = NewWindow();
-1
View File
@@ -38,7 +38,6 @@ public:
private: private:
BWindow * fMainWindow; BWindow * fMainWindow;
BCatalog fAppCatalog;
}; };
extern MainApp *gMainApp; extern MainApp *gMainApp;
+1 -1
View File
@@ -7,7 +7,7 @@ UsePrivateHeaders app interface ;
Application Workspaces : Application Workspaces :
Workspaces.cpp Workspaces.cpp
: be locale $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: Workspaces.rdef : Workspaces.rdef
; ;
-2
View File
@@ -149,7 +149,6 @@ class WorkspacesApp : public BApplication {
private: private:
WorkspacesWindow* fWindow; WorkspacesWindow* fWindow;
BCatalog fAppCatalog;
}; };
@@ -809,7 +808,6 @@ WorkspacesWindow::SetAutoRaise(bool enable)
WorkspacesApp::WorkspacesApp() WorkspacesApp::WorkspacesApp()
: BApplication(kSignature) : BApplication(kSignature)
{ {
be_locale->GetAppCatalog(&fAppCatalog);
fWindow = new WorkspacesWindow(new WorkspacesSettings()); fWindow = new WorkspacesWindow(new WorkspacesSettings());
} }
+1 -1
View File
@@ -129,7 +129,7 @@ StdBinCommands
# commands that need libbe.so, libsupc++.so and liblocale.so # commands that need libbe.so, libsupc++.so and liblocale.so
StdBinCommands StdBinCommands
dstcheck.cpp 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 # Haiku-specific apps which need libbe.so
if $(TARGET_PLATFORM) = haiku { if $(TARGET_PLATFORM) = haiku {
-2
View File
@@ -101,7 +101,6 @@ TimedAlert::GetLabel(BString &string)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
BCatalog fCatalog;
time_t t; time_t t;
struct tm tm; struct tm tm;
tzset(); tzset();
@@ -136,7 +135,6 @@ main(int argc, char **argv)
if (dst != tm.tm_isdst || argc > 1) { if (dst != tm.tm_isdst || argc > 1) {
BApplication app("application/x-vnd.Haiku-cmd-dstconfig"); BApplication app("application/x-vnd.Haiku-cmd-dstconfig");
be_locale->GetAppCatalog(&fCatalog);
BString string; BString string;
TimedAlert::GetLabel(string); TimedAlert::GetLabel(string);
-54
View File
@@ -15,13 +15,6 @@
#include <Roster.h> #include <Roster.h>
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 //#pragma mark - BCatalog
BCatalog::BCatalog() BCatalog::BCatalog()
: :
@@ -39,8 +32,6 @@ BCatalog::BCatalog(const char *signature, const char *language,
BCatalog::~BCatalog() BCatalog::~BCatalog()
{ {
if (be_catalog == this)
be_app_catalog = be_catalog = NULL;
be_locale_roster->UnloadCatalog(fCatalog); 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 //#pragma mark - BCatalogAddOn
BCatalogAddOn::BCatalogAddOn(const char *signature, const char *language, BCatalogAddOn::BCatalogAddOn(const char *signature, const char *language,
uint32 fingerprint) uint32 fingerprint)
+7 -3
View File
@@ -8,9 +8,6 @@
#define __CATALOG_STUB_H__ #define __CATALOG_STUB_H__
#define B_TRANSLATE_USE_NEW_MACROS
#include <Catalog.h> #include <Catalog.h>
#include <Locale.h> #include <Locale.h>
#include <LocaleRoster.h> #include <LocaleRoster.h>
@@ -26,4 +23,11 @@ BCatalogStub::GetCatalog()
} }
/* static */ void
BCatalogStub::ForceReload()
{
sCatalogInitOnce = false;
}
#endif #endif
-12
View File
@@ -43,15 +43,3 @@ BLocale::GetString(uint32 id)
return fCountry->GetString(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);
}
+7 -7
View File
@@ -425,11 +425,6 @@ BLocaleRoster::GetCatalog(BCatalog* catalog, vint32* catalogInitStatus)
// This function is used in the translation macros, so it can't return a // This function is used in the translation macros, so it can't return a
// status_t. Maybe it could throw exceptions ? // 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) { if (*catalogInitStatus == true) {
// Catalog already loaded - nothing else to do // Catalog already loaded - nothing else to do
return catalog; return catalog;
@@ -456,11 +451,16 @@ BLocaleRoster::GetCatalog(BCatalog* catalog, vint32* catalogInitStatus)
BFile objectFile(info.name, B_READ_ONLY); BFile objectFile(info.name, B_READ_ONLY);
BAppFileInfo objectInfo(&objectFile); BAppFileInfo objectInfo(&objectFile);
char objectSignature[B_MIME_TYPE_LENGTH]; 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/"): // drop supertype from mimetype (should be "application/"):
char* stripSignature = objectSignature; char* stripSignature = objectSignature;
while(*(stripSignature++)!='/'); while(*stripSignature != '/')
stripSignature ++;
log_team(LOG_DEBUG, log_team(LOG_DEBUG,
"Image %s (address %x) requested catalog with mimetype %s", "Image %s (address %x) requested catalog with mimetype %s",
-4
View File
@@ -16,10 +16,6 @@
APRApplication::APRApplication(void) APRApplication::APRApplication(void)
: BApplication(APPEARANCE_APP_SIGNATURE) : 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 = new APRWindow(BRect(100, 100, 550, 420));
fWindow->Show(); fWindow->Show();
} }
-1
View File
@@ -21,7 +21,6 @@ public:
private: private:
APRWindow *fWindow; APRWindow *fWindow;
BCatalog fCatalog;
}; };
#endif #endif
+1 -1
View File
@@ -22,7 +22,7 @@ Preference Appearance :
#FontMenu.cpp #FontMenu.cpp
#MenuView.cpp #MenuView.cpp
: be $(TARGET_LIBSTDC++) liblocale.so : be $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: Appearance.rdef : Appearance.rdef
; ;
@@ -48,7 +48,6 @@ public:
private: private:
BackgroundsWindow* fWindow; BackgroundsWindow* fWindow;
BCatalog fCatalog;
}; };
@@ -60,7 +59,6 @@ BackgroundsApplication::BackgroundsApplication()
BApplication(kSignature), BApplication(kSignature),
fWindow(NULL) fWindow(NULL)
{ {
be_locale->GetAppCatalog(&fCatalog);
fWindow = new BackgroundsWindow(); fWindow = new BackgroundsWindow();
fWindow->Show(); fWindow->Show();
} }
+1 -1
View File
@@ -7,7 +7,7 @@ Preference Backgrounds :
Backgrounds.cpp Backgrounds.cpp
BackgroundsView.cpp BackgroundsView.cpp
ImageFilePanel.cpp ImageFilePanel.cpp
: be tracker translation $(TARGET_LIBSUPC++) liblocale.so : be tracker translation $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: Backgrounds.rdef : Backgrounds.rdef
; ;
+1 -1
View File
@@ -8,7 +8,7 @@ Preference CPUFrequency :
DriverInterface.cpp DriverInterface.cpp
main.cpp main.cpp
StatusView.cpp StatusView.cpp
: be $(TARGET_LIBSUPC++) liblocale.so : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: cpufrequency.rdef : cpufrequency.rdef
; ;
-3
View File
@@ -24,9 +24,6 @@ main(int argc, char* argv[])
{ {
BApplication *app = new BApplication(kPrefSignature); BApplication *app = new BApplication(kPrefSignature);
BCatalog cat;
be_locale->GetAppCatalog(&cat);
PreferencesWindow<freq_preferences> *window; PreferencesWindow<freq_preferences> *window;
window = new PreferencesWindow<freq_preferences>( window = new PreferencesWindow<freq_preferences>(
B_TRANSLATE("CPU Frequency"), B_TRANSLATE("CPU Frequency"),
-3
View File
@@ -77,8 +77,6 @@ class FileTypes : public BApplication {
BWindow *fApplicationTypesWindow; BWindow *fApplicationTypesWindow;
uint32 fWindowCount; uint32 fWindowCount;
uint32 fTypeWindowCount; uint32 fTypeWindowCount;
BCatalog fCatalog;
}; };
@@ -172,7 +170,6 @@ FileTypes::FileTypes()
fWindowCount(0), fWindowCount(0),
fTypeWindowCount(0) fTypeWindowCount(0)
{ {
be_locale->GetAppCatalog(&fCatalog);
fFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, fFilePanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL,
B_FILE_NODE | B_DIRECTORY_NODE, false); B_FILE_NODE | B_DIRECTORY_NODE, false);
} }
+1 -1
View File
@@ -25,7 +25,7 @@ Preference FileTypes :
PreferredAppMenu.cpp PreferredAppMenu.cpp
StringView.cpp StringView.cpp
: be tracker $(TARGET_LIBSUPC++) liblocale.so : be tracker $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: FileTypes.rdef FileTypes.icons.rdef : FileTypes.rdef FileTypes.icons.rdef
; ;
+1 -1
View File
@@ -6,7 +6,7 @@ Preference Fonts :
FontView.cpp FontView.cpp
main.cpp main.cpp
MainWindow.cpp MainWindow.cpp
: be $(TARGET_LIBSUPC++) liblocale.so : be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: Fonts.rdef : Fonts.rdef
; ;
-4
View File
@@ -25,16 +25,12 @@ class FontsApp : public BApplication {
FontsApp(); FontsApp();
virtual void AboutRequested(); virtual void AboutRequested();
private:
BCatalog fCatalog;
}; };
FontsApp::FontsApp() FontsApp::FontsApp()
: BApplication("application/x-vnd.Haiku-Fonts") : BApplication("application/x-vnd.Haiku-Fonts")
{ {
be_locale->GetAppCatalog(&fCatalog);
MainWindow *window = new MainWindow(); MainWindow *window = new MainWindow();
window->Show(); window->Show();
} }
+1 -1
View File
@@ -14,7 +14,7 @@ Preference Keyboard :
KeyboardSettings.cpp KeyboardSettings.cpp
KeyboardView.cpp KeyboardView.cpp
KeyboardWindow.cpp KeyboardWindow.cpp
: translation be $(TARGET_LIBSUPC++) liblocale.so : translation be $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: Keyboard.rdef : Keyboard.rdef
; ;
-1
View File
@@ -21,7 +21,6 @@
KeyboardApplication::KeyboardApplication() KeyboardApplication::KeyboardApplication()
: BApplication("application/x-vnd.Haiku-Keyboard") : BApplication("application/x-vnd.Haiku-Keyboard")
{ {
be_locale->GetAppCatalog(&fCatalog);
new KeyboardWindow(); new KeyboardWindow();
} }
-3
View File
@@ -21,9 +21,6 @@ public:
void MessageReceived(BMessage* message); void MessageReceived(BMessage* message);
void AboutRequested(void); void AboutRequested(void);
private:
BCatalog fCatalog;
}; };
#endif #endif
+1 -1
View File
@@ -12,7 +12,7 @@ Preference Keymap :
KeymapListItem.cpp KeymapListItem.cpp
KeymapWindow.cpp KeymapWindow.cpp
: be tracker liblocale.so libshared.a $(TARGET_LIBSTDC++) : be tracker $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSTDC++)
: Keymap.rdef : Keymap.rdef
; ;
@@ -13,7 +13,6 @@
KeymapApplication::KeymapApplication() KeymapApplication::KeymapApplication()
: BApplication("application/x-vnd.Haiku-Keymap") : BApplication("application/x-vnd.Haiku-Keymap")
{ {
be_locale->GetAppCatalog(&fCatalog);
// create the window // create the window
fWindow = new KeymapWindow(); fWindow = new KeymapWindow();
fWindow->Show(); fWindow->Show();
@@ -28,7 +28,6 @@ class KeymapApplication : public BApplication {
private: private:
KeymapWindow* fWindow; KeymapWindow* fWindow;
BCatalog fCatalog;
}; };
#endif // KEYMAP_APPLICATION_H #endif // KEYMAP_APPLICATION_H
@@ -16,7 +16,6 @@
#include <new> #include <new>
#define B_TRANSLATE_USE_NEW_MACROS
#include <Bitmap.h> #include <Bitmap.h>
#include <Country.h> #include <Country.h>
#include <Catalog.h> #include <Catalog.h>
-3
View File
@@ -4,9 +4,6 @@
*/ */
#define B_TRANSLATE_USE_NEW_MACROS
#include "Locale.h" #include "Locale.h"
#include "LocaleWindow.h" #include "LocaleWindow.h"
-3
View File
@@ -5,9 +5,6 @@
*/ */
#define B_TRANSLATE_USE_NEW_MACROS
#include "Locale.h" #include "Locale.h"
#include "LocaleWindow.h" #include "LocaleWindow.h"
#include "LanguageListView.h" #include "LanguageListView.h"
@@ -4,9 +4,6 @@
*/ */
#define B_TRANSLATE_USE_NEW_MACROS
#include "TimeFormatSettingsView.h" #include "TimeFormatSettingsView.h"
#include <Alert.h> #include <Alert.h>
+1 -1
View File
@@ -46,7 +46,7 @@ if $(HAIKU_OPENSSL_ENABLED) {
Preference E-mail Preference E-mail
: $(sources) : $(sources)
: be libmail.so $(HAIKU_NETWORK_LIBS) $(TARGET_NETAPI_LIB) : 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 : e-mail.rdef
; ;
-3
View File
@@ -17,15 +17,12 @@ class MailConfigApp : public BApplication {
public: public:
MailConfigApp(); MailConfigApp();
~MailConfigApp(); ~MailConfigApp();
private:
BCatalog fCatalog;
}; };
MailConfigApp::MailConfigApp() MailConfigApp::MailConfigApp()
: BApplication("application/x-vnd.Haiku-Mail") : BApplication("application/x-vnd.Haiku-Mail")
{ {
be_locale->GetAppCatalog(&fCatalog);
(new ConfigWindow())->Show(); (new ConfigWindow())->Show();
} }
+1 -1
View File
@@ -15,7 +15,7 @@ Preference Media :
MediaViews.cpp MediaViews.cpp
MediaListItem.cpp MediaListItem.cpp
MediaAlert.cpp MediaAlert.cpp
: media be liblocale.so $(TARGET_LIBSUPC++) : media be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: media.rdef : media.rdef
; ;

Some files were not shown because too many files have changed in this diff Show More