Add a call in BCountry to get an icon for that country.
Untested and not working yet since we don't provide any icon. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36303 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include <LocaleStrings.h>
|
||||
#include <String.h>
|
||||
|
||||
|
||||
class BBitmap;
|
||||
|
||||
namespace icu_4_2 {
|
||||
class DateFormat;
|
||||
class Locale;
|
||||
@@ -21,13 +24,13 @@ class BCountry {
|
||||
public:
|
||||
BCountry(const char* languageCode, const char* countryCode);
|
||||
BCountry(const char* languageAndCountryCode = "en_US");
|
||||
virtual ~BCountry();
|
||||
virtual ~BCountry();
|
||||
|
||||
virtual bool Name(BString&) const;
|
||||
const char* Code() const;
|
||||
virtual bool Name(BString&) const;
|
||||
const char* Code() const;
|
||||
status_t GetIcon(BBitmap* result);
|
||||
|
||||
// see definitions below
|
||||
const char *GetString(uint32 id) const;
|
||||
const char* GetString(uint32 id) const;
|
||||
|
||||
// date & time
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <IconUtils.h>
|
||||
#include <String.h>
|
||||
|
||||
#include <unicode/datefmt.h>
|
||||
@@ -86,6 +87,17 @@ BCountry::Code() const
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BCountry::GetIcon(BBitmap* result)
|
||||
{
|
||||
// TODO: a proper way to locate the library being used ?
|
||||
BNode storage("/boot/system/lib/liblocale.so");
|
||||
if (storage.InitCheck() != B_OK)
|
||||
return B_ERROR;
|
||||
return BIconUtils::GetVectorIcon(&storage, Code(), result);
|
||||
}
|
||||
|
||||
|
||||
// TODO use ICU backend keywords instead
|
||||
const char*
|
||||
BCountry::GetString(uint32 id) const
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
SubDir HAIKU_TOP src kits locale ;
|
||||
|
||||
UsePrivateHeaders libbe locale shared ;
|
||||
UsePublicHeaders locale storage ;
|
||||
UseLibraryHeaders icu ;
|
||||
UsePublicHeaders locale storage icon ;
|
||||
UseLibraryHeaders icu icon ;
|
||||
|
||||
SharedLibrary liblocale.so
|
||||
: cat.cpp
|
||||
|
||||
Reference in New Issue
Block a user