]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
convert author names and status messages to docstring
[lyx.git] / src / lyxfunc.C
index 1ece1addda7cd565d9c24aee084a518f9ffe4c68..f8fe702f076bdc9281e0902e06f0808f2ed4c64f 100644 (file)
@@ -293,7 +293,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
                lyxerr << BOOST_CURRENT_FUNCTION
                       << " Key [action="
                       << func.action << "]["
-                      << keyseq->print() << ']'
+                      << to_utf8(keyseq->print()) << ']'
                       << endl;
        }
 
@@ -302,7 +302,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
        // num_bytes == 0? (Lgb)
 
        if (keyseq->length() > 1) {
-               lyx_view_->message(from_utf8(keyseq->print()));
+               lyx_view_->message(keyseq->print());
        }
 
 
@@ -786,7 +786,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_COMMAND_PREFIX:
                        BOOST_ASSERT(lyx_view_);
-                       lyx_view_->message(from_utf8(keyseq->printOptions()));
+                       lyx_view_->message(keyseq->printOptions());
                        break;
 
                case LFUN_COMMAND_EXECUTE:
@@ -807,7 +807,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_META_PREFIX:
                        meta_fake_bit = key_modifier::alt;
-                       setMessage(from_utf8(keyseq->print()));
+                       setMessage(keyseq->print());
                        break;
 
                case LFUN_BUFFER_TOGGLE_READ_ONLY:
@@ -1167,7 +1167,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
 
                case LFUN_SERVER_NOTIFY:
-                       dispatch_buffer = from_utf8(keyseq->print());
+                       dispatch_buffer = keyseq->print();
                        theLyXServer().notifyClient(to_utf8(dispatch_buffer));
                        break;
 
@@ -1246,6 +1246,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                InsetCommandParams p(name);
                                data = InsetCommandMailer::params2string(name, p);
                        } else if (name == "include") {
+                               // data is the include type: one of "include",
+                               // "input", "verbatiminput" or "verbatiminput*"
+                               if (data.empty())
+                                       // default type is requested
+                                       data = "include";
                                InsetCommandParams p(data);
                                data = InsetIncludeMailer::params2string(p);
                        } else if (name == "box") {
@@ -1763,7 +1768,7 @@ void LyXFunc::sendDispatchMessage(docstring const & msg, FuncRequest const & cmd
                }
        }
 
-       string const shortcuts = theTopLevelKeymap().printbindings(cmd);
+       string const shortcuts = to_utf8(theTopLevelKeymap().printbindings(cmd));
 
        if (!shortcuts.empty())
                comname += ": " + shortcuts;
@@ -2024,7 +2029,7 @@ void LyXFunc::setMessage(docstring const & m) const
 }
 
 
-string const LyXFunc::viewStatusMessage()
+docstring const LyXFunc::viewStatusMessage()
 {
        // When meta-fake key is pressed, show the key sequence so far + "M-".
        if (wasMetaKey())
@@ -2036,7 +2041,7 @@ string const LyXFunc::viewStatusMessage()
                return keyseq->printOptions();
 
        if (!view()->buffer())
-               return to_utf8(_("Welcome to LyX!"));
+               return _("Welcome to LyX!");
 
        return view()->cursor().currentState();
 }