[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/apps/konqueror/src
From: David Faure <faure () kde ! org>
Date: 2008-09-13 0:00:40
Message-ID: 1221264040.631016.29417.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 860420 by dfaure:
setIcon( const QPixmap& ) isn't virtual anymore, so reorg this code to make more \
sense. But see kfm-devel for whether we should change this behavior and not show \
favicons or mimetype-specific icons as the window icon...
M +11 -10 konqmainwindow.cpp
M +2 -1 konqmainwindow.h
--- trunk/KDE/kdebase/apps/konqueror/src/konqmainwindow.cpp #860419:860420
@@ -1496,7 +1496,7 @@
kDebug(1202);
m_combo->updatePixmaps();
m_pViewManager->updatePixmaps();
- setIcon( KonqPixmapProvider::self()->pixmapFor( m_combo->currentText() ));
+ updateWindowIcon();
}
void KonqMainWindow::slotOpenWith()
@@ -3337,7 +3337,7 @@
if (url != m_combo->lineEdit()->text()) {
//kDebug(1202) << "url=" << url;
m_combo->setURL( url );
- setIcon( KonqPixmapProvider::self()->pixmapFor( url ) );
+ updateWindowIcon();
}
}
@@ -5099,18 +5099,19 @@
return !stayPreloaded();
}
-void KonqMainWindow::setIcon( const QPixmap& pix )
+void KonqMainWindow::updateWindowIcon()
{
+ const QString url = m_combo->currentText();
+ // TODO (kfm-devel email 13/09/2008) should we use a profile-defined icon \
instead of a url-dependent window icon? + const QPixmap pix = \
KonqPixmapProvider::self()->pixmapFor( url ); KParts::MainWindow::setWindowIcon( pix \
);
- QPixmap big = pix;
+ QPixmap big = pix;
+ if (!url.isEmpty()) {
+ big = KonqPixmapProvider::self()->pixmapFor( url, KIconLoader::SizeMedium );
+ }
- QString url = m_combo->currentText();
-
- if ( !url.isEmpty() )
- big = KonqPixmapProvider::self()->pixmapFor( url, KIconLoader::SizeMedium );
-
- KWindowSystem::setIcons( winId(), big, pix );
+ KWindowSystem::setIcons( winId(), big, pix );
}
void KonqMainWindow::slotIntro()
--- trunk/KDE/kdebase/apps/konqueror/src/konqmainwindow.h #860419:860420
@@ -403,7 +403,6 @@
// public for KonqViewManager
void slotPartActivated( KParts::Part *part );
- virtual void setIcon( const QPixmap& );
void slotGoHistoryActivated( int steps );
void slotGoHistoryActivated( int steps, Qt::MouseButtons buttons, \
Qt::KeyboardModifiers modifiers );
@@ -557,6 +556,8 @@
void showPageSecurity();
private:
+ void updateWindowIcon();
+
QString detectNameFilter( KUrl & url );
/**
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic