summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/browsermainwindow.cpp1
-rw-r--r--src/urlbar.cpp17
-rw-r--r--src/urlbar.h2
-rw-r--r--src/webview.cpp12
4 files changed, 9 insertions, 23 deletions
diff --git a/src/browsermainwindow.cpp b/src/browsermainwindow.cpp
index 60115b09..8a936774 100644
--- a/src/browsermainwindow.cpp
+++ b/src/browsermainwindow.cpp
@@ -342,7 +342,6 @@ void BrowserMainWindow::setupMenu()
// ------------------------------------------------------------- SETTINGS ------------------------------------------------------------------------------------------------------
KMenu *settingsMenu = (KMenu *) menuBar()->addMenu( i18n("&Settings") );
-// TODO settingsMenu->addAction( KStandardAction::configureToolbars(this, SLOT( ) , this ) );
settingsMenu->addAction( KStandardAction::preferences(this, SLOT( slotPreferences() ) , this ) );
// ------------------------------------------------------------- HELP --------------------------------------------------------------------------------------------------
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index e2dc458d..bd84b6d5 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -132,20 +132,3 @@ QLinearGradient UrlBar::generateGradient(const QColor &color) const
// }
// }
-
-// FIXME : seems working. Need to re-enable it when searchbar resizing will work , too..
-// void UrlBar::resizeEvent( QResizeEvent * event )
-// {
-// QRect rect = geometry();
-//
-// int windowWidth = BrowserApplication::instance()->mainWindow()->size().width() ; // FIXME ( OR not?)
-// int newWidth = windowWidth * 4 / 6;
-//
-// setGeometry( rect.x() + 1,
-// rect.y() + 1,
-// newWidth,
-// height()
-// );
-//
-// KHistoryComboBox::resizeEvent( event );
-// }
diff --git a/src/urlbar.h b/src/urlbar.h
index 1346eada..99199d9c 100644
--- a/src/urlbar.h
+++ b/src/urlbar.h
@@ -47,7 +47,7 @@ private slots:
protected:
// void paintEvent( QPaintEvent * );
-// void resizeEvent( QResizeEvent * );
+
private:
QLinearGradient generateGradient(const QColor &color) const;
diff --git a/src/webview.cpp b/src/webview.cpp
index dd28124a..f836b5ea 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -180,21 +180,25 @@ WebView::WebView(QWidget* parent)
}
+// TODO : improve and KDE-ize this menu
void WebView::contextMenuEvent(QContextMenuEvent *event)
{
QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
if (!r.linkUrl().isEmpty())
{
- QMenu menu(this);
- menu.addAction(pageAction(QWebPage::OpenLinkInNewWindow));
- menu.addAction(i18n("Open in New Tab"), this, SLOT(openLinkInNewTab()));
+ KMenu menu(this);
+ KAction *a = new KAction( KIcon("tab-new"), i18n("Open in New Tab"), this);
+ connect( a, SIGNAL( triggered() ), this , SLOT( openLinkInNewTab() ) );
+ menu.addAction( a );
menu.addSeparator();
menu.addAction(pageAction(QWebPage::DownloadLinkToDisk));
// Add link to bookmarks...
menu.addSeparator();
menu.addAction(pageAction(QWebPage::CopyLinkToClipboard));
- if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
+ if ( page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled) )
+ {
menu.addAction(pageAction(QWebPage::InspectElement));
+ }
menu.exec(mapToGlobal(event->pos()));
return;
}