aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-08-21 18:59:03 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-08-21 18:59:03 (GMT)
commit00cc28d936d66101d78289f66c04373854fb7a3f (patch)
tree2767c6d30da8602edb1b76d8ab2b4d0df56d72ef /src/FbTk
parent675bbfd80b185f0c7c186b8338f7245bd2c1bb93 (diff)
downloadfluxbox_pavel-00cc28d936d66101d78289f66c04373854fb7a3f.zip
fluxbox_pavel-00cc28d936d66101d78289f66c04373854fb7a3f.tar.bz2
Don't spam with the "Unable to convert ... from nil" messages
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Resource.hh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh
index b729ad4..e3e8cc1 100644
--- a/src/FbTk/Resource.hh
+++ b/src/FbTk/Resource.hh
@@ -257,9 +257,13 @@ public:
257 257
258 virtual void setFromLua(lua::state &l) { 258 virtual void setFromLua(lua::state &l) {
259 try { 259 try {
260 m_value = Traits::fromLua(l); 260 if(l.isnil(-1))
261 m_rm->resourceChanged(*this); 261 setDefaultValue();
262 m_modified_sig.emit(m_value); 262 else {
263 m_value = Traits::fromLua(l);
264 m_rm->resourceChanged(*this);
265 m_modified_sig.emit(m_value);
266 }
263 } 267 }
264 catch(ConversionError &e) { 268 catch(ConversionError &e) {
265 std::cerr << name() << ": " << e.what() << std::endl; 269 std::cerr << name() << ": " << e.what() << std::endl;