]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlCommand.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlCommand.C
index 5c632825c230719b6ed5281a0cd807133ef99943..7fbdf294be04dacd74532a5333fb2eb09d875b12 100644 (file)
 #include "insets/insetcommand.h"
 
 
-ControlCommand::ControlCommand(Dialog & dialog, kb_action ac)
+ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
        : Dialog::Controller(dialog),
-         action_(ac)
+         lfun_name_(lfun_name)
 {}
 
 
-void ControlCommand::initialiseParams(string const & data)
+bool ControlCommand::initialiseParams(string const & data)
 {
        InsetCommandMailer::string2params(data, params_);
+       return true;
 }
 
 
@@ -39,9 +40,10 @@ void ControlCommand::clearParams()
 
 void ControlCommand::dispatchParams()
 {
-       if (action_ == LFUN_NOACTION)
+       if (lfun_name_.empty())
                return;
 
-       FuncRequest fr(action_, InsetCommandMailer::params2string(params_));
-       kernel().dispatch(fr);
+       string const lfun = InsetCommandMailer::params2string(lfun_name_,
+                                                             params_);
+       kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }