]> git.lyx.org Git - features.git/commitdiff
Close tab button started with 4.5.
authorPavel Sanda <sanda@lyx.org>
Sun, 4 Nov 2012 00:37:54 +0000 (01:37 +0100)
committerPavel Sanda <sanda@lyx.org>
Sun, 4 Nov 2012 00:37:54 +0000 (01:37 +0100)
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiWorkArea.cpp

index 902d2dd9cd460a557196c0c437e456caf1f4bcb8..e2ecb06e70b39fe8ba3b58626dc17b98fc7f999e 100644 (file)
@@ -2515,9 +2515,6 @@ PrefUserInterface::PrefUserInterface(GuiPreferences * form)
                this, SIGNAL(changed()));
        connect(singleInstanceCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-#if QT_VERSION < 0x040500
-       singleCloseTabButtonCB->setEnabled(false);
-#endif
        connect(singleCloseTabButtonCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(uiFilePB, SIGNAL(clicked()),
@@ -2571,9 +2568,7 @@ void PrefUserInterface::apply(LyXRC & rc) const
        rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
        rc.single_instance = singleInstanceCB->isChecked();
        rc.single_close_tab_button = singleCloseTabButtonCB->isChecked();
-#if QT_VERSION < 0x040500
-       rc.single_close_tab_button = true;
-#endif
+
        switch (closeLastViewCO->currentIndex()) {
        case 0:
                rc.close_buffer_with_last_view = "yes";
index 135d7b29e14f12f75f6e5859694ad43cdc7af062..a693c23c58257a4ed3a703da32ee5a04f692c30f 100644 (file)
@@ -1508,9 +1508,6 @@ TabWorkArea::TabWorkArea(QWidget * parent)
 #ifdef Q_WS_MACX
        setStyle(&noTabFrameMacStyle);
 #endif
-#if QT_VERSION < 0x040500
-       lyxrc.single_close_tab_button = true;
-#endif
 
        QPalette pal = palette();
        pal.setColor(QPalette::Active, QPalette::Button,
@@ -1547,10 +1544,8 @@ TabWorkArea::TabWorkArea(QWidget * parent)
        tb->setContextMenuPolicy(Qt::CustomContextMenu);
        connect(tb, SIGNAL(customContextMenuRequested(const QPoint &)),
                this, SLOT(showContextMenu(const QPoint &)));
-#if QT_VERSION >= 0x040500
        connect(tb, SIGNAL(tabCloseRequested(int)),
                this, SLOT(closeTab(int)));
-#endif
 
        setUsesScrollButtons(true);
 }
@@ -1608,9 +1603,7 @@ void TabWorkArea::showBar(bool show)
        tabBar()->setEnabled(show);
        tabBar()->setVisible(show);
        closeBufferButton->setVisible(show && lyxrc.single_close_tab_button);
-#if QT_VERSION >= 0x040500
        setTabsClosable(!lyxrc.single_close_tab_button);
-#endif
 }
 
 
@@ -2019,9 +2012,7 @@ DragTabBar::DragTabBar(QWidget* parent)
        : QTabBar(parent)
 {
        setAcceptDrops(true);
-#if QT_VERSION >= 0x040500
        setTabsClosable(!lyxrc.single_close_tab_button);
-#endif
 }