]> git.lyx.org Git - features.git/commitdiff
move the title_ string to the base class Dialog::View
authorAlfredo Braunstein <abraunst@lyx.org>
Thu, 22 May 2003 15:42:50 +0000 (15:42 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Thu, 22 May 2003 15:42:50 +0000 (15:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7003 a592a061-630c-0410-9148-cb99ea01b6c8

43 files changed:
src/frontends/controllers/ChangeLog
src/frontends/controllers/Dialog.C
src/frontends/controllers/Dialog.h
src/frontends/controllers/ViewBase.C
src/frontends/controllers/ViewBase.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/QAbout.C
src/frontends/qt2/QBibitem.C
src/frontends/qt2/QBibtex.C
src/frontends/qt2/QChanges.C
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QCitation.C
src/frontends/qt2/QDialogView.C
src/frontends/qt2/QDialogView.h
src/frontends/qt2/QERT.C
src/frontends/qt2/QError.C
src/frontends/qt2/QErrorList.C
src/frontends/qt2/QExternal.C
src/frontends/qt2/QFloat.C
src/frontends/qt2/QGraphics.C
src/frontends/qt2/QInclude.C
src/frontends/qt2/QLog.C
src/frontends/qt2/QMinipage.C
src/frontends/qt2/QParagraph.C
src/frontends/qt2/QRef.C
src/frontends/qt2/QShowFile.C
src/frontends/qt2/QTabular.C
src/frontends/qt2/QTabularCreate.C
src/frontends/qt2/QThesaurus.C
src/frontends/qt2/QToc.C
src/frontends/qt2/QURL.C
src/frontends/qt2/QVCLog.C
src/frontends/qt2/QWrap.C
src/frontends/qt2/Qt2Base.C
src/frontends/qt2/Qt2Base.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormDialogView.C
src/frontends/xforms/FormDialogView.h
src/frontends/xforms/FormErrorList.C
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormShowFile.C

index bbf08e3cd66438b682579afa65b54f4401d87759..94e167e1ccdc1fdbefbb0015d9ed3898c2bb036a 100644 (file)
@@ -1,6 +1,11 @@
+2003-05-21  Alfredo Braunstein  <abraunst@libero.it>
+
+       * ViewBase.h:
+       * Dialog.h (setTitle): added
+
 2003-05-20  Alfredo Braunstein  <abraunst@libero.it>
 
-       ControlErrorList.[Ch]: small bugs fixed, use ErrorList
+       ControlErrorList.[Ch]: small bugs fixed, use ErrorList
 
 2003-05-13  André Pönitz  <poenitz@gmx.net>
 
index 708c3c0862e10ba5765a1261bb0897c3f0c72e8f..3873dbe2085956366a5851d6fe5cffbc800be9a0 100644 (file)
@@ -162,6 +162,18 @@ Dialog::View & Dialog::view() const
 }
 
 
+void Dialog::View::setTitle(string const & newtitle)
+{
+       title_ = newtitle;
+}
+
+
+string const & Dialog::View::getTitle() const
+{
+       return title_;
+}
+
+
 void Dialog::setController(Controller * i)
 {
        lyx::Assert(i && !controller_ptr_.get());
index 88e6719d0ef7d04729bca2c36c1292bc8017e714..53e1b5ad7418fb5a6a7f3f52be87422400b5c2f7 100644 (file)
@@ -179,7 +179,7 @@ private:
  */
 class Dialog::View : boost::noncopyable {
 public:
-       View(Dialog & parent) : p_(parent) {}
+       View(Dialog & parent, string title) : p_(parent), title_(title) {}
        virtual ~View() {}
 
        //@{
@@ -225,6 +225,11 @@ public:
        Dialog & dialog() { return p_; }
        Dialog const & dialog() const { return p_; }
 
+       /// sets the title of the dialog (window caption)
+       void setTitle(string const &);
+       /// gets the title of the dialog (window caption)
+       string const & getTitle() const;
+
 protected:
        Kernel & kernel() { return p_.kernel(); }
        Kernel const & kernel() const { return p_.kernel(); }
@@ -239,6 +244,8 @@ protected:
 private:
        ///
        Dialog & p_;
+       ///
+       string title_;
 };
 
 
index a4cfa84b0c91b483943b1d0d19d61bbdbca3e4f8..d4745470a1eb67dc8dc8f761fd92d1b07b2b2391 100644 (file)
@@ -15,8 +15,8 @@
 #include "support/LAssert.h"
 
 
-ViewBase::ViewBase()
-       : controller_ptr_(0)
+ViewBase::ViewBase(string const & t)
+       : controller_ptr_(0), title_(t)
 {}
 
 
@@ -26,6 +26,18 @@ void ViewBase::setController(ControlButtons & c)
 }
 
 
+void ViewBase::setTitle(string const & newtitle)
+{
+       title_ = newtitle;
+}
+
+
+string const & ViewBase::getTitle() const
+{
+       return title_;
+}
+
+
 ControlButtons & ViewBase::getController()
 {
        lyx::Assert(controller_ptr_);
index dd5994e5569f9902beb4e6bdbb5f1dbdb6eb62a1..50781ae6bafd9e0088e7dbd64954d849c412796b 100644 (file)
@@ -20,7 +20,7 @@ class ButtonController;
 class ViewBase : boost::noncopyable {
 public:
        ///
-       ViewBase();
+       ViewBase(string const &);
        ///
        virtual ~ViewBase() {}
 
@@ -56,9 +56,18 @@ public:
        ControlButtons const & getController() const;
        ///
        ButtonController & bc();
+       /// sets the title of the dialog (window caption)
+       void setTitle(string const &);
+       /// gets the title of the dialog
+       string const & getTitle() const;
+
 protected:
        /// We don't own this.
        ControlButtons * controller_ptr_;
+
+private:
+       string title_;
+
 };
 
 #endif // VIEWBASE_H
index 5d66d553704d0470f5087d03b7e9150eb91d58d8..d8045e09ae878f1d763220c51738fa1a18318197 100644 (file)
@@ -1,3 +1,35 @@
+2003-05-21  Alfredo Braunstein  <abraunst@libero.it>
+
+       * Qt2Base.[Ch]:
+       * QDialogView.[Ch] (setTitle): added
+       * QAbout.C:
+       * QBibitem.C:
+       * QBibtex.C:
+       * QChanges.C:
+       * QCharacter.C:
+       * QCitation.C:
+       * QERT.C:
+       * QError.C:
+       * QErrorList.C:
+       * QErrorListDialog.C:
+       * QExternal.C:
+       * QFloat.C:
+       * QGraphics.C:
+       * QInclude.C:
+       * QLog.C:
+       * QMinipage.C:
+       * QParagraph.C:
+       * QRef.C:
+       * QShowFile.C:
+       * QTabular.C:
+       * QTabularCreate.C:
+       * QThesaurus.C:
+       * QToc.C:
+       * QURL.C:
+       * QVCLog.C:
+       * QWrap.C: the argument to Dialog::View ctor is now a string. use
+       setTitle instead of setCaption when appropriate
+
 2003-05-22  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * QErrorListDialog.C: remove include for <qtextedit.h>
index a336c620ad933baf083b2533ed5d67dba4017539..0bf9ab2b8dd538cf311c6ab77162a66744c9c044 100644 (file)
@@ -33,7 +33,7 @@ typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
 
 
 QAbout::QAbout(Dialog & parent)
-       : base_class(parent, qt_("About LyX"))
+       : base_class(parent, _("About LyX"))
 {
 }
 
index 6cbf93ccb65e6847eaeccfbdbf0de62d767fe493..a49091811d9eec6557a124e76c3a288008009d63 100644 (file)
@@ -28,7 +28,7 @@ typedef QController<ControlCommand, QView<QBibitemDialog> > base_class;
 
 
 QBibitem::QBibitem(Dialog & parent)
-       : base_class(parent, qt_("LyX: Bibliography Item Settings"))
+       : base_class(parent, _("LyX: Bibliography Item Settings"))
 {
 }
 
index 185eb4aeeb9d1ea291a876628d0bcd01fed568b3..c5fa14bb1104a1bbc5fa2e48bbcb0617d502753b 100644 (file)
@@ -38,7 +38,7 @@ typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
 
 
 QBibtex::QBibtex(Dialog & parent)
-       : base_class(parent, qt_("BibTeX"))
+       : base_class(parent, _("BibTeX"))
 {
 }
 
index 98e2e3f4a6af54b674a00cafb9bdd7a2199b9aa0..d1f18cbd0dc71054c172956182e1048307e8495d 100644 (file)
@@ -24,7 +24,7 @@ typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
 
 
 QChanges::QChanges(Dialog & parent)
-       : base_class(parent, qt_("LyX: Merge Changes"))
+       : base_class(parent, _("LyX: Merge Changes"))
 {
 }
 
index 8632e984a97f507aa622a2d3a781498cf811c1a2..0151c248a6b460078a8bf66352647e7627678acc 100644 (file)
@@ -33,7 +33,7 @@ typedef QController<ControlCharacter, QView<QCharacterDialog> > base_class;
 
 
 QCharacter::QCharacter(Dialog & parent)
-       : base_class(parent, qt_("LyX: Change Text Style"))
+       : base_class(parent, _("LyX: Change Text Style"))
 {
 }
 
index ae19e33cea774d4a0c405eac7e15330b1cefff85..5f1aadf0608bba1964ec04cbe665ec29acde9839 100644 (file)
@@ -43,7 +43,7 @@ typedef QController<ControlCitation, QView<QCitationDialog> > base_class;
 
 
 QCitation::QCitation(Dialog & parent)
-       : base_class(parent, qt_("LyX: Citation Reference"))
+       : base_class(parent, _("LyX: Citation Reference"))
 {}
 
 
index cbb3e117b2175f73da5608b4f6a978503284d5ff..ab50ead138ecf0fdefe3e3788c4bae4689c39851 100644 (file)
@@ -15,6 +15,7 @@
 #include <qapplication.h>
 
 #include "debug.h"
+#include "qt_helpers.h"
 #include "QtLyXView.h"
 #include "QDialogView.h"
 #include "Qt2BC.h"
@@ -22,8 +23,8 @@
 #include "support/LAssert.h"
 
 
-QDialogView::QDialogView(Dialog & parent, QString const & t)
-       : Dialog::View(parent), updating_(false), title_(t)
+QDialogView::QDialogView(Dialog & parent, string const & t)
+       : Dialog::View(parent,t), updating_(false)
 {}
 
 
@@ -55,10 +56,11 @@ void QDialogView::show()
 
        update();  // make sure its up-to-date
 
+       form()->setCaption(toqstr(getTitle()));
+
        if (form()->isVisible()) {
                form()->raise();
        } else {
-               form()->setCaption(title_);
                form()->show();
        }
 }
index c2ab533e46a771d662e8f00d66f44d83ba8690c0..103078b895d469bcaa2df089e05db5b1fd8c303e 100644 (file)
@@ -29,12 +29,11 @@ class QDialogView : public QObject, public Dialog::View {
        Q_OBJECT
 public:
        ///
-       QDialogView(Dialog &, QString const &);
+       QDialogView(Dialog &, string const &);
        ///
        virtual ~QDialogView() {}
        ///
        bool readOnly() const;
-
 protected:
        /// build the actual dialog
        virtual void build_dialog() = 0;
@@ -78,10 +77,6 @@ protected slots:
 private:
        /// Pointer to the actual instantiation of the Qt dialog
        virtual QDialog * form() const = 0;
-
-private:
-       /// dialog title, displayed by WM.
-       QString title_;
 };
 
 
index b556a2d40718d94260228673d59e9e3ce070514e..2356a15578edd7fb6dcd87a3f8ddd551710c8c38 100644 (file)
@@ -25,7 +25,7 @@ typedef QController<ControlERT, QView<QERTDialog> > base_class;
 
 
 QERT::QERT(Dialog & parent)
-       : base_class(parent, qt_("LyX: TeX Code Settings"))
+       : base_class(parent, _("LyX: TeX Code Settings"))
 {
 }
 
index 09e9b65d4d3090353181fcda2ba9b633833d664d..12a2dac3e002ccdf598dcff96bf2d762a5deacc3 100644 (file)
@@ -25,7 +25,7 @@ typedef QController<ControlError, QView<QErrorDialog> > base_class;
 
 
 QError::QError(Dialog & parent)
-       : base_class(parent, qt_("LyX: LaTeX Error"))
+       : base_class(parent, _("LyX: LaTeX Error"))
 {
 }
 
index 76c7a09ced322449ccad4bea236a408045579033..41864abba6f129dfa6e303c86f8f57a7bdc4dec7 100644 (file)
@@ -48,7 +48,7 @@ void QErrorList::select(int item)
 
 void QErrorList::update_contents()
 {
-       dialog_->setCaption(toqstr(controller().name()));
+       setTitle(controller().name());
        dialog_->errorsLB->clear();
        dialog_->descriptionTB->setText(QString());
 
index 9923290032fa739a6d10fb9c27bf4e9291ae564b..e998ebaf14731483fba930203db472570c4ea81d 100644 (file)
@@ -29,7 +29,7 @@ typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
 
 
 QExternal::QExternal(Dialog & parent)
-       : base_class(parent, qt_("LyX: External Material"))
+       : base_class(parent, _("LyX: External Material"))
 {
 }
 
index af279acf5c02bfd4d475f91b2dacdd9feaffdbba..c60f3df3da7319326f4d8014ce8a7c86b1d5a861 100644 (file)
@@ -27,7 +27,7 @@ typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
 
 
 QFloat::QFloat(Dialog & parent)
-       : base_class(parent, qt_("LyX: Float Settings"))
+       : base_class(parent, _("LyX: Float Settings"))
 {
 }
 
index a82da948637fe4976697e2941dbbe7e4183efcd9..b33169037e100ea946f38d268fb5dcd437ecbfcf 100644 (file)
@@ -47,7 +47,7 @@ typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
 
 
 QGraphics::QGraphics(Dialog & parent)
-       : base_class(parent, qt_("LyX: Graphics"))
+       : base_class(parent, _("LyX: Graphics"))
 {
 }
 
index caf5e2ffff29147dc8756b3a3b90a975d28dfa0a..450f3d46d25df3cc06ee7b29186945f186f45053 100644 (file)
@@ -29,7 +29,7 @@ typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
 
 
 QInclude::QInclude(Dialog & parent)
-       : base_class(parent, qt_("LyX: Child Document"))
+       : base_class(parent, _("LyX: Child Document"))
 {}
 
 
index 9ea5a027f5e34c1ad4c9759240f16b1afc9a3d90..a3189cf84a42f2e3e8a22f605d23ec7cad6b499c 100644 (file)
@@ -31,7 +31,7 @@ using std::getline;
 typedef QController<ControlLog, QView<QLogDialog> > base_class;
 
 QLog::QLog(Dialog & parent)
-       : base_class(parent, qt_("LyX: LaTeX Log"))
+       : base_class(parent, _("LyX: LaTeX Log"))
 {
 }
 
@@ -50,9 +50,9 @@ void QLog::update_contents()
                controller().logfile();
 
        if (logfile.first == Buffer::buildlog)
-               dialog_->setCaption(qt_("Build log"));
+               setTitle(_("Build log"));
        else
-               dialog_->setCaption(qt_("LaTeX log"));
+               setTitle(_("LaTeX log"));
 
        dialog_->logTV->setText("");
 
index b0f1020ad6614e292cc64c03a641385a2a4c1d21..08a41c076e199420ccc25413bd740a66fb2faf8b 100644 (file)
@@ -30,7 +30,7 @@ typedef QController<ControlMinipage, QView<QMinipageDialog> > base_class;
 
 
 QMinipage::QMinipage(Dialog & parent)
-       : base_class(parent, qt_("LyX: Minipage Settings"))
+       : base_class(parent, _("LyX: Minipage Settings"))
 {
 }
 
index 4484f4750c26507a96c01a0a3cce03ba776f8412..74cce8bc11fa66f8e4a02c9f15d12e4fe64236dd 100644 (file)
@@ -43,7 +43,7 @@ typedef QController<ControlParagraph, QView<QParagraphDialog> > base_class;
 
 
 QParagraph::QParagraph(Dialog & parent)
-       : base_class(parent, qt_("LyX: Paragraph Settings"))
+       : base_class(parent, _("LyX: Paragraph Settings"))
 {}
 
 
index 553595c7bbd3e7dd5d1f34e6695a5d5dd97b23eb..9f3b29682635059027b2563c098a178980bc92d2 100644 (file)
@@ -39,7 +39,7 @@ typedef QController<ControlRef, QView<QRefDialog> > base_class;
 
 
 QRef::QRef(Dialog & parent)
-       : base_class(parent, qt_("LyX: Cross-reference")),
+       : base_class(parent, _("LyX: Cross-reference")),
        sort_(false), at_ref_(false)
 {
 }
index a79e0525d05fa30efb30da37e4d6c8e3c9dd2368..b68386c67906ca754efbebd4449994a218868934 100644 (file)
@@ -25,7 +25,7 @@ typedef QController<ControlShowFile, QView<QShowFileDialog> > base_class;
 
 
 QShowFile::QShowFile(Dialog & parent)
-       : base_class(parent, qt_("LyX: Show File"))
+       : base_class(parent, _("LyX: Show File"))
 {
 }
 
index 85bc8706547846995a5ecaa9d89e6dc7b8bce2f6..bbf8d31627d1e2d22da26d2d270eb9c77e0c160c 100644 (file)
@@ -34,7 +34,7 @@
 typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
 
 QTabular::QTabular(Dialog & parent)
-       : base_class(parent, qt_("LyX: Table Settings"))
+       : base_class(parent, _("LyX: Table Settings"))
 {
 }
 
index 866dfddb8ecc1e5907bfb29a77056c07133d4178..84d6c6dac57d61fa01062ccbdae80b8ebb4a42cf 100644 (file)
@@ -25,7 +25,7 @@ typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> > base_cla
 
 
 QTabularCreate::QTabularCreate(Dialog & parent)
-       : base_class(parent, qt_("LyX: Insert Table"))
+       : base_class(parent, _("LyX: Insert Table"))
 {
 }
 
index 81453baea02b0a41092e082cde5b6ebff0077b41..e440ba640b96f4111acb45e32a9a993b0d0eab0b 100644 (file)
@@ -25,7 +25,7 @@ typedef QController<ControlThesaurus, QView<QThesaurusDialog> > base_class;
 
 
 QThesaurus::QThesaurus(Dialog & parent)
-       : base_class(parent, qt_("LyX: Thesaurus"))
+       : base_class(parent, _("LyX: Thesaurus"))
 {
 }
 
index d0fc232b484a3c1d31541aceccd6a64757921e74..64eeba91f977282c99e0759e16e8c18a69bc213b 100644 (file)
@@ -36,7 +36,7 @@ using std::vector;
 typedef QController<ControlToc, QView<QTocDialog> > base_class;
 
 QToc::QToc(Dialog & parent)
-       : base_class(parent, qt_("LyX: Table of Contents")), depth_(1)
+       : base_class(parent, _("LyX: Table of Contents")), depth_(1)
 {}
 
 
@@ -61,7 +61,7 @@ void QToc::updateType()
                dialog_->typeCO->insertItem(toqstr(*it));
                if (*it == type) {
                        dialog_->typeCO->setCurrentItem(it - choice.begin());
-                       dialog_->setCaption(toqstr(type));
+                       setTitle(type);
                }
        }
 }
index daba1de69e9ac665ec629168542e7bc39553274a..5f83af9b6a0b0e83e7bfc5255be44690cfff8d66 100644 (file)
@@ -26,7 +26,7 @@
 typedef QController<ControlCommand, QView<QURLDialog> > base_class;
 
 QURL::QURL(Dialog & parent)
-       : base_class(parent, qt_("LyX: URL"))
+       : base_class(parent, _("LyX: URL"))
 {
 }
 
index 50507e3dae0f146e3e2cb2507554d6f8f86d8a3a..5769148bb8731052c52c79f879a9535c82818e42 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "Lsstream.h"
 #include "qt_helpers.h"
+#include "support/lstrings.h"
 #include "LyXView.h"
 #include "ControlVCLog.h"
 
@@ -29,7 +30,7 @@ typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
 
 
 QVCLog::QVCLog(Dialog & parent)
-       : base_class(parent, qt_("LyX: Version Control Log"))
+       : base_class(parent, _("LyX: Version Control Log"))
 {
 }
 
@@ -44,11 +45,9 @@ void QVCLog::build_dialog()
 
 void QVCLog::update_contents()
 {
-#if USE_BOOST_FORMAT
-       dialog_->setCaption(toqstr(boost::io::str(boost::format(_("Version control log for %1$s")) % controller().getBufferFileName())));
-#else
-       dialog_->setCaption(toqstr(string(_("Version control log for ")) + controller().getBufferFileName()));
-#endif
+       setTitle(bformat(_("Version control log for %1$s"), 
+                        controller().getBufferFileName()));
+
        dialog_->vclogTV->setText("");
 
        ostringstream ss;
index 279ec8dc4ab1ef87ce006f2a6bf13113bbaabb45..0780f285c8844c650eec5f888a327e67f5badc81 100644 (file)
@@ -33,7 +33,7 @@ typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
 
 
 QWrap::QWrap(Dialog & parent)
-       : base_class(parent, qt_("LyX: Text Wrap Settings"))
+       : base_class(parent, _("LyX: Text Wrap Settings"))
 {
 }
 
index 25aadf019e969dbbfd7415941b4987c15ee51ce5..704ac24ba6bd6b6fbd9162542b53b8642dc36968 100644 (file)
@@ -14,6 +14,7 @@
 #include <qapplication.h>
 
 #include "debug.h"
+#include "qt_helpers.h"
 #include "QtLyXView.h"
 #include "Qt2Base.h"
 #include "Qt2BC.h"
@@ -22,8 +23,8 @@
 #include "support/LAssert.h"
 
 
-Qt2Base::Qt2Base(QString const & t)
-       : ViewBase(), updating_(false), title_(t)
+Qt2Base::Qt2Base(string const & t)
+       : ViewBase(t), updating_(false)
 {}
 
 
@@ -50,10 +51,11 @@ void Qt2Base::show()
 
        update();  // make sure its up-to-date
 
+       form()->setCaption(toqstr(getTitle()));
+
        if (form()->isVisible()) {
                form()->raise();
        } else {
-               form()->setCaption(title_);
                form()->show();
        }
 }
index e9f573b155529fc1a1dab7f9bde42043e5b302b3..2c88f595c7de65af0426c5c32ba18e36f417f3b6 100644 (file)
@@ -29,7 +29,7 @@ class Qt2Base : public QObject, public ViewBase {
        Q_OBJECT
 public:
        ///
-       Qt2Base(QString const &);
+       Qt2Base(string const &);
        ///
        virtual ~Qt2Base() {}
 protected:
@@ -73,10 +73,6 @@ protected slots:
 private:
        /// Pointer to the actual instantiation of the Qt dialog
        virtual QDialog * form() const = 0;
-
-private:
-       /// dialog title, displayed by WM.
-       QString title_;
 };
 
 
index 7b021bd9ec4296761f8841f488760a76a158d282..fe0fef9663df059cecfabf64b17dbf307641a60a 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-21  Alfredo Braunstein  <abraunst@libero.it>
+
+       * FormBase.[Ch]:
+       * FormDialogView.[Ch] (setTitle): added
+       * FormErrorList.C:
+       * FormLog.C:
+       * FormShowFile.C: use setTitle
+
 2003-05-20  Alfredo Braunstein  <abraunst@libero.it>
 
        * FormErrorList.[Ch]: small bugs fixed
index 04440a220ccfa5f6043fcac4fa8006d8f4a86bb2..aa75144166e9f4758de55ba774009a9e62d94d28 100644 (file)
@@ -46,10 +46,10 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
 
 
 FormBase::FormBase(string const & t, bool allowResize)
-       : ViewBase(),
+       : ViewBase(t),
          warning_posted_(false), message_widget_(0),
          minw_(0), minh_(0), allow_resize_(allowResize),
-         title_(t), icon_pixmap_(0), icon_mask_(0),
+         icon_pixmap_(0), icon_mask_(0),
          tooltips_(new Tooltips())
 {}
 
@@ -102,7 +102,7 @@ void FormBase::prepare_to_show()
 
        // set the title for the minimized form
        if (!getController().IconifyWithMain())
-               fl_winicontitle(form()->window, title_.c_str());
+               fl_winicontitle(form()->window, getTitle().c_str());
 
        //  assign an icon to the form
        string const iconname = LibFileSearch("images", "lyx", "xpm");
@@ -155,7 +155,7 @@ void FormBase::show()
                if (!allow_resize_)
                        fl_set_form_maxsize(form(), minw_, minh_);
 
-               string const maximize_title = "LyX: " + title_;
+               string const maximize_title = "LyX: " + getTitle();
                int const iconify_policy =
                        getController().IconifyWithMain() ? FL_TRANSIENT : 0;
 
index bf5b9d4a714e73fe7f177ff2c2fefb680c7775f3..bb0d481cade53fe549cc4765f9e9573270fc0e1f 100644 (file)
@@ -124,8 +124,6 @@ private:
        int minh_;
        /// Can the dialog be resized after it has been created?
        bool allow_resize_;
-       /// dialog title, displayed by the window manager.
-       string title_;
        /// Passed to the window manager to give a pretty little symbol ;-)
        Pixmap icon_pixmap_;
        ///
index 87b3b533df1ed5a4a253260105beb111a0b32993..78389477f9d8be3ff698149bec0d7ba5fa491527 100644 (file)
@@ -48,10 +48,10 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
 
 FormDialogView::FormDialogView(Dialog & parent,
                               string const & t, bool allowResize)
-       : Dialog::View(parent),
+       : Dialog::View(parent, t),
          warning_posted_(false), message_widget_(0),
          minw_(0), minh_(0), allow_resize_(allowResize),
-         title_(t), icon_pixmap_(0), icon_mask_(0),
+         icon_pixmap_(0), icon_mask_(0),
          tooltips_(new Tooltips())
 {}
 
@@ -104,7 +104,7 @@ void FormDialogView::prepare_to_show()
 
        // set the title for the minimized form
        if (!lyxrc.dialogs_iconify_with_main)
-               fl_winicontitle(form()->window, title_.c_str());
+               fl_winicontitle(form()->window, getTitle().c_str());
 
        //  assign an icon to the form
        string const iconname = LibFileSearch("images", "lyx", "xpm");
@@ -157,7 +157,7 @@ void FormDialogView::show()
                if (!allow_resize_)
                        fl_set_form_maxsize(form(), minw_, minh_);
 
-               string const maximize_title = "LyX: " + title_;
+               string const maximize_title = "LyX: " + getTitle();
                int const iconify_policy = lyxrc.dialogs_iconify_with_main ?
                        FL_TRANSIENT : 0;
 
index 7a34894d55aa6c6c0c2de720b59424d4b847a5d7..30383241c4f087311caf2fb62814eebd80edd398 100644 (file)
@@ -123,8 +123,6 @@ private:
        int minh_;
        /// Can the dialog be resized after it has been created?
        bool allow_resize_;
-       /// dialog title, displayed by the window manager.
-       string title_;
        /// Passed to the window manager to give a pretty little symbol ;-)
        Pixmap icon_pixmap_;
        ///
index afb0b723b3d0846898a2553d325221e960466158..dea9ead658761aea8442dd71740edbcfca76f8ac 100644 (file)
@@ -39,7 +39,7 @@ void FormErrorList::build()
 
 void FormErrorList::update()
 {
-        fl_set_form_title(dialog_->form, controller().name().c_str());
+        setTitle(controller().name());
        updateContents();
 }
 
index 04b43386bcf06e5b9458b92f7751a52582555c67..b16c14307b2a8e11d5137d2aab1c7fdcd8d39f02 100644 (file)
@@ -30,7 +30,7 @@ void FormLog::update()
        string const title = buildlog ?
                _("LyX: LaTeX Log") :
                _("LyX: Literate Programming Build Log");
-       fl_set_form_title(dialog_->form, title.c_str());
+       setTitle(title);
 
        fl_clear_browser(dialog_->browser);
        int const valid = fl_load_browser(dialog_->browser,
index cfd1139703ce9bb5ddb80e99e2ec9c172ebb777e..c1b8bb5ad0ea08e4b709f2a0bec150b4814b6ba4 100644 (file)
@@ -33,7 +33,7 @@ void FormShowFile::update()
        fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE);
 
        string const title = "LyX: " + controller().getFileName();
-       fl_set_form_title(dialog_->form, title.c_str());
+       setTitle(title);
 
        string const contents = controller().getFileContents();
        if (contents.empty())