summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-01-02 11:37:41 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-01-02 11:37:41 +0100
commitd44dbdafcd96dd988076b729810af964a6e9bf7c (patch)
treedd1a69f1a5cb59855db9592f3f03b479492bfd10
parentabout:tabs, easy method to manage rekonq tabs. (diff)
downloadrekonq-d44dbdafcd96dd988076b729810af964a6e9bf7c.tar.xz
Clean up rekonq.kcfg
It was really a mess before. I also found 2 settings never used... WARNING: This will cost users to reset some settings. Sorry for that
-rw-r--r--src/application.cpp8
-rw-r--r--src/mainview.cpp2
-rw-r--r--src/rekonq.kcfg136
-rw-r--r--src/settings/settings_tabs.ui19
-rw-r--r--src/webpage.cpp6
5 files changed, 97 insertions, 74 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 942e0876..fb67c236 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -454,14 +454,14 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
switch (newType)
{
case Rekonq::NewTab:
- if (ReKonfig::openTabNoWindow())
+ if (ReKonfig::openLinksInNewWindow())
{
- tab = w->mainView()->newWebTab(!ReKonfig::openTabsBack());
+ w = newMainWindow();
+ tab = w->mainView()->currentWebTab();
}
else
{
- w = newMainWindow();
- tab = w->mainView()->currentWebTab();
+ tab = w->mainView()->newWebTab(!ReKonfig::openNewTabsInBackground());
}
break;
case Rekonq::NewFocusedTab:
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 5e616ff7..008eda09 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -303,7 +303,7 @@ WebTab *MainView::newWebTab(bool focused)
connect(tab->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
connect(tab->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *)));
- if (ReKonfig::openTabsNearCurrent())
+ if (ReKonfig::openNewTabsNearCurrent())
{
insertTab(currentIndex() + 1, tab, i18n("(Untitled)"));
m_widgetBar->insertWidget(currentIndex() + 1, tab->urlBar());
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 08bae46b..bfaece5f 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -55,18 +55,12 @@
<entry name="startupBehaviour" type="Int">
<default>1</default>
</entry>
- <entry name="newTabsBehaviour" type="Int">
- <default>0</default>
- </entry>
- <entry name="newTabStartPage" type="Int">
- <default>0</default>
+ <entry name="useNewTabPage" type="Bool">
+ <default>false</default>
</entry>
<entry name="homePage" type="String">
<default>http://www.kde.org/</default>
</entry>
- <entry name="useNewTabPage" type="Bool">
- <default>false</default>
- </entry>
<entry name="downloadPath" type="Url">
<default code="true">KGlobalSettings::downloadPath()</default>
</entry>
@@ -79,33 +73,9 @@
<entry name="kgetList" type="Bool">
<default>false</default>
</entry>
- <entry name="searchEngine" type="Int">
- <default>0</default>
- </entry>
- <entry name="smoothScrolling" type="Bool">
- <default>true</default>
- </entry>
<entry name="hScrollWheelHistory" type="Bool">
<default>false</default>
</entry>
- <entry name="clearHistory" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearDownloads" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCookies" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCachedPages" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearWebIcons" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearHomePageThumbs" type="Bool">
- <default>true</default>
- </entry>
<entry name="enableViShortcuts" type="Bool">
<default>false</default>
</entry>
@@ -114,29 +84,52 @@
<!-- Tabs Settings -->
<group name="Tabs">
- <entry name="openTabNoWindow" type="Bool">
+ <!-- xxx -->
+ <entry name="newTabsBehaviour" type="Int">
+ <default>0</default>
+ </entry>
+ <entry name="newTabStartPage" type="Int">
+ <default>0</default>
+ </entry>
+ <!-- xxx -->
+ <entry name="hoveringTabOption" type="Int">
+ <default>0</default>
+ </entry>
+ <!-- xxx -->
+ <entry name="alwaysShowTabBar" type="Bool">
<default>true</default>
</entry>
+ <entry name="openLinksInNewWindow" type="Bool">
+ <default>false</default>
+ </entry>
<entry name="openExternalLinksInNewWindow" type="Bool">
<default>false</default>
</entry>
<entry name="lastTabClosesWindow" type="Bool">
<default>false</default>
</entry>
- <entry name="alwaysShowTabBar" type="Bool">
+ <entry name="openNewTabsInBackground" type="Bool">
<default>true</default>
</entry>
- <entry name="openTabsBack" type="Bool">
+ <entry name="openNewTabsNearCurrent" type="Bool">
+ <default>false</default>
+ </entry>
+ <entry name="closeTabSelectPrevious" type="Bool">
<default>true</default>
</entry>
- <entry name="openTabsNearCurrent" type="Bool">
- <default>false</default>
+ <entry name="animatedTabHighlighting" type="Bool">
+ <default>true</default>
</entry>
- <entry name="hoveringTabOption" type="Int">
- <default>0</default>
+</group>
+
+
+<!-- Appearance Settings -->
+<group name="Appearance">
+ <entry name="userCSS" type="Url">
+ <default></default>
</entry>
- <entry name="closeTabSelectPrevious" type="Bool">
- <default>false</default>
+ <entry name="smoothScrolling" type="Bool">
+ <default>true</default>
</entry>
<entry name="useFavicon" type="Bool">
<default>false</default>
@@ -144,9 +137,6 @@
<entry name="middleClickAction" type="Int">
<default>2</default>
</entry>
- <entry name="animatedTabHighlighting" type="Bool">
- <default>true</default>
- </entry>
</group>
@@ -187,29 +177,30 @@
<entry name="expireHistory" type="Int">
<default>1</default>
</entry>
-</group>
-
-
-<!-- WebKit Settings -->
-<group name="Webkit">
- <entry name="pluginsEnabled" type="Int">
- <default>0</default>
+ <entry name="clearHistory" type="Bool">
+ <default>true</default>
</entry>
- <entry name="webGL" type="Bool">
- <default>false</default>
+ <entry name="clearDownloads" type="Bool">
+ <default>true</default>
</entry>
- <entry name="spatialNavigation" type="Bool">
- <default>false</default>
+ <entry name="clearCookies" type="Bool">
+ <default>true</default>
</entry>
- <entry name="frameFlattening" type="Bool">
- <default>false</default>
+ <entry name="clearCachedPages" type="Bool">
+ <default>true</default>
</entry>
- <entry name="dnsPrefetch" type="Bool">
+ <entry name="clearWebIcons" type="Bool">
<default>true</default>
</entry>
- <entry name="printElementBackgrounds" type="Bool">
+ <entry name="clearHomePageThumbs" type="Bool">
<default>true</default>
</entry>
+</group>
+
+
+<!-- WebKit Settings -->
+<group name="Webkit">
+ <!-- xxx -->
<entry name="javascriptEnabled" type="Bool">
<default>true</default>
</entry>
@@ -219,9 +210,11 @@
<entry name="javascriptCanAccessClipboard" type="Bool">
<default>false</default>
</entry>
- <entry name="javaEnabled" type="Bool">
- <default>true</default>
+ <!-- xxx -->
+ <entry name="pluginsEnabled" type="Int">
+ <default>0</default>
</entry>
+ <!-- xxx -->
<entry name="offlineStorageDatabaseEnabled" type="Bool">
<default>false</default>
</entry>
@@ -231,8 +224,24 @@
<entry name="localStorageEnabled" type="Bool">
<default>false</default>
</entry>
- <entry name="userCSS" type="Url">
- <default></default>
+ <!-- xxx -->
+ <entry name="javaEnabled" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="webGL" type="Bool">
+ <default>false</default>
+ </entry>
+ <entry name="spatialNavigation" type="Bool">
+ <default>false</default>
+ </entry>
+ <entry name="frameFlattening" type="Bool">
+ <default>false</default>
+ </entry>
+ <entry name="dnsPrefetch" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="printElementBackgrounds" type="Bool">
+ <default>true</default>
</entry>
</group>
@@ -259,6 +268,7 @@
</entry>
</group>
+
<!-- Sync Settings -->
<group name="Sync">
<entry name="syncEnabled" type="Bool">
diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui
index ca30dd54..8379ad61 100644
--- a/src/settings/settings_tabs.ui
+++ b/src/settings/settings_tabs.ui
@@ -189,6 +189,19 @@
</layout>
</item>
<item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QCheckBox" name="kcfg_alwaysShowTabBar">
<property name="text">
<string>Always show tab bar</string>
@@ -196,7 +209,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="kcfg_openTabNoWindow">
+ <widget class="QCheckBox" name="kcfg_openLinksInNewWindow">
<property name="text">
<string>Open links in new tab instead of in new window</string>
</property>
@@ -217,14 +230,14 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="kcfg_openTabsBack">
+ <widget class="QCheckBox" name="kcfg_openNewTabsInBackground">
<property name="text">
<string>Open new tabs in the background</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="kcfg_openTabsNearCurrent">
+ <widget class="QCheckBox" name="kcfg_openNewTabsNearCurrent">
<property name="text">
<string>Open new tabs after currently active one</string>
</property>
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 7a321f3d..61cc50d6 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -253,13 +253,13 @@ WebPage *WebPage::createWindow(QWebPage::WebWindowType type)
kDebug() << "Modal Dialog";
WebTab *w = 0;
- if (ReKonfig::openTabNoWindow())
+ if (ReKonfig::openLinksInNewWindow())
{
- w = rApp->mainWindow()->mainView()->newWebTab(!ReKonfig::openTabsBack());
+ w = rApp->newMainWindow()->mainView()->currentWebTab();
}
else
{
- w = rApp->newMainWindow()->mainView()->currentWebTab();
+ w = rApp->mainWindow()->mainView()->newWebTab(!ReKonfig::openNewTabsInBackground());
}
return w->page();
}