From db3729a059e13654643e432b250b95e6fbb66dbb Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 18 Oct 2000 12:00:53 +0000 Subject: [PATCH] Update NEWS, fix a few buglets git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1137 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 16 +++++++- NEWS | 13 ++++--- src/frontends/xforms/FormParagraph.C | 58 +++++++++++++--------------- src/lyxfunc.C | 17 +++++--- src/minibuffer.C | 1 + 5 files changed, 62 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7136c99389..ccfb954b05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,20 @@ +2000-10-18 Jean-Marc Lasgouttes + + * NEWS: updated. + +2000-10-17 John Levon + + * src/frontends/xforms/FormParagraph.C: more space above/below + fixes + +2000-10-17 Dekel Tsur + + * src/lyxfunc.C (Dispatch): Call to showState() after insertion of + a char only if real_current_font was changed. + 2000-10-17 Jean-Marc Lasgouttes - * NEWS: update somehow for 1.1.6 + * NEWS: update somewhat for 1.1.6 * lib/ui/default.ui: clean up. diff --git a/NEWS b/NEWS index d18f1f0df3..5c13c7a068 100644 --- a/NEWS +++ b/NEWS @@ -33,20 +33,20 @@ Other major changes in 1.1.6 include: - the table support has been completely rewritten. It is now a modular object (inset) which owns for each cell a (also) newly written text - inset. This permits now to have automatic text-wrap inside a tabular + inset. This now permits automatic text-wrap inside a tabular cell (if you define a width), multiparagraph mode AND setting of layouts for the paragraphs (lists inside a tabular cell!). Last but - not least, wide tabulars now scroll automatically so that all of it + not least, a wide tabular now scroll automatically so that all of it is visible without the need to enlarge the window! While there are yet no other new features, they will be now MUCH easier to add. It may be that because of being "young" code some - features may not work right now, but at least you can use this much + features may not work right now, but at least it is much better than before. - new external material inset: this is a new kind of very powerful inset which will allow LyX to interface intelligently with external - applications. Among other good things, it will allow you to finally + applications. Among other good things, it will finally allow you to include GIF, JPEG, TIF, PNG, or just about any other raster format images in your document. It will even do an approximate ascii rendering when you do Ascii export if you have gifscii installed. @@ -55,9 +55,10 @@ Other major changes in 1.1.6 include: viewing or exporting purpose) has been rewritten. In particular, the PDF format is now supported [Dekel, details?] -- DocBook improvements [José, details?] +- included files work now with docbook and linuxdoc. + New layout docbook-book. -And finally, there has been a lot of smaller changes, which are +And finally, there have been a lot of smaller changes, which are mentioned here for your information - the menu entry File->New does not prompt for a file name by default diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 8413b0dd7e..43ab071378 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -547,17 +547,17 @@ bool FormParagraph::input(FL_OBJECT * ob, long) // // "Synchronize" the choices and input fields, making it // impossible to commit senseless data. - if (ob == general_->choice_space_above) { - if (fl_get_choice (general_->choice_space_above) != 7) - fl_set_input (general_->input_space_above, ""); - } else if (ob == general_->choice_space_below) { - if (fl_get_choice (general_->choice_space_below) != 7) - fl_set_input (general_->input_space_below, ""); - } + + if (fl_get_choice (general_->choice_space_above) != 7) + fl_set_input (general_->input_space_above, ""); + + if (fl_get_choice (general_->choice_space_below) != 7) + fl_set_input (general_->input_space_below, ""); + // // then the extra form // - else if (ob == extra_->radio_pextra_indent) { + if (ob == extra_->radio_pextra_indent) { int n = fl_get_button(extra_->radio_pextra_indent); if (n) { fl_set_button(extra_->radio_pextra_minipage, 0); @@ -648,32 +648,28 @@ bool FormParagraph::input(FL_OBJECT * ob, long) // first the general form // string input = fl_get_input (general_->input_space_above); + bool invalid = false; - if (input.empty()) { - fl_set_choice (general_->choice_space_above, 1); - } else if (isValidGlueLength (input)) { - fl_set_choice (general_->choice_space_above, 7); - } else { - fl_set_choice (general_->choice_space_above, 7); - fl_set_object_label(dialog_->text_warning, - _("Warning: Invalid Length (valid example: 10mm)")); - fl_show_object(dialog_->text_warning); - ret = false; - } - + if (fl_get_choice(general_->choice_space_above)==7) + invalid = !input.empty() && !isValidGlueLength(input); + input = fl_get_input (general_->input_space_below); - - if (input.empty()) { - fl_set_choice (general_->choice_space_below, 1); - } else if (isValidGlueLength(input)) { - fl_set_choice (general_->choice_space_below, 7); - } else { - fl_set_choice (general_->choice_space_below, 7); - fl_set_object_label(dialog_->text_warning, - _("Warning: Invalid Length (valid example: 10mm)")); - fl_show_object(dialog_->text_warning); - ret = false; + + if (fl_get_choice(general_->choice_space_below)==7) + invalid = invalid || (!input.empty() && !isValidGlueLength(input)); + + if (ob == general_->input_space_above || ob == general_->input_space_below) { + if (invalid) { + fl_set_object_label(dialog_->text_warning, + _("Warning: Invalid Length (valid example: 10mm)")); + fl_show_object(dialog_->text_warning); + return false; + } else { + fl_hide_object(dialog_->text_warning); + return true; + } } + // // then the extra form // diff --git a/src/lyxfunc.C b/src/lyxfunc.C index f84201f8b3..2cc20d2d7a 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -2886,6 +2886,7 @@ string const LyXFunc::Dispatch(int ac, case LFUN_SELFINSERT: { + LyXFont old_font(owner->view()->text->real_current_font); for (string::size_type i = 0; i < argument.length(); ++i) { owner->view()->text->InsertChar(owner->view(), argument[i]); // This needs to be in the loop, or else we @@ -2895,8 +2896,11 @@ string const LyXFunc::Dispatch(int ac, owner->view()->text->sel_cursor = owner->view()->text->cursor; moveCursorUpdate(false); - owner->showState(); // current_font.number can change - // so we need to update the minibuffer + + // real_current_font.number can change so we need to + // update the minibuffer + if (old_font != owner->view()->text->real_current_font) + owner->showState(); } break; @@ -3017,7 +3021,7 @@ string const LyXFunc::Dispatch(int ac, } owner->view()->beforeChange(); - + LyXFont old_font(owner->view()->text->real_current_font); for (string::size_type i = 0; i < argument.length(); ++i) { if (greek_kb_flag) { @@ -3032,8 +3036,11 @@ string const LyXFunc::Dispatch(int ac, owner->view()->text->sel_cursor = owner->view()->text->cursor; moveCursorUpdate(false); - owner->showState(); // current_font.number can change - // so we need to update the minibuffer + + // real_current_font.number can change so we need to + // update the minibuffer + if (old_font != owner->view()->text->real_current_font) + owner->showState(); return string(); } else { // why is an "Unknown action" with empty diff --git a/src/minibuffer.C b/src/minibuffer.C index 6ed6450a8f..c6da1b797e 100644 --- a/src/minibuffer.C +++ b/src/minibuffer.C @@ -129,6 +129,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord, } else if (event == FL_PUSH) { // This actually clears the buffer. mini->PrepareForCommand(); + return 1; } return 0; -- 2.39.2