Fix #8452 (app's crashing for non-existent system catalog)
* make the system catalog a BCatalog instead of a BCatalogAddOn*, such that using a non-existing system catalog won't crash but simply return the untranslated string instead * rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog() and adjust it to use BCatalog::SetTo() in order to replace the data used by the given catalog * adjust all users of gSystemCatalog accordingly
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
||||
// contain the language-name(s)
|
||||
status_t SetFilesystemTranslationPreferred(bool preferred);
|
||||
|
||||
status_t GetSystemCatalog(BCatalogAddOn** catalog) const;
|
||||
status_t LoadSystemCatalog(BCatalog* catalog) const;
|
||||
|
||||
BCatalogAddOn* LoadCatalog(const entry_ref& catalogOwner,
|
||||
const char* language = NULL,
|
||||
@@ -109,7 +109,7 @@ struct RosterData {
|
||||
|
||||
BLocale fDefaultLocale;
|
||||
BTimeZone fDefaultTimeZone;
|
||||
|
||||
|
||||
bool fIsFilesystemTranslationPreferred;
|
||||
|
||||
bool fAreResourcesLoaded;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
extern BCatalogAddOn* gSystemCatalog;
|
||||
extern BCatalog gSystemCatalog;
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user