diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 05:07:07 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-10-01 05:07:07 (GMT) |
commit | 38ef6e515589af7841c577188eb23c5dbe5d11f3 (patch) | |
tree | 43cea3086cddfb59c7bfb8ea1e05e7ec93910280 /src/FbTk/Resource.hh | |
parent | 69de5b5a00abf131452a8d5153afd0df6e86ce6c (diff) | |
download | fluxbox_pavel-38ef6e515589af7841c577188eb23c5dbe5d11f3.zip fluxbox_pavel-38ef6e515589af7841c577188eb23c5dbe5d11f3.tar.bz2 |
made code simpler
Diffstat (limited to 'src/FbTk/Resource.hh')
-rw-r--r-- | src/FbTk/Resource.hh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh index bfdcdca..8c9d645 100644 --- a/src/FbTk/Resource.hh +++ b/src/FbTk/Resource.hh | |||
@@ -139,12 +139,10 @@ public: | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | protected: | 141 | protected: |
142 | static void ensureXrmIsInitialize(); | ||
143 | 142 | ||
144 | int m_db_lock; | 143 | int m_db_lock; |
145 | 144 | ||
146 | private: | 145 | private: |
147 | static bool m_init; | ||
148 | 146 | ||
149 | ResourceList m_resourcelist; | 147 | ResourceList m_resourcelist; |
150 | 148 | ||
@@ -168,11 +166,8 @@ template <typename T> | |||
168 | class Resource:public Resource_base, public Accessor<T> { | 166 | class Resource:public Resource_base, public Accessor<T> { |
169 | public: | 167 | public: |
170 | typedef T Type; | 168 | typedef T Type; |
171 | Resource(ResourceManager &rm, T val, | 169 | Resource(ResourceManager &rm, T val, const std::string &name, const std::string &altname): |
172 | const std::string &name, const std::string &altname): | 170 | Resource_base(name, altname), m_value(val), m_defaultval(val), m_rm(rm) { |
173 | Resource_base(name, altname), | ||
174 | m_value(val), m_defaultval(val), | ||
175 | m_rm(rm) { | ||
176 | m_rm.addResource(*this); // add this to resource handler | 171 | m_rm.addResource(*this); // add this to resource handler |
177 | } | 172 | } |
178 | virtual ~Resource() { | 173 | virtual ~Resource() { |