diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/mainview.cpp | 32 | ||||
-rw-r--r-- | src/opensearch/opensearchengine.cpp (renamed from src/search/opensearchengine.cpp) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchengine.h (renamed from src/search/opensearchengine.h) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchmanager.cpp (renamed from src/search/opensearchmanager.cpp) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchmanager.h (renamed from src/search/opensearchmanager.h) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchreader.cpp (renamed from src/search/opensearchreader.cpp) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchreader.h (renamed from src/search/opensearchreader.h) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchwriter.cpp (renamed from src/search/opensearchwriter.cpp) | 0 | ||||
-rw-r--r-- | src/opensearch/opensearchwriter.h (renamed from src/search/opensearchwriter.h) | 0 | ||||
-rw-r--r-- | src/opensearch/searchengine.cpp (renamed from src/search/searchengine.cpp) | 0 | ||||
-rw-r--r-- | src/opensearch/searchengine.h (renamed from src/search/searchengine.h) | 0 | ||||
-rw-r--r-- | src/urlbar/stackedurlbar.cpp | 1 | ||||
-rw-r--r-- | src/webpage.cpp | 18 | ||||
-rw-r--r-- | src/webtab.cpp | 8 | ||||
-rw-r--r-- | src/webtab.h | 9 |
17 files changed, 46 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df92271f..67c5e0fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.6.0" ) +SET(REKONQ_VERSION "0.6.50" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5f99a608..861126f5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -73,11 +73,11 @@ SET( rekonq_KDEINIT_SRCS analyzer/analyzerpanel.cpp analyzer/networkanalyzer.cpp #---------------------------------------- - search/searchengine.cpp - search/opensearchwriter.cpp - search/opensearchreader.cpp - search/opensearchmanager.cpp - search/opensearchengine.cpp + opensearch/searchengine.cpp + opensearch/opensearchwriter.cpp + opensearch/opensearchreader.cpp + opensearch/opensearchmanager.cpp + opensearch/opensearchengine.cpp ) @@ -103,7 +103,7 @@ INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/rekonqpage ${CMAKE_CURRENT_SOURCE_DIR}/settings ${CMAKE_CURRENT_SOURCE_DIR}/analyzer - ${CMAKE_CURRENT_SOURCE_DIR}/search + ${CMAKE_CURRENT_SOURCE_DIR}/opensearch ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${QT4_INCLUDES} diff --git a/src/mainview.cpp b/src/mainview.cpp index 3daee339..d263111a 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -313,8 +313,7 @@ WebTab *MainView::webTab(int index) const WebTab *MainView::newWebTab(bool focused) { - WebTab* tab = new WebTab(this); - UrlBar *bar = new UrlBar(tab); + WebTab *tab = new WebTab(this); // connecting webview with mainview connect(tab->view(), SIGNAL(loadStarted()), this, SLOT(webViewLoadStarted())); @@ -324,18 +323,18 @@ WebTab *MainView::newWebTab(bool focused) connect(tab->view(), SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); // connecting webPage signals with mainview - connect(tab->view()->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested())); - connect(tab->view()->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *))); + connect(tab->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested())); + connect(tab->page(), SIGNAL(printRequested(QWebFrame *)), this, SIGNAL(printRequested(QWebFrame *))); if ( ReKonfig::openTabsNearCurrent() ) { insertTab(currentIndex() + 1, tab, i18n("(Untitled)")); - _widgetBar->insertWidget(currentIndex() + 1, bar); + _widgetBar->insertWidget(currentIndex() + 1, tab->urlBar()); } else { addTab(tab, i18n("(Untitled)")); - _widgetBar->addWidget(bar); + _widgetBar->addWidget(tab->urlBar()); } updateTabBar(); @@ -471,11 +470,11 @@ void MainView::closeTab(int index, bool del) if (index < 0 || index >= count()) return; - WebTab *tab = webTab(index); - if (!tab) + WebTab *tabToClose = webTab(index); + if (!tabToClose) return; - if (tab->view()->isModified()) + if (tabToClose->view()->isModified()) { int risp = KMessageBox::warningContinueCancel(this, i18n("This tab contains changes that have not been submitted.\n" @@ -486,12 +485,12 @@ void MainView::closeTab(int index, bool del) return; } - if (!tab->url().isEmpty() + if (!tabToClose->url().isEmpty() && !QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled) ) { - QString title = tab->view()->title(); - QString url = tab->url().prettyUrl(); + QString title = tabToClose->view()->title(); + QString url = tabToClose->url().prettyUrl(); HistoryItem item(url, QDateTime(), title); m_recentlyClosedTabs.removeAll(item); m_recentlyClosedTabs.prepend(item); @@ -500,15 +499,12 @@ void MainView::closeTab(int index, bool del) removeTab(index); updateTabBar(); // UI operation: do it ASAP!! - UrlBar *urlbar = _widgetBar->urlBar(index); - _widgetBar->removeWidget(urlbar); - + _widgetBar->removeWidget( tabToClose->urlBar() ); _widgetBar->setCurrentIndex(m_currentTabIndex); if (del) { - tab->deleteLater(); - urlbar->deleteLater(); + tabToClose->deleteLater(); } emit tabsChanged(); @@ -718,7 +714,7 @@ void MainView::detachTab(int index, MainWindow *toWindow) else { QString label = tab->view()->title(); - UrlBar *bar = _widgetBar->urlBar(index); + UrlBar *bar = tab->urlBar(); closeTab(index, false); MainWindow *w; diff --git a/src/search/opensearchengine.cpp b/src/opensearch/opensearchengine.cpp index 78e50980..78e50980 100644 --- a/src/search/opensearchengine.cpp +++ b/src/opensearch/opensearchengine.cpp diff --git a/src/search/opensearchengine.h b/src/opensearch/opensearchengine.h index f2329624..f2329624 100644 --- a/src/search/opensearchengine.h +++ b/src/opensearch/opensearchengine.h diff --git a/src/search/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp index 8e024951..8e024951 100644 --- a/src/search/opensearchmanager.cpp +++ b/src/opensearch/opensearchmanager.cpp diff --git a/src/search/opensearchmanager.h b/src/opensearch/opensearchmanager.h index 224ada08..224ada08 100644 --- a/src/search/opensearchmanager.h +++ b/src/opensearch/opensearchmanager.h diff --git a/src/search/opensearchreader.cpp b/src/opensearch/opensearchreader.cpp index 5b7ece2c..5b7ece2c 100644 --- a/src/search/opensearchreader.cpp +++ b/src/opensearch/opensearchreader.cpp diff --git a/src/search/opensearchreader.h b/src/opensearch/opensearchreader.h index 4e2444e0..4e2444e0 100644 --- a/src/search/opensearchreader.h +++ b/src/opensearch/opensearchreader.h diff --git a/src/search/opensearchwriter.cpp b/src/opensearch/opensearchwriter.cpp index 81ce022c..81ce022c 100644 --- a/src/search/opensearchwriter.cpp +++ b/src/opensearch/opensearchwriter.cpp diff --git a/src/search/opensearchwriter.h b/src/opensearch/opensearchwriter.h index 6a2e0d11..6a2e0d11 100644 --- a/src/search/opensearchwriter.h +++ b/src/opensearch/opensearchwriter.h diff --git a/src/search/searchengine.cpp b/src/opensearch/searchengine.cpp index 89e62dee..89e62dee 100644 --- a/src/search/searchengine.cpp +++ b/src/opensearch/searchengine.cpp diff --git a/src/search/searchengine.h b/src/opensearch/searchengine.h index d813666b..d813666b 100644 --- a/src/search/searchengine.h +++ b/src/opensearch/searchengine.h diff --git a/src/urlbar/stackedurlbar.cpp b/src/urlbar/stackedurlbar.cpp index 1882d98c..44039244 100644 --- a/src/urlbar/stackedurlbar.cpp +++ b/src/urlbar/stackedurlbar.cpp @@ -29,7 +29,6 @@ #include "stackedurlbar.moc" // Local Includes -#include "application.h" #include "urlbar.h" diff --git a/src/webpage.cpp b/src/webpage.cpp index 9be0d3c9..d481567f 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -459,7 +459,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) mainFrame()->setHtml(html); _isOnRekonqPage = true; - Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(replyUrl); + + WebView *view = qobject_cast<WebView *>(parent()); + WebTab *tab = qobject_cast<WebTab *>(view->parent()); + UrlBar *bar = tab->urlBar(); + bar->setQUrl(replyUrl); + Application::instance()->mainWindow()->updateActions(); } else @@ -561,9 +566,14 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) frame->setHtml(errorPage(reply)); if(isMainFrameRequest) { - _isOnRekonqPage = true; - Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(_loadingUrl); - Application::instance()->mainWindow()->updateActions(); + _isOnRekonqPage = true; + + WebView *view = qobject_cast<WebView *>(parent()); + WebTab *tab = qobject_cast<WebTab *>(view->parent()); + UrlBar *bar = tab->urlBar(); + bar->setQUrl(_loadingUrl); + + Application::instance()->mainWindow()->updateActions(); } } break; diff --git a/src/webtab.cpp b/src/webtab.cpp index cce09953..c525ac00 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -33,6 +33,7 @@ #include "rekonq.h" // Local Includes +#include "urlbar.h" #include "previewselectorbar.h" #include "rsswidget.h" #include "walletbar.h" @@ -48,7 +49,8 @@ WebTab::WebTab(QWidget *parent) : QWidget(parent) , _view(new WebView(this)) - , m_progress(0) + , _bar(new UrlBar(this)) + , _progress(0) { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); @@ -110,14 +112,14 @@ KUrl WebTab::url() void WebTab::updateProgress(int p) { - m_progress = p; + _progress = p; emit loadProgressing(); } void WebTab::loadFinished(bool) { - m_progress = 0; + _progress = 0; } diff --git a/src/webtab.h b/src/webtab.h index a9129d0b..d9213983 100644 --- a/src/webtab.h +++ b/src/webtab.h @@ -39,6 +39,7 @@ #include <QtGui/QWidget> // Forward Declarations +class UrlBar; class PreviewSelectorBar; class WalletBar; @@ -52,8 +53,9 @@ public: ~WebTab(); inline WebView *view() { return _view; } + UrlBar *urlBar() { return _bar; } inline WebPage *page() { return view()->page(); } - inline int progress() { return m_progress; } + inline int progress() { return _progress; } KUrl url(); void createPreviewSelectorBar(int index); @@ -72,8 +74,9 @@ signals: private: WebView *_view; - - int m_progress; + UrlBar *_bar; + + int _progress; QWeakPointer<WalletBar> _walletBar; QWeakPointer<PreviewSelectorBar> _previewSelectorBar; |