aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-13 08:33:14 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2012-04-07 02:11:31 (GMT)
commit57a320ec85e39885707a6cabe2ab36f69e948ea9 (patch)
tree054ee4b56e2431ca36673c25b644a8cb49678b4a /src/FbTk
parentd232e10f8fadfbaae834c0ba124cef16cd0bc356 (diff)
downloadfluxbox_paul-57a320ec85e39885707a6cabe2ab36f69e948ea9.zip
fluxbox_paul-57a320ec85e39885707a6cabe2ab36f69e948ea9.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; }