]> git.lyx.org Git - features.git/commitdiff
Changes to make RH-7.3 be able to run lyx.
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 4 Jul 2002 17:45:35 +0000 (17:45 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 4 Jul 2002 17:45:35 +0000 (17:45 +0000)
Also changes to make gcc 3.1 compiled lyx exit cleanly after
above changes.

Move operator== out out InsetCommandParams.

Change some signals in GraphicsImage to function instead.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4535 a592a061-630c-0410-9148-cb99ea01b6c8

21 files changed:
po/POTFILES.in
src/frontends/ChangeLog
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlBibtex.C
src/frontends/screen.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/XFormsView.C
src/frontends/xforms/XFormsView.h
src/frontends/xforms/XMiniBuffer.C
src/frontends/xforms/combox.C
src/frontends/xforms/lyx_gui.C
src/graphics/ChangeLog
src/graphics/GraphicsImage.C
src/graphics/GraphicsImage.h
src/insets/ChangeLog
src/insets/insetcommandparams.C
src/insets/insetcommandparams.h
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/formulabase.C

index 61ddad4474c536e9e57908de7b597c68464d21c2..b45b39034d429c2a51686446b06095ce4359f3ab 100644 (file)
@@ -8,7 +8,6 @@ src/converter.C
 src/CutAndPaste.C
 src/debug.C
 src/exporter.C
-src/ext_l10n.h
 src/FloatList.C
 src/frontends/controllers/biblio.C
 src/frontends/controllers/ButtonController.h
index 58eb2867a345ab19b4fedface1161f04ebb04a67..b911b35cc6eec99f7373d8035df13bc1ce591791 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * screen.C (SplashScreen): we change
+       (topCursorVisible): ws change
+       (greyOut): divide by 2 instead of multiplying with 0.5
+
 2002-07-02  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * Dialogs.h: remove static from redrawGUI and
index 7bd0b62f7c966dc5e02afad18e76ebf3e41099d9..6afca5d7da631d1453b5319c6a3d9c9f129bc243 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * ControlBibtex.C (applyParamsToInset): ws change
+
 2002-06-27  Juergen Spitzmueller <j.spitzmueller@gmx.de>
 
        * ControlInclude.C: Add warning if absolute path name and
index 9f8df298d69259484d12ce40f22a9d9d1fd046cd..832b86a4a1164dc69261ae90754206121c8f7bc9 100644 (file)
@@ -49,7 +49,7 @@ void ControlBibtex::applyParamsToInset()
 
        // We need to do a redraw because the maximum
        // InsetBibKey width could have changed
-#warning are you sure you need this repaint() ? 
+#warning are you sure you need this repaint() ?
        lv_.view()->repaint();
        lv_.view()->fitCursor();
 }
index 6f874d9f799fb7f904966357ec12e970bf30f777..31220bf0f7dfce598c752c2358895c3c9c729c30 100644 (file)
@@ -94,8 +94,8 @@ SplashScreen::SplashScreen()
        loader_.reset(file);
        // We aren't interested here in when the image is loaded.
        // If it isn't ready when we want it, then we ignore it.
-//     loader_->statusChanged.connect(
-//                     boost::bind(&SplashScreen::statusChanged, this));
+//     loader_->statusChanged.connect(
+//                     boost::bind(&SplashScreen::statusChanged, this));
        if (loader_.status() == grfx::WaitingToLoad)
                loader_.startLoading();
 }
@@ -189,8 +189,7 @@ unsigned int LyXScreen::topCursorVisible(LyXCursor const & cursor, int top_y)
        if (!row)
                return max(newtop, 0);
 
-       if (cursor.y() - row->baseline() + row->height()
-           - top_y >= vheight) {
+       if (cursor.y() - row->baseline() + row->height() - top_y >= vheight) {
                if (row->height() < vheight
                    && row->height() > vheight / 4) {
                        newtop = cursor.y()
@@ -381,14 +380,14 @@ void LyXScreen::greyOut()
                int const w = splash_image->getWidth();
                int const h = splash_image->getHeight();
 
-               int x = 0.5 * (workarea().workWidth() - w);
-               int y = 0.5 * (workarea().workHeight() - h);
+               int x = (workarea().workWidth() - w) / 2;
+               int y = (workarea().workHeight() - h) / 2;
 
                workarea().getPainter().image(x, y, w, h, *splash_image);
 
                string const & splash_text  = splash.text();
                LyXFont const & splash_font = splash.font();
-               
+
                x += 260;
                y += 265;
 
index 34bfff30e6eec3914acc6dfefca479ccbd5fad12..d173b53e3d57dbd0c8032e8a030590a82b9132ab 100644 (file)
@@ -1,13 +1,31 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * lyx_gui.C (init_graphics): boost::function assign, not
+       boost::signal connect.
+
+       * combox.C (Combox): what remove does is now done implicitly from
+       XFormsView destructor.
+
+       * XMiniBuffer.C (peek_event): comment last arg to avoid warning.
+
+       * XFormsView.h: form_ is now a raw pointer not a scoped_ptr.
+
+       * XFormsView.C (XFormsView): hide and free form_
+       (getForm): raw pointer return
+       (create_form_form_main): raw pointer set
+
+       * Toolbar_pimpl.C (toolbarItem): whet clean does is now done
+       implicitly from XFormsView destructor.
 
 2002-07-04  André Pönitz <poenitz@gmx.net>
 
        * FormInset.[Ch]: reduce #include depencies
-       
+
        * guiapi.C: suppress compiler warning
 
 2002-06-27  Juergen Spitzmueller <j.spitzmueller@gmx.de>
 
-       * FormInclude.C: Comment out unneeded and wrong update mechanism 
+       * FormInclude.C: Comment out unneeded and wrong update mechanism
        (related to bug #459)
        *forms/form_include.fd: define missing callbacks (bug #459)
 
index 6aee2b1f6c86d138b9fa9ce1206e25e4e38d635c..25304f9d4efeb6aa177d495504d01ee998649b63 100644 (file)
@@ -53,7 +53,9 @@ Toolbar::Pimpl::toolbarItem::toolbarItem()
 
 Toolbar::Pimpl::toolbarItem::~toolbarItem()
 {
-       clean();
+       // It seems that now this is taken care of
+       // in the XFormsView destructor. (Lgb)
+       // clean();
 }
 
 
index 8fec911401d15e5bc52e4a3fc8fd696463bf990c..a8f7a5e5ee2051d8ce6dfd558407c4e1d952a1c8 100644 (file)
@@ -72,7 +72,11 @@ XFormsView::XFormsView(int width, int height)
 }
 
 
-XFormsView::~XFormsView() {}
+XFormsView::~XFormsView()
+{
+       fl_hide_form(form_);
+       fl_free_form(form_);
+}
 
 
 /// Redraw the main form.
@@ -88,7 +92,7 @@ void XFormsView::redraw()
 
 FL_FORM * XFormsView::getForm() const
 {
-       return form_.get();
+       return form_;
 }
 
 
@@ -133,7 +137,7 @@ void XFormsView::create_form_form_main(Dialogs & dia, int width, int height)
         */
 {
        // the main form
-       form_.reset(fl_bgn_form(FL_NO_BOX, width, height));
+       form_ = fl_bgn_form(FL_NO_BOX, width, height);
        getForm()->u_vdata = this;
        FL_OBJECT * obj = fl_add_box(FL_FLAT_BOX, 0, 0, width, height, "");
        fl_set_object_color(obj, FL_MCOL, FL_MCOL);
index de236a5422dc4e6a60f352a6961b8c62c9c7a812..32242db532081f0eb92f6247645d4c91cfb6ddda 100644 (file)
@@ -65,6 +65,6 @@ private:
        /// makes the main form.
        void create_form_form_main(Dialogs & d, int width, int height);
        /// the main form.
-       boost::scoped_ptr<FL_FORM> form_;
+       FL_FORM * form_;
 };
 #endif
index ee8160cfcd9ad97ea5e5bf9da8200eb65c9c9a51..b516d103f64d5e41faaff543bede0be5d39adf0a 100644 (file)
@@ -75,14 +75,15 @@ XMiniBuffer::~XMiniBuffer()
 }
 
 
-int XMiniBuffer::peek_event(FL_OBJECT * ob, int event, int key, XEvent * xev)
+int XMiniBuffer::peek_event(FL_OBJECT * ob, int event,
+                           int key, XEvent * /*xev*/)
 {
 #if 0
        if (dropdown_->isVisible()) {
                return dropdown_->peek(xev);
        }
 #endif
-       
+
        switch (event) {
        case FL_UNFOCUS:
                messageMode();
@@ -98,7 +99,7 @@ int XMiniBuffer::peek_event(FL_OBJECT * ob, int event, int key, XEvent * xev)
                        char const * tmp = fl_get_input(ob);
                        input = tmp ? tmp : "";
                }
-                 
+
 
                switch (key) {
                case XK_Down:
index d181c92061f3ca3a4a75faac3c5770caf85fa607..fa7a53175590ae209669c8083182bbaad454b058 100644 (file)
@@ -84,7 +84,8 @@ Combox::Combox(combox_type t)
 
 Combox::~Combox()
 {
-   remove();
+       // This is now handled by the XFormsView destructor (Lgb)
+       // remove();
 }
 
 
index 044dfada970c5873acf70d5b6f870969f8fcddd2..207a33bcc807358aefbb90c9a411b394bd1a543c 100644 (file)
@@ -300,11 +300,11 @@ void lyx_gui::init_graphics()
 
 #ifdef USE_XFORMS_IMAGE_LOADER
        // connect the image loader based on the xforms library
-       Image::newImage.connect(boost::bind(&xformsImage::newImage));
-       Image::loadableFormats.connect(boost::bind(&xformsImage::loadableFormats));
+       Image::newImage = boost::bind(&xformsImage::newImage);
+       Image::loadableFormats = boost::bind(&xformsImage::loadableFormats);
 #else
        // connect the image loader based on the XPM library
-       Image::newImage.connect(boost::bind(&ImageXPM::newImage));
-       Image::loadableFormats.connect(boost::bind(&ImageXPM::loadableFormats));
+       Image::newImage = boost::bind(&ImageXPM::newImage);
+       Image::loadableFormats = boost::bind(&ImageXPM::loadableFormats);
 #endif
 }
index 3f4056bce54a0ab07695fc5dd559da04089616a5..458889a557272badfe0b28338bbc85ebdebd438f 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * GraphicsImage.[Ch]: newImage and loadableFormats changed to
+       boost::function from boost::signal.
+
 2002-07-01  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * GraphicsConverter.C (convert): do not use ChangeExtension
@@ -19,7 +24,7 @@
        grfx::Converter now represents a single conversion process.
        Thus grfx::CachItem now has a grfx::Converter * that is set when the
        conversion is initiated and destroyed on completion.
-       
+
        * GraphicsCache.[Ch]:
        * GraphicsCacheItem.[Ch]:
        * GraphicsConverter.[Ch]:
@@ -29,7 +34,7 @@
        so not only should we have a clean, minimal and well documented
        interface to these classes in the header files, but the class internals
        should be much clearer too.
-       
+
        * Renamed classes
        grfx::GCache -> grfx::Cache,
        grfx::GCacheItem -> grfx::CacheItem,
 
 2002-06-17  Herbert Voss  <voss@lyx.org>
 
-       * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a 
+       * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
        default when nothing different was found
-       (convertToDisplayFormat): handle zipped files in the right way and 
-       choose always convert as a default converter when no other 
+       (convertToDisplayFormat): handle zipped files in the right way and
+       choose always convert as a default converter when no other
        userdefined was found
-       
+
        * GraphicsConverter.C: add more lyxerr comments and choose
        convert when no other userdefined converter was found
-               
+
 2002-06-10  Herbert Voss  <voss@lyx.org>
 
        * GraphicsImageXPM.C (convertTo7chars): get another special color
 2002-06-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * GraphicsCache.C: use right colormap incantation
+
 2002-06-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * GraphicsCache.C: use lyx_gui namespace
 
        * GraphicsImageXPM.C: back down to using xforms
          directly again
+
 2002-06-07  Angus Leeming  <leeming@lyx.org>
 
        Fixes needed to compile with Compaq cxx 6.5.
        * GraphicsConverter.h: forward declare class ConvProcess.
 
-       * GraphicsImageXPM.C: 
+       * GraphicsImageXPM.C:
        all c-library variables have been moved into namespace std.
        Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
 
index a87ad49a5540a48433592ee93be88d40da949bb5..8ef312666c43b0557ee56439ec384add5f267cb6 100644 (file)
@@ -20,10 +20,11 @@ namespace grfx {
 
 // This is to be connected to a function that will return a new
 // instance of a viable derived class.
-boost::signal0<Image::ImagePtr> Image::newImage;
+boost::function0<Image::ImagePtr> Image::newImage;
 
 /// Return the list of loadable formats.
-boost::signal0<Image::FormatList> Image::loadableFormats;
+boost::function0<Image::FormatList> Image::loadableFormats;
+
 
 std::pair<unsigned int, unsigned int>
 Image::getScaledDimensions(Params const & params) const
index 5c9077679373d9370f190bf757f87ffca67c927c..3a03523b808a84dbb2cc2936d4086088fa9ebf5d 100644 (file)
@@ -25,7 +25,7 @@
 #include "LString.h"
 
 #include <boost/shared_ptr.hpp>
-#include <boost/signals/signal0.hpp>
+#include <boost/function/function0.hpp>
 #include <boost/signals/signal1.hpp>
 
 #include <X11/X.h> // for Pixmap :-(
@@ -48,12 +48,12 @@ public:
         */
        typedef boost::shared_ptr<Image> ImagePtr;
        ///
-       static boost::signal0<ImagePtr> newImage;
+       static boost::function0<ImagePtr> newImage;
 
        /// Return the list of loadable formats.
        typedef std::vector<string> FormatList;
        ///
-       static boost::signal0<FormatList> loadableFormats;
+       static boost::function0<FormatList> loadableFormats;
 
        /// Must define default c-tor explicitly as we define a copy c-tor.
        Image() {}
index 0373696c39eda58ad65c471d7f766a7a222e4d35..a2e272ba89bf2b7be7bdb21822fe17446be13d6b 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * insetcommandparams.[Ch] (operator=): move out of class
+       (operator!): move out of class
 
 2002-07-04  André Pönitz <poenitz@gmx.net>
 
index 93a3070d49c27a759653c2464fec2b97881d789b..d3879d0ae036e60acad6d8057f2983c2ec585dfb 100644 (file)
 #include "lyxlex.h"
 #include "debug.h"
 
+#include "support/LOstream.h"
+
+using std::ostream;
+using std::endl;
+
 
 InsetCommandParams::InsetCommandParams()
 {}
@@ -58,19 +63,6 @@ void InsetCommandParams::setFromString(string const & b)
 }
 
 
-bool InsetCommandParams::operator==(InsetCommandParams const & o) const
-{
-       return cmdname == o.cmdname && contents == o.contents
-               && options == o.options;
-}
-
-
-bool InsetCommandParams::operator!=(InsetCommandParams const & o) const
-{
-       return !(*this == o);
-}
-
-
 void InsetCommandParams::scanCommand(string const & cmd)
 {
        string tcmdname, toptions, tcontents;
@@ -172,3 +164,18 @@ string const InsetCommandParams::getCommand() const
        return s;
 }
 
+
+bool operator==(InsetCommandParams const & o1,
+               InsetCommandParams const & o2)
+{
+       return o1.getCmdName() == o2.getCmdName()
+               && o1.getContents() == o2.getContents()
+               && o1.getOptions() == o2.getOptions();
+}
+
+
+bool operator!=(InsetCommandParams const & o1,
+               InsetCommandParams const & o2)
+{
+       return !(o1 == o2);
+}
index 90bb0eb56ae4a64564225948a960c60c6dc6755c..b6c3b75dedf04973b897765b06ce1b0485c2afdd 100644 (file)
@@ -33,10 +33,6 @@ public:
                            string const & c = string(),
                            string const & o = string());
        ///
-       bool operator==(InsetCommandParams const &) const;
-       ///
-       bool operator!=(InsetCommandParams const &) const;
-       ///
        void read(LyXLex &);
        /// Parse the command
        void scanCommand(string const &);
@@ -70,4 +66,12 @@ private:
 };
 
 
+///
+bool operator==(InsetCommandParams const &,
+               InsetCommandParams const &);
+
+///
+bool operator!=(InsetCommandParams const &,
+               InsetCommandParams const &);
+
 #endif
index d40bf7117e8f7d186ed42eb7e8c642468a0d5893..6e18e2cce528491711214c667522129a708f593c 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * formulabase.C: ws changes
+       * formula.C: ws changes
+
 2002-07-01  Geof Piroux
 
        * math_ex*.[Ch] et al: support for Mathematica as CAS backend
 2002-06-24  André Pönitz <poenitz@gmx.net>
 
        * *.[Ch]: left over changes from Porto
-       
+
        * math_gridinset.C (eolString): fix #456
 
 2002-06-21  John Levon  <moz@compsoc.man.ac.uk>
 
        * formula.C: use repaint()
+
 2002-06-16  André Pönitz <poenitz@gmx.net>
 
        * math_factory.C:
index a6c0b602018d1942208792fcdc2a17c6e4868572..466c9fe241e8872e2f217719fc1b162292eb4465 100644 (file)
@@ -76,7 +76,7 @@ InsetFormula::InsetFormula(string const & data)
 {
        if (!data.size())
                return;
-       if (!mathed_parse_normal(par_, data)) 
+       if (!mathed_parse_normal(par_, data))
                lyxerr << "cannot interpret '" << data << "' as math\n";
 }
 
@@ -279,7 +279,7 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action,
                        }
 
 #warning FIXME: please check you really mean repaint() ... is it needed,
-#warning and if so, should it be update() instead ? 
+#warning and if so, should it be update() instead ?
                        if (!new_label.empty() && bv->ChangeRefsIfUnique(old_label, new_label))
                                bv->repaint();
 
@@ -382,7 +382,7 @@ bool InsetFormula::insetAllowed(Inset::Code code) const
 {
        return
                (code == Inset::LABEL_CODE && display())
-               || code == Inset::REF_CODE      
+               || code == Inset::REF_CODE
                || code == Inset::ERT_CODE;
 }
 
@@ -440,7 +440,7 @@ void InsetFormula::statusChanged()
 {
        lyxerr << "### InsetFormula::statusChanged called!, status: "
                << loader_->status() << "\n";
-       if (loader_->status() == grfx::Ready) 
+       if (loader_->status() == grfx::Ready)
                view()->updateInset(this, false);
        else if (loader_->status() == grfx::WaitingToLoad)
                loader_->startLoading();
@@ -454,7 +454,7 @@ void InsetFormula::updatePreview()
        if (!lyxrc.preview)
                return;
 
-       // get LaTeX 
+       // get LaTeX
        ostringstream ls;
        WriteStream wi(ls, false, false);
        par_->write(wi);
@@ -505,4 +505,3 @@ void InsetFormula::updatePreview()
        loader_->startLoading();
        loader_->statusChanged.connect(boost::bind(&InsetFormula::statusChanged, this));
 }
-
index 93bc456b65c9ffe1c4db57ada990d0766147a740..d3b03a8a1d046eae2274167658459b3d3cfd06e0 100644 (file)
@@ -1030,7 +1030,7 @@ void mathDispatchInsertMatrix(BufferView * bv, string const & arg)
        if (!bv->available())
                return;
        InsetFormula * f = new InsetFormula(bv);
-       if (openNewInset(bv, f)) { 
+       if (openNewInset(bv, f)) {
                f->mutate("simple");
                bv->theLockingInset()->localDispatch(bv, LFUN_INSERT_MATRIX, arg);
        }