From 955d0c7b47bb6ba661f34a1d1f6ff18d36bfe9b3 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 23 Sep 2009 15:03:00 +0200 Subject: Fixing rekonq home page urlbar focus issue --- src/mainview.cpp | 9 +++++---- src/mainwindow.cpp | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mainview.cpp b/src/mainview.cpp index 59ffde4d..655122a2 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -306,9 +306,6 @@ void MainView::newTab() { WebView *w = newWebView(); - urlBar()->setUrl(KUrl("")); - urlBar()->setFocus(); - HomePage p(w); switch(ReKonfig::newTabsBehaviour()) @@ -316,12 +313,16 @@ void MainView::newTab() case 0: w->setHtml( p.rekonqHomePage() ); break; + case 1: + urlBar()->setUrl(KUrl("")); + break; case 2: w->load( QUrl(ReKonfig::homePage()) ); break; default: break; } + urlBar()->setFocus(); } @@ -668,4 +669,4 @@ void MainView::showTabPreview(int tab) QPoint pos(m_tabBar->tabRect(tab).x(),m_tabBar->tabRect(tab).y()+m_tabBar->tabRect(tab).height()); m_previewPopup->show(mapToGlobal(pos)); -} \ No newline at end of file +} diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8b4f5c6c..c8ac0378 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -745,6 +745,7 @@ void MainWindow::slotHome() { HomePage p(w); w->setHtml( p.rekonqHomePage(), QUrl()); + m_view->urlBar()->setFocus(); } else { -- cgit v1.2.1