History log of /haiku/src/preferences/locale/LanguageListView.cpp
Revision Date Author Comments
# 3a2b6b9d 25-Nov-2013 John Scipione <jscipione@gmail.com>

Locale: Small cleanup of outline list view.

* preserve high and low colors of view between draws
* Use DefaultLabelSpacing() instead of using hard 4 pixel spacing


# 91c78f09 20-Aug-2012 John Scipione <jscipione@gmail.com>

Create and use new list view item colors

* B_LIST_BACKGROUND_COLOR
* B_LIST_SELECTED_BACKGROUND_COLOR
* B_LIST_ITEM_TEXT_COLOR
* B_LIST_SELECTED_ITEM_TEXT_COLOR


# 2c1f6c10 20-Aug-2012 John Scipione <jscipione@gmail.com>

Update ListItem's to use menu item colors.

* Selected bg uses B_MENU_SELECTED_BACKGROUND_COLOR
* Selected text uses B_MENU_SELECTED_ITEM_TEXT_COLOR
* Unselected text uses B_MENU_ITEM_TEXT_COLOR

Update BStringItem, but also the custom Listitem code in the
Appearance and Locale preflets.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# a3ab429e 25-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* improve look of drop target indicator in Locale prefs, as it was too ugly even for
my not so visually inclined taste - we now use a gradient which IMHO gives much
more pleasant results
* add TODO about whether or not code for drawing drop target inidicators should be
added to ControlLook (or some other class with similar purpose)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6102c6f 24-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Improve drag'n'drop in Locale preflet:
* following a hint by Stephan: implement drawing of a drop target indicator,
a global one (bounds) for the available languages and an individual drop target
indicator ("between" the items) for the preferred languages
* fix drag'n'drop within preferred languages listview
* finish support for manipulating multiple items in preferred languages listview


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd1bc982 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Follow hint by Marcus and make colors static *const*.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42672 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed327030 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix drawing artefacts in Locale prefs (and IMHO improve the look):
* separate LanguageListItemWithFlag from LanguageListItem
* draw the flag in front of the text instead of at wherever the right bounds happen to
be, fixing the drawing artefacts when scrolling
* size the flag to match the size of the list item, which looks much better when
using a largish default font
* use StringItem::BaselineOffset() instead of manually computed (and wrong) offset
when drawing the text


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b059ce3 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Drop TODO since the commented code doesn't have any effect and nothing else seems to be
missing either.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42655 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e9bcfa89 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-10211 (uninitialized member in c'tor):
* fDropIndex should be initialized

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39944 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04e916cc 25-Oct-2010 Rene Gollent <anevilyak@gmail.com>

Override Update() so we can return an item width that includes our flag.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6fd2f4a0 23-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

One more monster commit (sorry ...) concerning the Locale Kit:
* extracted new class BFormattingConventions from BCountry, which
manages the formatting conventions from a given locale and
allows to get/set the four different date/time formats supported
by ICU-locales as well as number and monetary formats
* overhauled the Locale preflet:
+ drop editing features for all formats, since I don't think
they do not make much sense to have in a prefs GUI - being
able to select from the existing locales should be good
enough. Please note that you can still change the formats
programmatically in an application.
+ renamed the 'Countries' tab to 'Formatting'
+ the locale formatting conventions list in the 'Formatting'
tab is now hierarchical for easier access (less scrolling)
+ fixed functionality of 'Revert' and 'Defaults' buttons
+ added support for using the month/day-names of your preferred
language during date formatting
* adjusted BLocale to ask BFormattingConventions for the current
formats when formatting dates and times and to offer 4
different format styles (full, long, medium and short).
* adjust all classes formatting dates/times to pick the
appropriate format style
* BLocaleRoster no longer directly archives/unarchives the
individual formatting conventions but delegates that to
BFormattingConventions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d8fda6 19-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

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


# 6bb481c7 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Adjustments to Locale preflet
* renamed Locale.{h,cpp} to LocalePreflet.{h,cpp} as having two headers named
Locale.h confuses jam (as a result, the Locale preflet did not depend on
headers/os/locale/Locale.h)
* style adjustments (mostly order of headers)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5e92b1a 26-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Move the flag to the left of the listviews, like in the time preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37760 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ec16200 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

/Donnees/Dev/Haiku/haiku/src/preferences/locale/LanguageListView.h:0: nondigits in number and not hexadecimal --This line,
and those below, will be ignored--
* Simplify a little the code in the draw method and make the list look prettier (the spacing was weird)
M locale/LanguageListView.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37727 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5421c7d6 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix all localized applications, as an include was missing in some of them
* dstcheck : the generated catalog is now 'dstcheck.catkeys' instead of 'en.catkeys', so that it does not conflict with
other localized apps in the bin/ folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be8fa2fb 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* 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


# 76a4353b 01-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
* Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12039d82 28-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Adding missing #undef B_TRANSLATE_CONTEXT

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb0cbb0 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36733 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96eaa02e 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 533d9a5f 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed a ton of minor coding style violations, no functional change intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 68a1479c 30-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix #5788 by overhauling the Locale preflet a bit:
* InitiateDrag() now makes sure that either a number of top-level items
or a group of subitems sharing the parent is being dragged - anything
else doesn't really make sense and results in mayhem and/or crashes
* LocaleWindow now tries harder to keep the language listview sorted
* when moving around items between the two listviews, they are no longer
copied (and partly leaked), but the same items are now just moved over
* cleanup here and there
This is still somewhat of a mess - I recommend splitting the two listviews at least (as they actually behave differently) - maybe it would be better to pick the available languages from a popup-menu instead of keeping them in a listview?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e590fb24 26-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments
* commented out a useless block of code (and added a respective TODO)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d26f9e1 26-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix #5755: Locale preflet crashing when dragging languages around
* The flag bitmaps being part of list items were not treated properly in
the language item's copy constructor (the bitmap pointer was copied, not
the bitmap object itself). As a result, bitmap objects were freed more than
once.
* some cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0638c3ab 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add some more icons for better testing
* Use the country name instead of the language name to identify each icon
* Cleanup, fixed copyrights, and some more checks to avoid crashing in case of a missing icon


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffbcecd4 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add support for flags in BCountry. The flags are stored as HVIF icon resources in liblocale.so.
Test french flag took from http://www.bastisoft.de/misc/flags/ (licence is very permissive), converted to HVIF with Icon O Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36314 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e7931be 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Separate LanguageListView from LocaleWindow as it was occupying more than half of the file and will grow even more soon.
No functionnal change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a2b6b9d521e3829676c6e8c0c6e56bfc60dbb45 25-Nov-2013 John Scipione <jscipione@gmail.com>

Locale: Small cleanup of outline list view.

* preserve high and low colors of view between draws
* Use DefaultLabelSpacing() instead of using hard 4 pixel spacing


# 91c78f092f17e1cc233f7f85a075f72b72b3f246 20-Aug-2012 John Scipione <jscipione@gmail.com>

Create and use new list view item colors

* B_LIST_BACKGROUND_COLOR
* B_LIST_SELECTED_BACKGROUND_COLOR
* B_LIST_ITEM_TEXT_COLOR
* B_LIST_SELECTED_ITEM_TEXT_COLOR


# 2c1f6c10cea42833d502ed3e97cae02565d9f885 20-Aug-2012 John Scipione <jscipione@gmail.com>

Update ListItem's to use menu item colors.

* Selected bg uses B_MENU_SELECTED_BACKGROUND_COLOR
* Selected text uses B_MENU_SELECTED_ITEM_TEXT_COLOR
* Unselected text uses B_MENU_ITEM_TEXT_COLOR

Update BStringItem, but also the custom Listitem code in the
Appearance and Locale preflets.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# a3ab429e0760a86e91e881e3f88015dbe2d280cd 25-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

* improve look of drop target indicator in Locale prefs, as it was too ugly even for
my not so visually inclined taste - we now use a gradient which IMHO gives much
more pleasant results
* add TODO about whether or not code for drawing drop target inidicators should be
added to ControlLook (or some other class with similar purpose)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6102c6fba34f639d328d3480948f21ec76f80c9 24-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Improve drag'n'drop in Locale preflet:
* following a hint by Stephan: implement drawing of a drop target indicator,
a global one (bounds) for the available languages and an individual drop target
indicator ("between" the items) for the preferred languages
* fix drag'n'drop within preferred languages listview
* finish support for manipulating multiple items in preferred languages listview


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42686 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd1bc982f2abc95c72f1b82f06e4a84d90801404 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Follow hint by Marcus and make colors static *const*.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42672 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed3270303877d293339908b02647b374418d513e 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix drawing artefacts in Locale prefs (and IMHO improve the look):
* separate LanguageListItemWithFlag from LanguageListItem
* draw the flag in front of the text instead of at wherever the right bounds happen to
be, fixing the drawing artefacts when scrolling
* size the flag to match the size of the list item, which looks much better when
using a largish default font
* use StringItem::BaselineOffset() instead of manually computed (and wrong) offset
when drawing the text


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b059ce37838a11fa7786ee276cb6cce169c2098 21-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Drop TODO since the commented code doesn't have any effect and nothing else seems to be
missing either.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42655 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e9bcfa8975f0201daaaf1e7e6d78d6a9fe9cf9b5 26-Dec-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix CID-10211 (uninitialized member in c'tor):
* fDropIndex should be initialized

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39944 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04e916ccb5b36fd2ce229d5f9155cf793943fc32 25-Oct-2010 Rene Gollent <anevilyak@gmail.com>

Override Update() so we can return an item width that includes our flag.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6fd2f4a0d14b45a316defe994e9790de062ff3ff 23-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

One more monster commit (sorry ...) concerning the Locale Kit:
* extracted new class BFormattingConventions from BCountry, which
manages the formatting conventions from a given locale and
allows to get/set the four different date/time formats supported
by ICU-locales as well as number and monetary formats
* overhauled the Locale preflet:
+ drop editing features for all formats, since I don't think
they do not make much sense to have in a prefs GUI - being
able to select from the existing locales should be good
enough. Please note that you can still change the formats
programmatically in an application.
+ renamed the 'Countries' tab to 'Formatting'
+ the locale formatting conventions list in the 'Formatting'
tab is now hierarchical for easier access (less scrolling)
+ fixed functionality of 'Revert' and 'Defaults' buttons
+ added support for using the month/day-names of your preferred
language during date formatting
* adjusted BLocale to ask BFormattingConventions for the current
formats when formatting dates and times and to offer 4
different format styles (full, long, medium and short).
* adjust all classes formatting dates/times to pick the
appropriate format style
* BLocaleRoster no longer directly archives/unarchives the
individual formatting conventions but delegates that to
BFormattingConventions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d8fda63745350804d76b4ed160732086fa9655 19-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

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


# 6bb481c7148451f881d071e0d3ec39255ed7e9b2 30-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Adjustments to Locale preflet
* renamed Locale.{h,cpp} to LocalePreflet.{h,cpp} as having two headers named
Locale.h confuses jam (as a result, the Locale preflet did not depend on
headers/os/locale/Locale.h)
* style adjustments (mostly order of headers)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5e92b1a2c7fc6ef2d0333c0fce6a4ee0ff69088 26-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Move the flag to the left of the listviews, like in the time preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37760 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ec16200dd847de16129c42fdc46bc66e13a199e 23-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

/Donnees/Dev/Haiku/haiku/src/preferences/locale/LanguageListView.h:0: nondigits in number and not hexadecimal --This line,
and those below, will be ignored--
* Simplify a little the code in the draw method and make the list look prettier (the spacing was weird)
M locale/LanguageListView.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37727 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5421c7d682a251f1cbcdfa1bf870ca1170584135 20-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix all localized applications, as an include was missing in some of them
* dstcheck : the generated catalog is now 'dstcheck.catkeys' instead of 'en.catkeys', so that it does not conflict with
other localized apps in the bin/ folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be8fa2fb3088ab1921612b60f352dd9334b40b3d 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* 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


# 76a4353b79418ab1d9050821a5578bef0d40df0c 01-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
* Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12039d82c4d623ec9292898610203c8a10d2456a 28-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Adding missing #undef B_TRANSLATE_CONTEXT

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb0cbb044cf538f18c0d252934a5bcaa33bfd34 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36733 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96eaa02e8f3976114f4db607ea41ebe158916823 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 533d9a5f85f4e917dda6c2e1bbd5b0f85a275dbb 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed a ton of minor coding style violations, no functional change intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 68a1479cc677c39d5bad325baf4429c2e932901e 30-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix #5788 by overhauling the Locale preflet a bit:
* InitiateDrag() now makes sure that either a number of top-level items
or a group of subitems sharing the parent is being dragged - anything
else doesn't really make sense and results in mayhem and/or crashes
* LocaleWindow now tries harder to keep the language listview sorted
* when moving around items between the two listviews, they are no longer
copied (and partly leaked), but the same items are now just moved over
* cleanup here and there
This is still somewhat of a mess - I recommend splitting the two listviews at least (as they actually behave differently) - maybe it would be better to pick the available languages from a popup-menu instead of keeping them in a listview?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e590fb24c657e81bf9388c0303dceaad02c9de51 26-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments
* commented out a useless block of code (and added a respective TODO)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d26f9e11c6afa0d24f8fcc6360f23fcf96da747 26-Apr-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix #5755: Locale preflet crashing when dragging languages around
* The flag bitmaps being part of list items were not treated properly in
the language item's copy constructor (the bitmap pointer was copied, not
the bitmap object itself). As a result, bitmap objects were freed more than
once.
* some cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0638c3ab4cb3b8859c8fd6f0010ecc2ac6f8478f 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add some more icons for better testing
* Use the country name instead of the language name to identify each icon
* Cleanup, fixed copyrights, and some more checks to avoid crashing in case of a missing icon


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffbcecd4894c27f62075a6e70ff3bae0caa51356 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Add support for flags in BCountry. The flags are stored as HVIF icon resources in liblocale.so.
Test french flag took from http://www.bastisoft.de/misc/flags/ (licence is very permissive), converted to HVIF with Icon O Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36314 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e7931beaaec3143a0cb1e7c815fd931c27a8041 15-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Separate LanguageListView from LocaleWindow as it was occupying more than half of the file and will grow even more soon.
No functionnal change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36307 a95241bf-73f2-0310-859d-f6bbb57e9c96