]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Michael's latest batch of new gnome files.
[lyx.git] / src / lyxfunc.C
index ec2eb4513b839604d39bc7e5d625ff28b03f01a9..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;
@@ -1664,9 +1659,9 @@ void LyXFunc::menuNew(bool fromTemplate)
        if (lyxrc.new_ask_filename) {
                FileDialog fileDlg(owner, _("Enter filename for new document"),
                                   LFUN_SELECT_FILE_SYNC,
-                       make_pair(string(_("Documents")),
+                       make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
-                       make_pair(string(_("Templates")),
+                       make_pair(string(_("Templates|#T#t")),
                                  string(lyxrc.template_path)));
 
                FileDialog::Result result =
@@ -1748,9 +1743,9 @@ void LyXFunc::menuNew(bool fromTemplate)
        if (fromTemplate) {
                FileDialog fileDlg(owner, _("Select template file"),
                        LFUN_SELECT_FILE_SYNC,
-                       make_pair(string(_("Documents")),
+                       make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
-                       make_pair(string(_("Templates")),
+                       make_pair(string(_("Templates|#T#t")),
                                  string(lyxrc.template_path)));
 
                FileDialog::Result result =
@@ -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;
@@ -1789,9 +1784,9 @@ void LyXFunc::open(string const & fname)
        if (fname.empty()) {
                FileDialog fileDlg(owner, _("Select document to open"),
                        LFUN_FILE_OPEN,
-                       make_pair(string(_("Documents")),
+                       make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
-                       make_pair(string(_("Examples")),
+                       make_pair(string(_("Examples|#E#e")),
                                  string(AddPath(system_lyxdir, "examples"))));
 
                FileDialog::Result result =
@@ -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;
@@ -1866,9 +1861,9 @@ void LyXFunc::doImport(string const & argument)
 
                FileDialog fileDlg(owner, text, 
                        LFUN_IMPORT,
-                       make_pair(string(_("Documents")),
+                       make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
-                       make_pair(string(_("Examples")),
+                       make_pair(string(_("Examples|#E#e")),
                                  string(AddPath(system_lyxdir, "examples"))));
                        
                string const extension = "*." + formats.extension(format)