aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-05-23 10:25:47 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-05-23 10:25:47 (GMT)
commitfbcdd34b223174a28ff712b7d03e56339fa2fe07 (patch)
treeda036effaeeb5ba7788f4b0403151aa864e9d16d /src/Toolbar.cc
parentff9c68e247704bd1522ea7a2055b7fa4b2b0c568 (diff)
downloadfluxbox-fbcdd34b223174a28ff712b7d03e56339fa2fe07.zip
fluxbox-fbcdd34b223174a28ff712b7d03e56339fa2fe07.tar.bz2
mostly cosmetic fixes, mainly discovered by 'clang --analyze'
reordering of Resource-related stuff was because of "error: explicit specialization of 'getString' after instantiation" complaints.
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc63
1 files changed, 32 insertions, 31 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index e64d74e..4ed765a 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -80,37 +80,6 @@ using std::list;
80namespace FbTk { 80namespace FbTk {
81 81
82template<> 82template<>
83void FbTk::Resource<Toolbar::Placement>::
84setFromString(const char *strval) {
85 if (strcasecmp(strval, "TopLeft")==0)
86 m_value = Toolbar::TOPLEFT;
87 else if (strcasecmp(strval, "BottomLeft")==0)
88 m_value = Toolbar::BOTTOMLEFT;
89 else if (strcasecmp(strval, "TopCenter")==0)
90 m_value = Toolbar::TOPCENTER;
91 else if (strcasecmp(strval, "BottomCenter")==0)
92 m_value = Toolbar::BOTTOMCENTER;
93 else if (strcasecmp(strval, "TopRight")==0)
94 m_value = Toolbar::TOPRIGHT;
95 else if (strcasecmp(strval, "BottomRight")==0)
96 m_value = Toolbar::BOTTOMRIGHT;
97 else if (strcasecmp(strval, "LeftTop") == 0)
98 m_value = Toolbar::LEFTTOP;
99 else if (strcasecmp(strval, "LeftCenter") == 0)
100 m_value = Toolbar::LEFTCENTER;
101 else if (strcasecmp(strval, "LeftBottom") == 0)
102 m_value = Toolbar::LEFTBOTTOM;
103 else if (strcasecmp(strval, "RightTop") == 0)
104 m_value = Toolbar::RIGHTTOP;
105 else if (strcasecmp(strval, "RightCenter") == 0)
106 m_value = Toolbar::RIGHTCENTER;
107 else if (strcasecmp(strval, "RightBottom") == 0)
108 m_value = Toolbar::RIGHTBOTTOM;
109 else
110 setDefaultValue();
111}
112
113template<>
114string FbTk::Resource<Toolbar::Placement>:: 83string FbTk::Resource<Toolbar::Placement>::
115getString() const { 84getString() const {
116 switch (m_value) { 85 switch (m_value) {
@@ -154,6 +123,38 @@ getString() const {
154 //default string 123 //default string
155 return string("BottomCenter"); 124 return string("BottomCenter");
156} 125}
126
127template<>
128void FbTk::Resource<Toolbar::Placement>::
129setFromString(const char *strval) {
130 if (strcasecmp(strval, "TopLeft")==0)
131 m_value = Toolbar::TOPLEFT;
132 else if (strcasecmp(strval, "BottomLeft")==0)
133 m_value = Toolbar::BOTTOMLEFT;
134 else if (strcasecmp(strval, "TopCenter")==0)
135 m_value = Toolbar::TOPCENTER;
136 else if (strcasecmp(strval, "BottomCenter")==0)
137 m_value = Toolbar::BOTTOMCENTER;
138 else if (strcasecmp(strval, "TopRight")==0)
139 m_value = Toolbar::TOPRIGHT;
140 else if (strcasecmp(strval, "BottomRight")==0)
141 m_value = Toolbar::BOTTOMRIGHT;
142 else if (strcasecmp(strval, "LeftTop") == 0)
143 m_value = Toolbar::LEFTTOP;
144 else if (strcasecmp(strval, "LeftCenter") == 0)
145 m_value = Toolbar::LEFTCENTER;
146 else if (strcasecmp(strval, "LeftBottom") == 0)
147 m_value = Toolbar::LEFTBOTTOM;
148 else if (strcasecmp(strval, "RightTop") == 0)
149 m_value = Toolbar::RIGHTTOP;
150 else if (strcasecmp(strval, "RightCenter") == 0)
151 m_value = Toolbar::RIGHTCENTER;
152 else if (strcasecmp(strval, "RightBottom") == 0)
153 m_value = Toolbar::RIGHTBOTTOM;
154 else
155 setDefaultValue();
156}
157
157} // end namespace FbTk 158} // end namespace FbTk
158 159
159namespace { 160namespace {