summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-06 19:48:46 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-06 19:48:46 (GMT)
commit711930d831964515536de61e33e25996fcca7a60 (patch)
treeb735e6b991b3165ad2c9e0ef5a180eb0d82f6d1e
parent4aa730f3740d55e2d6d34250c7178601418ce050 (diff)
Show close button by default
-rw-r--r--CMakeLists.txt2
-rw-r--r--messagelist/src/core/settings.kcfg5
-rw-r--r--messagelist/src/pane.cpp17
3 files changed, 8 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce27757..2512d12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.3.71")
+set(PIM_VERSION "5.3.72")
set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/messagelist/src/core/settings.kcfg b/messagelist/src/core/settings.kcfg
index b4aaf6d..5236b0f 100644
--- a/messagelist/src/core/settings.kcfg
+++ b/messagelist/src/core/settings.kcfg
@@ -11,11 +11,6 @@
<label>Display tooltips for messages and group headers</label>
<whatsthis>Enable this option to display tooltips when hovering over an item in the message list.</whatsthis>
</entry>
- <entry name="TabsHaveCloseButton" type="Bool">
- <default>false</default>
- <label>Show close button on each tab</label>
- <whatsthis>Enable this option if you want to have a close button on each tab.</whatsthis>
- </entry>
<entry name="ShowQuickSearch" type="Bool">
<default>true</default>
</entry>
diff --git a/messagelist/src/pane.cpp b/messagelist/src/pane.cpp
index c57f3c1..a0b8556 100644
--- a/messagelist/src/pane.cpp
+++ b/messagelist/src/pane.cpp
@@ -164,7 +164,7 @@ Pane::Pane(bool restoreSession, QAbstractItemModel *model, QItemSelectionModel *
connect(d->mCloseTabButton, SIGNAL(clicked()),
SLOT(onCloseTabClicked()));
- setTabsClosable(MessageListSettings::self()->tabsHaveCloseButton());
+ setTabsClosable(true);
connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(slotTabCloseRequested(int)));
readConfig(restoreSession);
@@ -834,15 +834,12 @@ void Pane::Private::updateTabControls()
q->setCornerWidget(Q_NULLPTR, Qt::TopLeftCorner);
}
- const bool hasCloseButton(MessageListSettings::self()->tabsHaveCloseButton());
- q->setTabsClosable(hasCloseButton);
- if (hasCloseButton) {
- const int numberOfTab(q->count());
- if (numberOfTab == 1) {
- q->tabBar()->tabButton(0, QTabBar::RightSide)->setEnabled(false);
- } else if (numberOfTab > 1) {
- q->tabBar()->tabButton(0, QTabBar::RightSide)->setEnabled(true);
- }
+ q->setTabsClosable(true);
+ const int numberOfTab(q->count());
+ if (numberOfTab == 1) {
+ q->tabBar()->tabButton(0, QTabBar::RightSide)->setEnabled(false);
+ } else if (numberOfTab > 1) {
+ q->tabBar()->tabButton(0, QTabBar::RightSide)->setEnabled(true);
}
}