diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-11 11:00:45 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-16 23:49:23 (GMT) |
commit | eb0eef14134ee667c60f75f53de4e24950f3c117 (patch) | |
tree | 58b35842e1f84666373478bca3386be037a7a019 /src/AttentionNoticeHandler.cc | |
parent | 3b7c1a3c220b7ccec0dee7804d36dabfe81449c4 (diff) | |
download | fluxbox_pavel-eb0eef14134ee667c60f75f53de4e24950f3c117.zip fluxbox_pavel-eb0eef14134ee667c60f75f53de4e24950f3c117.tar.bz2 |
Simplify FbTk::Resource template class
by outsourcing the conversion from string/lua to the specific type (and back) to a separate
class. This change touches a lot of files because the interface of FbTk::Resource changed
slightly. However, the changes are minor.
Diffstat (limited to 'src/AttentionNoticeHandler.cc')
-rw-r--r-- | src/AttentionNoticeHandler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AttentionNoticeHandler.cc b/src/AttentionNoticeHandler.cc index 1bb28b2..4243377 100644 --- a/src/AttentionNoticeHandler.cc +++ b/src/AttentionNoticeHandler.cc | |||
@@ -67,10 +67,10 @@ void AttentionNoticeHandler::addAttention(Focusable &client) { | |||
67 | ResourceManager &res = client.screen().resourceManager(); | 67 | ResourceManager &res = client.screen().resourceManager(); |
68 | std::string res_name = client.screen().name() + ".demandsAttentionTimeout"; | 68 | std::string res_name = client.screen().name() + ".demandsAttentionTimeout"; |
69 | std::string res_alt_name = client.screen().name() + ".DemandsAttentionTimeout"; | 69 | std::string res_alt_name = client.screen().name() + ".DemandsAttentionTimeout"; |
70 | Resource<int> *timeout_res = dynamic_cast<Resource<int>* >(res.findResource(res_name)); | 70 | IntResource *timeout_res = dynamic_cast<IntResource* >(res.findResource(res_name)); |
71 | if (timeout_res == 0) { | 71 | if (timeout_res == 0) { |
72 | // no resource, create one and add it to managed resources | 72 | // no resource, create one and add it to managed resources |
73 | timeout_res = new FbTk::Resource<int>(res, 500, res_name, res_alt_name); | 73 | timeout_res = new FbTk::IntResource(res, 500, res_name, res_alt_name); |
74 | client.screen().addManagedResource(timeout_res); | 74 | client.screen().addManagedResource(timeout_res); |
75 | } | 75 | } |
76 | // disable if timeout is zero | 76 | // disable if timeout is zero |