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-11-01 09:52:46 (GMT)
commit8c208459910f1dddcfdeb00567b990eebfc218b8 (patch)
tree47c442f906124306a52e13641d28fc6cd1ac513e /src/AttentionNoticeHandler.cc
parent60cd98604ae0ee62d64e3bc852898f69dae221d4 (diff)
downloadfluxbox_pavel-8c208459910f1dddcfdeb00567b990eebfc218b8.zip
fluxbox_pavel-8c208459910f1dddcfdeb00567b990eebfc218b8.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