mirror of https://github.com/BOINC/boinc.git
- fixes #237 - current BM fails to build with wxWidgets
unicode variant (Applied Frank Thomas's patch) clientgui/ SkinManager.cpp svn path=/trunk/boinc/; revision=12859
This commit is contained in:
parent
910436c1e7
commit
9ad6f6af79
|
@ -5975,3 +5975,10 @@ Charlie 8 June 2007
|
||||||
make_GridRepublic.sh
|
make_GridRepublic.sh
|
||||||
release_GridRepublic.sh
|
release_GridRepublic.sh
|
||||||
|
|
||||||
|
Rom 8 June 2007
|
||||||
|
- fixes #237 - current BM fails to build with wxWidgets
|
||||||
|
unicode variant
|
||||||
|
(Applied Frank Thomas's patch)
|
||||||
|
|
||||||
|
clientgui/
|
||||||
|
SkinManager.cpp
|
||||||
|
|
|
@ -1207,7 +1207,7 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
|
||||||
// First we try the users canonical locale resources.
|
// First we try the users canonical locale resources.
|
||||||
// i.e. en_US
|
// i.e. en_US
|
||||||
retval = ERR_XML_PARSE;
|
retval = ERR_XML_PARSE;
|
||||||
p = fopen(ConstructSkinFileName().c_str(), "r");
|
p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r");
|
||||||
if (p) {
|
if (p) {
|
||||||
mf.init_file(p);
|
mf.init_file(p);
|
||||||
retval = Parse(mf, strDesiredLocale);
|
retval = Parse(mf, strDesiredLocale);
|
||||||
|
@ -1218,7 +1218,7 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
|
||||||
// locale.
|
// locale.
|
||||||
// i.e. en
|
// i.e. en
|
||||||
if (ERR_XML_PARSE == retval) {
|
if (ERR_XML_PARSE == retval) {
|
||||||
p = fopen(ConstructSkinFileName().c_str(), "r");
|
p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r");
|
||||||
if (p) {
|
if (p) {
|
||||||
mf.init_file(p);
|
mf.init_file(p);
|
||||||
retval = Parse(mf, strDesiredLocale.Left(2));
|
retval = Parse(mf, strDesiredLocale.Left(2));
|
||||||
|
@ -1229,7 +1229,7 @@ bool CSkinManager::ReloadSkin(wxLocale* pLocale, wxString strSkin) {
|
||||||
// If we failed the second lookup try english
|
// If we failed the second lookup try english
|
||||||
// i.e. en
|
// i.e. en
|
||||||
if (ERR_XML_PARSE == retval) {
|
if (ERR_XML_PARSE == retval) {
|
||||||
p = fopen(ConstructSkinFileName().c_str(), "r");
|
p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r");
|
||||||
if (p) {
|
if (p) {
|
||||||
mf.init_file(p);
|
mf.init_file(p);
|
||||||
retval = Parse(mf, wxT("en"));
|
retval = Parse(mf, wxT("en"));
|
||||||
|
@ -1343,7 +1343,7 @@ int CSkinManager::Parse(MIOFILE& in, wxString strDesiredLocale) {
|
||||||
|
|
||||||
// Look for the begining of the desired locale.
|
// Look for the begining of the desired locale.
|
||||||
while (in.fgets(buf, 256)) {
|
while (in.fgets(buf, 256)) {
|
||||||
if (match_tag(buf, strLocaleStartTag.c_str())) {
|
if (match_tag(buf, (const char*)strLocaleStartTag.mb_str(wxConvUTF8))) {
|
||||||
bLocaleFound = true;
|
bLocaleFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1352,7 +1352,7 @@ int CSkinManager::Parse(MIOFILE& in, wxString strDesiredLocale) {
|
||||||
if (!bLocaleFound) return ERR_XML_PARSE;
|
if (!bLocaleFound) return ERR_XML_PARSE;
|
||||||
|
|
||||||
while (in.fgets(buf, 256)) {
|
while (in.fgets(buf, 256)) {
|
||||||
if (match_tag(buf, strLocaleEndTag.c_str())) break;
|
if (match_tag(buf, (const char*)strLocaleStartTag.mb_str(wxConvUTF8))) break;
|
||||||
else if (match_tag(buf, "<simple>")) {
|
else if (match_tag(buf, "<simple>")) {
|
||||||
m_SimpleSkin.Parse(in);
|
m_SimpleSkin.Parse(in);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue