aboutsummaryrefslogtreecommitdiff
path: root/src/Resources.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-11-22 21:09:14 (GMT)
committerfluxgen <fluxgen>2005-11-22 21:09:14 (GMT)
commitf7cfa81bbb1f488899905731f9b72a9cce7d8c83 (patch)
treec56d23e938814dcdf917197f09bd22e5cf4094e3 /src/Resources.cc
parentbe1cbd46909e678bbd71f3a590e36c3077cb2960 (diff)
downloadfluxbox_pavel-f7cfa81bbb1f488899905731f9b72a9cce7d8c83.zip
fluxbox_pavel-f7cfa81bbb1f488899905731f9b72a9cce7d8c83.tar.bz2
const function Resource getString
Diffstat (limited to 'src/Resources.cc')
-rw-r--r--src/Resources.cc18
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//-----------------------------------------------------------------
112template<> 112template<>
113std::string FbTk::Resource<bool>:: 113std::string FbTk::Resource<bool>::
114getString() { 114getString() const {
115 return std::string(**this == true ? "true" : "false"); 115 return std::string(**this == true ? "true" : "false");
116} 116}
117 117
118template<> 118template<>
119std::string FbTk::Resource<int>:: 119std::string FbTk::Resource<int>::
120getString() { 120getString() 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
126template<> 126template<>
127std::string FbTk::Resource<std::string>:: 127std::string FbTk::Resource<std::string>::
128getString() { return **this; } 128getString() const { return **this; }
129 129
130 130
131template<> 131template<>
132std::string FbTk::Resource<Fluxbox::TitlebarList>:: 132std::string FbTk::Resource<Fluxbox::TitlebarList>::
133getString() { 133getString() 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
165template<> 165template<>
166std::string FbTk::Resource<Fluxbox::TabsAttachArea>:: 166std::string FbTk::Resource<Fluxbox::TabsAttachArea>::
167getString() { 167getString() 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
174template<> 174template<>
175string FbTk::Resource<unsigned int>:: 175string FbTk::Resource<unsigned int>::
176getString() { 176getString() 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
182template<> 182template<>
183string FbTk::Resource<long long>:: 183string FbTk::Resource<long long>::
184getString() { 184getString() 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
215template<> 215template<>
216string FbTk::Resource<Fluxbox::Layer>:: 216string FbTk::Resource<Fluxbox::Layer>::
217getString() { 217getString() 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
246template<> 246template<>
247string FbTk::Resource<long>:: 247string FbTk::Resource<long>::
248getString() { 248getString() 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);