]> git.lyx.org Git - features.git/commitdiff
enable buffer-export without loading the GUI.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 13 Oct 2006 21:27:55 +0000 (21:27 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 13 Oct 2006 21:27:55 +0000 (21:27 +0000)
* lyx_main.C:
  - parse_export(): set lyx::use_gui to false.

* MathFactory.C:
  - initMath(): initSymbols() only if lyx::use_gui is true.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15327 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyx_main.C
src/mathed/MathFactory.C

index f1eb44260610411e3c0ffa3378c882c42cc751e5..1ae9a00c30065a700b9f2cf24076fdb020211499 100644 (file)
@@ -1036,7 +1036,7 @@ int parse_export(string const & type, string const &)
                exit(1);
        }
        batch = "buffer-export " + type;
-       lyx::use_gui = true;
+       lyx::use_gui = false;
        return 1;
 }
 
index 6bc40bbea90b7e012d284e83ecf55ed00e8be955..60b0a6c09ee30c009b24de52ca4336b75585e35f 100644 (file)
@@ -74,6 +74,9 @@ using std::istringstream;
 
 bool has_math_fonts;
 
+namespace lyx {
+extern bool use_gui;
+}
 
 namespace {
 
@@ -227,7 +230,8 @@ void initMath()
        if (!initialized) {
                initialized = true;
                initParser();
-               initSymbols();
+               if (lyx::use_gui)
+                       initSymbols();
        }
 }