Le samedi 21 novembre 2009 03:41:32, Cédric Bellegarde a écrit :
> Here another patch making application icon use current favicon (like in
> konqueror)
> 

Improve it by putting default web page icon while loading... (Don't want site1 
favicon with site2 name in taskbar).

Cédric
diff --git a/src/mainview.cpp b/src/mainview.cpp
index ebcad08..273bbc0 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -267,6 +266,10 @@ void MainView::currentChanged(int index)
     if (!webView)
         return;
 
+    // set tab icon
+    QIcon icon = Application::icon(webView->url());
+    m_parentWindow->setWindowIcon(icon);
+
     // retrieve the old webview (that where we move from)
     WebView *oldWebView = this->webView(m_currentTabIndex);
     
@@ -370,6 +373,7 @@ void MainView::newTab()
             break;
     case 1: // blank page
         urlBar()->setUrl(KUrl(""));
+        m_parentWindow->setWindowIcon(KIcon("rekonq"));
         break;
     case 2: // homepage
         w->load( QUrl(ReKonfig::homePage()) );
@@ -573,6 +577,7 @@ void MainView::webViewIconChanged()
         label->setPixmap(icon.pixmap(16, 16));
 
         urlBar()->updateUrl();
+        m_parentWindow->setWindowIcon(icon);
     }
 }
 
@@ -594,6 +599,7 @@ void MainView::webViewTitleChanged(const QString &title)
     {
         emit setCurrentTitle(tabTitle);
     }
+    m_parentWindow->setWindowIcon(KIcon("text-html"));
     Application::historyManager()->updateHistoryEntry(webView->url(), tabTitle);
 }
 
_______________________________________________
rekonq mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/rekonq

Reply via email to