From c5609edc64e6582c86ac171df79f594a7d3d48a9 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 22 Mar 2000 15:02:51 +0000 Subject: [PATCH] Small fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@624 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 10 ++++++++++ po/ChangeLog | 4 ++++ po/es.po | 10 +++------- src/FontLoader.C | 34 +++++++++++++--------------------- src/lyx_main.C | 1 - 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea8938d58b..feca0d7ab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-03-21 Kayvan A. Sylvan + + * src/lyx_main.C (easyParse): Removed misplaced gui=false which + caused lyx to startup with no GUI in place, causing in a crash + upon startup when called with arguments. + +2000-03-21 Jean-Marc Lasgouttes + + * src/FontLoader.C: better initialization of dummyXFontStruct. + 2000-03-20 José Abílio Matos * src/lyxrc.[Ch] Removed \sgml_extra_options, added 6 other flags diff --git a/po/ChangeLog b/po/ChangeLog index fb3fac8499..fe630b0326 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2000-03-10 Jean-Marc Lasgouttes + + * es.po: bugfix from Jose M. Alcaide + 2000-03-10 Jean-Marc Lasgouttes * fr.po: updated from Olivier Faucheux diff --git a/po/es.po b/po/es.po index e5e9a4037a..8351f0225c 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: lyx-1.0.0\n" "POT-Creation-Date: 2000-02-17 01:59+0100\n" -"PO-Revision-Date: 2000-01-20 22:46+00:00\n" +"PO-Revision-Date: 2000-03-22 15:54+01:00\n" "Last-Translator: David Suárez de lis \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" @@ -3266,17 +3266,13 @@ msgstr " Dist. peque msgid "" " Default | Custom | USletter | USlegal | USexecutive | A3 | A4 | A5 | B3 | " "B4 | B5 " -msgstr "" -" Por defecto | Personalizado | LegalUS | EjecutivoUS | A3 | A4 | A5 | B3 | " -"B4 | B5 " +msgstr " Por defecto | Personalizado | CartaUS | LegalUS | EjecutivoUS | A3 | A4 | A5 | B3 | B4 | B5 " #: src/lyx_gui.C:478 msgid "" " None | A4 small Margins (only portrait) | A4 very small Margins (only " "portrait) | A4 very wide margins (only portrait) " -msgstr "" -" Ninguno | A4 márgenes pequeñas (sólo retrato) | A4 mágenes muy pequeños " -"(sólo retrato) | A4 márgenes muy anchos (sólo márgenes) " +msgstr " Ninguno | A4 márgenes pequeños (sólo retrato) | A4 mágenes muy pequeños (sólo retrato) | A4 márgenes muy anchos (sólo retrato) " #: src/lyx_gui.C:524 msgid " ``text'' | ''text'' | ,,text`` | ,,text'' | «text» | »text« " diff --git a/src/FontLoader.C b/src/FontLoader.C index cbf3bd5c45..d01905d61d 100644 --- a/src/FontLoader.C +++ b/src/FontLoader.C @@ -198,27 +198,9 @@ 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 -}; - +// A dummy fontstruct used when there is no gui. +static XFontStruct dummyXFontStruct; +static bool dummyXFontStructisGood = false; /// Do load font XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family, @@ -227,6 +209,16 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family, LyXFont::FONT_SIZE size) { if (!lyxrc.use_gui) { + if (!dummyXFontStructisGood) { + // no character specific info + dummyXFontStruct.per_char=0; + // unit ascent on character displays + dummyXFontStruct.ascent = 1; + // no descent on character displays + dummyXFontStruct.descent = 0; + dummyXFontStructisGood = true; + } + return &dummyXFontStruct; } diff --git a/src/lyx_main.C b/src/lyx_main.C index 6964d415ba..76564ac9ad 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -575,7 +575,6 @@ bool LyX::easyParse(int * argc, char * argv[]) "ps...] after ") << arg << _(" switch!") << endl; } - gui = false; } return gui; }