aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-13 08:33:14 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:57:22 (GMT)
commit5b85f21a7ff560eafb1553b4529d2240000aa8b4 (patch)
treee3d595c3849f26038a7d8e7f588486d05d31e2ff /src/FbTk
parentaec059644893c1314203d501b1d80cfd439f4d2f (diff)
downloadfluxbox_paul-5b85f21a7ff560eafb1553b4529d2240000aa8b4.zip
fluxbox_paul-5b85f21a7ff560eafb1553b4529d2240000aa8b4.tar.bz2
Emit the "modified" signal when a resource value is changed through C++ code
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Resource.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh
index 37a7ed3..7a797a1 100644
--- a/src/FbTk/Resource.hh
+++ b/src/FbTk/Resource.hh
@@ -224,7 +224,11 @@ public:
224 setDefaultValue(); 224 setDefaultValue();
225 } 225 }
226 } 226 }
227 Accessor<T> &operator =(const T& newvalue) { m_value = newvalue; return *this;} 227 Accessor<T> &operator =(const T& newvalue) {
228 m_value = newvalue;
229 m_modified_sig.emit(m_value);
230 return *this;
231 }
228 /// specialized, must be implemented 232 /// specialized, must be implemented
229 /// @return string value of resource 233 /// @return string value of resource
230 std::string getString() const { return Traits::toString(m_value); } 234 std::string getString() const { return Traits::toString(m_value); }
@@ -243,7 +247,7 @@ public:
243 247
244 operator T() const { return m_value; } 248 operator T() const { return m_value; }
245 T& get() { return m_value; } 249 T& get() { return m_value; }
246 T& operator*() { return m_value; } 250 Accessor<T>& operator*() { return *this; }
247 const T& operator*() const { return m_value; } 251 const T& operator*() const { return m_value; }
248 T *operator->() { return &m_value; } 252 T *operator->() { return &m_value; }
249 const T *operator->() const { return &m_value; } 253 const T *operator->() const { return &m_value; }