diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-06-11 11:00:45 (GMT) |
---|---|---|
committer | Paul Tagliamonte <paultag@fluxbox.org> | 2012-04-07 02:10:40 (GMT) |
commit | cc0f1196a5632cd7de035e51d4f5204591f1359d (patch) | |
tree | edaf534c913f1427f59e6a09ceb5387e30bbba16 /src/AttentionNoticeHandler.cc | |
parent | 5f91d3183a1407222bb6929de0eb2bdc314a0bad (diff) | |
download | fluxbox_paul-cc0f1196a5632cd7de035e51d4f5204591f1359d.zip fluxbox_paul-cc0f1196a5632cd7de035e51d4f5204591f1359d.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 0aaf266..3ed9bf3 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 |