aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/ThemeItems.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-04-26 15:04:37 (GMT)
committerrathnor <rathnor>2004-04-26 15:04:37 (GMT)
commitd4a871785130ab0d6533bef4f1ec55c4cfd3b8df (patch)
treef07025c5527733c88043ca61316c0af62daf598d /src/FbTk/ThemeItems.hh
parentef6bf03ca19c0c96943894f9d0f0db9bc0bd58fc (diff)
downloadfluxbox_pavel-d4a871785130ab0d6533bef4f1ec55c4cfd3b8df.zip
fluxbox_pavel-d4a871785130ab0d6533bef4f1ec55c4cfd3b8df.tar.bz2
toolbar themeing fixes
Diffstat (limited to 'src/FbTk/ThemeItems.hh')
-rw-r--r--src/FbTk/ThemeItems.hh26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/FbTk/ThemeItems.hh b/src/FbTk/ThemeItems.hh
index 63c17df..57a5f11 100644
--- a/src/FbTk/ThemeItems.hh
+++ b/src/FbTk/ThemeItems.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: ThemeItems.hh,v 1.5 2004/02/10 19:03:04 fluxgen Exp $ 22// $Id: ThemeItems.hh,v 1.6 2004/04/26 15:04:37 rathnor Exp $
23 23
24/// @file implements common theme items 24/// @file implements common theme items
25 25
@@ -42,7 +42,7 @@ using namespace std;
42 42
43// create default handlers for Color, Font, Texture, int and string 43// create default handlers for Color, Font, Texture, int and string
44template <> 44template <>
45void FbTk::ThemeItem<std::string>::load() { } 45void FbTk::ThemeItem<std::string>::load(const std::string *name, const std::string *altname) { }
46 46
47template <> 47template <>
48void FbTk::ThemeItem<std::string>::setDefaultValue() { 48void FbTk::ThemeItem<std::string>::setDefaultValue() {
@@ -55,7 +55,7 @@ void FbTk::ThemeItem<std::string>::setFromString(const char *str) {
55} 55}
56 56
57template <> 57template <>
58void FbTk::ThemeItem<int>::load() { } 58void FbTk::ThemeItem<int>::load(const std::string *name, const std::string *altname) { }
59 59
60template <> 60template <>
61void FbTk::ThemeItem<int>::setDefaultValue() { 61void FbTk::ThemeItem<int>::setDefaultValue() {
@@ -103,18 +103,21 @@ void ThemeItem<FbTk::Font>::setFromString(const char *str) {
103 103
104// do nothing 104// do nothing
105template <> 105template <>
106void ThemeItem<FbTk::Font>::load() { 106void ThemeItem<FbTk::Font>::load(const std::string *name, const std::string *altname) {
107} 107}
108 108
109 109
110template <> 110template <>
111void ThemeItem<FbTk::Texture>::load() { 111void ThemeItem<FbTk::Texture>::load(const std::string *o_name, const std::string *o_altname) {
112 const std::string &m_name = (o_name==0)?name():*o_name;
113 const std::string &m_altname = (o_altname==0)?altName():*o_altname;
114
112 string color_name(ThemeManager::instance(). 115 string color_name(ThemeManager::instance().
113 resourceValue(name()+".color", altName()+".Color")); 116 resourceValue(m_name+".color", m_altname+".Color"));
114 string colorto_name(ThemeManager::instance(). 117 string colorto_name(ThemeManager::instance().
115 resourceValue(name()+".colorTo", altName()+".ColorTo")); 118 resourceValue(m_name+".colorTo", m_altname+".ColorTo"));
116 string pixmap_name(ThemeManager::instance(). 119 string pixmap_name(ThemeManager::instance().
117 resourceValue(name()+".pixmap", altName()+".Pixmap")); 120 resourceValue(m_name+".pixmap", m_altname+".Pixmap"));
118 121
119 122
120 // set default value if we failed to load color 123 // set default value if we failed to load color
@@ -137,7 +140,7 @@ void ThemeItem<FbTk::Texture>::load() {
137 m_tm.screenNum())); 140 m_tm.screenNum()));
138 if (pm.get() == 0) { 141 if (pm.get() == 0) {
139 if (FbTk::ThemeManager::instance().verbose()) { 142 if (FbTk::ThemeManager::instance().verbose()) {
140 cerr<<"Resource("<<name()+".pixmap" 143 cerr<<"Resource("<<m_name+".pixmap"
141 <<"): Failed to load image: "<<pixmap_name<<endl; 144 <<"): Failed to load image: "<<pixmap_name<<endl;
142 } 145 }
143 m_value.pixmap() = 0; 146 m_value.pixmap() = 0;
@@ -163,8 +166,7 @@ void ThemeItem<FbTk::Texture>::setFromString(const char *str) {
163 166
164// not used 167// not used
165template <> 168template <>
166void FbTk::ThemeItem<PixmapWithMask>:: 169void FbTk::ThemeItem<PixmapWithMask>::load(const std::string *name, const std::string *altname) { }
167load() { }
168 170
169template <> 171template <>
170void FbTk::ThemeItem<PixmapWithMask>:: 172void FbTk::ThemeItem<PixmapWithMask>::
@@ -211,7 +213,7 @@ void ThemeItem<FbTk::Color>::setFromString(const char *str) {
211 213
212// does nothing 214// does nothing
213template <> 215template <>
214void ThemeItem<FbTk::Color>::load() { } 216void ThemeItem<FbTk::Color>::load(const std::string *name, const std::string *altname) { }
215 217
216} // end namespace FbTk 218} // end namespace FbTk
217 219