diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-02-18 03:26:42 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-02-18 03:26:42 +0100 |
commit | 871fa5c3a2f0f85f7338171c3d7660167150c69d (patch) | |
tree | 71e9d40c46600889d3bda485675418cb710cea80 /src | |
parent | don't change stop/reload icon on not focused loading pages. (diff) | |
download | rekonq-871fa5c3a2f0f85f7338171c3d7660167150c69d.tar.xz |
half fixed (but half is not enough...) the favicon querelle..
Diffstat (limited to 'src')
-rw-r--r-- | src/application.cpp | 28 | ||||
-rw-r--r-- | src/mainview.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/webview.cpp | 2 |
4 files changed, 18 insertions, 16 deletions
diff --git a/src/application.cpp b/src/application.cpp index 2e1c70a8..a5b4e759 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -260,22 +260,24 @@ SessionManager *Application::sessionManager() KIcon Application::icon(const KUrl &url) { - if( !Application::instance()->mainWindowList().isEmpty() ) // avoid infinite loop at startup - { + // avoid infinite loop at startup + if( Application::instance()->mainWindowList().isEmpty() ) + return KIcon("text-html"); - if(url == KUrl("about:closedTabs")) - return KIcon("tab-close"); - if(url == KUrl("about:history")) - return KIcon("view-history"); - if(url == KUrl("about:bookmarks")) - return KIcon("bookmarks"); - if(url == KUrl("about:favorites")) - return KIcon("emblem-favorite"); - } - + // first things first.. if(url.isEmpty()) return KIcon("text-html"); - + + // rekonq icons.. + if(url == KUrl("about:closedTabs")) + return KIcon("tab-close"); + if(url == KUrl("about:history")) + return KIcon("view-history"); + if(url == KUrl("about:bookmarks")) + return KIcon("bookmarks"); + if(url == KUrl("about:favorites")) + return KIcon("emblem-favorite"); + KIcon icon = KIcon(QWebSettings::iconForUrl(url)); if (icon.isNull()) { diff --git a/src/mainview.cpp b/src/mainview.cpp index 0db31c1a..940e1273 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -583,7 +583,7 @@ void MainView::webViewIconChanged() int index = indexOf( view->parentWidget() ); if (-1 != index) { - QIcon icon = Application::icon(view->url()); + KIcon icon = Application::icon(view->url()); QLabel *label = animatedLoading(index, false); QMovie *movie = label->movie(); delete movie; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e965aa19..a4df5756 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1165,7 +1165,7 @@ void MainWindow::aboutToShowBackMenu() QWebHistoryItem item = historyList.at(i); KAction *action = new KAction(this); action->setData(i + offset); - QIcon icon = Application::icon( item.url() ); + KIcon icon = Application::icon( item.url() ); action->setIcon( icon ); action->setText( item.title() ); m_historyBackMenu->addAction(action); diff --git a/src/webview.cpp b/src/webview.cpp index e1ba2a46..36f62bfa 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -164,7 +164,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter; data.setData(searchProviderPrefix + "some keyword"); a = new KAction(service->name(), this); - a->setIcon(Application::icon(KUrl(data.uri()))); + a->setIcon( Application::icon( data.uri() ) ); a->setData(searchProviderPrefix); connect(a, SIGNAL(triggered(bool)), this, SLOT(search())); searchMenu->addAction(a); |