aboutsummaryrefslogtreecommitdiff
path: root/src/AttentionNoticeHandler.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-11 11:00:45 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-06-15 23:12:25 (GMT)
commitcd9df3b8144c4c41f7b57f0075fbb98ef7561296 (patch)
tree10ffc1692e4afbcb2c74b9db8c8a44b434ef62ca /src/AttentionNoticeHandler.cc
parent787c7a994d4328a9c90a037dd464f8007351b0c0 (diff)
downloadfluxbox_pavel-cd9df3b8144c4c41f7b57f0075fbb98ef7561296.zip
fluxbox_pavel-cd9df3b8144c4c41f7b57f0075fbb98ef7561296.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.cc4
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