One third of Andre' no-gui patch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@622 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-03-20 16:37:50 +00:00
parent db0716f666
commit 90343c7ade
10 changed files with 179 additions and 103 deletions

View File

@ -1,3 +1,20 @@
2000-03-09 André Pönitz <poenitz@mathematik.tu-chemnitz.de>
* src/lyxrc.*: Added support for running without Gui
(\use_gui false)
* src/FontLoader.C: sensible defaults if no fonts are needed
* src/lyx_cb.C: New function ShowMessage (writes either to the
minibuffer or cout in case of no gui
New function AskOverwrite for common stuff
Consequently various changes to call these functions
* src/lyx_main.C: allow gui = false and handle lyxrc \use_gui false
wild guess at sensible screen resolution when having no gui
* src/lyxfont.C: no gui, no fonts... set some defaults
2000-03-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> 2000-03-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/LColor.C: made the command inset background a bit lighter. * src/LColor.C: made the command inset background a bit lighter.

View File

@ -112,7 +112,9 @@ void FontInfo::query()
return; return;
} }
char ** list = XListFonts(fl_display, pattern.c_str(), 100, &matches); char ** list = 0;
if (lyxrc.use_gui)
list = XListFonts(fl_display, pattern.c_str(), 100, &matches);
if (list == 0) { if (list == 0) {
// No fonts matched // No fonts matched

View File

@ -197,12 +197,39 @@ void FontLoader::getFontinfo(LyXFont::FONT_FAMILY family,
} }
} }
// A dummy fontstruct used when there is no gui. Only the last 3 have
// well-thought values...
static XFontStruct dummyXFontStruct = {
/*XExtData *ext_data; */ 0,
/* Font fid; */ 0,
/* unsigned direction; */ FontLeftToRight,
/* unsigned min_char_or_byte2; */ 0,
/* unsigned max_char_or_byte2; */ 0,
/* unsigned min_byte1; */ 0,
/* unsigned max_byte1; */ 0,
/* Bool all_chars_exist; */ 0,
/* unsigned default_char; */ 0,
/* int n_properties; */ 0,
/* XFontProp *properties; */ 0,
/* XCharStruct min_bounds; */ 0,
/* XCharStruct max_bounds; */ 0,
/* XCharStruct *per_char; */ 0, // no character specific info
/* int ascent; */ 1, // unit ascent on character displays
/* int descent; */ 0, // no descent on character displays
};
/// Do load font /// Do load font
XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family, XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
LyXFont::FONT_SERIES series, LyXFont::FONT_SERIES series,
LyXFont::FONT_SHAPE shape, LyXFont::FONT_SHAPE shape,
LyXFont::FONT_SIZE size) LyXFont::FONT_SIZE size)
{ {
if (!lyxrc.use_gui) {
return &dummyXFontStruct;
}
getFontinfo(family, series, shape); getFontinfo(family, series, shape);
int fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi * int fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
(lyxrc.zoom/100.0) ) / 72.27 + 0.5 ); (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );
@ -215,11 +242,12 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
font = "fixed"; font = "fixed";
} }
XFontStruct * fs = 0;
current_view->owner()->getMiniBuffer()->Store(); current_view->owner()->getMiniBuffer()->Store();
current_view->owner()->getMiniBuffer()->Set(_("Loading font into X-Server...")); current_view->owner()->getMiniBuffer()->Set(_("Loading font into X-Server..."));
fs = XLoadQueryFont(fl_display, font.c_str());
XFontStruct * fs = XLoadQueryFont(fl_display, font.c_str());
if (fs == 0) { if (fs == 0) {
if (font == "fixed") { if (font == "fixed") {
lyxerr << "We're doomed. Can't get 'fixed' font." << endl; lyxerr << "We're doomed. Can't get 'fixed' font." << endl;

View File

@ -397,36 +397,38 @@ void InitFigures()
bittable[i] = char(~k); bittable[i] = char(~k);
} }
fl_add_canvas_handler(figinset_canvas, ClientMessage,
GhostscriptMsg, current_view->owner()->getMainForm());
// allocate color cube on pseudo-color display // allocate color cube on pseudo-color display
// first get visual // first get visual
gs_color = false; gs_color = false;
local_gc_copy = createGC(); if (lyxrc.use_gui) {
fl_add_canvas_handler(figinset_canvas, ClientMessage,
GhostscriptMsg, current_view->owner()->getMainForm());
Visual * vi = DefaultVisual(fl_display, DefaultScreen(fl_display)); local_gc_copy = createGC();
if (lyxerr.debugging()) {
printf("Visual ID: %ld, class: %d, bprgb: %d, mapsz: %d\n", Visual * vi = DefaultVisual(fl_display, DefaultScreen(fl_display));
vi->visualid, vi->c_class, if (lyxerr.debugging()) {
vi->bits_per_rgb, vi->map_entries); printf("Visual ID: %ld, class: %d, bprgb: %d, mapsz: %d\n",
vi->visualid, vi->c_class,
vi->bits_per_rgb, vi->map_entries);
}
color_visual = ( (vi->c_class == StaticColor) ||
(vi->c_class == PseudoColor) ||
(vi->c_class == TrueColor) ||
(vi->c_class == DirectColor) );
if ((vi->c_class & 1) == 0) return;
// now allocate colors
if (vi->c_class == GrayScale) {
// allocate grayscale
AllocGrays(vi->map_entries/2);
} else {
// allocate normal color
int i = 5;
while (i * i * i * 2 > vi->map_entries) --i;
AllocColors(i);
}
gs_allcolors = vi->map_entries;
} }
color_visual = ( (vi->c_class == StaticColor) ||
(vi->c_class == PseudoColor) ||
(vi->c_class == TrueColor) ||
(vi->c_class == DirectColor) );
if ((vi->c_class & 1) == 0) return;
// now allocate colors
if (vi->c_class == GrayScale) {
// allocate grayscale
AllocGrays(vi->map_entries/2);
} else {
// allocate normal color
int i = 5;
while (i * i * i * 2 > vi->map_entries) --i;
AllocColors(i);
}
gs_allcolors = vi->map_entries;
} }
@ -1240,7 +1242,8 @@ Inset * InsetFig::Clone() const
tmp->pswid = pswid; tmp->pswid = pswid;
tmp->pshgh = pshgh; tmp->pshgh = pshgh;
tmp->fname = fname; tmp->fname = fname;
if (!fname.empty() && (flags & 3) && !lyxrc.ps_command.empty()) { if (!fname.empty() && (flags & 3) && !lyxrc.ps_command.empty()
&& lyxrc.use_gui) {
// do not display if there is // do not display if there is
// "do not display" chosen (Matthias 260696) // "do not display" chosen (Matthias 260696)
tmp->figure->data = getfigdata(wid, hgh, fname, psx, psy, tmp->figure->data = getfigdata(wid, hgh, fname, psx, psy,

View File

@ -175,6 +175,18 @@ void MenuReload(Buffer * buf);
void MenuLayoutSave(); void MenuLayoutSave();
void ShowMessage(Buffer * buf, string const & msg1,
string const & msg2 = string(), string const & msg3 = string(), int delay=6)
{
if (lyxrc.use_gui) {
buf->getUser()->owner()->getMiniBuffer()->Set(msg1, msg2, msg3, delay);
}
else {
// can somebody think of something more clever? cerr?
cout << msg1 << msg2 << msg3 << endl;
}
}
// How should this actually work? Should it prohibit input in all BufferViews, // How should this actually work? Should it prohibit input in all BufferViews,
// or just in the current one? If "just the current one", then it should be // or just in the current one? If "just the current one", then it should be
// placed in BufferView. If "all BufferViews" then LyXGUI (I think) should // placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
@ -345,9 +357,8 @@ void MenuWriteAs(Buffer * buffer)
buffer->fileName(s); buffer->fileName(s);
buffer->markDirty(); buffer->markDirty();
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Document renamed to '"), ShowMessage(buffer, _("Document renamed to '"),
MakeDisplayPath(s), MakeDisplayPath(s), _("', but not saved..."));
_("', but not saved..."));
} }
return; return;
} // Check whether the file exists } // Check whether the file exists
@ -549,12 +560,10 @@ bool RunScript(Buffer * buffer, bool wait,
#ifdef WITH_WARNINGS #ifdef WITH_WARNINGS
#warning What should we do here? #warning What should we do here?
#endif #endif
buffer->getUser()->owner()->getMiniBuffer()->Set( ShowMessage(buffer, _("Executing command:"), cmd);
_("Executing command:"), cmd);
result = one.startscript(Systemcalls::System, cmd); result = one.startscript(Systemcalls::System, cmd);
} else { } else {
buffer->getUser()->owner()->getMiniBuffer()->Set( ShowMessage(buffer, _("Executing command:"), cmd);
_("Executing command:"), cmd);
result = one.startscript(wait ? Systemcalls::Wait result = one.startscript(wait ? Systemcalls::Wait
: Systemcalls::DontWait, cmd); : Systemcalls::DontWait, cmd);
} }
@ -772,6 +781,22 @@ bool PreviewDVI(Buffer * buffer)
} }
bool AskOverwrite(Buffer * buffer, string const & s)
{
if (lyxrc.use_gui) {
// be friendly if there is a gui
FileInfo fi(s);
if (fi.readable() &&
!AskQuestion(_("File already exists:"),
MakeDisplayPath(s, 50),
_("Do you want to overwrite the file?"))) {
ShowMessage(buffer, _("Canceled"));
return false;
}
}
return true;
}
void MenuMakeLaTeX(Buffer * buffer) void MenuMakeLaTeX(Buffer * buffer)
{ {
// Why care about this? // Why care about this?
@ -781,25 +806,18 @@ void MenuMakeLaTeX(Buffer * buffer)
// Get LaTeX-Filename // Get LaTeX-Filename
string s = buffer->getLatexName(false); string s = buffer->getLatexName(false);
FileInfo fi(s); if (!AskOverwrite(buffer, s))
if (fi.readable() && return;
!AskQuestion(_("File already exists:"),
MakeDisplayPath(s, 50),
_("Do you want to overwrite the file?"))) {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Canceled"));
return;
}
if (buffer->isDocBook()) if (buffer->isDocBook())
buffer->getUser()->owner()->getMiniBuffer()->Set( ShowMessage(buffer, _("DocBook does not have a latex backend"));
_("DocBook does not have a latex backend"));
else { else {
if (buffer->isLinuxDoc()) if (buffer->isLinuxDoc())
RunLinuxDoc(buffer->getUser(), 0, buffer->fileName()); RunLinuxDoc(buffer->getUser(), 0, buffer->fileName());
else else
buffer->makeLaTeXFile(s, string(), true); buffer->makeLaTeXFile(s, string(), true);
buffer->getUser()->owner()->getMiniBuffer()->Set( ShowMessage(buffer, _("Nice LaTeX file saved as"),
_("Nice LaTeX file saved as"), MakeDisplayPath(s)); MakeDisplayPath(s));
buffer->markDviDirty(); buffer->markDviDirty();
} }
} }
@ -818,22 +836,16 @@ void MenuMakeLinuxDoc(Buffer * buffer)
// Get LinuxDoc-Filename // Get LinuxDoc-Filename
string s = ChangeExtension(buffer->fileName(), string s = ChangeExtension(buffer->fileName(),
".sgml", false); ".sgml", false);
FileInfo fi(s); if (!AskOverwrite(buffer, s))
if (fi.readable() &&
!AskQuestion(_("File already exists:"),
MakeDisplayPath(s, 50),
_("Do you want to overwrite the file?"))) {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Canceled"));
return; return;
}
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Building LinuxDoc SGML file `"), ShowMessage(buffer, _("Building LinuxDoc SGML file `"),
MakeDisplayPath(s),"'..."); MakeDisplayPath(s),"'...");
buffer->makeLinuxDocFile(s, 65); buffer->makeLinuxDocFile(s, 65);
buffer->redraw(); buffer->redraw();
buffer->getUser()->owner()->getMiniBuffer()->Set(_("LinuxDoc SGML file save as"), ShowMessage(buffer, _("LinuxDoc SGML file save as"),
MakeDisplayPath(s)); MakeDisplayPath(s));
} }
@ -852,22 +864,16 @@ void MenuMakeDocBook(Buffer * buffer)
// Get DocBook-Filename // Get DocBook-Filename
string s = ChangeExtension(buffer->fileName(), string s = ChangeExtension(buffer->fileName(),
".sgml", false); ".sgml", false);
FileInfo fi(s); if (!AskOverwrite(buffer, s))
if (fi.readable() &&
!AskQuestion(_("File already exists:"),
MakeDisplayPath(s, 50),
_("Do you want to overwrite the file?"))) {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Canceled"));
return; return;
}
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Building DocBook SGML file `"), ShowMessage(buffer, _("Building DocBook SGML file `"),
MakeDisplayPath(s), "'..."); MakeDisplayPath(s), "'...");
buffer->makeDocBookFile(s, 65); buffer->makeDocBookFile(s, 65);
buffer->redraw(); buffer->redraw();
buffer->getUser()->owner()->getMiniBuffer()->Set(_("DocBook SGML file save as"), ShowMessage(buffer, _("DocBook SGML file save as"),
MakeDisplayPath(s)); MakeDisplayPath(s));
} }
@ -881,18 +887,13 @@ void MenuMakeAscii(Buffer * buffer)
string s = ChangeExtension (buffer->fileName(), string s = ChangeExtension (buffer->fileName(),
".txt", false); ".txt", false);
FileInfo fi(s);
if (fi.readable() && if (!AskOverwrite(buffer, s))
!AskQuestion(_("File already exists:"),
MakeDisplayPath(s, 50),
_("Do you want to overwrite the file?"))) {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Canceled"));
return; return;
}
buffer->writeFileAscii(s, lyxrc.ascii_linelen); buffer->writeFileAscii(s, lyxrc.ascii_linelen);
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Ascii file saved as"), MakeDisplayPath(s)); ShowMessage(buffer, _("Ascii file saved as"), MakeDisplayPath(s));
} }
@ -936,10 +937,10 @@ void MenuMakeHTML(Buffer * buffer)
Systemcalls one; Systemcalls one;
int res = one.startscript(Systemcalls::System, tmp); int res = one.startscript(Systemcalls::System, tmp);
if (res == 0) { if (res == 0) {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Document exported as HTML to file `") ShowMessage(buffer, _("Document exported as HTML to file `")
+ MakeDisplayPath(result) +'\''); + MakeDisplayPath(result) +'\'');
} else { } else {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Unable to convert to HTML the file `") ShowMessage(buffer, _("Unable to convert to HTML the file `")
+ MakeDisplayPath(infile) + MakeDisplayPath(infile)
+ '\''); + '\'');
} }
@ -996,7 +997,7 @@ void MenuExport(Buffer * buffer, string const & extyp)
MenuMakeHTML(buffer); MenuMakeHTML(buffer);
} }
else { else {
buffer->getUser()->owner()->getMiniBuffer()->Set(_("Unknown export type: ") + extyp); ShowMessage(buffer, _("Unknown export type: ") + extyp);
} }
} }

View File

@ -79,7 +79,7 @@ LyX::LyX(int * argc, char * argv[])
// Initialization of LyX (reads lyxrc and more) // Initialization of LyX (reads lyxrc and more)
lyxerr[Debug::INIT] << "Initializing LyX::init..." << endl; lyxerr[Debug::INIT] << "Initializing LyX::init..." << endl;
init(argc, argv); init(argc, argv, gui);
lyxerr[Debug::INIT] << "Initializing LyX::init...done" << endl; lyxerr[Debug::INIT] << "Initializing LyX::init...done" << endl;
lyxGUI->init(); lyxGUI->init();
@ -114,7 +114,8 @@ LyX::LyX(int * argc, char * argv[])
if (last_loaded != 0) { if (last_loaded != 0) {
lyxerr.debug() << "Yes we loaded some files." << endl; lyxerr.debug() << "Yes we loaded some files." << endl;
lyxGUI->regBuf(last_loaded); if (lyxrc.use_gui)
lyxGUI->regBuf(last_loaded);
} }
// Execute batch commands if available // Execute batch commands if available
@ -142,7 +143,7 @@ LyX::~LyX()
extern "C" void error_handler(int err_sig); extern "C" void error_handler(int err_sig);
void LyX::init(int */*argc*/, char **argv) void LyX::init(int */*argc*/, char **argv, bool gui)
{ {
// Install the signal handlers // Install the signal handlers
signal(SIGHUP, error_handler); signal(SIGHUP, error_handler);
@ -334,11 +335,20 @@ void LyX::init(int */*argc*/, char **argv)
} }
// Calculate screen dpi as average of x-DPI and y-DPI: // Calculate screen dpi as average of x-DPI and y-DPI:
Screen * scr = DefaultScreenOfDisplay(fl_get_display()); // Disable gui when either lyxrc or easyparse says so
lyxrc.dpi = ((HeightOfScreen(scr)* 25.4 / HeightMMOfScreen(scr)) + if (!gui)
(WidthOfScreen(scr)* 25.4 / WidthMMOfScreen(scr))) / 2; lyxrc.use_gui = false;
lyxerr[Debug::INFO] << "DPI setting detected to be "
<< lyxrc.dpi + 0.5 << endl; // Calculate screen dpi as average of x-DPI and y-DPI:
if (lyxrc.use_gui) {
Screen * scr = DefaultScreenOfDisplay(fl_get_display());
lyxrc.dpi = ((HeightOfScreen(scr)* 25.4 / HeightMMOfScreen(scr)) +
(WidthOfScreen(scr)* 25.4 / WidthMMOfScreen(scr))) / 2;
lyxerr[Debug::INFO] << "DPI setting detected to be "
<< lyxrc.dpi + 0.5 << endl;
} else {
lyxrc.dpi = 1; // I hope this is safe
}
// //
// Read configuration files // Read configuration files
@ -565,6 +575,7 @@ bool LyX::easyParse(int * argc, char * argv[])
"ps...] after ") "ps...] after ")
<< arg << _(" switch!") << endl; << arg << _(" switch!") << endl;
} }
gui = false;
} }
return gui; return gui;
} }

View File

@ -74,7 +74,7 @@ private:
/// ///
void runtime(); void runtime();
/// ///
void init(int * argc, char * argv[]); void init(int * argc, char * argv[], bool);
/// ///
void queryUserLyXDir(); void queryUserLyXDir();
/// ///

View File

@ -855,17 +855,6 @@ int LyXFont::descent(char c) const
} }
// Specialized after profiling. (Asger)
int LyXFont::width(char c) const
{
if (realShape() != LyXFont::SMALLCAPS_SHAPE){
return XTextWidth(getXFontstruct(), &c, 1);
} else {
return textWidth(&c, 1);
}
}
int LyXFont::lbearing(char c) const int LyXFont::lbearing(char c) const
{ {
XFontStruct * finfo = getXFontstruct(); XFontStruct * finfo = getXFontstruct();
@ -892,8 +881,22 @@ int LyXFont::rbearing(char c) const
} }
// Specialized after profiling. (Asger)
int LyXFont::width(char c) const
{
if (realShape() != LyXFont::SMALLCAPS_SHAPE){
return lyxrc.use_gui ? XTextWidth(getXFontstruct(), &c, 1) : 1;
} else {
return textWidth(&c, 1);
}
}
int LyXFont::textWidth(char const * s, int n) const int LyXFont::textWidth(char const * s, int n) const
{ {
if (!lyxrc.use_gui)
return n;
if (realShape() != LyXFont::SMALLCAPS_SHAPE){ if (realShape() != LyXFont::SMALLCAPS_SHAPE){
return XTextWidth(getXFontstruct(), s, n); return XTextWidth(getXFontstruct(), s, n);
} else { } else {

View File

@ -147,6 +147,7 @@ enum LyXRCTags {
RC_DVI_TO_PS_COMMAND, RC_DVI_TO_PS_COMMAND,
RC_DATE_INSERT_FORMAT, RC_DATE_INSERT_FORMAT,
RC_SHOW_BANNER, RC_SHOW_BANNER,
RC_USE_GUI,
RC_LAST RC_LAST
}; };
@ -165,8 +166,8 @@ keyword_item lyxrcTags[] = {
{ "\\begin_toolbar", RC_BEGINTOOLBAR }, { "\\begin_toolbar", RC_BEGINTOOLBAR },
{ "\\bind", RC_BIND }, { "\\bind", RC_BIND },
{ "\\bind_file", RC_BINDFILE }, { "\\bind_file", RC_BINDFILE },
{ "\\build_command", RC_BUILD_COMMAND }, { "\\build_command", RC_BUILD_COMMAND },
{ "\\build_error_filter", RC_BUILD_ERROR_FILTER }, { "\\build_error_filter", RC_BUILD_ERROR_FILTER },
{ "\\check_lastfiles", RC_CHECKLASTFILES }, { "\\check_lastfiles", RC_CHECKLASTFILES },
{ "\\chktex_command", RC_CHKTEX_COMMAND }, { "\\chktex_command", RC_CHKTEX_COMMAND },
{ "\\cursor_follows_scrollbar", RC_CURSOR_FOLLOWS_SCROLLBAR }, { "\\cursor_follows_scrollbar", RC_CURSOR_FOLLOWS_SCROLLBAR },
@ -245,6 +246,7 @@ keyword_item lyxrcTags[] = {
{ "\\template_path", RC_TEMPLATEPATH }, { "\\template_path", RC_TEMPLATEPATH },
{ "\\use_alt_language", RC_USE_ALT_LANG }, { "\\use_alt_language", RC_USE_ALT_LANG },
{ "\\use_escape_chars", RC_USE_ESC_CHARS }, { "\\use_escape_chars", RC_USE_ESC_CHARS },
{ "\\use_gui", RC_USE_GUI },
{ "\\use_input_encoding", RC_USE_INP_ENC }, { "\\use_input_encoding", RC_USE_INP_ENC },
{ "\\use_personal_dictionary", RC_USE_PERS_DICT }, { "\\use_personal_dictionary", RC_USE_PERS_DICT },
{ "\\use_tempdir", RC_USETEMPDIR }, { "\\use_tempdir", RC_USETEMPDIR },
@ -281,7 +283,7 @@ void LyXRC::setDefaults() {
print_to_printer = "-P"; print_to_printer = "-P";
print_to_file = "-o "; print_to_file = "-o ";
print_file_extension = ".ps"; print_file_extension = ".ps";
print_paper_flag = "-t"; print_paper_flag = "-t";
print_paper_dimension_flag = "-T"; print_paper_dimension_flag = "-T";
document_path = GetEnvPath("HOME"); document_path = GetEnvPath("HOME");
tempdir_path = "/tmp"; tempdir_path = "/tmp";
@ -359,6 +361,7 @@ void LyXRC::setDefaults() {
/// ///
date_insert_format = "%A, %e %B %Y"; date_insert_format = "%A, %e %B %Y";
show_banner = true; show_banner = true;
use_gui = true;
// //
defaultKeyBindings(); defaultKeyBindings();
} }
@ -990,6 +993,10 @@ int LyXRC::read(string const & filename)
if (lexrc.next()) if (lexrc.next())
show_banner = lexrc.GetBool(); show_banner = lexrc.GetBool();
break; break;
case RC_USE_GUI:
if (lexrc.next())
use_gui = lexrc.GetBool();
break;
case RC_LAST: break; // this is just a dummy case RC_LAST: break; // this is just a dummy
} }
} }
@ -1307,6 +1314,8 @@ void LyXRC::output(ostream & os) const
<< "\"\n"; << "\"\n";
case RC_SHOW_BANNER: case RC_SHOW_BANNER:
os << "\\show_banner " << tostr(show_banner) << "\n"; os << "\\show_banner " << tostr(show_banner) << "\n";
case RC_USE_GUI:
os << "\\use_gui " << tostr(show_banner) << "\n";
} }
os.flush(); os.flush();
} }

View File

@ -226,6 +226,8 @@ public:
string auto_mathmode; string auto_mathmode;
/// ///
bool show_banner; bool show_banner;
/// Do we have to use a GUI?
bool use_gui;
/// ///
typedef map<string, int> Bindings; typedef map<string, int> Bindings;
/// ///