-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kabc/addresseeview.cpp | 28 |
2 files changed, 31 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index d75ff7e..013c3f8 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,34 +1,38 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.2.1 ************ | 3 | ********** VERSION 2.2.1 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed a problem displaying very long allday events in agenda view in single day mode. | 6 | Fixed a problem displaying very long allday events in agenda view in single day mode. |
7 | Fixed a problem with the default settings for new todos. | 7 | Fixed a problem with the default settings for new todos. |
8 | Added an error message dialog if saving of calendar files is not possible. | 8 | Added an error message dialog if saving of calendar files is not possible. |
9 | Made it impossible to close KO/Pi if saving fails. | 9 | Made it impossible to close KO/Pi if saving fails. |
10 | Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. | 10 | Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. |
11 | Added config options for conflict detection. | 11 | Added config options for conflict detection. |
12 | 12 | ||
13 | KA/Pi: | 13 | KA/Pi: |
14 | Added a config option to turn on asking before a contact is deleted. | 14 | Added a config option to turn on asking before a contact is deleted. |
15 | Fixed a problem with the default view and view selection at startup. | 15 | Fixed a problem with the default view and view selection at startup. |
16 | Formatted name is now set on import, if formatted name is empty. | 16 | Formatted name is now set on import, if formatted name is empty. |
17 | Fixed a problem of displaying images in the contact details view: | ||
18 | Now the wid/hei ratio is not changed. | ||
19 | I a picture is larger than 128 pixels in wid or hei it is downscaled to | ||
20 | max 128 pixels wid/hei. | ||
17 | 21 | ||
18 | ********** VERSION 2.2.0 ************ | 22 | ********** VERSION 2.2.0 ************ |
19 | 23 | ||
20 | New stable release! | 24 | New stable release! |
21 | Fixed some minor usability problems. | 25 | Fixed some minor usability problems. |
22 | Added writing of next alarm to a file for usage on pdaXrom. | 26 | Added writing of next alarm to a file for usage on pdaXrom. |
23 | 27 | ||
24 | 28 | ||
25 | ************************************* | 29 | ************************************* |
26 | 30 | ||
27 | You can find the complete changelog | 31 | You can find the complete changelog |
28 | from version 1.7.7 to 2.2.0 | 32 | from version 1.7.7 to 2.2.0 |
29 | in the source package or on | 33 | in the source package or on |
30 | 34 | ||
31 | http://www.pi-sync.net/html/changelog.html | 35 | http://www.pi-sync.net/html/changelog.html |
32 | 36 | ||
33 | 37 | ||
34 | 38 | ||
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index f3cfb23..05d604f 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -369,61 +369,87 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) | |||
369 | notes = QString( | 369 | notes = QString( |
370 | "<tr><td align=\"right\"><b>%1</b></td>" | 370 | "<tr><td align=\"right\"><b>%1</b></td>" |
371 | "<td align=\"left\"><a href=\"allDetails\">%4</a></td></tr>" ) | 371 | "<td align=\"left\"><a href=\"allDetails\">%4</a></td></tr>" ) |
372 | .arg( i18n("Details") ) | 372 | .arg( i18n("Details") ) |
373 | .arg( i18n("Show!") ); | 373 | .arg( i18n("Show!") ); |
374 | 374 | ||
375 | 375 | ||
376 | } | 376 | } |
377 | 377 | ||
378 | QString aRole = ""; | 378 | QString aRole = ""; |
379 | QString aOrga = ""; | 379 | QString aOrga = ""; |
380 | if ( true /*!mAddressee.role().isEmpty()*/ ) { | 380 | if ( true /*!mAddressee.role().isEmpty()*/ ) { |
381 | aRole = "<tr>" | 381 | aRole = "<tr>" |
382 | "<td align=\"left\">" + mAddressee.role() + "</td>" | 382 | "<td align=\"left\">" + mAddressee.role() + "</td>" |
383 | "</tr>"; | 383 | "</tr>"; |
384 | } | 384 | } |
385 | if ( true /*!mAddressee.organization().isEmpty()*/ ) { | 385 | if ( true /*!mAddressee.organization().isEmpty()*/ ) { |
386 | aOrga = "<tr>" | 386 | aOrga = "<tr>" |
387 | "<td align=\"left\">" + mAddressee.organization() + "</td>" | 387 | "<td align=\"left\">" + mAddressee.organization() + "</td>" |
388 | "</tr>"; | 388 | "</tr>"; |
389 | } | 389 | } |
390 | mText = ""; | 390 | mText = ""; |
391 | QString picString = ""; | 391 | QString picString = ""; |
392 | KABC::Picture picture = mAddressee.photo(); | 392 | KABC::Picture picture = mAddressee.photo(); |
393 | if (picture.undefined() ) picture = mAddressee.logo(); | ||
393 | bool picAvailintern = false; | 394 | bool picAvailintern = false; |
394 | bool picAvailUrl = false; | 395 | bool picAvailUrl = false; |
395 | if (! picture.undefined() ) { | 396 | if (! picture.undefined() ) { |
396 | picAvailintern = (picture.isIntern() && !picture.data().isNull()); | 397 | picAvailintern = (picture.isIntern() && !picture.data().isNull()); |
397 | picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); | 398 | picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); |
398 | } | 399 | } |
399 | if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { | 400 | if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { |
400 | picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; | 401 | picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; |
401 | if ( picAvailintern ) { | 402 | if ( picAvailintern ) { |
402 | QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); | 403 | QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); |
404 | int wid = picture.data().width(); | ||
405 | int hei = picture.data().height(); | ||
406 | if ( wid > 128 || hei > 128 ) { | ||
407 | if ( wid > hei ) { | ||
408 | hei = (hei*128)/wid; | ||
409 | wid = 128; | ||
410 | } else { | ||
411 | wid = (wid*128)/hei; | ||
412 | hei = 128; | ||
413 | } | ||
414 | } | ||
415 | picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei); | ||
403 | } else { | 416 | } else { |
404 | if ( picAvailUrl ) { | 417 | if ( picAvailUrl ) { |
405 | QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() )); | 418 | QPixmap picPix( picture.url() ); |
419 | QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); | ||
420 | int wid = picPix.width(); | ||
421 | int hei = picPix.height(); | ||
422 | if ( wid > 128 || hei > 128 ) { | ||
423 | if ( wid > hei ) { | ||
424 | hei = (hei*128)/wid; | ||
425 | wid = 128; | ||
426 | } else { | ||
427 | wid = (wid*128)/hei; | ||
428 | hei = 128; | ||
429 | } | ||
430 | } | ||
431 | picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei); | ||
406 | } else { | 432 | } else { |
407 | if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) { | 433 | if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) { |
408 | static bool setDefaultImageChildren = false; | 434 | static bool setDefaultImageChildren = false; |
409 | if ( !setDefaultImageChildren ) { | 435 | if ( !setDefaultImageChildren ) { |
410 | QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); | 436 | QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); |
411 | setDefaultImageChildren = true; | 437 | setDefaultImageChildren = true; |
412 | } | 438 | } |
413 | picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">"; | 439 | picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">"; |
414 | 440 | ||
415 | } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) { | 441 | } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) { |
416 | static bool setDefaultImagepouses = false; | 442 | static bool setDefaultImagepouses = false; |
417 | if ( !setDefaultImagepouses ) { | 443 | if ( !setDefaultImagepouses ) { |
418 | QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); | 444 | QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); |
419 | setDefaultImagepouses = true; | 445 | setDefaultImagepouses = true; |
420 | } | 446 | } |
421 | picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">"; | 447 | picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">"; |
422 | } else { | 448 | } else { |
423 | QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); | 449 | QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); |
424 | if ( gen == "male" ) { | 450 | if ( gen == "male" ) { |
425 | static bool setDefaultImageMale = false; | 451 | static bool setDefaultImageMale = false; |
426 | if ( !setDefaultImageMale ) { | 452 | if ( !setDefaultImageMale ) { |
427 | QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); | 453 | QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); |
428 | setDefaultImageMale = true; | 454 | setDefaultImageMale = true; |
429 | } | 455 | } |