]> git.lyx.org Git - features.git/commitdiff
Kayvan --export fix ; Angus toolbar fixes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 May 2001 15:38:24 +0000 (15:38 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 May 2001 15:38:24 +0000 (15:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1983 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C
src/BufferView.h
src/ChangeLog
src/LaTeX.C
src/ToolbarDefaults.C
src/ToolbarDefaults.h
src/WorkArea.h
src/insets/ChangeLog
src/insets/insettabular.C
src/insets/insettext.C
src/lyx_main.C

index 1baf3d769b1da8184528e04db95f2da85175e323..1c65105bf68ecd06256201ffe75e91af87ac3d99 100644 (file)
@@ -50,12 +50,6 @@ LyXScreen * BufferView::screen() const
 }
 
 
-WorkArea * BufferView::workarea() const
-{
-       return &pimpl_->workarea_;
-}
-
-
 LyXView * BufferView::owner() const
 {
        return pimpl_->owner_;
@@ -279,6 +273,12 @@ void BufferView::pasteClipboard(bool asPara)
 }
 
 
+string const BufferView::getClipboard() const
+{
+       return pimpl_->workarea_.getClipboard();
+}
+
+
 void BufferView::stuffClipboard(string const & stuff) const
 {
        pimpl_->stuffClipboard(stuff);
index 2d6f36e88a38a8231db2867b1ce04cf310d5b8f1..f4e45828c76b02b2982c4d9d5a18d339cc68b974 100644 (file)
@@ -55,8 +55,6 @@ public:
        ///
        LyXScreen * screen() const;
        ///
-       WorkArea * workarea() const;
-       ///
        void buffer(Buffer * b);
        ///
        void resize(int, int, int, int);
@@ -237,6 +235,8 @@ public:
        ///
        bool ChangeCitationsIfUnique(string const & from, string const & to);
        ///
+       string const getClipboard() const;
+       ///
        void pasteClipboard(bool asPara);
        ///
        void stuffClipboard(string const &) const;
index 997ab44d5d6071e6f13bd9549ccf40f3935736d1..bb8905069109fbd0580fa0f760988355ebfdca78 100644 (file)
@@ -1,3 +1,22 @@
+2001-04-28  Kayvan A. Sylvan  <kayvan@sylvan.com>
+       * LaTeX.C (run): Fix problem with --export code.
+2001-04-26  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * BufferView.[Ch] (workarea): removed.
+       (getClipboard) new method; wrapper for workarea()->getClipboard()
+
+       * ToolbarDefaults.C (read): removed final lex.next() command; it's a
+       bug.
+
+       * WorkArea.h (width, height, xpos, ypos): These methods all
+       returned the dimensions of the work_area sub-area of WorkArea,
+       resulting in a position error if the WorkArea were resized. Now
+       return the dimensions of the entire WorkArea.
+
+       * lyx_main.C (ReadUIFile): don't print out spurious warnings.
+
 2001-05-03  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * LaTeX.C (deplog): correct the syntax of regex reg1
index c40f17173f2e3fd4e5bed8b15197efef5a91393d..06e45c4c58671a397e208270b0fa23316b4c2f6d 100644 (file)
@@ -174,7 +174,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
 
        ++count;
        lyxerr[Debug::LATEX] << "Run #" << count << endl;
-       lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
+       if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
        
        //WriteStatus(lfun, string(_("LaTeX run number ")) + tostr(count));
        this->operator()();
@@ -209,7 +209,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
        if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
-               lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex."));
+               if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex."));
 //             WriteStatus(minib, _("Running MakeIndex."));
                rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")));
        }
@@ -222,7 +222,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                // tags is found -> run bibtex and set rerun = true;
                // no checks for now
                lyxerr[Debug::LATEX] << "Running BibTeX." << endl;
-               lfun->Dispatch(LFUN_MESSAGE, _("Running BibTeX."));
+               if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running BibTeX."));
                //WriteStatus(minib, _("Running BibTeX."));
                updateBibtexDependencies(head, bibtex_info);
                rerun |= runBibTeX(bibtex_info);
@@ -251,7 +251,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                        << "Dep. file has changed or rerun requested" << endl;
                lyxerr[Debug::LATEX]
                        << "Run #" << count << endl;
-               lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
+               if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
 //             WriteStatus(minib,
 //                         string(_("LaTeX run number ")) + tostr(count));
                this->operator()();
@@ -280,7 +280,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
        if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
-               lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex."));
+               if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex."));
                //WriteStatus(minib, _("Running MakeIndex."));
                rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")));
        }
@@ -302,7 +302,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                rerun = false;
                ++count;
                lyxerr[Debug::LATEX] << "Run #" << count << endl;
-               lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run numger") + ' ' + tostr(count));
+               if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run numger") + ' ' + tostr(count));
 //             WriteStatus(minib, string(_("LaTeX run number ")) + tostr(count));
                this->operator()();
                scanres = scanLogFile(terr);
index 9e8cc03a780656abc5f622fa2d3e18f765a0a28e..087ec6d65206d2b7340dc159da3786754f72427e 100644 (file)
@@ -111,14 +111,13 @@ void ToolbarDefaults::read(LyXLex & lex)
 
        if (lyxerr.debugging(Debug::PARSER))
                lex.printTable(lyxerr);
-       
-       while (lex.IsOK() && !quit) {
 
+       while (lex.IsOK() && !quit) {
                switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next()) {
                                func = lex.GetString();
-                               lyxerr[Debug::GUI]
+                               lyxerr[Debug::PARSER]
                                        << "Toolbar::read TO_ADD func: `"
                                        << func << "'" << endl;
                                add(func);
@@ -149,7 +148,6 @@ void ToolbarDefaults::read(LyXLex & lex)
                }
        }
        lex.popTable();
-       lex.next();
 }
 
 
index 2f98e4f1b626768786385274622d10fac16d4d8d..92b9dc8b0fcae6e558f585e97944ca667b364ff0 100644 (file)
@@ -79,4 +79,3 @@ extern ToolbarDefaults toolbardefaults;
 
 
 #endif
-
index dc3e26a5413d2bcd4fc5a4296c1b38f7e4787acd..1d757c021f9d4da38339f54697a9cd99408cf135 100644 (file)
@@ -35,13 +35,17 @@ public:
        ///
        int workWidth() const { return work_area->w; }
        ///
-       unsigned int width() const { return work_area->w + scrollbar->w; }
+       //unsigned int width() const { return work_area->w + scrollbar->w; }
+       unsigned int width() const { return backgroundbox->w + 15; }
        ///
-       unsigned int height() const { return work_area->h; }
+       //unsigned int height() const { return work_area->h; }
+       unsigned int height() const { return backgroundbox->h; }
        ///
-       int xpos() const { return work_area->x; }
+       //int xpos() const { return work_area->x; }
+       int xpos() const { return backgroundbox->x; }
        ///
-       int ypos() const { return work_area->y; }
+       //int ypos() const { return work_area->y; }
+       int ypos() const { return backgroundbox->y; }
        ///
        void resize(int xpos, int ypos, int width, int height);
        ///
index d2431d494e7efdc92e370ce5fa608696c14d9f02..ad41b1fd3511f9e3dc1c5427aa5eec7dcc53141c 100644 (file)
@@ -1,3 +1,9 @@
+2001-04-27  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * insettabular.C (LocalDispatch):
+       * insettext.C (LocalDispatch): getClipboard() is now a BufferView
+       method 
+
 2001-05-03  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * insettext.C: remvoe !NEW_INSETS cruft
index a3bced2cd7ec7b5503e7357c8e40bf76d5389d0b..73aaf52f8bb123741b2ecd47552cf02f214c5447 100644 (file)
@@ -954,7 +954,7 @@ InsetTabular::LocalDispatch(BufferView * bv,
                break;
        case LFUN_PASTESELECTION:
        {
-               string clip(bv->workarea()->getClipboard());
+               string clip(bv->getClipboard());
        
                if (clip.empty())
                        break;
index fa69c36dda4eef31bc893b2a3401cd0e327ede71..f570e72eeaa568133b7305d67079c8f1a7cec0cc 100644 (file)
@@ -959,7 +959,7 @@ InsetText::LocalDispatch(BufferView * bv,
                break;
        case LFUN_PASTESELECTION:
        {
-               string clip(bv->workarea()->getClipboard());
+               string clip(bv->getClipboard());
        
                if (clip.empty())
                        break;
index 5dd579923323246d3981354c4c4f07e1122dbb84..de3c9089fd2f431ddc6c81869c7a963f887a9e59 100644 (file)
@@ -658,8 +658,9 @@ void LyX::ReadUIFile(string const & name)
                        break;
 
                default:
-                       lex.printError("LyX::ReadUFile: "
-                                      "Unknown menu tag: `$$Token'");
+                       if(!strip(lex.GetString()).empty())
+                               lex.printError("LyX::ReadUIFile: "
+                                              "Unknown menu tag: `$$Token'");
                        break;
                }
        }