[haiku-commits] Re: haiku: hrev45680 - src/kits build/jam src/tools/locale

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 14 May 2013 17:59:11 +0200

> Another, somewhat related issue is that strings for the libshared.a
> sources now end up in the libbe catalog. That doesn't actually work,
> does it? IIRC how finding the respective catalog at runtime works, an
> application using e.g. AboutWindow would have the AboutWindow code
> linked into the executable itself, meaning that the executable's catalog
> would be used. Or do I miss something?

There is a trick for this.
All the strings built in libshared and libbe use "gSystemCatalog.GetString()" 
instead of the usual way catalogs are accessed, which always looks things up 
inside libbe's catalog. This was done because libbe couldn't link with 
liblocale 
when it was a separate shared library. Now that issue is fixed, but the code 
still works that way, and it allows using it from libshared or other static 
libraries as well.

Examples of this includes BColorControl, string_for_size, string_for_speed, and 
some more.

-- 
Adrien.

Other related posts: