]> git.lyx.org Git - lyx.git/commitdiff
2002-07-02 Lars Gullik Bj�nnes <larsbj@birdstep.com>
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 2 Jul 2002 19:23:10 +0000 (19:23 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 2 Jul 2002 19:23:10 +0000 (19:23 +0000)
Dialogs.h: remove static from redrawGUI and
toggleTooltips.

And changes because of this.

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

82 files changed:
src/frontends/ChangeLog
src/frontends/Dialogs.C
src/frontends/Dialogs.h
src/frontends/Toolbar.C
src/frontends/Toolbar.h
src/frontends/controllers/ControlConnections.C
src/frontends/controllers/GUI.h
src/frontends/lyx_gui.h
src/frontends/xforms/FileDialog.C
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/FormAboutlyx.h
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibitem.h
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBibtex.h
src/frontends/xforms/FormBrowser.C
src/frontends/xforms/FormBrowser.h
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormCharacter.h
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCitation.h
src/frontends/xforms/FormERT.C
src/frontends/xforms/FormERT.h
src/frontends/xforms/FormError.C
src/frontends/xforms/FormError.h
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormExternal.h
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormFiledialog.h
src/frontends/xforms/FormFloat.C
src/frontends/xforms/FormFloat.h
src/frontends/xforms/FormForks.C
src/frontends/xforms/FormForks.h
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormInclude.h
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormIndex.h
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormLog.h
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/FormMinipage.h
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormParagraph.h
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormPreamble.h
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormPrint.h
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormRef.h
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormSearch.h
src/frontends/xforms/FormSendto.C
src/frontends/xforms/FormSendto.h
src/frontends/xforms/FormShowFile.C
src/frontends/xforms/FormShowFile.h
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/FormSpellchecker.h
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormTabularCreate.h
src/frontends/xforms/FormTexinfo.C
src/frontends/xforms/FormTexinfo.h
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/FormThesaurus.h
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormToc.h
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormUrl.h
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/FormVCLog.h
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/Toolbar_pimpl.h
src/frontends/xforms/Tooltips.C
src/frontends/xforms/Tooltips.h
src/frontends/xforms/XFormsView.C
src/frontends/xforms/XFormsView.h
src/frontends/xforms/lyx_gui.C

index 0453379efe7f798431ce69ea2fe2f86fea074966..58eb2867a345ab19b4fedface1161f04ebb04a67 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-02  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * Dialogs.h: remove static from redrawGUI and
+       toggleTooltips.
+
 2002-06-28  Angus Leeming  <leeming@lyx.org>
 
        * Painter.h:
index 41fcf70ca6f3dc796ea632b18187412cedb70ba2..6b6abb0e830b39aff0068654b837e77c316efc39 100644 (file)
 
 // Signal enabling all visible dialogs to be redrawn if so desired.
 // E.g., when the GUI colours have been remapped.
-boost::signal0<void> Dialogs::redrawGUI;
+//boost::signal0<void> Dialogs::redrawGUI;
 
 extern LyXView * dialogs_lyxview;
 
 
 // toggle tooltips on/off in all dialogs.
-boost::signal0<void> Dialogs::toggleTooltips;
+//boost::signal0<void> Dialogs::toggleTooltips;
 
 void Dialogs::showAboutlyx()
 {
index b031c0940877926fdc974a46abf2fd4a2256c66a..7e575eda799ad407e425e9f49dd4649eedf1b57b 100644 (file)
@@ -66,10 +66,10 @@ public:
 
        /** Redraw all visible dialogs because, for example, the GUI colours
            have been re-mapped. */
-       static boost::signal0<void> redrawGUI;
+       boost::signal0<void> redrawGUI;
 
        /// Toggle tooltips on/off in all dialogs.
-       static boost::signal0<void> toggleTooltips;
+       boost::signal0<void> toggleTooltips;
 
        /// Are the tooltips on or off?
        static bool tooltipsEnabled();
index a86608677187fab2692ca73695cf14ec3a833390..01c4acf9a8ac5aff11f45de67871cd40b26a359c 100644 (file)
@@ -23,10 +23,11 @@ using std::endl;
 extern LyXAction lyxaction;
 
 
-Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
+Toolbar::Toolbar(LyXView * o, Dialogs & d,
+                int x, int y, ToolbarDefaults const &tbd)
        : last_textclass_(-1)
 {
-       pimpl_ = new Pimpl(o, x, y);
+       pimpl_ = new Pimpl(o, d, x, y);
 
        pimpl_->reset();
 
index 3558f73121ed500e851f5064e3e18a4b720bab42..40985bedafd0d50115dfdf4622780798e4e9494c 100644 (file)
@@ -22,6 +22,7 @@
 
 class LyXView;
 class ToolbarDefaults;
+class Dialogs;
 
 /** The LyX GUI independent toolbar class
   The GUI interface is implemented in the corresponding Toolbar_pimpl class.
@@ -29,7 +30,8 @@ class ToolbarDefaults;
 class Toolbar {
 public:
        ///
-       Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
+       Toolbar(LyXView * o, Dialogs & d,
+               int x, int y, ToolbarDefaults const &);
 
        ///
        ~Toolbar();
@@ -55,8 +57,8 @@ public:
 
        /// update the layout combox
        void setLayout(string const & layout);
-       /** 
-        * Populate the layout combox - returns whether we did a full 
+       /**
+        * Populate the layout combox - returns whether we did a full
         * update or not
         */
        bool updateLayoutList(int textclass);
index 24dd8a3cfb6d8d1ff1463fde498458dee8d6357d..5a5778ad1d60fe7997242e81973bb8aa678787c4 100644 (file)
@@ -33,7 +33,7 @@ ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
 
 void ControlConnectBase::connect()
 {
-       r_ = Dialogs::redrawGUI.
+       r_ = d_.redrawGUI.
                connect(boost::bind(&ControlConnectBase::redraw, this));
 }
 
index 80348161550e8ddc8c980d274394ddd333464685..6a93661c911a0b6b314508350d5b9f41eb05d748 100644 (file)
@@ -20,7 +20,7 @@ template <class Controller, class GUIview, class Policy, class GUIbc>
 class GUI : public Controller {
 public:
        ///
-       GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
+       GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this, d) {}
        ///
        virtual ButtonControllerBase & bc() { return bc_; }
        ///
index 7d622ab6500e9cfdba207c963241e700a2ea8e99..83b674d90e713160d907e344940720837b18f3fb 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /**
  * \file lyx_gui.h
  * Copyright 2002 the LyX Team
@@ -8,22 +9,24 @@
 
 #ifndef LYX_GUI_H
 #define LYX_GUI_H
+
 #include <config.h>
+
 #include "LString.h"
+
 #include <vector>
+
+class Dialogs;
+
 /// GUI interaction
 namespace lyx_gui {
+
        /// parse command line and do basic initialisation
        void parse_init(int & argc, char * argv[]);
-        
+
        /**
         * set up GUI parameters. At this point lyxrc may
-        * be used. 
+        * be used.
         */
        void parse_lyxrc();
 
index bdbf6cde4a9287351e33b1e370adac7ad6671379..0678fd7472d9c25af05102011bb532973658ef78 100644 (file)
@@ -33,7 +33,7 @@ using std::endl;
 FileDialog::FileDialog(LyXView *lv, string const &t, kb_action s, Button b1, Button b2)
        : private_(0), lv_(lv), title_(t), success_(s)
 {
-       private_ = new FileDialog::Private;
+       private_ = new FileDialog::Private(*lv->getDialogs());
 
        private_->SetButton(0, b1.first, b1.second);
        private_->SetButton(1, b2.first, b2.second);
@@ -43,7 +43,6 @@ FileDialog::FileDialog(LyXView *lv, string const &t, kb_action s, Button b1, But
 FileDialog::~FileDialog()
 {
        delete private_;
-       private_ = 0;
 }
 
 
index b178c611056f55a5e33ab5e3515c552e91e775ae..77c054e1747bba32921280bc376467425b98467f 100644 (file)
@@ -25,8 +25,8 @@ using std::getline;
 
 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
 
-FormAboutlyx::FormAboutlyx(ControlAboutlyx & c)
-       : base_class(c, _("About LyX"), false)
+FormAboutlyx::FormAboutlyx(ControlAboutlyx & c, Dialogs & d)
+       : base_class(c, d, _("About LyX"), false)
 {}
 
 
index bc5d5e3b6a6e0671d05c29c7c6cb632310acb63b..f09a36704ad410f8782f4e81b012a9a0893e330c 100644 (file)
@@ -30,7 +30,7 @@ struct FD_aboutlyx_license;
 class FormAboutlyx : public FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > {
 public:
        ///
-       FormAboutlyx(ControlAboutlyx &);
+       FormAboutlyx(ControlAboutlyx &, Dialogs &);
 
 private:
        /// not needed.
index ce6263346ca35fecfb9ea86735df725511ae73c9..762a09f1e382b90e7174af336340447616256db6 100644 (file)
@@ -32,9 +32,10 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
 } // extern "C"
 
 
-FormBase::FormBase(ControlButtons & c, string const & t, bool allowResize)
+FormBase::FormBase(ControlButtons & c, Dialogs & d,
+                  string const & t, bool allowResize)
        : ViewBC<xformsBC>(c), minw_(0), minh_(0), allow_resize_(allowResize),
-         title_(t), tooltips_(new Tooltips)
+         title_(t), tooltips_(new Tooltips(d))
 {}
 
 
index 42855f2483507282dbdeb5cb5a99372836817f35..53a54864c0a97ed5f2c343219f77f74a88061f12 100644 (file)
@@ -28,6 +28,7 @@
 
 class xformsBC;
 class Tooltips;
+class Dialogs;
 
 /** This class is an XForms GUI base class.
  */
@@ -35,7 +36,8 @@ class FormBase : public ViewBC<xformsBC>, public FeedbackController
 {
 public:
        ///
-       FormBase(ControlButtons &, string const &, bool allowResize);
+       FormBase(ControlButtons &, Dialogs &,
+                string const &, bool allowResize);
        ///
        virtual ~FormBase();
 
@@ -91,7 +93,8 @@ class FormDB: public FormBase
 {
 protected:
        ///
-       FormDB(ControlButtons &, string const &, bool allowResize=true);
+       FormDB(ControlButtons &, Dialogs &,
+              string const &, bool allowResize=true);
        /// Pointer to the actual instantiation of xform's form
        virtual FL_FORM * form() const;
        /// Real GUI implementation.
@@ -100,8 +103,9 @@ protected:
 
 
 template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButtons & c, string const & t, bool allowResize)
-       : FormBase(c, t, allowResize)
+FormDB<Dialog>::FormDB(ControlButtons & c, Dialogs & d,
+                      string const & t, bool allowResize)
+       : FormBase(c, d, t, allowResize)
 {}
 
 
@@ -118,16 +122,17 @@ class FormCB: public Base
 {
 protected:
        ///
-       FormCB(Controller &, string const &, bool allowResize=true);
+       FormCB(Controller &, Dialogs &,
+              string const &, bool allowResize = true);
        /// The parent controller
        Controller & controller() const;
 };
 
 
 template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(Controller & c, string const & t,
-                                bool allowResize)
-       : Base(c, t, allowResize)
+FormCB<Controller, Base>::FormCB(Controller & c, Dialogs & d,
+                                string const & t, bool allowResize)
+       : Base(c, d, t, allowResize)
 {}
 
 
index 0fd20eee57f856e1aed913f15ae7c180f95441d3..7213005212f2ae64b71ed39702c73d3541a7c0f7 100644 (file)
@@ -43,7 +43,7 @@ FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
                                       string const & t, bool allowResize)
        : lv_(lv), d_(d), title_(t),
          minw_(0), minh_(0), allow_resize_(allowResize),
-         tooltips_(new Tooltips)
+         tooltips_(new Tooltips(*d))
 {
        lyx::Assert(lv && d);
 }
@@ -71,7 +71,7 @@ void FormBaseDeprecated::redraw()
 void FormBaseDeprecated::connect()
 {
        fl_set_form_minsize(form(), minw_, minh_);
-       r_ = Dialogs::redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
+       r_ = d_->redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
 }
 
 
index 6057263184d32652140ee226b5fc86598b261acb..de9440f359ab8c858882aee8d663baeddb1f591c 100644 (file)
@@ -22,8 +22,8 @@
 
 typedef FormCB<ControlBibitem, FormDB<FD_bibitem> > base_class;
 
-FormBibitem::FormBibitem(ControlBibitem & c)
-       : base_class(c, _("Bibliography Entry"))
+FormBibitem::FormBibitem(ControlBibitem & c, Dialogs & d)
+       : base_class(c, d, _("Bibliography Entry"))
 {}
 
 
index bc3be3b2dc3ac09a1d0c537beac79a7a6a492a95..2c18ccbf219fa9b1077d71545fb88a70bc05a80a 100644 (file)
@@ -26,8 +26,7 @@ struct FD_bibitem;
 class FormBibitem : public FormCB<ControlBibitem, FormDB<FD_bibitem> > {
 public:
        ///
-       FormBibitem(ControlBibitem &);
-
+       FormBibitem(ControlBibitem &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 8e968d38d11b9a3cb714f6ad60b2d13622b0398e..4e2bb28ac105a32a1afbbe8d7a69df552c830926 100644 (file)
@@ -36,8 +36,8 @@ using std::sort;
 
 typedef FormCB<ControlBibtex, FormDB<FD_bibtex> > base_class;
 
-FormBibtex::FormBibtex(ControlBibtex & c)
-       : base_class(c, _("BibTeX Database"))
+FormBibtex::FormBibtex(ControlBibtex & c, Dialogs & d)
+       : base_class(c, d, _("BibTeX Database"))
 {}
 
 
@@ -75,13 +75,13 @@ void FormBibtex::build()
 
        str = _("Activate this option if you want the bibliography to appear in the Table of Contents (which doesn't happen by default)");
        tooltips().init(dialog_->check_bibtotoc, str);
-       
+
        str = _("Choose a BibTeX style from the browsers list");
        tooltips().init(dialog_->button_style_choose, str);
-       
+
        str = _("Updates your TeX system for a new bibstyle list. Only the styles which are in directories where TeX finds them are listed!");
        tooltips().init(dialog_->button_rescan, str);
-       
+
 }
 
 
@@ -116,9 +116,9 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long)
                }
        } else if (ob == dialog_->button_style_choose) {
                unsigned int selection = fl_get_browser(dialog_->browser_styles);
-               string const out_name = 
+               string const out_name =
                        fl_get_browser_line(dialog_->browser_styles, selection);
-               fl_set_input(dialog_->input_style, 
+               fl_set_input(dialog_->input_style,
                        ChangeExtension(out_name, string()).c_str());
        } else if (ob == dialog_->button_rescan)
                controller().rescanBibStyles();
index f177e7203345a87adb060571a357006ab86baa03..572b9c13f873f2c308caf935f810c2960312e87b 100644 (file)
@@ -26,8 +26,7 @@ struct FD_bibtex;
 class FormBibtex : public FormCB<ControlBibtex, FormDB<FD_bibtex> > {
 public:
        ///
-       FormBibtex(ControlBibtex &);
-
+       FormBibtex(ControlBibtex &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 3715242892222b2f3c1646376bed434434fc1ab7..339335a536831e497eac9256fe6932717229f7dc 100644 (file)
@@ -16,8 +16,9 @@
 #include "forms/form_browser.h"
 #include "xformsBC.h"
 
-FormBrowser::FormBrowser(ControlButtons & c, string const & t, bool allowResize)
-       : FormDB<FD_browser>(c, t, allowResize)
+FormBrowser::FormBrowser(ControlButtons & c, Dialogs & d,
+                        string const & t, bool allowResize)
+       : FormDB<FD_browser>(c, d, t, allowResize)
 {}
 
 
index 064ed23e56285177dbe692daaadef16e0f094d18..6312362c35835798fe8f1028bb2c7fc3fa9de9d4 100644 (file)
@@ -26,8 +26,8 @@ struct FD_browser;
 class FormBrowser : public FormDB<FD_browser> {
 public:
        ///
-       FormBrowser(ControlButtons &, string const &, bool allowResize=true);
-
+       FormBrowser(ControlButtons &, Dialogs &,
+                   string const &, bool allowResize = true);
 private:
        /// Build the dialog.
        virtual void build();
index 2968d398cd09538f3945e4f30e336f88ec305a10..41f16413467059ef4669da0bbfe4c7d111e0fde2 100644 (file)
@@ -36,8 +36,8 @@ using namespace frnt;
 
 typedef FormCB<ControlCharacter, FormDB<FD_character> > base_class;
 
-FormCharacter::FormCharacter(ControlCharacter & c)
-       : base_class(c, _("Character Layout"), false)
+FormCharacter::FormCharacter(ControlCharacter & c, Dialogs & d)
+       : base_class(c, d, _("Character Layout"), false)
 {}
 
 
index daa890b2905d7680847a9f34c95435f74f6c54b6..7eb57d30b1ca5ce54fd06b2e248c0cf798b3d0c7 100644 (file)
@@ -35,7 +35,7 @@ class FormCharacter
        : public FormCB<ControlCharacter, FormDB<FD_character> > {
 public:
        ///
-       FormCharacter(ControlCharacter &);
+       FormCharacter(ControlCharacter &, Dialogs &);
 private:
 
        /// Apply from dialog
index f6ccd890aa28bda699137891516ea57dca6276e5..9a2ce6e7516ede4a1d090e4f01a1baa84ad8f3f8 100644 (file)
@@ -58,14 +58,14 @@ void fillChoice(FD_citation * dialog, vector<string> vec)
        string str = " ";
        if (!vec.empty())
                str += getStringFromVector(vec, " | ") + " ";
-       
+
        fl_clear_choice(dialog->choice_style);
        fl_addto_choice(dialog->choice_style, str.c_str());
 
        setEnabled(dialog->choice_style, !vec.empty());
        if (vec.empty())
                return;
-               
+
        // The width of the choice varies with the contents.
        // Ensure that it is centred in the frame.
 
@@ -115,8 +115,8 @@ void updateStyle(FD_citation * dialog, string command)
 typedef FormCB<ControlCitation, FormDB<FD_citation> > base_class;
 
 
-FormCitation::FormCitation(ControlCitation & c)
-       : base_class(c, _("Citation"), false)
+FormCitation::FormCitation(ControlCitation & c, Dialogs & d)
+       : base_class(c, d, _("Citation"), false)
 {}
 
 
index 0cb8948c9404f33b507269c32c0677aec5a76bab..efcba5b9ff9b51248bbce110a36e06f8f51a150b 100644 (file)
@@ -25,8 +25,7 @@ struct FD_citation;
 class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
 public:
        ///
-       FormCitation(ControlCitation &);
-
+       FormCitation(ControlCitation &, Dialogs &);
 private:
        ///
        enum State {
index 4fedc68daba98128bb6e7de3fb39fabc575c43a5..64c66a3d4fc9bff331348ca3426bfe37be84a961 100644 (file)
@@ -23,8 +23,8 @@
 
 typedef FormCB<ControlERT, FormDB<FD_ert> > base_class;
 
-FormERT::FormERT(ControlERT & c)
-       : base_class(c, _("ERT Options"))
+FormERT::FormERT(ControlERT & c, Dialogs & d)
+       : base_class(c, d, _("ERT Options"))
 {}
 
 
index 74ac8a90986519163fec9085462862255f7486b1..7d61116c6644db103da899c24abd1d1148a2e0da 100644 (file)
@@ -26,7 +26,7 @@ class FormERT
        : public FormCB<ControlERT, FormDB<FD_ert> > {
 public:
        ///
-       FormERT(ControlERT &);
+       FormERT(ControlERT &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 75b3c24484316142abc6a12e6a3b4007048adb49..ead1e6478a727aff3cbd8f8c6aa42a00ea8104af 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlError, FormDB<FD_error> > base_class;
 
-FormError::FormError(ControlError & c)
-       : base_class(c, _("LaTeX Error"))
+FormError::FormError(ControlError & c, Dialogs & d)
+       : base_class(c, d, _("LaTeX Error"))
 {}
 
 
index 8bff9199409e546c83a3dc44457c0e75c8068af4..cbe367c4ef63a7790dcb05c21684ee2aee764edc 100644 (file)
@@ -24,8 +24,7 @@ struct FD_error;
 class FormError : public FormCB<ControlError, FormDB<FD_error> > {
 public:
        /// Constructor
-       FormError(ControlError &);
-
+       FormError(ControlError &, Dialogs &);
 private:
        /// not needed.
        virtual void apply() {}
index 589dc225e20239190a25c413581d1dea60a96052..1a6960bd7a40f893959df2bbe3ed4bd6ce7bb2b4 100644 (file)
@@ -27,8 +27,8 @@
 
 typedef FormCB<ControlExternal, FormDB<FD_external> > base_class;
 
-FormExternal::FormExternal(ControlExternal & c)
-       : base_class(c, _("Edit external file"))
+FormExternal::FormExternal(ControlExternal & c, Dialogs & d)
+       : base_class(c, d, _("Edit external file"))
 {}
 
 
index e0f00b46798cb8c24b4b29968b4872c9439c5753..b55abd4708e7a6b30dab4a91aa717a76ec9dac1f 100644 (file)
@@ -26,8 +26,7 @@ struct FD_external;
 class FormExternal : public FormCB<ControlExternal, FormDB<FD_external> > {
 public:
        ///
-       FormExternal(ControlExternal &);
-
+       FormExternal(ControlExternal &, Dialogs &);
 private:
        /// apply changes
        void apply();
index 9b5d810dea29017a6289dc4b59f3521303eedb13..d2fb63ed1c5cac3a718f20f31b3f759a00c5b587 100644 (file)
@@ -422,7 +422,7 @@ void FileDialog::Private::SetInfoLine(string const & Line)
 }
 
 
-FileDialog::Private::Private()
+FileDialog::Private::Private(Dialogs & dia)
 {
        pszDirectory = MakeAbsPath(string("."));
        pszMask = '*';
@@ -459,7 +459,7 @@ FileDialog::Private::Private()
        fl_hide_object(pFileDlgForm->User1);
        fl_hide_object(pFileDlgForm->User2);
 
-       r_ = Dialogs::redrawGUI.connect(boost::bind(&FileDialog::Private::redraw, this));
+       r_ = dia.redrawGUI.connect(boost::bind(&FileDialog::Private::redraw, this));
 }
 
 
index 4f4032444d19f09264130d7f7b1245b89047e5ae..57e4e69ee85548f30cc939e96b1440fac1bb0b68 100644 (file)
@@ -27,6 +27,8 @@
 
 #include <vector>
 
+class Dialogs;
+
 /// DirEntry internal structure definition
 class DirEntry {
 public:
@@ -51,7 +53,7 @@ class FD_filedialog;
 class FileDialog::Private : public boost::signals::trackable {
 public:
        ///
-       Private();
+       Private(Dialogs &);
        ///
        ~Private();
 
index 2ea3204a07e46bec074a4ab939d3504c21478344..79cbf8a13a8b20132736e9ce587555e1e033a8b2 100644 (file)
@@ -22,8 +22,8 @@
 
 typedef FormCB<ControlFloat, FormDB<FD_float> > base_class;
 
-FormFloat::FormFloat(ControlFloat & c)
-       : base_class(c, _("Float Options"))
+FormFloat::FormFloat(ControlFloat & c, Dialogs & d)
+       : base_class(c, d, _("Float Options"))
 {}
 
 
index 8e4513d6db73f2a5fdad917de35c3c864cc5dcd6..e8ad23e6ad42e64382b445b35073ec9eb95c06ff 100644 (file)
@@ -25,8 +25,7 @@ struct FD_float;
 class FormFloat : public FormCB<ControlFloat, FormDB<FD_float> > {
 public:
        ///
-       FormFloat(ControlFloat &);
-
+       FormFloat(ControlFloat &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index ca28eff22547bbb5c1a1c87002970d001dc55b92..cf4df6491e51c7df16bde9e068baaed6751c0f23 100644 (file)
@@ -30,8 +30,8 @@ using std::find_if;
 
 typedef FormCB<ControlForks, FormDB<FD_forks> > base_class;
 
-FormForks::FormForks(ControlForks & c)
-       : base_class(c, _("Child processes"))
+FormForks::FormForks(ControlForks & c, Dialogs & d)
+       : base_class(c, d, _("Child processes"))
 {}
 
 
index 8dde5b0ebda575881fd4e63a3b974cc4ae14ffa6..14eb28695eb379d0705fceefda89a69e915f274b 100644 (file)
@@ -22,7 +22,7 @@ struct FD_forks;
 class FormForks : public FormCB<ControlForks, FormDB<FD_forks> > {
 public:
        ///
-       FormForks(ControlForks &);
+       FormForks(ControlForks &, Dialogs &);
 
        /// preemptive handler for feedback messages
        void feedbackCB(FL_OBJECT *, int);
index 50d310d7dcafbc2eb576cd2b06cf3cd4d651760b..bafe57884d96c103c210510a0d68f0e209d43137 100644 (file)
@@ -53,8 +53,8 @@ LyXLength getLyXLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice)
 
 typedef FormCB<ControlGraphics, FormDB<FD_graphics> > base_class;
 
-FormGraphics::FormGraphics(ControlGraphics & c)
-       : base_class(c, _("Graphics"), false)
+FormGraphics::FormGraphics(ControlGraphics & c, Dialogs & d)
+       : base_class(c, d, _("Graphics"), false)
 {}
 
 
@@ -102,7 +102,7 @@ void FormGraphics::build()
 
        // Store the identifiers for later
        origins_ = getSecond(origindata);
-       
+
        string const choice =
                " " + getStringFromVector(getFirst(origindata), " | ") +" ";
        fl_addto_choice(file_->choice_origin, choice.c_str());
@@ -513,7 +513,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                }
                if (controller().isFilenameValid(out_name) &&
                    !controller().bbChanged)
-                       updateBB(out_name, string());
+                       updateBB(out_name, string());
 
        } else if (ob == file_->check_subcaption) {
                setEnabled(file_->input_subcaption,
index c12a127805ec0b20e0bdb48e88441303065709bc..6ae60f3244c17f8ebe8e677f971bcd5b6ad352d3 100644 (file)
@@ -35,8 +35,7 @@ struct FD_graphics_special;
 class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_graphics> > {
 public:
        ///
-       FormGraphics(ControlGraphics &);
-
+       FormGraphics(ControlGraphics &, Dialogs &);
 private:
 
        /** Redraw the form (on receipt of a Signal indicating, for example,
index f815337067656e99da128e58325f76210b9241a3..33f88d93f4e163195bf0ea856ee9d7b100717dac 100644 (file)
@@ -26,8 +26,8 @@
 
 typedef FormCB<ControlInclude, FormDB<FD_include> > base_class;
 
-FormInclude::FormInclude(ControlInclude & c)
-       : base_class(c, _("Include file"))
+FormInclude::FormInclude(ControlInclude & c, Dialogs & d)
+       : base_class(c, d, _("Include file"))
 {}
 
 
index 3af32fd8b2829d404a1cf7214e2cb875472fd069..325dd4b0769a94e0256de91845f1f48b7e7fa1e7 100644 (file)
@@ -25,8 +25,7 @@ struct FD_include;
 class FormInclude : public FormCB<ControlInclude, FormDB<FD_include> > {
 public:
        ///
-       FormInclude(ControlInclude &);
-
+       FormInclude(ControlInclude &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 0067d0a06d59b4e3e4f4e24cd9392f8f4af9ffae..ec704bb07a9762cce63253f2c77263dbbf9d7a61 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
 
-FormIndex::FormIndex(ControlIndex & c)
-       : base_class(c, _("Index"))
+FormIndex::FormIndex(ControlIndex & c, Dialogs & d)
+       : base_class(c, d, _("Index"))
 {}
 
 
index c24e77dda506e8dfcb46720bac46937b146a0283..360f16c41f53de5b9aa77279b7c1c28a52484b17 100644 (file)
@@ -24,8 +24,7 @@ struct FD_index;
 class FormIndex : public FormCB<ControlIndex, FormDB<FD_index> > {
 public:
        ///
-       FormIndex(ControlIndex &);
-
+       FormIndex(ControlIndex &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 474c7458959f4bb38f2ef9418947529ffbb81166..f317805d5f1aa88e2e6cc470c99bd8f001e63e53 100644 (file)
@@ -19,8 +19,8 @@
 #include "gettext.h"
 #include FORMS_H_LOCATION
 
-FormLog::FormLog(ControlLog & c)
-       : FormCB<ControlLog, FormBrowser>(c, _("LaTeX Log"))
+FormLog::FormLog(ControlLog & c, Dialogs & d)
+       : FormCB<ControlLog, FormBrowser>(c, d, _("LaTeX Log"))
 {}
 
 
index c8f40d7df549d4925399477ca2aa3fb10cbcbee9..00806b0e2370602ea332bded7d82e299d30ded9a 100644 (file)
@@ -25,7 +25,7 @@ class ControlLog;
 class FormLog : public FormCB<ControlLog, FormBrowser> {
 public:
        ///
-       FormLog(ControlLog &);
+       FormLog(ControlLog &, Dialogs &);
 
        // Functions accessible to the Controller.
 
index 4187f23468adb14e2ace52a7d17029270fb28811..eb37a93b8e894de957108e4544618bd48797b742 100644 (file)
@@ -24,8 +24,8 @@
 
 typedef FormCB<ControlMinipage, FormDB<FD_minipage> > base_class;
 
-FormMinipage::FormMinipage(ControlMinipage & c)
-       : base_class(c, _("Minipage Options"))
+FormMinipage::FormMinipage(ControlMinipage & c, Dialogs & d)
+       : base_class(c, d, _("Minipage Options"))
 {}
 
 
index 90ead2b9bc293a05b442d2df9f1fc88a5508c59a..e54acd600dd7499457c38a9230d86ef9c9e461cd 100644 (file)
@@ -26,7 +26,7 @@ class FormMinipage
        : public FormCB<ControlMinipage, FormDB<FD_minipage> > {
 public:
        ///
-       FormMinipage(ControlMinipage &);
+       FormMinipage(ControlMinipage &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 42540b213b9d4e0c6b439c50a2ba4c22c8868895..4b5da5d60af7eaf7b7e834e74d1c9bf9b400d569 100644 (file)
@@ -38,8 +38,8 @@ using std::remove_if;
 
 typedef FormCB<ControlParagraph, FormDB<FD_paragraph> > base_class;
 
-FormParagraph::FormParagraph(ControlParagraph & c)
-       : base_class(c, _("Paragraph Layout"), false)
+FormParagraph::FormParagraph(ControlParagraph & c, Dialogs & d)
+       : base_class(c, d, _("Paragraph Layout"), false)
 {}
 
 void FormParagraph::build()
index a509aa3d9153c8534b19a60319a7913f8870afff..c65c47469685fa8c4146b7efeecfec30dbbce089 100644 (file)
@@ -25,7 +25,7 @@ class FormParagraph
        : public FormCB<ControlParagraph, FormDB<FD_paragraph> > {
 public:
        ///
-       FormParagraph(ControlParagraph &);
+       FormParagraph(ControlParagraph &, Dialogs &);
 private:
        /// Build the dialog
        virtual void build();
@@ -33,7 +33,7 @@ private:
        virtual void apply();
        /// Update the dialog
        virtual void update();
-       
+
        /// Filter the inputs on callback from xforms
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
index 5fa4baf3de8d570dfb7c0633ab5edb2b92fe7410..299a6862ec2734b04728deeed61810e2dd14e200 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlPreamble, FormDB<FD_preamble> > base_class;
 
-FormPreamble::FormPreamble(ControlPreamble & c)
-       : base_class(c, _("LaTeX preamble"))
+FormPreamble::FormPreamble(ControlPreamble & c, Dialogs & d)
+       : base_class(c, d, _("LaTeX preamble"))
 {}
 
 
index 9166ea28ff0a0b4a2f74720396e5689ff91c50de..8bf7e9fefaaf4a4ddab5248017fb8e3a273676a5 100644 (file)
@@ -24,7 +24,7 @@ struct FD_preamble;
 class FormPreamble : public FormCB<ControlPreamble, FormDB<FD_preamble> > {
 public:
        ///
-       FormPreamble(ControlPreamble &);
+       FormPreamble(ControlPreamble &, Dialogs &);
 private:
        /// Apply from dialog
        virtual void apply();
index b5336ffb055d5090d27d48c16c4cfecfb7d1edf9..a64cc2fa8d1fdea87d8689437be34d0887a68dfe 100644 (file)
@@ -427,7 +427,7 @@ void FormPreferences::Colors::apply()
                                setCursorColor(GUI_COLOR_CURSOR);
                        }
                }
-               Dialogs::redrawGUI();
+               parent_.lv_->getDialogs()->redrawGUI();
        }
 
        // Now do the same for the LyX LColors...
index 47f1b45532478bec43f061ff749a922598412922..551b4eb560845b7c80ed2e3fc98616147f17974b 100644 (file)
@@ -32,8 +32,8 @@ using std::make_pair;
 
 typedef FormCB<ControlPrint, FormDB<FD_print> > base_class;
 
-FormPrint::FormPrint(ControlPrint & c)
-       : base_class(c, _("Print")),
+FormPrint::FormPrint(ControlPrint & c, Dialogs & d)
+       : base_class(c, d, _("Print")),
          target_(2), order_(2), which_(3)
 {}
 
index 2260f76a0b5ae0f7d362b565cf10aa1701cf944f..f9cddad70078dfb340be9957f969989c907c2c58 100644 (file)
@@ -29,8 +29,7 @@ struct FD_print;
 class FormPrint : public FormCB<ControlPrint, FormDB<FD_print> > {
 public:
        ///
-       FormPrint(ControlPrint &);
-
+       FormPrint(ControlPrint &, Dialogs &);
 private:
        /// Apply from dialog
        virtual void apply();
index f66890ae91adce2cef58b05d71b2aeeb00bfb0d2..99fc14dd2d8f158735bd53960f2523c39b47e3e0 100644 (file)
@@ -30,8 +30,8 @@ using std::vector;
 
 typedef FormCB<ControlRef, FormDB<FD_ref> > base_class;
 
-FormRef::FormRef(ControlRef & c)
-       : base_class(c, _("Reference")),
+FormRef::FormRef(ControlRef & c, Dialogs & d)
+       : base_class(c, d, _("Reference")),
          at_ref_(false)
 {}
 
index 4d816f03273d1482798fc47b0c623dae25966e28..3a5ef194bf5da6f55164bdbe754a03a966ff1402 100644 (file)
@@ -24,8 +24,7 @@ struct FD_ref;
 class FormRef : public FormCB<ControlRef, FormDB<FD_ref> > {
 public:
        ///
-       FormRef(ControlRef &);
-
+       FormRef(ControlRef &, Dialogs &);
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index bf972e7fc0447bff77399a4fca4bd236951f846e..da4dd93f461a3d101762829259ba31cd11e59bc1 100644 (file)
@@ -20,8 +20,8 @@
 
 typedef FormCB<ControlSearch, FormDB<FD_search> > base_class;
 
-FormSearch::FormSearch(ControlSearch & c)
-       : base_class(c, _("LyX: Find and Replace"))
+FormSearch::FormSearch(ControlSearch & c, Dialogs & d)
+       : base_class(c, d, _("LyX: Find and Replace"))
 {}
 
 
@@ -43,7 +43,7 @@ void FormSearch::update()
        fl_set_focus_object(dialog_->form, dialog_->input_search);
 }
 
+
 ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * obj, long)
 {
        if (obj == dialog_->button_findnext ||
index 123eaeefc9f4d43baab0e39582ca725d775f0aa8..5f5be4cfb6413407b6159b3f2bbe02d52a0c8c51 100644 (file)
@@ -24,8 +24,7 @@ struct FD_search;
 class FormSearch : public FormCB<ControlSearch, FormDB<FD_search> > {
 public:
        ///
-       FormSearch(ControlSearch &);
-
+       FormSearch(ControlSearch &, Dialogs &);
 private:
        /// not needed.
        virtual void apply() {}
index ce9f5f5ea601f301014509f4e6e3a649555c9403..1d8615d7e006531f53934fd71cc6dbe9ab8c9b2c 100644 (file)
@@ -26,8 +26,8 @@ using std::vector;
 
 typedef FormCB<ControlSendto, FormDB<FD_sendto> > base_class;
 
-FormSendto::FormSendto(ControlSendto & c)
-       : base_class(c, _("Send document to command"))
+FormSendto::FormSendto(ControlSendto & c, Dialogs & d)
+       : base_class(c, d, _("Send document to command"))
 {}
 
 
index f091873c7f5621c85a4ead484f5d315d4b046b5b..86f9f7ba806b3e7d3b8c2bfe462eafbcdaa53d01 100644 (file)
@@ -26,8 +26,7 @@ struct FD_sendto;
 class FormSendto : public FormCB<ControlSendto, FormDB<FD_sendto> > {
 public:
        ///
-       FormSendto(ControlSendto &);
-
+       FormSendto(ControlSendto &, Dialogs &);
 private:
        /// Apply from dialog (modify or create inset)
        virtual void apply();
index ca454c93695bffda1229234692ce46a0223c0cea..8e8f7b8b36b8f6d0765a4e4e5d7f13394c659443 100644 (file)
@@ -20,8 +20,8 @@
 #include FORMS_H_LOCATION
 
 
-FormShowFile::FormShowFile(ControlShowFile & c)
-       : FormCB<ControlShowFile, FormBrowser>(c, string())
+FormShowFile::FormShowFile(ControlShowFile & c, Dialogs & d)
+       : FormCB<ControlShowFile, FormBrowser>(c, d, string())
 {}
 
 
index fd71682b26a1023c690139f26e3e5e902ac2dfb1..a00fb533e50ba0a88fd226aac81e6351cafc8d20 100644 (file)
@@ -25,7 +25,7 @@ class ControlShowFile;
 class FormShowFile : public FormCB<ControlShowFile, FormBrowser> {
 public:
        ///
-       FormShowFile(ControlShowFile &);
+       FormShowFile(ControlShowFile &, Dialogs &);
 
        // Functions accessible to the Controller.
 
index 70dea25e5e06094ee89d9a27224d7cb882189f51..7dbfa0fca438297996f94a49ebdedd88b6e414b0 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > base_class;
 
-FormSpellchecker::FormSpellchecker(ControlSpellchecker & c)
-       : base_class(c, _("LyX: Spellchecker"), false)
+FormSpellchecker::FormSpellchecker(ControlSpellchecker & c, Dialogs & d)
+       : base_class(c, d, _("LyX: Spellchecker"), false)
 {}
 
 
index b56cbf67a1aaf50c127dce121d19e07f246135b8..5f986486cfcb49403ef794cd5cb462382edff322 100644 (file)
@@ -24,8 +24,7 @@ struct FD_spellchecker;
 class FormSpellchecker : public FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > {
 public:
        ///
-       FormSpellchecker(ControlSpellchecker &);
-
+       FormSpellchecker(ControlSpellchecker &, Dialogs &);
 private:
        /// not needed.
        void apply() {}
index c977117c3b9d98b83da48dabf960fe42fd8eadba..2e57b59a4a6cf264ce49576ee2c32db3fb935607 100644 (file)
@@ -26,8 +26,8 @@ using std::make_pair;
 
 typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
 
-FormTabularCreate::FormTabularCreate(ControlTabularCreate & c)
-       : base_class(c, _("Insert Tabular"))
+FormTabularCreate::FormTabularCreate(ControlTabularCreate & c, Dialogs & d)
+       : base_class(c, d, _("Insert Tabular"))
 {}
 
 
index 91df9dae974e135ba8bb1bde6b94d7514e360caf..ef665ee84c398a61d57c8f4ac9f1d3314b357ddb 100644 (file)
@@ -27,8 +27,7 @@ class FormTabularCreate :
        public FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > {
 public:
        ///
-       FormTabularCreate(ControlTabularCreate &);
-
+       FormTabularCreate(ControlTabularCreate &, Dialogs &);
 private:
        /// Apply from dialog
        virtual void apply();
index 70ecfaf9ba3b77c896cc9b336055c07536787817..d28e8fb8a997d472fd2d9ce25af6ecd7b4be3a7a 100644 (file)
@@ -26,8 +26,8 @@
 
 
 typedef FormCB<ControlTexinfo, FormDB<FD_texinfo> > base_class;
-FormTexinfo::FormTexinfo(ControlTexinfo & c)
-       : base_class(c, _("LaTeX Information")),
+FormTexinfo::FormTexinfo(ControlTexinfo & c, Dialogs & d)
+       : base_class(c, d, _("LaTeX Information")),
          activeStyle(ControlTexinfo::cls)
 {}
 
index 35891e1cbeaca5eae9ff0116abd90fc090f5aff0..0564fcd3eb5677f91a779fb64ccf3d17df79e029 100644 (file)
@@ -22,8 +22,7 @@ struct FD_texinfo;
 class FormTexinfo : public FormCB<ControlTexinfo, FormDB<FD_texinfo> > {
 public:
        ///
-       FormTexinfo(ControlTexinfo &);
-
+       FormTexinfo(ControlTexinfo &, Dialogs &);
 private:
        /// not needed
        virtual void apply() {}
index c4e66c72337726bd59e194cb8541d3a83aee2ff2..9ce8b49edad053b857e67e9f40f8ea38f26e92f4 100644 (file)
@@ -33,8 +33,8 @@ using std::vector;
 typedef FormCB<ControlThesaurus, FormDB<FD_thesaurus> > base_class;
 
 
-FormThesaurus::FormThesaurus(ControlThesaurus & c)
-       : base_class(c, _("LyX: Thesaurus"), false),
+FormThesaurus::FormThesaurus(ControlThesaurus & c, Dialogs & d)
+       : base_class(c, d, _("LyX: Thesaurus"), false),
          clickline_(-1)
 {
 }
index d23b81a10bfa90b51b18035f84c6cd9a4efe4151..82cbeafe01a801c263041e837ba2c1b1830e1a0e 100644 (file)
@@ -24,8 +24,7 @@ struct FD_thesaurus;
 class FormThesaurus : public FormCB<ControlThesaurus, FormDB<FD_thesaurus> > {
 public:
        ///
-       FormThesaurus(ControlThesaurus &);
-
+       FormThesaurus(ControlThesaurus &, Dialogs &);
 private:
        /// not needed.
        virtual void apply() {}
index 35c46dc07bbd87dd5b5ed19489b71d151601999b..d7ad86b2542e7e3998feed1a80146d52cb96f65d 100644 (file)
@@ -29,8 +29,8 @@ using std::endl;
 
 typedef FormCB<ControlToc, FormDB<FD_toc> > base_class;
 
-FormToc::FormToc(ControlToc & c)
-       : base_class(c, _("Table of Contents"))
+FormToc::FormToc(ControlToc & c, Dialogs & d)
+       : base_class(c, d, _("Table of Contents"))
 {}
 
 
index 2d8b552b644726e0df066a737729961832d46548..308af3bdad18feedf66dff4eaf4f3c0dd2ebd3ee 100644 (file)
@@ -25,7 +25,7 @@ struct FD_toc;
 class FormToc : public FormCB<ControlToc, FormDB<FD_toc> > {
 public:
        ///
-       FormToc(ControlToc &);
+       FormToc(ControlToc &, Dialogs &);
 private:
        /// not needed
        virtual void apply() {}
index 46a786076e2685cfb465979192f3fd5c76fdb19f..823c8760af1b61d7dd075077acff27794b4996b1 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlUrl, FormDB<FD_url> > base_class;
 
-FormUrl::FormUrl(ControlUrl & c)
-       : base_class(c, _("Url"))
+FormUrl::FormUrl(ControlUrl & c, Dialogs & d)
+       : base_class(c, d, _("Url"))
 {}
 
 
index 1ed730e87333c361cc3fe2869db36e93aec67c92..361553a748d4e704a8fa4d00b7ab2fb8ba3ef01e 100644 (file)
@@ -24,8 +24,7 @@ struct FD_url;
 class FormUrl : public FormCB<ControlUrl, FormDB<FD_url> > {
 public:
        ///
-       FormUrl(ControlUrl &);
-
+       FormUrl(ControlUrl &, Dialogs &);
 private:
        /// Apply from dialog (modify or create inset)
        virtual void apply();
index c4d7ef2b04ce5cefc662ce1c4293c0ed6e39a3ff..3f4ec370fb9e5b3438cf93323d8b1bc790c3d8f9 100644 (file)
@@ -20,8 +20,8 @@
 #include "gettext.h"
 #include FORMS_H_LOCATION
 
-FormVCLog::FormVCLog(ControlVCLog & c)
-       : FormCB<ControlVCLog, FormBrowser>(c, _("Version Control Log"))
+FormVCLog::FormVCLog(ControlVCLog & c, Dialogs & d)
+       : FormCB<ControlVCLog, FormBrowser>(c, d, _("Version Control Log"))
 {}
 
 
index c1b6d67b4c7b1ad51dbf315ccf39a616dcfd236c..e4ba01f1cd8ce835324f5b02646eb1c2a7c3ca02 100644 (file)
@@ -25,7 +25,7 @@ class ControlVCLog;
 class FormVCLog : public FormCB<ControlVCLog, FormBrowser> {
 public:
        ///
-       FormVCLog(ControlVCLog &);
+       FormVCLog(ControlVCLog &, Dialogs &);
 
        // Functions accessible to the Controller.
 
index 4c29bc95bb7ed92edb892499d729625af3fa1ab0..6aee2b1f6c86d138b9fa9ce1206e25e4e38d635c 100644 (file)
@@ -86,11 +86,11 @@ Toolbar::Pimpl::toolbarItem::operator=(toolbarItem const & ti)
 
 
 
-Toolbar::Pimpl::Pimpl(LyXView * o, int x, int y)
+Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs & d, int x, int y)
        : owner(static_cast<XFormsView *>(o)), sxpos(x), sypos(y)
 {
        combox = 0;
-       tooltip_ = new Tooltips;
+       tooltip_ = new Tooltips(d);
 }
 
 
index c695c587e9dfbbbfcfbfadf7f8f8e238ddcd7607..68660241e1caf0b270a60f41afcda54fda105e68 100644 (file)
@@ -26,6 +26,7 @@
 
 class XFormsView;
 class Tooltips;
+class Dialogs;
 
 /** The LyX xforms toolbar class
   */
@@ -34,7 +35,7 @@ public:
        /// called when user selects a layout from combox
        static void layoutSelectedCB(int, void *, Combox *);
        ///
-       Pimpl(LyXView * o, int x, int y);
+       Pimpl(LyXView * o, Dialogs &, int x, int y);
        ///
        ~Pimpl();
 
index a205683377f61b16dc03ce8a111c160fa027d7fb..7974ac72f32f28ac7122dc8876eea880000496dc 100644 (file)
@@ -35,12 +35,12 @@ boost::signal0<void> Tooltips::toggled;
 
 #if FL_VERSION > 0 || FL_REVISION >= 89
 
-Tooltips::Tooltips()
+Tooltips::Tooltips(Dialogs & d)
 {
        static bool first = true;
        if (first) {
                first = false;
-               Dialogs::toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
+               d.toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
        }
        toggled.connect(boost::bind(&Tooltips::set, this));
 }
index 0acff36e0e2f5a031975c249d72d854fdda38c2b..e6bcc0f6377e6b3bd4225db07ff8fad5ec7ed1c8 100644 (file)
@@ -26,6 +26,8 @@
 
 #include <map>
 
+class Dialogs;
+
 
 #ifdef __GNUG__
 #pragma interface
@@ -33,7 +35,7 @@
 
 class Tooltips : boost::noncopyable, public boost::signals::trackable {
 public:
-       Tooltips();
+       Tooltips(Dialogs &);
 
        /// Initialise a tooltip for this ob.
        void init(FL_OBJECT * ob, string const & tip);
index 9b0b7e2769445f89bade747a23ca5b92d9cc0a92..8fec911401d15e5bc52e4a3fc8fd696463bf990c 100644 (file)
@@ -59,7 +59,7 @@ int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
 XFormsView::XFormsView(int width, int height)
        : LyXView()
 {
-       create_form_form_main(width, height);
+       create_form_form_main(*getDialogs(), width, height);
        fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0);
 
        // Connect the minibuffer signals
@@ -68,7 +68,7 @@ XFormsView::XFormsView(int width, int height)
 
        // Make sure the buttons are disabled if needed.
        updateToolbar();
-       Dialogs::redrawGUI.connect(boost::bind(&XFormsView::redraw, this));
+       getDialogs()->redrawGUI.connect(boost::bind(&XFormsView::redraw, this));
 }
 
 
@@ -123,7 +123,7 @@ void XFormsView::show(int x, int y, string const & title)
 }
 
 
-void XFormsView::create_form_form_main(int width, int height)
+void XFormsView::create_form_form_main(Dialogs & dia, int width, int height)
        /* to make this work as it should, .lyxrc should have been
         * read first; OR maybe this one should be made dynamic.
         * Hmmmm. Lgb.
@@ -144,7 +144,8 @@ void XFormsView::create_form_form_main(int width, int height)
 
        menubar_.reset(new Menubar(this, menubackend));
 
-       toolbar_.reset(new Toolbar(this, air, 30 + air + bw, toolbardefaults));
+       toolbar_.reset(new Toolbar(this, dia,
+                                  air, 30 + air + bw, toolbardefaults));
        toolbar_->set(true);
 
        int const ywork = 60 + 2 * air + bw;
index 703158041406283537f1ddc8a3250d88eb86fc94..de236a5422dc4e6a60f352a6961b8c62c9c7a812 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "frontends/LyXView.h"
 
+class Dialogs;
+
 /**
  * XFormsView - xforms implementation of LyXView
  *
@@ -32,14 +34,14 @@ public:
 
        ~XFormsView();
 
-        /**
-         * show - display the top-level window
-         * @param xpos requested x position (or 0)
-         * @param xpos requested y position (or 0)
-         * @param title window title
-         */
+       /**
+        * show - display the top-level window
+        * @param xpos requested x position (or 0)
+        * @param xpos requested y position (or 0)
+        * @param title window title
+        */
        void show(int xpos, int ypos, string const & t = string("LyX"));
+
        /// get the xforms main form
        FL_FORM * getForm() const;
        /// redraw the main form.
@@ -58,10 +60,10 @@ private:
         * @param t main window title
         * @param it iconified (short) title
         */
-       virtual void setWindowTitle(string const & t, string const & it); 
+       virtual void setWindowTitle(string const & t, string const & it);
+
        /// makes the main form.
-       void create_form_form_main(int width, int height);
+       void create_form_form_main(Dialogs & d, int width, int height);
        /// the main form.
        boost::scoped_ptr<FL_FORM> form_;
 };
index 8703352decbfa43fd21ba6a87f4dd2cb31177a65..044dfada970c5873acf70d5b6f870969f8fcddd2 100644 (file)
@@ -8,16 +8,16 @@
  */
 
 #include <config.h>
+
 #include "lyx_gui.h"
+
 #include "support/lyxlib.h"
 #include "support/os.h"
 #include "support/filetools.h"
+
 #include "debug.h"
 #include "gettext.h"
+
 #include "lyx_main.h"
 #include "lyxrc.h"
 
@@ -27,7 +27,7 @@
 #include "lyxserver.h"
 #include "BufferView.h"
 #include "XFormsView.h"
+
 #include FORMS_H_LOCATION
 #include "ColorHandler.h"
 #include "xforms_helpers.h"
 #include "graphics/GraphicsImageXPM.h"
 #endif
 
+
 #include <fcntl.h>
 
 #include <boost/bind.hpp>
+
 #ifndef CXX_GLOBAL_CSTD
 using std::exit;
 #endif
@@ -49,15 +49,15 @@ using std::exit;
 using std::vector;
 using std::hex;
 using std::endl;
+
 extern bool finished;
 extern BufferList bufferlist;
+
 // FIXME: wrong place !
 LyXServer * lyxserver;
+
 namespace {
+
 /// set default GUI configuration
 void setDefaults()
 {
@@ -80,7 +80,7 @@ void setDefaults()
                        | FL_PDBorderWidth, &cntl);
 }
 
+
 extern "C" {
 
 int LyX_XErrHandler(Display * display, XErrorEvent * xeev) {
@@ -103,19 +103,19 @@ int LyX_XErrHandler(Display * display, XErrorEvent * xeev) {
        lyx::abort();
        return 0;
 }
+
 }
+
 /// read in geometry specification
 char geometry[40];
+
 } // namespace anon
 
+
 void lyx_gui::parse_init(int & argc, char * argv[])
 {
        setDefaults();
+
        FL_CMD_OPT cmdopt[] = {
                {"-geometry", "*.geometry", XrmoptionSepArg, "690x510"}
        };
@@ -125,36 +125,36 @@ void lyx_gui::parse_init(int & argc, char * argv[])
        };
 
        const int num_res = sizeof(res)/sizeof(FL_resource);
+
        fl_initialize(&argc, argv, "LyX", cmdopt, num_res);
+
        // It appears that, in xforms >=0.89.5, fl_initialize()
        // calls setlocale() and ruins our LC_NUMERIC setting.
        locale_init();
+
        fl_get_app_resources(res, num_res);
+
        Display * display = fl_get_display();
+
        if (!display) {
                lyxerr << "LyX: unable to access X display, exiting" << endl;
                os::warn("Unable to access X display, exiting");
                ::exit(1);
        }
+
        fcntl(ConnectionNumber(display), F_SETFD, FD_CLOEXEC);
+
        XSetErrorHandler(LyX_XErrHandler);
 
        lyxColorHandler.reset(new LyXColorHandler());
 }
+
 
 void lyx_gui::parse_lyxrc()
 {
-       // FIXME !!!! 
+       // FIXME !!!!
        lyxrc.dpi = 95;
+
        XformsColor::read(AddName(user_lyxdir, "preferences.xform"));
 
        if (lyxrc.popup_font_encoding.empty())
@@ -207,7 +207,7 @@ void lyx_gui::parse_lyxrc()
 #endif
 }
 
+
 void lyx_gui::start(string const & batch, vector<string> files)
 {
        // initial geometry
@@ -215,7 +215,7 @@ void lyx_gui::start(string const & batch, vector<string> files)
        int ypos = -1;
        unsigned int width = 690;
        unsigned int height = 510;
+
        static const int geometryBitmask =
                XParseGeometry(geometry,
                                &xpos, &ypos, &width, &height);
@@ -235,7 +235,7 @@ void lyx_gui::start(string const & batch, vector<string> files)
        }
 
        Screen * s = ScreenOfDisplay(fl_get_display(), fl_screen);
+
        // recalculate xpos if it's not set
        if (xpos == -1)
                xpos = (WidthOfScreen(s) - width) / 2;
@@ -246,17 +246,17 @@ void lyx_gui::start(string const & batch, vector<string> files)
 
        lyxerr[Debug::GUI] << "Creating view: " << width << "x" << height
                << "+" << xpos << "+" << ypos << endl;
+
        XFormsView view(width, height);
        view.show(xpos, ypos, "LyX");
        view.init();
 
        Buffer * last = 0;
+
        // FIXME: some code below needs moving
 
        lyxserver = new LyXServer(view.getLyXFunc(), lyxrc.lyxpipes);
+
        vector<string>::const_iterator cit = files.begin();
        vector<string>::const_iterator end = files.end();
        for (; cit != end; ++cit) {
@@ -276,7 +276,7 @@ void lyx_gui::start(string const & batch, vector<string> files)
                view.getLyXFunc()->verboseDispatch(batch, false);
        }
 
-       // enter the event loop 
+       // enter the event loop
        while (!finished) {
                if (fl_check_forms() == FL_EVENT) {
                        XEvent ev;
@@ -287,11 +287,11 @@ void lyx_gui::start(string const & batch, vector<string> files)
                }
        }
 
-       // FIXME 
+       // FIXME
        delete lyxserver;
 }
+
+
 // Called by the graphics cache to connect the appropriate frontend
 // image loading routines to the LyX kernel.
 void lyx_gui::init_graphics()