Commit 711930d8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show close button by default

parent 4aa730f3
......@@ -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")
......
......@@ -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>
......
......@@ -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);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment