aboutsummaryrefslogtreecommitdiff
path: root/src/Resources.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-09-30 19:03:59 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-09-30 19:03:59 (GMT)
commite8c2690bfc92274b96d1620829977bf4c1db908b (patch)
treee22b216642d6743730f24053d217560df28c0356 /src/Resources.cc
parent12fe9ca7a8b7962831319845bf9a7b44db368b57 (diff)
downloadfluxbox_pavel-e8c2690bfc92274b96d1620829977bf4c1db908b.zip
fluxbox_pavel-e8c2690bfc92274b96d1620829977bf4c1db908b.tar.bz2
cosmetic: slightly less code to do the same
Diffstat (limited to 'src/Resources.cc')
-rw-r--r--src/Resources.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Resources.cc b/src/Resources.cc
index df0f926..20786d8 100644
--- a/src/Resources.cc
+++ b/src/Resources.cc
@@ -76,18 +76,20 @@ setFromString(char const *strval) {
76 //clear old values 76 //clear old values
77 m_value.clear(); 77 m_value.clear();
78 78
79 std::string v;
79 for (size_t i = 0; i < val.size(); i++) { 80 for (size_t i = 0; i < val.size(); i++) {
80 if (strcasecmp(val[i].c_str(), "Maximize")==0) 81 v = FbTk::StringUtil::toLower(val[i]);
82 if (v == "maximize")
81 m_value.push_back(WinButton::MAXIMIZE); 83 m_value.push_back(WinButton::MAXIMIZE);
82 else if (strcasecmp(val[i].c_str(), "Minimize")==0) 84 else if (v == "minimize")
83 m_value.push_back(WinButton::MINIMIZE); 85 m_value.push_back(WinButton::MINIMIZE);
84 else if (strcasecmp(val[i].c_str(), "Shade")==0) 86 else if (v == "shade")
85 m_value.push_back(WinButton::SHADE); 87 m_value.push_back(WinButton::SHADE);
86 else if (strcasecmp(val[i].c_str(), "Stick")==0) 88 else if (v == "stick")
87 m_value.push_back(WinButton::STICK); 89 m_value.push_back(WinButton::STICK);
88 else if (strcasecmp(val[i].c_str(), "MenuIcon")==0) 90 else if (v == "menuIcon")
89 m_value.push_back(WinButton::MENUICON); 91 m_value.push_back(WinButton::MENUICON);
90 else if (strcasecmp(val[i].c_str(), "Close")==0) 92 else if (v == "close")
91 m_value.push_back(WinButton::CLOSE); 93 m_value.push_back(WinButton::CLOSE);
92 } 94 }
93} 95}