summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-06 00:41:22 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-06 00:41:22 +0200
commit84239c0babad3b46d1ed4458bcaedff730997829 (patch)
treef1f61ac209a9c9303d833ee41bef8ea30a5610e0 /src/webview.cpp
parentcursor:pointer over thumbnails (diff)
downloadrekonq-84239c0babad3b46d1ed4458bcaedff730997829.tar.xz
I apologize for this. As said, I use no mouse and I couldn't
argue this strange GUI behaviour Revert "- Cleaning mouse gesture managements" This reverts commit 0c71d428f284675c658c55d2f3d9f858ad78c850.
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index e5cc62bb..ac6f4566 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -128,8 +128,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewWindow()));
menu.addAction(a);
- menu.addSeparator();
-
a = pageAction(QWebPage::DownloadLinkToDisk);
a->setIcon(KIcon("document-save"));
menu.addAction(a);
@@ -137,8 +135,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
a = pageAction(QWebPage::CopyLinkToClipboard);
a->setIcon(KIcon("edit-copy"));
menu.addAction(a);
-
- menu.addSeparator();
}
// is content editable && selected? Add CUT
@@ -188,16 +184,13 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if(!engine.isEmpty())
{
service = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(engine));
- if(service)
- {
- const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter; // FIXME crashed
- data.setData(searchProviderPrefix + "some keyword");
- a = new KAction(service->name(), this);
- a->setIcon(Application::icon(KUrl(data.uri())));
- a->setData(searchProviderPrefix);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(slotSearch()));
- searchMenu->addAction(a);
- }
+ const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter; // FIXME crashed
+ data.setData(searchProviderPrefix + "some keyword");
+ a = new KAction(service->name(), this);
+ a->setIcon(Application::icon(KUrl(data.uri())));
+ a->setData(searchProviderPrefix);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(slotSearch()));
+ searchMenu->addAction(a);
}
}
@@ -328,6 +321,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
void WebView::mousePressEvent(QMouseEvent *event)
{
+ m_page->m_pressedButtons = event->buttons();
+ m_page->m_keyboardModifiers = event->modifiers();
+
switch(event->button())
{
case Qt::XButton1:
@@ -344,7 +340,7 @@ void WebView::mousePressEvent(QMouseEvent *event)
void WebView::wheelEvent(QWheelEvent *event)
{
- if (Application::keyboardModifiers() & Qt::ControlModifier)
+ if (QApplication::keyboardModifiers() & Qt::ControlModifier)
{
int numDegrees = event->delta() / 8;
int numSteps = numDegrees / 15;