author | zautrix <zautrix> | 2005-03-29 18:35:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 18:35:10 (UTC) |
commit | b70d9695bb6a2d567b75965c0530792ad90c84a3 (patch) (unidiff) | |
tree | bc27647d044cf4a8d9c75acd19d9a2d078fe00b2 /kabc | |
parent | a7c827aa0e555206b60dec3bc07f7afab4352883 (diff) | |
download | kdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.zip kdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.tar.gz kdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.tar.bz2 |
icons
-rw-r--r-- | kabc/addresseeview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index e85991e..8f104e0 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -249,22 +249,28 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) | |||
249 | bool picAvailUrl = false; | 249 | bool picAvailUrl = false; |
250 | if (! picture.undefined() ) { | 250 | if (! picture.undefined() ) { |
251 | picAvailintern = (picture.isIntern() && !picture.data().isNull()); | 251 | picAvailintern = (picture.isIntern() && !picture.data().isNull()); |
252 | picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); | 252 | picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); |
253 | } | 253 | } |
254 | if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { | 254 | if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { |
255 | picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; | ||
255 | if ( picAvailintern ) { | 256 | if ( picAvailintern ) { |
256 | QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); | 257 | QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); |
257 | } else { | 258 | } else { |
258 | if ( picAvailUrl ) { | 259 | if ( picAvailUrl ) { |
259 | QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() )); | 260 | QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() )); |
260 | } else { | 261 | } else { |
261 | QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", KGlobal::iconLoader()->loadIcon( "package_toys", KIcon::Desktop, 128 ) ); | 262 | static bool setDefaultImage = false; |
263 | if ( !setDefaultImage ) { | ||
264 | qDebug("Setting default pixmap "); | ||
265 | QMimeSourceFactory::defaultFactory()->setPixmap( "defaultPenguin", KGlobal::iconLoader()->loadIcon( "package_toys", KIcon::Desktop, 128 ) ); | ||
266 | setDefaultImage = true; | ||
267 | } | ||
268 | picString = "<img src=\"defaultPenguin\" width=\"64\" height=\"64\">"; | ||
262 | } | 269 | } |
263 | } | 270 | } |
264 | picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; | ||
265 | mText = QString::fromLatin1( | 271 | mText = QString::fromLatin1( |
266 | "<html>" | 272 | "<html>" |
267 | "<body text=\"%1\" bgcolor=\"%2\">" // text and background color | 273 | "<body text=\"%1\" bgcolor=\"%2\">" // text and background color |
268 | "<table>" | 274 | "<table>" |
269 | "<tr>" | 275 | "<tr>" |
270 | "<td rowspan=\"3\" align=\"right\" valign=\"top\">" | 276 | "<td rowspan=\"3\" align=\"right\" valign=\"top\">" |