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 <LocaleStrings.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
|
|
||||||
|
class BBitmap;
|
||||||
|
|
||||||
namespace icu_4_2 {
|
namespace icu_4_2 {
|
||||||
class DateFormat;
|
class DateFormat;
|
||||||
class Locale;
|
class Locale;
|
||||||
@@ -25,9 +28,9 @@ class BCountry {
|
|||||||
|
|
||||||
virtual bool Name(BString&) const;
|
virtual bool Name(BString&) const;
|
||||||
const char* Code() 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
|
// date & time
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <IconUtils.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
#include <unicode/datefmt.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
|
// TODO use ICU backend keywords instead
|
||||||
const char*
|
const char*
|
||||||
BCountry::GetString(uint32 id) const
|
BCountry::GetString(uint32 id) const
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src kits locale ;
|
SubDir HAIKU_TOP src kits locale ;
|
||||||
|
|
||||||
UsePrivateHeaders libbe locale shared ;
|
UsePrivateHeaders libbe locale shared ;
|
||||||
UsePublicHeaders locale storage ;
|
UsePublicHeaders locale storage icon ;
|
||||||
UseLibraryHeaders icu ;
|
UseLibraryHeaders icu icon ;
|
||||||
|
|
||||||
SharedLibrary liblocale.so
|
SharedLibrary liblocale.so
|
||||||
: cat.cpp
|
: cat.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user