Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Tappe d1d8fda637 Next step of Locale Kit refactoring:
* BLocale now keeps language and country completely separate and
  mixes the formatting conventions into the current language's locale
  when formatting dates and times (needs to be done for number- and
  currency-formatting, too, since the digits may not be in the
  preferred language)
* optimized fetching of the flag icons such that they are all loaded
  in one go (by the locale roster) - this alone speeds up the Locale
  preflet considerably
* worked on fixing the language confusion in the Locale preflet
* fixed a couple of bugs in the Locale preflet that would lead to
  illegal characters being displayed in the date-subpart menus


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-19 21:36:44 +00:00
Oliver Tappe 38ac8def5a Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes 
  out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
  but uses copies, instead - this makes locking superfluous, as the clients'
  BCountry objects can no longer be changed by the setting a new default 
  country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
  need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
  (the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time 
  preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-01 20:28:19 +00:00
Adrien Destugues 5098ba1b94 Update ICU to 4.4
* Remove 4.2 sourcecode
 * ICU is now an optional package (mandatory)
 * Adjust the namespaces and libraries names where needed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 19:04:40 +00:00
Axel Dörfler 96eaa02e8f * Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
  be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
  - GetName() now gets a BString reference, also
  - it now returns the name in its own language, ie. for German this would
    always be "deutsch", no matter the current language settings, and finally,
  - it now empties the string it gets before adding the name.
  - added GetTranslatedName() that behaves like the previous version.
  - added const where it made sense (ie. almost everywhere).
  - Code() now returns the code of the language only.
  - ID() now returns the full ID of this language, ie. including country,
    variant, and keywords if any.
  - added Country(), and Variant().
  - renamed IsCountry() to IsCountrySpecific().
  - added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
  only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
  for a language even if only one had been dragged, we now only mark the items
  that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
  like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
  language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
  is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
  looking spaghettie code - still, I think things have slightly improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:38:40 +00:00
Adrien Destugues 859d808fb7 Also forgot this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 21:22:25 +00:00
Adrien Destugues 5570fd11c0 - Locale kit : made the language class live. It now uses ICU as a backend as expected
- Some changes in the locale roster to allow instanciating a language
- Locale preflet : use this new API instead of directly calling ICU
Side effect : all languages in Locale window are now displayed in the current locale. It makes more sense as otherwise the list would be unsortable. However it can get annoying if you mistakenly set a strange language as default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-20 22:44:34 +00:00
Adrien Destugues 93647add85 Public headers should not hold commiter names in the licence header. Removed them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-24 21:03:57 +00:00
Oliver Tappe 75f1522155 * reintegrated gsoc-locale-kit branch into trunk - there's more
work to do, but it's about time to give this code more exposure.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-18 22:23:34 +00:00
Oliver Tappe 723383c0f4 Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
  sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 21:56:16 +00:00
Oliver Tappe c3ac87e8fc * Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 19:23:59 +00:00