]> 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 055aeee29803d4a4fef3edc5d09e43fe90b63438..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);
+       }
 }
 
 
@@ -879,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;
 }