]> git.lyx.org Git - features.git/commitdiff
fix problem with nroff detection, remove dead code with old floats, bogus message...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 13 Jan 2002 13:07:27 +0000 (13:07 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 13 Jan 2002 13:07:27 +0000 (13:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3352 a592a061-630c-0410-9148-cb99ea01b6c8

12 files changed:
ChangeLog
lib/ChangeLog
lib/configure
lib/configure.m4
src/BufferView_pimpl.C
src/ChangeLog
src/LyXView.C
src/frontends/gnome/ChangeLog
src/insets/ChangeLog
src/insets/insettext.C
src/lyxfunc.C
src/lyxfunc.h

index ee33f1f804c1838368a5c0f9bd7dbdb238d77034..83dce7f7924f28201d8a6c44d6514bab2d72feeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,12 +7,6 @@
        * configure.in: remove test for -lpt on SCO. Hopefully it is not
        needed anymore. This fixes bug #137
 
-2001-11-29 Ben Stanley <bds02@uow.edu.au>
-
-       * src/LaTeX.C
-       * src/LaTeX.h Fixed bug in LaTeX class where it would not
-       re-run latex if no depfiles were changed, but the .dvi was removed.
-
 2001-11-28  John Levon  <moz@compsoc.man.ac.uk>
 
        * README: fix ghostscript comment
index db7fabbba1421f95bd7ee0a6e855ab56e168b159..479430bebd392ba33f88ef7fee4f666a0cc19b93 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-12  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * configure.m4: try to fix problem with groff detection
+
 2002-01-10  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * lyxrc.example: change the names of some variables in line with lyxrc.C
index 8b1c146ed8377a061501cfa2b3ee8fb02f70038f..bc348bd6d29f6da00c9bdd8176c221652d3fe2b5 100755 (executable)
@@ -729,7 +729,7 @@ if test -n "$ac_word"; then
 
   if test -n "$prog"; then
     ac_result=yes
-    test $prog = "nroff" && prog='tbl $$FName | nroff'
+    test "$prog" = "nroff" && prog='tbl $$FName | nroff'
   else
     ac_result=no
   fi
index ec4b104d752173b092ab341a3c4b5569821d56d9..a68db828059ce5c166eec8c641c815d8e07a3454 100644 (file)
@@ -269,7 +269,7 @@ test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i"
 # Search a *roff program (used to translate tables in ASCII export)
 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
   'groff -t -Tlatin1 $$FName' nroff,dnl
-  test $prog = "nroff" && prog='tbl $$FName | nroff')
+  test "$prog" = "nroff" && prog='tbl $$FName | nroff')
 
 # Search the ChkTeX program
 LYXRC_PROG([for ChkTeX], \chktex_command,dnl
index 220390374e5b8989bf4b948f6a9abfefda0a3c84..ca62780d4ab8ea23f7090fedbcc55bfa2bba6f40 100644 (file)
@@ -782,6 +782,8 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y,
 
        setState();
        owner_->showState();
+       owner_->updateMenubar();
+       owner_->updateToolbar();
 
        // Did we hit an editable inset?
        if (inset_hit) {
@@ -834,29 +836,6 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y,
                return;
        }
 
-#ifdef WITH_WARNINGS
-#warning variable c is set but never used. What is it good for?? (JMarc)
-#warning isnt this code dead ?? "open a float" ??? (jbl)
-#endif
-       // check whether we want to open a float
-       if (bv_->text) {
-               bool hit = false;
-               char c = ' ';
-               if (bv_->text->cursor.pos() <
-                   bv_->text->cursor.par()->size()) {
-                       c = bv_->text->cursor.par()->
-                               getChar(bv_->text->cursor.pos());
-               }
-                       if (bv_->text->cursor.pos() - 1 >= 0) {
-                       c = bv_->text->cursor.par()->
-                               getChar(bv_->text->cursor.pos() - 1);
-               }
-               if (hit == true) {
-                       selection_possible = false;
-                       return;
-               }
-       }
-
        // Maybe we want to edit a bibitem ale970302
        if (bv_->text->cursor.par()->bibkey && x < 20 + 
            bibitemMaxWidth(bv_, textclasslist.
index 0e26bc00367a00c7fe65ef3324a05cbdfe42cced..0b35b334fe53778bca2afa56215daec03b4fcf14 100644 (file)
@@ -1,3 +1,17 @@
+2002-01-13  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * BufferView_pimpl.C (workAreaButtonRelease): remove dead code (to
+       open a float)
+
+       * lyxfunc.C (setStatusMessage):
+       (getStatusMessage): new methods
+       (getStatus):use setStatusMessage instead of setErrorMessage
+       (dispatch): when function is disabled, set error message here
+       [instead of in getStatus previously]
+
+       * BufferView_pimpl.C (workAreaButtonRelease): update
+       toolbar/menubar here too.
+
 2002-01-13  Allan Rae  <rae@lyx.org>
 
        * BufferView2.C (removeAutoInsets): finished off earlier fix.
 
 2002-01-12  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
+       * lyxfunc.C (dispatch): update toolbar/menubar after dispatching. 
+
+       * LyXView.C (updateMenubar): call MenuBar::update here
+       (updateToolbar): but not here
+       (showState): do not update toolbar/menubar
+
        * LyXAction.[Ch]: move isPseudoAction to the C file, since nobody
        should need to care about that.
 
        (simpleDocBookOnePar): changed a PAR::META_INSET to isInset().
        Fixed a double write of labels.
        
+2001-11-29 Ben Stanley <bds02@uow.edu.au>
+
+       * LaTeX.C:
+       * LaTeX.h Fixed bug in LaTeX class where it would not
+       re-run latex if no depfiles were changed, but the .dvi was removed.
+
 2001-11-28  André Pönitz <poenitz@gmx.net>
 
        * all the files from the change on 2001/11/26:
index 5362a6e48e13711ff3dbcc8aade6a59103ae6e54..5b913c99ac8d2df2e997aff4c4494810fbc65b19 100644 (file)
@@ -111,7 +111,6 @@ void LyXView::setLayout(layout_type layout)
 void LyXView::updateToolbar()
 {
        toolbar->update();
-       menubar->update();
 }
 
 
@@ -158,6 +157,7 @@ void LyXView::updateMenubar()
                menubar->set("main_nobuffer");
        else
                menubar->set("main");
+       menubar->update();
 }
 
 
@@ -246,6 +246,4 @@ void LyXView::updateWindowTitle()
 void LyXView::showState()
 {
        message(currentState(view()));
-       getToolbar()->update();
-       menubar->update();
 }
index ef4c9ca862102b731043ac24fa70077ba8818cc4..e04b9a8599df67499d2d621007fd3eb46b2e1d68 100644 (file)
@@ -1,3 +1,12 @@
+2002-01-12  Michael A. Koziarski  <michael@koziarski.com>
+
+       * Menubar_pimpl.C
+       * Menubar_pimpl.h
+       * mainapp.h
+       * mainapp.C: Removed,  We should behave similarly to the qt2
+       frontend, so I've removed the LyXGnomified and menubar code.  The
+       menubar wasn't working properly anyway.
+
 2002-01-08  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * Menubar_pimpl.C (composeUIInfo): 
index 7fa91dc48c5f94882648a5593c8a9d328093b159..56493b7b4d6b939899f0bc0842732d6366ca1897 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-13  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * insettext.C (updateLocal): update menubar and toolbar here too.
+
 2002-01-13  Allan Rae  <rae@lyx.org>
 
        * insettabular.C (InsetTabular): Both constructors now initialise
index 2b44ae2cc506968b95443b5655f4aa94fc96e66d..61a0147063c199cfabfdef70d3463cbb8c8d5f65 100644 (file)
@@ -621,6 +621,8 @@ void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty) const
        if (need_update == CURSOR)
                need_update = NONE;
        bv->owner()->showState();
+       bv->owner()->updateMenubar();
+       bv->owner()->updateToolbar();
        if (old_par != cpar(bv)) {
                bv->owner()->setLayout(cpar(bv)->getLayout());
                old_par = cpar(bv);
index c76ebbdd9ccf82295d657bb4c23415bf1232df5d..ec2eb4513b839604d39bc7e5d625ff28b03f01a9 100644 (file)
@@ -354,7 +354,7 @@ FuncStatus LyXFunc::getStatus(kb_action action,
        Buffer * buf = owner->buffer();
        
        if (action == LFUN_UNKNOWN_ACTION) {
-               setErrorMessage(N_("Unknown action"));
+               setStatusMessage(N_("Unknown action"));
                return flag.unknown(true);
        }
        
@@ -368,12 +368,12 @@ FuncStatus LyXFunc::getStatus(kb_action action,
                            !lyxaction.funcHasFlag(action,
                                                   LyXAction::ReadOnly)) {
                                // no
-                               setErrorMessage(N_("Document is read-only"));
+                               setStatusMessage(N_("Document is read-only"));
                                flag.disabled(true);
                        }
                } else {
                        // no
-                       setErrorMessage(N_("Command not allowed with"
+                       setStatusMessage(N_("Command not allowed with"
                                           "out any document open"));
                        return flag.disabled(true);
                }
@@ -869,6 +869,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                       << lyxaction.getActionName(action)
                       << " [" << action << "] is disabled at this location"
                       << endl;
+               setErrorMessage(getStatusMessage());
                goto exit_with_message;
        }
 
@@ -884,36 +885,36 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                        // Undo/Redo is a bit tricky for insets.
                        if (action == LFUN_UNDO) {
                                owner->view()->menuUndo();
-                               return string();
+                               goto exit_with_message;
                        } else if (action == LFUN_REDO) {
                                owner->view()->menuRedo();
-                               return string();
+                               goto exit_with_message;
                        } else if (((result=owner->view()->theLockingInset()->
                                     localDispatch(owner->view(), action, argument)) ==
                                    UpdatableInset::DISPATCHED) ||
                                   (result == UpdatableInset::DISPATCHED_NOUPDATE))
-                               return string();
+                               goto exit_with_message;
                        else if (result == UpdatableInset::FINISHED) {
                                        if (TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
                                                TEXT()->cursorRight(owner->view());
                                                moveCursorUpdate(true, false);
                                                owner->showState();
                                        }
-                                       return string();
+                                       goto exit_with_message;
                        } else if (result == UpdatableInset::FINISHED_RIGHT) {
                                if (!TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
                                        TEXT()->cursorRight(owner->view());
                                        moveCursorUpdate(true, false);
                                        owner->showState();
                                }
-                               return string();
+                               goto exit_with_message;
                        } else if (result == UpdatableInset::FINISHED_UP) {
                                if (TEXT()->cursor.row()->previous()) {
                                        TEXT()->cursorUp(owner->view());
                                        moveCursorUpdate(true, false);
                                        owner->showState();
                                }
-                               return string();
+                               goto exit_with_message;
                        } else if (result == UpdatableInset::FINISHED_DOWN) {
                                if (TEXT()->cursor.row()->next())
                                        TEXT()->cursorDown(owner->view());
@@ -921,7 +922,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                        TEXT()->cursorRight(owner->view());
                                moveCursorUpdate(true, false);
                                owner->showState();
-                               return string();
+                               goto exit_with_message;
                        } else {
                                //setMessage(N_("Text mode"));
                                switch (action) {
@@ -938,14 +939,14 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                                moveCursorUpdate(true, false);
                                                owner->showState();
                                        }
-                                       return string();
+                                       goto exit_with_message;
                                case LFUN_LEFT: 
                                        if (TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
                                                TEXT()->cursorRight(owner->view());
                                                moveCursorUpdate(true, false);
                                                owner->showState();
                                        }
-                                       return string();
+                                       goto exit_with_message;
                                case LFUN_DOWN:
                                        if (TEXT()->cursor.row()->next())
                                                TEXT()->cursorDown(owner->view());
@@ -953,7 +954,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                                                TEXT()->cursorRight(owner->view());
                                        moveCursorUpdate(true, false);
                                        owner->showState();
-                                       return string();
+                                       goto exit_with_message;
                                default:
                                        break;
                                }
@@ -1632,7 +1633,9 @@ exit_with_message:
 
        if (!res.empty())
                owner->message(_(res));
-
+       owner->updateMenubar();
+       owner->updateToolbar();
+       
        return res;
 }
 
@@ -1965,12 +1968,18 @@ void LyXFunc::setErrorMessage(string const & m) const
 }
 
 
-void LyXFunc::setMessage(string const & m)
+void LyXFunc::setMessage(string const & m) const 
 {
        dispatch_buffer = m;
 }
 
 
+void LyXFunc::setStatusMessage(string const & m) const
+{
+       status_buffer = m;
+}
+
+
 void LyXFunc::initMiniBuffer() 
 {
        string text = _("Welcome to LyX!");
index c74eecf984f501baefde589ccfcece36e6231b1a..925984661542fbe4009b847a6ec30cf37ed63af0 100644 (file)
@@ -67,11 +67,15 @@ public:
         /// True if lyxfunc reports an error
         bool errorStat() const { return errorstat; }
         /// Buffer to store result messages
-        void setMessage(string const & m);
+        void setMessage(string const & m) const;
         /// Buffer to store result messages
         void setErrorMessage(string const &) const; 
+        /// Buffer to store result messages from getStatus
+        void setStatusMessage(string const &) const; 
         /// Buffer to store result messages
         string const getMessage() const { return dispatch_buffer; }
+        /// Buffer to store result messages
+        string const getStatusMessage() const { return status_buffer; }
        /// Handle a accented char keysequenze
        void handleKeyFunc(kb_action action);
 
@@ -101,6 +105,9 @@ private:
            good reason to have this one as static in Dispatch? (Ale)
        */
         mutable string dispatch_buffer;
+        /** Buffer to store messages and result data from getStatus
+       */
+        mutable string status_buffer;
        /// Command name and shortcut information
        string commandshortcut;