diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-12 13:17:47 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-06-15 23:12:52 (GMT) |
commit | fe4b924bcb7d059e5ca059f88ba863a74c0d8760 (patch) | |
tree | 23b2fb89b1301b586a67edb17bac43b8b0df73f7 /src/FbTk/Resource.hh | |
parent | ba6a65c3d020e2a57eb805da6ed30d796b383060 (diff) | |
download | fluxbox_pavel-fe4b924bcb7d059e5ca059f88ba863a74c0d8760.zip fluxbox_pavel-fe4b924bcb7d059e5ca059f88ba863a74c0d8760.tar.bz2 |
Factor out "session." from resource names
this reduces typing and it makes more sense in lua, since there the resources are implemented as
hierarchical tables and the topmost table has to be handled a bit specially.
Diffstat (limited to 'src/FbTk/Resource.hh')
-rw-r--r-- | src/FbTk/Resource.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh index 33a6bb2..744178b 100644 --- a/src/FbTk/Resource.hh +++ b/src/FbTk/Resource.hh | |||
@@ -87,6 +87,8 @@ class ResourceManager_base | |||
87 | public: | 87 | public: |
88 | typedef std::list<Resource_base *> ResourceList; | 88 | typedef std::list<Resource_base *> ResourceList; |
89 | 89 | ||
90 | ResourceManager_base(const std::string &root) : m_root(root) {} | ||
91 | |||
90 | virtual ~ResourceManager_base() {} | 92 | virtual ~ResourceManager_base() {} |
91 | 93 | ||
92 | /// Save all resouces registered to this class | 94 | /// Save all resouces registered to this class |
@@ -123,6 +125,7 @@ public: | |||
123 | 125 | ||
124 | protected: | 126 | protected: |
125 | ResourceList m_resourcelist; | 127 | ResourceList m_resourcelist; |
128 | const std::string m_root; | ||
126 | }; | 129 | }; |
127 | 130 | ||
128 | class ResourceManager: public ResourceManager_base | 131 | class ResourceManager: public ResourceManager_base |
@@ -130,7 +133,8 @@ class ResourceManager: public ResourceManager_base | |||
130 | public: | 133 | public: |
131 | // lock specifies if the database should be opened with one level locked | 134 | // lock specifies if the database should be opened with one level locked |
132 | // (useful for constructing inside initial set of constructors) | 135 | // (useful for constructing inside initial set of constructors) |
133 | ResourceManager(const char *filename, bool lock_db); | 136 | ResourceManager(const std::string &root, const std::string &alt_root, |
137 | const char *filename, bool lock_db); | ||
134 | virtual ~ResourceManager(); | 138 | virtual ~ResourceManager(); |
135 | 139 | ||
136 | /// Load all resources registered to this class | 140 | /// Load all resources registered to this class |
@@ -169,6 +173,7 @@ private: | |||
169 | XrmDatabaseHelper *m_database; | 173 | XrmDatabaseHelper *m_database; |
170 | 174 | ||
171 | std::string m_filename; | 175 | std::string m_filename; |
176 | std::string m_alt_root; | ||
172 | }; | 177 | }; |
173 | 178 | ||
174 | 179 | ||