]> git.lyx.org Git - lyx.git/commitdiff
Update NEWS, fix a few buglets
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 18 Oct 2000 12:00:53 +0000 (12:00 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 18 Oct 2000 12:00:53 +0000 (12:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1137 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
NEWS
src/frontends/xforms/FormParagraph.C
src/lyxfunc.C
src/minibuffer.C

index 7136c99389029106a5b3ba1a6d8adadb9b1f0d0a..ccfb954b05f41ab73ac39a422df56fb8d48ed611 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,20 @@
+2000-10-18  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * NEWS: updated.
+
+2000-10-17  John Levon  <moz@compsoc.man.ac.uk>
+
+       * src/frontends/xforms/FormParagraph.C: more space above/below
+       fixes
+
+2000-10-17  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * 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  <Jean-Marc.Lasgouttes@inria.fr>
 
-       * 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 d18f1f0df3f9be001b1d6610c448c0b7fc1dd840..5c13c7a068a09043f7ca059d92c2a46e2fea15f1 100644 (file)
--- 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
index 8413b0dd7e8bee691201a05e9fd855dc29473e5e..43ab071378abd147164b1ba05a33b0c2cf2a4a0d 100644 (file)
@@ -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
     //
index f84201f8b302da067db32efd45a67ef47bc8da09..2cc20d2d7a5d6c1fbb3ddd97e157cf42195cc19e 100644 (file)
@@ -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
index 6ed6450a8fabfd93de40d41a514abec546ecc634..c6da1b797e773cf685658baff0180900d7ddbb0c 100644 (file)
@@ -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;