]> git.lyx.org Git - lyx.git/blobdiff - src/funcrequest.C
initialize button_ member to sane state
[lyx.git] / src / funcrequest.C
index 7b486f199ff1cd453e286a629f37b905ba7fd9ca..60ba5b588b3514c45d450fe2baaa923f35a4084f 100644 (file)
 
 using std::vector;
 using std::getline;
+using std::endl;
 
 
 FuncRequest::FuncRequest()
-       : view_(0), action(LFUN_UNKNOWN_ACTION)
+       : view_(0), action(LFUN_UNKNOWN_ACTION), button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(kb_action act)
-       : view_(0), action(act)
+       : view_(0), action(act), button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(kb_action act, string const & arg)
-       : view_(0), action(act), argument(arg)
+       : view_(0), action(act), argument(arg), button_(mouse_button::none)
 {}
 
 
@@ -42,12 +43,12 @@ FuncRequest::FuncRequest
 
 
 FuncRequest::FuncRequest(BufferView * view, kb_action act)
-       : view_(view), action(act)
+       : view_(view), action(act), button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(BufferView * view, kb_action act, string const & arg)
-       : view_(view), action(act), argument(arg)
+       : view_(view), action(act), argument(arg), button_(mouse_button::none)
 {}
 
 
@@ -92,7 +93,7 @@ void FuncRequest::message(string const & msg) const
        if (view_)
                view_->owner()->getLyXFunc().setMessage(msg);
        else
-               lyxerr  << "Dropping message '" << msg << "'\n";
+               lyxerr  << "Dropping message '" << msg << "'" << endl;
 }
 
 
@@ -101,18 +102,18 @@ void FuncRequest::errorMessage(string const & msg) const
        if (view_)
                view_->owner()->getLyXFunc().setErrorMessage(msg);
        else
-               lyxerr  << "Dropping error message '" << msg << "'\n";
+               lyxerr  << "Dropping error message '" << msg << "'" << endl;
 }
 
 
 void split(vector<string> & args, string str)
 {
-       istringstream is(str);
+       istringstream is(STRCONV(str));
        while (is) {
                char c;
                string s;
                is >> c;
-               if (c == '"') 
+               if (c == '"')
                        getline(is, s, '"');
                else {
                        is.putback(c);