]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / lyx_main.C
index 2b08c9b95c5c009ba41138779c4aaae921559923..01c2aaafff58b157ec452e239b805740f870af86 100644 (file)
@@ -235,7 +235,7 @@ void LyX::priv_exec(int & argc, char * argv[])
        vector<string> files;
 
        for (int argi = argc - 1; argi >= 1; --argi)
-               files.push_back(argv[argi]);
+               files.push_back(os::internal_path(argv[argi]));
 
        if (first_start)
                files.push_back(i18nLibFileSearch("examples", "splash.lyx"));
@@ -278,7 +278,13 @@ void LyX::priv_exec(int & argc, char * argv[])
                files.clear(); // the files are already loaded
        }
 
-       lyx_gui::start(batch_command, files);
+       if (want_gui)
+               lyx_gui::start(batch_command, files);
+       else {
+               // Something went wrong above
+               QuitLyX();
+               exit(EXIT_FAILURE);
+       }
 }
 
 
@@ -525,7 +531,9 @@ void LyX::defaultKeyBindings(kb_keymap  * kbmap)
        kbmap->bind("Down", FuncRequest(LFUN_DOWN));
 
        kbmap->bind("Tab", FuncRequest(LFUN_CELL_FORWARD));
-       kbmap->bind("ISO_Left_Tab", FuncRequest(LFUN_CELL_FORWARD));
+       kbmap->bind("C-Tab", FuncRequest(LFUN_CELL_SPLIT));
+       kbmap->bind("~S-ISO_Left_Tab", FuncRequest(LFUN_CELL_BACKWARD));
+       kbmap->bind("~S-BackTab", FuncRequest(LFUN_CELL_BACKWARD));
 
        kbmap->bind("Home", FuncRequest(LFUN_HOME));
        kbmap->bind("End", FuncRequest(LFUN_END));
@@ -564,10 +572,6 @@ void LyX::defaultKeyBindings(kb_keymap  * kbmap)
        kbmap->bind("KP_End", FuncRequest(LFUN_END));
        kbmap->bind("KP_Prior", FuncRequest(LFUN_PRIOR));
        kbmap->bind("KP_Next", FuncRequest(LFUN_NEXT));
-
-       kbmap->bind("C-Tab", FuncRequest(LFUN_CELL_SPLIT));
-       kbmap->bind("S-Tab", FuncRequest(LFUN_CELL_BACKWARD));
-       kbmap->bind("S-ISO_Left_Tab", FuncRequest(LFUN_CELL_BACKWARD));
 }
 
 
@@ -636,7 +640,7 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
        // If the user specified explicitly a directory, ask whether
        // to create it. If the user says "no", then exit.
        if (explicit_userdir &&
-           !Alert::prompt(
+           Alert::prompt(
                    _("Missing LyX support directory"),
                    bformat(_("You have specified a non-existent user "
                              "LyX directory, %1$s.\n"
@@ -881,9 +885,6 @@ int parse_execute(string const & arg, string const &)
                exit(1);
        }
        batch = arg;
-       // Argh. Setting gui to false segfaults..
-       // FIXME: when ? how ?
-       // is_gui = false;
        return 1;
 }