summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-01 02:06:55 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-01 02:06:55 +0200
commit801c6ac411f787c8ad0febab9da2f1b20fc2c84e (patch)
tree5b0ef0b386a7f1c19a9231980d6296945b9b09b2 /src
parentFix tab in background feature (diff)
downloadrekonq-801c6ac411f787c8ad0febab9da2f1b20fc2c84e.tar.xz
Some string changes and various fixes
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp7
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/mainview.h2
-rw-r--r--src/webpage.cpp4
4 files changed, 14 insertions, 9 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 06e67218..ff52d935 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -283,8 +283,8 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
// this should let rekonq to support the beautiful KDE web browsing shortcuts
loadingUrl = KUriFilter::self()->filteredUri(loadingUrl);
- WebView *webView=m_mainWindow->mainView()->currentWebView();
-
+ WebView *webView;
+
switch(type)
{
case Rekonq::SettingOpenTab:
@@ -296,7 +296,8 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
case Rekonq::BackgroundTab:
webView = m_mainWindow->mainView()->newTab(false);
break;
- case Rekonq::CurrentTab: // nothing to do here.. just to save a warning!!
+ case Rekonq::CurrentTab:
+ webView = m_mainWindow->mainView()->currentWebView();
break;
};
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 8c1de1f6..5fc24512 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -350,7 +350,7 @@ WebView *MainView::webView(int index) const
}
-WebView *MainView::newTab(bool focus)
+WebView *MainView::newTab(bool focused)
{
// line edit
UrlBar *urlBar = new UrlBar; // Ownership of widget is passed on to the QStackedWidget (addWidget method).
@@ -380,8 +380,12 @@ WebView *MainView::newTab(bool focus)
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *)));
addTab(webView, i18n("(Untitled)"));
- if (focus) setCurrentWidget(webView);
-
+
+ if (focused)
+ {
+ setCurrentWidget(webView);
+ }
+
urlBar->setFocus();
emit tabsChanged();
diff --git a/src/mainview.h b/src/mainview.h
index 99693ed6..d7f7675b 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -102,7 +102,7 @@ public slots:
*
* @return a pointer to the new WebView
*/
- WebView *newTab(bool focus = true);
+ WebView *newTab(bool focused = true);
void slotCloneTab(int index = -1);
void slotCloseTab(int index = -1);
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 7938208a..11d17a6e 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -105,7 +105,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
// if frame doesn't exists (perhaps) we are pointing to a blank target..
if (!frame)
{
- Application::instance()->loadUrl(request.url(), Rekonq::NewTab);
+ Application::instance()->loadUrl(request.url(), Rekonq::SettingOpenTab);
return false;
}
}
@@ -131,7 +131,7 @@ WebPage *WebPage::newWindow(WebWindowType type)
kDebug() << "Modal Dialog ---------------------------------------";
}
- WebView *w = Application::instance()->mainWindow()->mainView()->newTab();
+ WebView *w = Application::instance()->mainWindow()->mainView()->newTab(!ReKonfig::openTabsBack());
return w->page();
}