aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-11-22 21:06:49 (GMT)
committerfluxgen <fluxgen>2005-11-22 21:06:49 (GMT)
commit8434c42aa8048d443306943ef48097dc8b31b79d (patch)
tree698de7fbb14ded5a2a724181df9846072c57af9c /src/FbTk
parent37a435f1d7e694e32c74c65557558190cb2baf33 (diff)
downloadfluxbox_pavel-8434c42aa8048d443306943ef48097dc8b31b79d.zip
fluxbox_pavel-8434c42aa8048d443306943ef48097dc8b31b79d.tar.bz2
const resourceValue function
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Resource.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc
index 5fdc5f4..640bcd6 100644
--- a/src/FbTk/Resource.cc
+++ b/src/FbTk/Resource.cc
@@ -161,8 +161,20 @@ Resource_base *ResourceManager::findResource(const std::string &resname) {
161 return 0; 161 return 0;
162} 162}
163 163
164string ResourceManager::resourceValue(const std::string &resname) { 164const Resource_base *ResourceManager::findResource(const std::string &resname) const {
165 Resource_base *res = findResource(resname); 165 // find resource name
166 ResourceList::const_iterator i = m_resourcelist.begin();
167 ResourceList::const_iterator i_end = m_resourcelist.end();
168 for (; i != i_end; ++i) {
169 if ((*i)->name() == resname ||
170 (*i)->altName() == resname)
171 return *i;
172 }
173 return 0;
174}
175
176string ResourceManager::resourceValue(const std::string &resname) const {
177 const Resource_base *res = findResource(resname);
166 if (res != 0) 178 if (res != 0)
167 return res->getString(); 179 return res->getString();
168 180