]> git.lyx.org Git - features.git/commitdiff
remove Dialog::title_, direct setting the title works as well.
authorAndré Pönitz <poenitz@gmx.net>
Mon, 10 Sep 2007 19:02:11 +0000 (19:02 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 10 Sep 2007 19:02:11 +0000 (19:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20196 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/Dialog.cpp
src/frontends/controllers/Dialog.h
src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiDelimiter.cpp
src/frontends/qt4/GuiDialog.cpp
src/frontends/qt4/GuiDialog.h
src/frontends/qt4/GuiEmbeddedFiles.cpp
src/frontends/qt4/GuiMathMatrix.cpp
src/frontends/qt4/LyXFileDialog.cpp

index 71fd5224d7454e478ea168a54aac9e357b6cf384..ed236578bf4cea6af5191b74aadc57ac05549e91 100644 (file)
@@ -125,6 +125,12 @@ void Dialog::setController(Controller * controller)
        controller_ = controller;
 }
 
+Controller & Dialog::controller() const
+{
+       BOOST_ASSERT(controller_);
+       return *controller_;
+}
+
 
 Controller::Controller(Dialog & parent)
        : parent_(parent)
@@ -139,24 +145,5 @@ bool Controller::canApply() const
 }
 
 
-Controller & Dialog::controller() const
-{
-       BOOST_ASSERT(controller_);
-       return *controller_;
-}
-
-
-void Dialog::setViewTitle(docstring const & newtitle)
-{
-       title_ = newtitle;
-}
-
-
-docstring const & Dialog::getViewTitle() const
-{
-       return title_;
-}
-
-
 } // namespace frontend
 } // namespace lyx
index d88be2da3f2922e544c78c2ff5c5124c90707175..c3a0fd2bae8c660098d6ade7c5e1ba8575dd1ff2 100644 (file)
@@ -146,10 +146,6 @@ public:
         */
        virtual void partialUpdateView(int /*id*/) {}
 
-       /// sets the title of the dialog (window caption)
-       void setViewTitle(docstring const &);
-       /// gets the title of the dialog (window caption)
-       docstring const & getViewTitle() const;
        ///
        std::string name() const { return name_; }
 
@@ -168,8 +164,6 @@ protected:
         */
        std::string name_;
        Controller * controller_;
-
-       docstring title_;
 };
 
 
index d8835c56ec931d34257e708c19ae4b0d03909ba2..7b355ef9bb6dfc5bdcbdeca4ecc52cdd94fea784 100644 (file)
@@ -74,8 +74,6 @@ GuiCitationDialog::GuiCitationDialog(LyXView & lv)
        setViewTitle(_("Citation"));
        setController(new ControlCitation(*this));
 
-       setWindowTitle(toqstr("LyX: " + getViewTitle()));
-
        connect(citationStyleCO, SIGNAL(activated(int)),
                this, SLOT(changed()));
        connect(fulllistCB, SIGNAL(clicked()),
index 6e50782e1de82c3e2e838ff4e346fc20dc2fd9fd..da0fbd5badf3103fa7964f6c18f025f8bc590e58 100644 (file)
@@ -66,7 +66,6 @@ GuiDelimiterDialog::GuiDelimiterDialog(LyXView & lv)
 
        connect(closePB, SIGNAL(clicked()), this, SLOT(accept()));
 
-       setWindowTitle(qt_("LyX: Delimiters"));
        setFocusProxy(leftLW);
 
        leftLW->setViewMode(QListView::IconMode);
index dad989fcae22a044c5723f228b745fd29b944090..0e2dbaaf5cab96ca9c68e9b75c8ecf7b7421d506 100644 (file)
@@ -22,6 +22,12 @@ GuiDialog::GuiDialog(LyXView & lv, std::string const & name)
 {}
 
 
+void GuiDialog::setViewTitle(docstring const & title)
+{
+       setWindowTitle("LyX: " + toqstr(title));
+}
+
+
 void GuiDialog::setButtonsValid(bool valid)
 {
        bc().setValid(valid);
@@ -140,8 +146,6 @@ void GuiDialog::showView()
        if (controller().exitEarly())
                return;
 
-       setWindowTitle(toqstr("LyX: " + getViewTitle()));
-
        if (QWidget::isVisible()) {
                raise();
                activateWindow();
index dbc32e1a27ef80b3da1dd291cabbcda81a63103a..b43448a5f28fc238fec1a226143940ac9443a60e 100644 (file)
@@ -79,6 +79,8 @@ public:
        void preUpdate();
        void postUpdate();
 
+       void setViewTitle(docstring const & title);
+
        ///
        bool readOnly() const;
 
index 39fe5d83a608d6ac0729fa7522631c483a21846f..fbe1b1eab5d17c6ec5fb0f7612fdceaa9717d04c 100644 (file)
@@ -21,12 +21,12 @@ namespace lyx {
 namespace frontend {
 
 
-GuiEmbeddedFilesDialog::GuiEmbeddedFilesDialog(ControlEmbeddedFiles & controller)
+GuiEmbeddedFilesDialog::GuiEmbeddedFilesDialog
+               (ControlEmbeddedFiles & controller)
        : controller_(controller)
 {
        setupUi(this);
-       setWindowTitle(qt_("Embedded Files"));
-
+       setWindowTitle("LyX: " + qt_("Embedded Files"));
        updateView();
 }
 
index f4ba1b142b7d9152005336fd0e08aee730f00f68..a8cda21df9393158f6e20cd8dfd18032504c10f7 100644 (file)
@@ -36,8 +36,6 @@ GuiMathMatrixDialog::GuiMathMatrixDialog(LyXView & lv)
        setViewTitle(_("Math Matrix"));
        setController(new ControlMath(*this));
 
-       setWindowTitle(qt_("LyX: Insert Matrix"));
-
        table->setMinimumSize(100, 100);
        rowsSB->setValue(5);
        columnsSB->setValue(5);
index a77d08f186c9cb070385c72131baaf4593435795..3576d9d72c14a74d5c1ff889272a2a5e70461688 100644 (file)
@@ -27,11 +27,12 @@ using std::string;
 namespace lyx {
 
 /// return the Qt form of the label
-static docstring const getLabel(docstring const & ucs4str) {
+static docstring const getLabel(docstring const & ucs4str)
+{
        // FIXME UNICODE
        string str = to_utf8(ucs4str);
        string label;
-       string sc(split(str, label, '|'));
+       string sc = split(str, label, '|');
        if (sc.length() < 2)
                return from_utf8(label);
        string::size_type pos = label.find(sc[1]);