diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 10:25:47 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-05-23 10:25:47 (GMT) |
commit | fbcdd34b223174a28ff712b7d03e56339fa2fe07 (patch) | |
tree | da036effaeeb5ba7788f4b0403151aa864e9d16d /src/Toolbar.cc | |
parent | ff9c68e247704bd1522ea7a2055b7fa4b2b0c568 (diff) | |
download | fluxbox-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.cc | 63 |
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; | |||
80 | namespace FbTk { | 80 | namespace FbTk { |
81 | 81 | ||
82 | template<> | 82 | template<> |
83 | void FbTk::Resource<Toolbar::Placement>:: | ||
84 | setFromString(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 | |||
113 | template<> | ||
114 | string FbTk::Resource<Toolbar::Placement>:: | 83 | string FbTk::Resource<Toolbar::Placement>:: |
115 | getString() const { | 84 | getString() 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 | |||
127 | template<> | ||
128 | void FbTk::Resource<Toolbar::Placement>:: | ||
129 | setFromString(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 | ||
159 | namespace { | 160 | namespace { |