diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2008-12-16 02:00:24 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2008-12-16 02:00:24 +0100 |
commit | 16432de65c59318d4b4c8cadb6d4a366d851d973 (patch) | |
tree | 061948a1ca762a12cf028449d5860961cd832610 /src | |
parent | Updated TODO (diff) | |
download | rekonq-16432de65c59318d4b4c8cadb6d4a366d851d973.tar.xz |
Some other steps on the road to the KDE browser..
Diffstat (limited to 'src')
-rw-r--r-- | src/browsermainwindow.cpp | 1 | ||||
-rw-r--r-- | src/urlbar.cpp | 17 | ||||
-rw-r--r-- | src/urlbar.h | 2 | ||||
-rw-r--r-- | src/webview.cpp | 12 |
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; } |