mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 00:39:18 +00:00
Better LaTeX error parsing, clear minibuffer when clicking, improve compilation on RH7, warn when file cannot be saved
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1113 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58622fce26
commit
fff0cb10d2
35
ChangeLog
35
ChangeLog
@ -1,7 +1,38 @@
|
|||||||
|
2000-10-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* src/debug.[Ch]: some fixes to help compiling with RH7.0
|
||||||
|
wonderful compiler.
|
||||||
|
|
||||||
2000-10-11 Baruch Even <baruch.even@writeme.com>
|
2000-10-11 Baruch Even <baruch.even@writeme.com>
|
||||||
|
|
||||||
|
* src/buffer.C (writeFile): Added test for errors on writing, this
|
||||||
|
catches all errors and not only file system full errors as intended.
|
||||||
|
|
||||||
|
2000-10-11 Baruch Even <baruch.even@writeme.com>
|
||||||
|
|
||||||
|
* src/minibuffer.h:
|
||||||
|
* src/minibuffer.C: Changed the method ExecCommand to
|
||||||
|
PrepareForCommand to convey its real action.
|
||||||
|
|
||||||
* src/minibuffer.C (peek_event): Added action when mouse clicks to
|
* src/minibuffer.C (peek_event): Added action when mouse clicks to
|
||||||
clear the minibuffer.
|
clear the minibuffer and prepare to enter a command.
|
||||||
|
|
||||||
|
* src/mathed/formula.C (LocalDispatch): Changed to conform with
|
||||||
|
the rename from ExecCommand to PrepareForCommand.
|
||||||
|
* src/lyxfunc.C (Dispatch): ditto.
|
||||||
|
|
||||||
|
2000-09-14 Dekel Tsur <dekel@math.tau.ac.il>
|
||||||
|
|
||||||
|
* src/LaTeX.C (scanLogFile): Don't ignore a "File ended while..."
|
||||||
|
error.
|
||||||
|
|
||||||
|
2000-10-13 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* lib/lyxrc.example: add description for
|
||||||
|
\screen_font_encoding_menu.
|
||||||
|
|
||||||
|
* src/lyx_gui.C (create_forms): better fix for crash with
|
||||||
|
translated interface.
|
||||||
|
|
||||||
2000-10-12 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2000-10-12 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
@ -64,7 +95,7 @@
|
|||||||
|
|
||||||
2000-09-29 Dekel Tsur <dekelts@tau.ac.il>
|
2000-09-29 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
* src/paragraph.C (TeXFootnote): Fixed bug with LTR table floats.
|
* src/paragraph.C (TeXFootnote): Fixed bug with RTL table floats.
|
||||||
|
|
||||||
2000-09-26 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2000-09-26 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
@ -232,6 +232,10 @@
|
|||||||
# the same as what LaTeX calls latin1.
|
# the same as what LaTeX calls latin1.
|
||||||
#\screen_font_encoding iso8859-2
|
#\screen_font_encoding iso8859-2
|
||||||
|
|
||||||
|
# The norm for the menu/popups fonts. The default is an empty string, which
|
||||||
|
# causes to use the screen fonts norm (defined by \screen_font_encoding).
|
||||||
|
#\screen_font_encoding_menu iso8859-2
|
||||||
|
|
||||||
# The font for popups. It is set to
|
# The font for popups. It is set to
|
||||||
# <font_popup>-*-*-*-?-*-*-*-*-<font_encoding>.
|
# <font_popup>-*-*-*-?-*-*-*-*-<font_encoding>.
|
||||||
# The default is:
|
# The default is:
|
||||||
|
@ -556,12 +556,14 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|
|||||||
if (++count > 10)
|
if (++count > 10)
|
||||||
break;
|
break;
|
||||||
} while (!prefixIs(tmp, "l."));
|
} while (!prefixIs(tmp, "l."));
|
||||||
if (prefixIs(tmp, "l.")) {
|
if (prefixIs(tmp, "l.") ||
|
||||||
|
contains(token, "File ended while")) {
|
||||||
// we have a latex error
|
// we have a latex error
|
||||||
retval |= TEX_ERROR;
|
retval |= TEX_ERROR;
|
||||||
// get the line number:
|
// get the line number:
|
||||||
int line = 0;
|
int line = 0;
|
||||||
sscanf(tmp.c_str(), "l.%d", &line);
|
if (prefixIs(tmp, "l."))
|
||||||
|
sscanf(tmp.c_str(), "l.%d", &line);
|
||||||
// get the rest of the message:
|
// get the rest of the message:
|
||||||
string errstr(tmp, tmp.find(' '));
|
string errstr(tmp, tmp.find(' '));
|
||||||
errstr += '\n';
|
errstr += '\n';
|
||||||
|
24
src/buffer.C
24
src/buffer.C
@ -1299,9 +1299,31 @@ bool Buffer::writeFile(string const & fname, bool flag) const
|
|||||||
|
|
||||||
// Write marker that shows file is complete
|
// Write marker that shows file is complete
|
||||||
ofs << "\n\\the_end" << endl;
|
ofs << "\n\\the_end" << endl;
|
||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
|
|
||||||
// how to check if close went ok?
|
// how to check if close went ok?
|
||||||
return true;
|
// Following is an attempt... (BE 20001011)
|
||||||
|
|
||||||
|
// good() returns false if any error occured, including some
|
||||||
|
// formatting error.
|
||||||
|
// bad() returns true if something bad happened in the buffer,
|
||||||
|
// which should include file system full errors.
|
||||||
|
|
||||||
|
bool status = true;
|
||||||
|
if (!ofs.good()) {
|
||||||
|
status = false;
|
||||||
|
#if 0
|
||||||
|
if (ofs.bad()) {
|
||||||
|
lyxerr << "Buffer::writeFile: BAD ERROR!" << endl;
|
||||||
|
} else {
|
||||||
|
lyxerr << "Buffer::writeFile: NOT SO BAD ERROR!"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,6 +53,13 @@ static error_item errorTags[] = {
|
|||||||
static const int numErrorTags = sizeof(errorTags)/sizeof(error_item);
|
static const int numErrorTags = sizeof(errorTags)/sizeof(error_item);
|
||||||
|
|
||||||
|
|
||||||
|
Debug::type const Debug::ANY = Debug::type(
|
||||||
|
Debug::INFO | Debug::INIT | Debug::KEY |
|
||||||
|
Debug::PARSER | Debug::LYXRC | Debug::KBMAP | Debug::LATEX |
|
||||||
|
Debug::MATHED | Debug::FONT | Debug::TCLASS | Debug::LYXVC |
|
||||||
|
Debug::LYXSERVER | Debug::ROFF | Debug::ACTION | Debug::LYXLEX |
|
||||||
|
Debug::DEPEND | Debug::INSETS);
|
||||||
|
|
||||||
Debug::type Debug::value(string const & val)
|
Debug::type Debug::value(string const & val)
|
||||||
{
|
{
|
||||||
type l = Debug::NONE;
|
type l = Debug::NONE;
|
||||||
|
15
src/debug.h
15
src/debug.h
@ -55,13 +55,16 @@ struct Debug {
|
|||||||
INSETS = (1 << 17)
|
INSETS = (1 << 17)
|
||||||
};
|
};
|
||||||
///
|
///
|
||||||
static const type ANY = type(INFO | INIT | KEY | TOOLBAR |
|
// static const type ANY = type(INFO | INIT | KEY | TOOLBAR |
|
||||||
PARSER | LYXRC | KBMAP | LATEX |
|
// PARSER | LYXRC | KBMAP | LATEX |
|
||||||
MATHED | FONT | TCLASS | LYXVC |
|
// MATHED | FONT | TCLASS | LYXVC |
|
||||||
LYXSERVER | ROFF | ACTION | LYXLEX |
|
// LYXSERVER | ROFF | ACTION | LYXLEX |
|
||||||
DEPEND | INSETS);
|
// DEPEND | INSETS);
|
||||||
///
|
///
|
||||||
friend inline void operator|=(Debug::type & d1, Debug::type d2);
|
static type const ANY;
|
||||||
|
|
||||||
|
///
|
||||||
|
// friend inline void operator|=(Debug::type & d1, Debug::type d2);
|
||||||
|
|
||||||
/** A function to convert symbolic string names on debug levels
|
/** A function to convert symbolic string names on debug levels
|
||||||
to their numerical value.
|
to their numerical value.
|
||||||
|
@ -396,15 +396,14 @@ void LyXGUI::create_forms()
|
|||||||
fl_end_form();
|
fl_end_form();
|
||||||
|
|
||||||
// "default" is not part of the languages array any more.
|
// "default" is not part of the languages array any more.
|
||||||
combo_language->addto("default");
|
combo_language->addline("default");
|
||||||
combo_language2->addto(_("No change"));
|
combo_language2->addline(_("No change"));
|
||||||
combo_language2->addto(_("Reset"));
|
combo_language2->addline(_("Reset"));
|
||||||
for(Languages::const_iterator cit = languages.begin();
|
for(Languages::const_iterator cit = languages.begin();
|
||||||
cit != languages.end(); ++cit) {
|
cit != languages.end(); ++cit) {
|
||||||
combo_language->addto((*cit).second.lang.c_str());
|
combo_language->addto((*cit).second.lang.c_str());
|
||||||
combo_language2->addto((*cit).second.lang.c_str());
|
combo_language2->addto((*cit).second.lang.c_str());
|
||||||
}
|
}
|
||||||
combo_language2->select_text(_("No change"));
|
|
||||||
|
|
||||||
// not really necessary, but we can do it anyway.
|
// not really necessary, but we can do it anyway.
|
||||||
fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12");
|
fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12");
|
||||||
|
@ -687,7 +687,7 @@ string LyXFunc::Dispatch(int ac,
|
|||||||
|
|
||||||
// --- Misc -------------------------------------------
|
// --- Misc -------------------------------------------
|
||||||
case LFUN_EXEC_COMMAND:
|
case LFUN_EXEC_COMMAND:
|
||||||
owner->getMiniBuffer()->ExecCommand();
|
owner->getMiniBuffer()->PrepareForCommand();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_CANCEL: // RVDK_PATCH_5
|
case LFUN_CANCEL: // RVDK_PATCH_5
|
||||||
|
@ -1070,7 +1070,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
|
|||||||
|
|
||||||
//------- dummy actions
|
//------- dummy actions
|
||||||
case LFUN_EXEC_COMMAND:
|
case LFUN_EXEC_COMMAND:
|
||||||
bv->owner()->getMiniBuffer()->ExecCommand();
|
bv->owner()->getMiniBuffer()->PrepareForCommand();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -128,7 +128,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord,
|
|||||||
}
|
}
|
||||||
} else if (event == FL_PUSH) {
|
} else if (event == FL_PUSH) {
|
||||||
// This actually clears the buffer.
|
// This actually clears the buffer.
|
||||||
mini->ExecCommand();
|
mini->PrepareForCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -142,7 +142,7 @@ extern "C" int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MiniBuffer::ExecCommand()
|
void MiniBuffer::PrepareForCommand()
|
||||||
{
|
{
|
||||||
text.erase();
|
text.erase();
|
||||||
fl_set_input(the_buffer, "");
|
fl_set_input(the_buffer, "");
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Init();
|
void Init();
|
||||||
///
|
///
|
||||||
void ExecCommand();
|
void PrepareForCommand();
|
||||||
/** allows to store and reset the contents one time. Usefull
|
/** allows to store and reset the contents one time. Usefull
|
||||||
for status messages like "load font" (Matthias)
|
for status messages like "load font" (Matthias)
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user