summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLindsay Mathieson <lindsay.mathieson@gmail.com>2013-01-24 20:15:02 +1000
committerLindsay Mathieson <lindsay.mathieson@gmail.com>2013-01-24 20:15:02 +1000
commit16e86e98b996a7596d6e7fede4921febeda2acee (patch)
treef24b5a140cced3b3aba2c7158a67f67c5b7cedcd
parentFixes javascript error for word replacement from the spellcheck popup menu. (diff)
downloadrekonq-16e86e98b996a7596d6e7fede4921febeda2acee.tar.xz
Added option for opening new tabs next to current (default to true). Otherwise tabs created at end of list.
-rw-r--r--src/rekonq.kcfg3
-rw-r--r--src/settings/settings_tabs.ui7
-rw-r--r--src/tabwindow/rekonqwindow.cpp5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 0e083edf..6303dcde 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -119,6 +119,9 @@
<entry name="closeTabSelectPrevious" type="Bool">
<default>false</default>
</entry>
+ <entry name="openNewTabsNextToCurrent" type="Bool">
+ <default>true</default>
+ </entry>
</group>
diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui
index df6db9ba..5b367a8d 100644
--- a/src/settings/settings_tabs.ui
+++ b/src/settings/settings_tabs.ui
@@ -215,6 +215,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="kcfg_openNewTabsNextToCurrent">
+ <property name="text">
+ <string>Open new tabs next to current tab</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp
index 1717403c..ee37eba9 100644
--- a/src/tabwindow/rekonqwindow.cpp
+++ b/src/tabwindow/rekonqwindow.cpp
@@ -27,6 +27,7 @@
// Self Includes
#include "rekonqwindow.h"
#include "rekonqwindow.moc"
+#include <rekonq.h>
// KDE Includes
#include <KApplication>
@@ -379,6 +380,8 @@ int RekonqWindow::addTab(QWidget *page, const QIcon &icon, const QString &label)
int RekonqWindow::insertTab(int index, QWidget *page, const QString &label)
{
+ if (! ReKonfig::openNewTabsNextToCurrent())
+ index = -1;
setUpdatesEnabled(false);
int i = KTabWidget::insertTab(index, page, label);
setUpdatesEnabled(true);
@@ -389,6 +392,8 @@ int RekonqWindow::insertTab(int index, QWidget *page, const QString &label)
int RekonqWindow::insertTab(int index, QWidget *page, const QIcon &icon, const QString &label)
{
+ if (! ReKonfig::openNewTabsNextToCurrent())
+ index = -1;
setUpdatesEnabled(false);
int i = KTabWidget::insertTab(index, page, icon, label);
setUpdatesEnabled(true);