diff options
author | fluxgen <fluxgen> | 2005-11-22 21:09:14 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2005-11-22 21:09:14 (GMT) |
commit | f7cfa81bbb1f488899905731f9b72a9cce7d8c83 (patch) | |
tree | c56d23e938814dcdf917197f09bd22e5cf4094e3 /src/Resources.cc | |
parent | be1cbd46909e678bbd71f3a590e36c3077cb2960 (diff) | |
download | fluxbox-f7cfa81bbb1f488899905731f9b72a9cce7d8c83.zip fluxbox-f7cfa81bbb1f488899905731f9b72a9cce7d8c83.tar.bz2 |
const function Resource getString
Diffstat (limited to 'src/Resources.cc')
-rw-r--r-- | src/Resources.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Resources.cc b/src/Resources.cc index ae0d72a..ff4f3f2 100644 --- a/src/Resources.cc +++ b/src/Resources.cc | |||
@@ -111,13 +111,13 @@ setFromString(const char *strval) { | |||
111 | //----------------------------------------------------------------- | 111 | //----------------------------------------------------------------- |
112 | template<> | 112 | template<> |
113 | std::string FbTk::Resource<bool>:: | 113 | std::string FbTk::Resource<bool>:: |
114 | getString() { | 114 | getString() const { |
115 | return std::string(**this == true ? "true" : "false"); | 115 | return std::string(**this == true ? "true" : "false"); |
116 | } | 116 | } |
117 | 117 | ||
118 | template<> | 118 | template<> |
119 | std::string FbTk::Resource<int>:: | 119 | std::string FbTk::Resource<int>:: |
120 | getString() { | 120 | getString() const { |
121 | char strval[256]; | 121 | char strval[256]; |
122 | sprintf(strval, "%d", **this); | 122 | sprintf(strval, "%d", **this); |
123 | return std::string(strval); | 123 | return std::string(strval); |
@@ -125,12 +125,12 @@ getString() { | |||
125 | 125 | ||
126 | template<> | 126 | template<> |
127 | std::string FbTk::Resource<std::string>:: | 127 | std::string FbTk::Resource<std::string>:: |
128 | getString() { return **this; } | 128 | getString() const { return **this; } |
129 | 129 | ||
130 | 130 | ||
131 | template<> | 131 | template<> |
132 | std::string FbTk::Resource<Fluxbox::TitlebarList>:: | 132 | std::string FbTk::Resource<Fluxbox::TitlebarList>:: |
133 | getString() { | 133 | getString() const { |
134 | string retval; | 134 | string retval; |
135 | int size=m_value.size(); | 135 | int size=m_value.size(); |
136 | for (int i=0; i<size; i++) { | 136 | for (int i=0; i<size; i++) { |
@@ -164,7 +164,7 @@ getString() { | |||
164 | 164 | ||
165 | template<> | 165 | template<> |
166 | std::string FbTk::Resource<Fluxbox::TabsAttachArea>:: | 166 | std::string FbTk::Resource<Fluxbox::TabsAttachArea>:: |
167 | getString() { | 167 | getString() const { |
168 | if (m_value == Fluxbox::ATTACH_AREA_TITLEBAR) | 168 | if (m_value == Fluxbox::ATTACH_AREA_TITLEBAR) |
169 | return "Titlebar"; | 169 | return "Titlebar"; |
170 | else | 170 | else |
@@ -173,7 +173,7 @@ getString() { | |||
173 | 173 | ||
174 | template<> | 174 | template<> |
175 | string FbTk::Resource<unsigned int>:: | 175 | string FbTk::Resource<unsigned int>:: |
176 | getString() { | 176 | getString() const { |
177 | char tmpstr[128]; | 177 | char tmpstr[128]; |
178 | sprintf(tmpstr, "%ul", m_value); | 178 | sprintf(tmpstr, "%ul", m_value); |
179 | return string(tmpstr); | 179 | return string(tmpstr); |
@@ -181,7 +181,7 @@ getString() { | |||
181 | 181 | ||
182 | template<> | 182 | template<> |
183 | string FbTk::Resource<long long>:: | 183 | string FbTk::Resource<long long>:: |
184 | getString() { | 184 | getString() const { |
185 | char tmpstr[128]; | 185 | char tmpstr[128]; |
186 | sprintf(tmpstr, "%llu", (unsigned long long) m_value); | 186 | sprintf(tmpstr, "%llu", (unsigned long long) m_value); |
187 | return string(tmpstr); | 187 | return string(tmpstr); |
@@ -214,7 +214,7 @@ setFromString(const char *strval) { | |||
214 | 214 | ||
215 | template<> | 215 | template<> |
216 | string FbTk::Resource<Fluxbox::Layer>:: | 216 | string FbTk::Resource<Fluxbox::Layer>:: |
217 | getString() { | 217 | getString() const { |
218 | 218 | ||
219 | if (m_value.getNum() == Fluxbox::instance()->getMenuLayer()) | 219 | if (m_value.getNum() == Fluxbox::instance()->getMenuLayer()) |
220 | return string("Menu"); | 220 | return string("Menu"); |
@@ -245,7 +245,7 @@ setFromString(const char *strval) { | |||
245 | 245 | ||
246 | template<> | 246 | template<> |
247 | string FbTk::Resource<long>:: | 247 | string FbTk::Resource<long>:: |
248 | getString() { | 248 | getString() const { |
249 | char tmpstr[128]; | 249 | char tmpstr[128]; |
250 | sprintf(tmpstr, "%ld", m_value); | 250 | sprintf(tmpstr, "%ld", m_value); |
251 | return string(tmpstr); | 251 | return string(tmpstr); |