summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFurkan Üzümcü <furkanuzumcu@gmail.com>2011-09-20 22:08:34 +0300
committerFurkan Üzümcü <furkanuzumcu@gmail.com>2011-09-20 22:08:34 +0300
commit1745660088759d2e693f99373144a173b27d2773 (patch)
tree9ec02e64acff4f96b59c205e5b94c39cf9f7b1a9 /src
parentFix tab size and addTabButton position when a KMessageWidget appears (diff)
downloadrekonq-1745660088759d2e693f99373144a173b27d2773.tar.xz
Added a combobox with middleclick options "autoscroll", "pasteAndGo" and
"do nothing"
Diffstat (limited to 'src')
-rw-r--r--src/rekonq.kcfg6
-rw-r--r--src/settings/settings_appearance.ui55
-rw-r--r--src/webview.cpp4
3 files changed, 41 insertions, 24 deletions
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index b583aa8e..d29a5a36 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -70,9 +70,6 @@
<entry name="searchEngine" type="Int">
<default>0</default>
</entry>
- <entry name="autoScroll" type="Bool">
- <default>true</default>
- </entry>
<entry name="smoothScrolling" type="Bool">
<default>true</default>
</entry>
@@ -129,6 +126,9 @@
<entry name="useFavicon" type="Bool">
<default>false</default>
</entry>
+ <entry name="middleClickAction" type="Int">
+ <default>2</default>
+ </entry>
<entry name="animatedTabHighlighting" type="Bool">
<default>true</default>
</entry>
diff --git a/src/settings/settings_appearance.ui b/src/settings/settings_appearance.ui
index b81d23f6..a185ed8a 100644
--- a/src/settings/settings_appearance.ui
+++ b/src/settings/settings_appearance.ui
@@ -17,7 +17,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>0</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="tabFont">
<attribute name="title">
@@ -293,19 +293,6 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QCheckBox" name="kcfg_autoScroll">
- <property name="toolTip">
- <string>Toggle automatic scrolling on middle click in a web page</string>
- </property>
- <property name="text">
- <string>Auto-scroll on middle-click</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
<widget class="QCheckBox" name="kcfg_smoothScrolling">
<property name="toolTip">
<string>Scroll pages with an eye candy effect</string>
@@ -326,6 +313,36 @@
</widget>
</item>
<item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Middle click should:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="kcfg_middleClickAction">
+ <item>
+ <property name="text">
+ <string>Auto-scroll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Load Clipboard URL</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Do Nothing</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -346,11 +363,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KUrlRequester</class>
- <extends>QFrame</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- <customwidget>
<class>KFontComboBox</class>
<extends>KComboBox</extends>
<header>kfontcombobox.h</header>
@@ -361,6 +373,11 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ <customwidget>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
diff --git a/src/webview.cpp b/src/webview.cpp
index 3da044ec..78eb7b2d 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -376,7 +376,7 @@ void WebView::mousePressEvent(QMouseEvent *event)
}
QWebHitTestResult result = page()->mainFrame()->hitTestContent(event->pos());
- m_canEnableAutoScroll = ReKonfig::autoScroll() && !result.isContentEditable() && result.linkUrl().isEmpty();
+ m_canEnableAutoScroll = ReKonfig::middleClickAction() == 0 && !result.isContentEditable() && result.linkUrl().isEmpty();
switch (event->button())
{
@@ -403,7 +403,7 @@ void WebView::mousePressEvent(QMouseEvent *event)
}
}
- if (!ReKonfig::autoScroll())
+ if (ReKonfig::middleClickAction() == 1 && result.linkUrl().isEmpty())
{
const QString clipboardContent = rApp->clipboard()->text();