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:
Oliver Tappe
2012-04-14 17:58:58 +02:00
parent cc52f0df3a
commit eaa5e0936d
13 changed files with 32 additions and 31 deletions
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -10,7 +10,7 @@
namespace BPrivate {
extern BCatalogAddOn* gSystemCatalog;
extern BCatalog gSystemCatalog;
} // namespace BPrivate