aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Resource.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-13 08:33:14 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-13 08:33:14 (GMT)
commita13f6ba94c2a52966ea0a37edb5a9fa798568052 (patch)
tree3ac18d91a33966d9207ad66c54685f7b24f27de5 /src/FbTk/Resource.hh
parentc63a2294d884151d5538d6ead319a76dc41abba6 (diff)
downloadfluxbox_pavel-a13f6ba94c2a52966ea0a37edb5a9fa798568052.zip
fluxbox_pavel-a13f6ba94c2a52966ea0a37edb5a9fa798568052.tar.bz2
Emit the "modified" signal when a resource value is changed through C++ code
Diffstat (limited to 'src/FbTk/Resource.hh')
-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; }