Index: ps/trunk/source/gui/CChart.cpp =================================================================== --- ps/trunk/source/gui/CChart.cpp +++ ps/trunk/source/gui/CChart.cpp @@ -209,9 +209,7 @@ if (m_Series.empty()) return; - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - font = L"default"; + const CStrW& font = GUI::GetSetting(this, "font"); float buffer_zone = 0.f; GUI::GetSetting(this, "buffer_zone", buffer_zone); Index: ps/trunk/source/gui/CCheckBox.cpp =================================================================== --- ps/trunk/source/gui/CCheckBox.cpp +++ ps/trunk/source/gui/CCheckBox.cpp @@ -68,16 +68,11 @@ { ENSURE(m_GeneratedTexts.size() == 1); - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - // Use the default if none is specified - // TODO Gee: (2004-08-14) Default should not be hard-coded, but be in styles! - font = L"default"; - float square_side; GUI::GetSetting(this, "square_side", square_side); const CGUIString& caption = GUI::GetSetting(this, "caption"); + const CStrW& font = GUI::GetSetting(this, "font"); float buffer_zone = 0.f; GUI::GetSetting(this, "buffer_zone", buffer_zone); Index: ps/trunk/source/gui/CList.cpp =================================================================== --- ps/trunk/source/gui/CList.cpp +++ ps/trunk/source/gui/CList.cpp @@ -81,11 +81,7 @@ // continuously, or even often, so it'll probably be okay. m_GeneratedTexts.clear(); - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - // Use the default if none is specified - // TODO Gee: (2004-08-14) Don't define standard like this. Do it with the default style. - font = L"default"; + const CStrW& font = GUI::GetSetting(this, "font"); bool scrollbar; GUI::GetSetting(this, "scrollbar", scrollbar); Index: ps/trunk/source/gui/COList.cpp =================================================================== --- ps/trunk/source/gui/COList.cpp +++ ps/trunk/source/gui/COList.cpp @@ -48,11 +48,7 @@ // continuously, or even often, so it'll probably be okay. m_GeneratedTexts.clear(); - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - // Use the default if none is specified - // TODO Gee: (2004-08-14) Don't define standard like this. Do it with the default style. - font = L"default"; + const CStrW& font = GUI::GetSetting(this, "font"); bool scrollbar; GUI::GetSetting(this, "scrollbar", scrollbar); Index: ps/trunk/source/gui/CText.cpp =================================================================== --- ps/trunk/source/gui/CText.cpp +++ ps/trunk/source/gui/CText.cpp @@ -69,12 +69,6 @@ if (m_GeneratedTexts.empty()) return; - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - // Use the default if none is specified - // TODO Gee: (2004-08-14) Don't define standard like this. Do it with the default style. - font = L"default"; - bool scrollbar; GUI::GetSetting(this, "scrollbar", scrollbar); @@ -84,6 +78,7 @@ width -= GetScrollBar(0).GetStyle()->m_Width; const CGUIString& caption = GUI::GetSetting(this, "caption"); + const CStrW& font = GUI::GetSetting(this, "font"); const float buffer_zone = GUI::GetSetting(this, "buffer_zone"); m_GeneratedTexts[0] = CGUIText(m_pGUI, caption, font, width, buffer_zone, this); Index: ps/trunk/source/gui/CTooltip.cpp =================================================================== --- ps/trunk/source/gui/CTooltip.cpp +++ ps/trunk/source/gui/CTooltip.cpp @@ -65,14 +65,11 @@ { ENSURE(m_GeneratedTexts.size() == 1); - CStrW font; - if (GUI::GetSetting(this, "font", font) != PSRETURN_OK || font.empty()) - font = L"default"; - float buffer_zone = 0.f; GUI::GetSetting(this, "buffer_zone", buffer_zone); const CGUIString& caption = GUI::GetSetting(this, "caption"); + const CStrW& font = GUI::GetSetting(this, "font"); float max_width = 0.f; GUI::GetSetting(this, "maxwidth", max_width);