The attached patch adds a new option to the tab settings. If turned on, rekonq
activates the previously selected tab if the active tab is closed.
The default setting is the current behaviour, where the tab right to the
closed one is activated.
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e772baf..9015755 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -509,6 +509,12 @@ void MainWindow::updateConfiguration()
// ============== General ==================
m_view->updateTabBar();
+ // ============== Tabs ==================
+ if (ReKonfig::closeTabSelectPrevious())
+ m_view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
+ else
+ m_view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
+
// =========== Fonts ==============
QWebSettings *defaultSettings = QWebSettings::globalSettings();
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index d6fde9e..6b92655 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -57,6 +57,9 @@
<entry name="alwaysShowTabPreviews" type="Bool">
<default>true</default>
</entry>
+ <entry name="closeTabSelectPrevious" type="Bool">
+ <default>false</default>
+ </entry>
</group>
diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui
index ba903ff..886eb8a 100644
--- a/src/settings/settings_tabs.ui
+++ b/src/settings/settings_tabs.ui
@@ -58,6 +58,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="kcfg_closeTabSelectPrevious">
+ <property name="text">
+ <string>Select previous tab when active tab is closed</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
_______________________________________________
rekonq mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/rekonq