diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-17 00:46:05 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-24 01:33:59 +0200 |
commit | 7cd00f6764a775934394ac9ee92b2393e5928f50 (patch) | |
tree | 1054cf65920aa72316b1922d2f6bfadd2f3c995b /src/mainview.cpp | |
parent | Add icons for "history panel" and "page source" items (diff) | |
download | rekonq-7cd00f6764a775934394ac9ee92b2393e5928f50.tar.xz |
Definitely fixing rekonq API. First step.
newTab function in MainView
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 41f5b72d..05e461ee 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -164,12 +164,6 @@ int MainView::webViewIndex(WebView *webView) const } -void MainView::setMakeBackTab(bool b) -{ - m_makeBackTab = b; -} - - void MainView::showTabBar() { if (ReKonfig::alwaysShowTabBar()) @@ -358,7 +352,7 @@ WebView *MainView::webView(int index) const } -WebView *MainView::newWebView(Rekonq::OpenType type) +WebView *MainView::newTab() { // line edit UrlBar *urlBar = new UrlBar; // Ownership of widget is passed on to the QStackedWidget (addWidget method). @@ -389,22 +383,25 @@ WebView *MainView::newWebView(Rekonq::OpenType type) addTab(webView, i18n("(Untitled)")); - switch(type) - { - case Rekonq::Default: - if (!m_makeBackTab) - { - setCurrentWidget(webView); // this method does NOT take ownership of webView - urlBar->setFocus(); - } - break; - case Rekonq::New: - setCurrentWidget(webView); // this method does NOT take ownership of webView - urlBar->setFocus(); - break; - case Rekonq::Background: - break; - }; + setCurrentWidget(webView); // this method does NOT take ownership of webView + urlBar->setFocus(); + +// switch(type) +// { +// case Rekonq::Default: +// if (!m_makeBackTab) +// { +// setCurrentWidget(webView); // this method does NOT take ownership of webView +// urlBar->setFocus(); +// } +// break; +// case Rekonq::New: +// setCurrentWidget(webView); // this method does NOT take ownership of webView +// urlBar->setFocus(); +// break; +// case Rekonq::Background: +// break; +// }; emit tabsChanged(); @@ -480,7 +477,7 @@ void MainView::slotCloneTab(int index) index = currentIndex(); if (index < 0 || index >= count()) return; - WebView *tab = newWebView(); + WebView *tab = newTab(); tab->setUrl(webView(index)->url()); showTabBar(); @@ -758,7 +755,7 @@ void MainView::mouseDoubleClickEvent(QMouseEvent *event) { if (!childAt(event->pos())) { - newWebView(Rekonq::New); + newTab(); return; } KTabWidget::mouseDoubleClickEvent(event); |