]> git.lyx.org Git - lyx.git/blobdiff - src/FuncStatus.C
Allows editing when the Prefs dialog is opened; fix bug 3140:
[lyx.git] / src / FuncStatus.C
index 3e0c615096db04054d8f63173b824a315c20c5a5..530b8e893a04c0bd35710b699ca7e88d755890b9 100644 (file)
 
 #include "FuncStatus.h"
 
-FuncStatus::FuncStatus() : v_(OK)
+
+namespace lyx {
+
+FuncStatus::FuncStatus()
+       : v_(OK)
 {
 }
 
@@ -20,12 +24,15 @@ FuncStatus::FuncStatus() : v_(OK)
 void FuncStatus::clear()
 {
        v_ = OK;
+       message_.erase();
 }
 
 
 void FuncStatus::operator|=(FuncStatus const & f)
 {
        v_ |= f.v_;
+       if (!f.message_.empty())
+               message_ = f.message_;
 }
 
 
@@ -73,3 +80,18 @@ bool FuncStatus::onoff(bool b) const
        else
                return (v_ & OFF);
 }
+
+
+void FuncStatus::message(docstring const & m)
+{
+       message_ = m;
+}
+
+
+docstring const & FuncStatus::message() const
+{
+       return message_;
+}
+
+
+} // namespace lyx