diff options
author | Lionel Chauvin <megabigbug@yahoo.fr> | 2009-08-07 19:10:13 +0200 |
---|---|---|
committer | Lionel Chauvin <megabigbug@yahoo.fr> | 2009-08-07 19:10:13 +0200 |
commit | 34052852fd2b003aafa73cd44b5d64bc3fdf970d (patch) | |
tree | b856c8152342e438d518752bbf378dce1315300b | |
parent | Load url in the background urlbar fixes (diff) | |
download | rekonq-34052852fd2b003aafa73cd44b5d64bc3fdf970d.tar.xz |
small fix: prevent empty url at the begining of loading
-rw-r--r-- | src/application.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/application.cpp b/src/application.cpp index 53393b7b..3817098d 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -298,7 +298,7 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) { loadingUrl = data.uri().url(); } - + if ( !KProtocolInfo::isKnownProtocol( loadingUrl ) ) { KMessageBox::error(0, i18n("Protocol not supported\n%1", url.protocol())); @@ -306,14 +306,19 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) } WebView *webView; - + switch(type) { case Rekonq::SettingOpenTab: webView = m_mainWindow->mainView()->newTab(!ReKonfig::openTabsBack()); + if (!ReKonfig::openTabsBack()) + { + m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl()); + } break; case Rekonq::NewCurrentTab: webView = m_mainWindow->mainView()->newTab(true); + m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl()); break; case Rekonq::NewBackTab: webView = m_mainWindow->mainView()->newTab(false); |