]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Michael's latest batch of new gnome files.
[lyx.git] / src / lyxfunc.C
index adfe50ce56f93e9fc323694f72c12155baa3826c..b65a5e647274dfb51da3180cc754e9578de475f1 100644 (file)
@@ -754,18 +754,13 @@ void LyXFunc::miniDispatch(string const & s)
 }
 
 
-void const LyXFunc::verboseDispatch(string const & s, bool show_sc) 
+void LyXFunc::verboseDispatch(string const & s, bool show_sc) 
 {
-       // Split command string into command and argument
-       string cmd;
-       string line = frontStrip(s);
-       string const arg = strip(frontStrip(split(line, cmd, ' ')));
-
-       int action = lyxaction.LookupFunc(cmd);
+       int action = lyxaction.LookupFunc(frontStrip(s));
  
        if (action == LFUN_UNKNOWN_ACTION) {
                string const msg = string(_("Unknown function ("))
-                       + cmd + ")";
+                       + s + ")";
                owner->message(msg);
        } else {
                verboseDispatch(action, show_sc);
@@ -773,7 +768,7 @@ void const LyXFunc::verboseDispatch(string const & s, bool show_sc)
 }
 
 
-void const LyXFunc::verboseDispatch(int ac, bool show_sc) 
+void LyXFunc::verboseDispatch(int ac, bool show_sc) 
 {
        string argument;
        kb_action action;
@@ -786,8 +781,8 @@ void const LyXFunc::verboseDispatch(int ac, bool show_sc)
 
 
 
-void const LyXFunc::verboseDispatch(kb_action action,
-                                   string const & argument, bool show_sc)
+void LyXFunc::verboseDispatch(kb_action action,
+                             string const & argument, bool show_sc)
 {
        string res = dispatch(action, argument);
 
@@ -1513,7 +1508,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
        {
                string const filename =
                        MakeAbsPath(argument, 
-                                   OnlyPath(owner->buffer()->fileName()));
+                                   owner->buffer()->filePath());
                setMessage(N_("Opening child document ") +
                           MakeDisplayPath(filename) + "...");
                owner->view()->savePosition(0);
@@ -1652,7 +1647,7 @@ void LyXFunc::menuNew(bool fromTemplate)
        string initpath = lyxrc.document_path;
 
        if (owner->view()->available()) {
-               string const trypath = owner->buffer()->filepath;
+               string const trypath = owner->buffer()->filePath();
                // If directory is writeable, use this as default.
                if (IsDirWriteable(trypath))
                        initpath = trypath;
@@ -1778,7 +1773,7 @@ void LyXFunc::open(string const & fname)
        string initpath = lyxrc.document_path;
   
        if (owner->view()->available()) {
-               string const trypath = owner->buffer()->filepath;
+               string const trypath = owner->buffer()->filePath();
                // If directory is writeable, use this as default.
                if (IsDirWriteable(trypath))
                        initpath = trypath;
@@ -1855,7 +1850,7 @@ void LyXFunc::doImport(string const & argument)
                string initpath = lyxrc.document_path;
                
                if (owner->view()->available()) {
-                       string const trypath = owner->buffer()->filepath;
+                       string const trypath = owner->buffer()->filePath();
                        // If directory is writeable, use this as default.
                        if (IsDirWriteable(trypath))
                                initpath = trypath;