-rw-r--r-- | kabc/addressee.cpp | 2 | ||||
-rw-r--r-- | kabc/addresseeview.cpp | 29 | ||||
-rw-r--r-- | kabc/phonenumber.cpp | 15 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 2 |
4 files changed, 39 insertions, 9 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 2f4a9af..6cfac80 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -1091,9 +1091,9 @@ QString Addressee::otherPhoneLabel() | |||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | QString Addressee::sipLabel() | 1093 | QString Addressee::sipLabel() |
1094 | { | 1094 | { |
1095 | return i18n("SIP"); | 1095 | return i18n("SiP"); |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | QString Addressee::emailLabel() | 1098 | QString Addressee::emailLabel() |
1099 | { | 1099 | { |
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 5c24acf..cde19a1 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -547,9 +547,9 @@ mText = "<table width=\"100%\">\n"; | |||
547 | setText( mText ); | 547 | setText( mText ); |
548 | 548 | ||
549 | } | 549 | } |
550 | 550 | ||
551 | QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred ) | 551 | QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones_unsorted ,bool preferred ) |
552 | { | 552 | { |
553 | ExternalAppHandler* eah = ExternalAppHandler::instance(); | 553 | ExternalAppHandler* eah = ExternalAppHandler::instance(); |
554 | bool kphoneAvail = eah->isPhoneAppAvailable(); | 554 | bool kphoneAvail = eah->isPhoneAppAvailable(); |
555 | bool kfaxAvail = eah->isFaxAppAvailable(); | 555 | bool kfaxAvail = eah->isFaxAppAvailable(); |
@@ -560,12 +560,37 @@ QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool pr | |||
560 | KABC::PhoneNumber::List::ConstIterator phoneIt; | 560 | KABC::PhoneNumber::List::ConstIterator phoneIt; |
561 | QString extension; | 561 | QString extension; |
562 | int phonetype; | 562 | int phonetype; |
563 | QString sms; | 563 | QString sms; |
564 | |||
565 | KABC::PhoneNumber::List::Iterator it; | ||
566 | KABC::PhoneNumber::List phones ; | ||
567 | |||
568 | PhoneNumber::TypeList tList = PhoneNumber::supportedTypeList(); | ||
569 | int i = 0; | ||
570 | int max = tList.count(); | ||
571 | while ( i < max-1 ) { | ||
572 | for ( it = phones_unsorted.begin(); it != phones_unsorted.end(); ++it ) { | ||
573 | if ( (*it).type() == tList[i] ) { | ||
574 | phones.append( (*it ) ); | ||
575 | break; | ||
576 | } | ||
577 | } | ||
578 | ++i; | ||
579 | } | ||
580 | for ( it = phones_unsorted.begin(); it != phones_unsorted.end(); ++it ) { | ||
581 | if ( (*it).type() == tList[ max-1 ] ) | ||
582 | phones.append( (*it ) ); | ||
583 | } | ||
584 | |||
564 | for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { | 585 | for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { |
565 | phonetype = (*phoneIt).type(); | 586 | phonetype = (*phoneIt).type(); |
566 | if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred ) | 587 | bool con = false; |
588 | if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred ) con = true; | ||
589 | if ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell ) con = !preferred;; | ||
590 | if ( con ) | ||
567 | continue; | 591 | continue; |
592 | |||
568 | if (ksmsAvail && | 593 | if (ksmsAvail && |
569 | ( | 594 | ( |
570 | ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) || | 595 | ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) || |
571 | ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell) | 596 | ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell) |
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index 6db1bcf..897c56d 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp | |||
@@ -98,19 +98,22 @@ int PhoneNumber::getCompatType( int type ) | |||
98 | } | 98 | } |
99 | if ((type & Pcs) == Pcs) { | 99 | if ((type & Pcs) == Pcs) { |
100 | if ((type & Pref) == Pref) | 100 | if ((type & Pref) == Pref) |
101 | return Pcs | Pref; | 101 | return Pcs | Pref; |
102 | if ((type & Voice) == Voice) | ||
103 | return Pcs | Voice; | ||
102 | return Pcs; | 104 | return Pcs; |
103 | } | 105 | } |
104 | if ((type & Car) == Car) | 106 | if ((type & Car) == Car) |
105 | return Car; | 107 | return Car; |
106 | if ((type & Pager) == Pager) | 108 | if ((type & Pager) == Pager) |
107 | return Pager; | 109 | return Pager; |
108 | if ((type & Isdn) == Isdn) | 110 | if ((type & Isdn) == Isdn) |
109 | return Isdn; | 111 | return Isdn; |
112 | #if 0 | ||
110 | if ((type & Video) == Video) | 113 | if ((type & Video) == Video) |
111 | return Video; | 114 | return Video; |
112 | 115 | #endif | |
113 | if ((type & Msg) == Msg) | 116 | if ((type & Msg) == Msg) |
114 | return Msg; | 117 | return Msg; |
115 | if ((type & Fax) == Fax) | 118 | if ((type & Fax) == Fax) |
116 | return Fax; | 119 | return Fax; |
@@ -225,16 +228,16 @@ PhoneNumber::TypeList PhoneNumber::typeList() | |||
225 | PhoneNumber::TypeList PhoneNumber::supportedTypeList() | 228 | PhoneNumber::TypeList PhoneNumber::supportedTypeList() |
226 | { | 229 | { |
227 | static TypeList list; | 230 | static TypeList list; |
228 | if ( list.count() == 0 ) | 231 | if ( list.count() == 0 ) |
229 | list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< Pcs<< Home << Work << Car << (Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Video << Msg << Pref << Voice; | 232 | list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< (Pcs|Voice)<< Home << Work << Car << Pcs <<(Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Msg << Pref << Voice; |
230 | return list; | 233 | return list; |
231 | } | 234 | } |
232 | QStringList PhoneNumber::supportedTypeListNames() | 235 | QStringList PhoneNumber::supportedTypeListNames() |
233 | { | 236 | { |
234 | static QStringList list; | 237 | static QStringList list; |
235 | if ( list.count() == 0 ) | 238 | if ( list.count() == 0 ) |
236 | list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SIP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Video") << i18n("Callback") << i18n("Primary")<< i18n("Other"); | 239 | list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SIP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2") << i18n("SIP2") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Callback") << i18n("Primary")<< i18n("Other"); |
237 | return list; | 240 | return list; |
238 | } | 241 | } |
239 | 242 | ||
240 | int PhoneNumber::typeListIndex4Type(int type ) | 243 | int PhoneNumber::typeListIndex4Type(int type ) |
@@ -279,10 +282,12 @@ QString PhoneNumber::typeLabel( int type ) | |||
279 | return i18n("Work2"); | 282 | return i18n("Work2"); |
280 | } | 283 | } |
281 | if ((type & Pcs) == Pcs) { | 284 | if ((type & Pcs) == Pcs) { |
282 | if ((type & Pref) == Pref) | 285 | if ((type & Pref) == Pref) |
283 | return i18n("SIP"); | 286 | return i18n("SiP"); |
284 | return i18n("VoIP"); | 287 | if ((type & Voice) == Voice) |
288 | return i18n("VoIP"); | ||
289 | return i18n("SiP2"); | ||
285 | } | 290 | } |
286 | if ((type & Car) == Car) | 291 | if ((type & Car) == Car) |
287 | return i18n("Mobile2"); | 292 | return i18n("Mobile2"); |
288 | if ((type & Pager) == Pager) | 293 | if ((type & Pager) == Pager) |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index aa61fb8..f134d5b 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -645,9 +645,9 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
645 | int dw = QApplication::desktop()->width(); | 645 | int dw = QApplication::desktop()->width(); |
646 | int dh = QApplication::desktop()->height(); | 646 | int dh = QApplication::desktop()->height(); |
647 | mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 647 | mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
648 | mTimerStartLabel->show(); | 648 | mTimerStartLabel->show(); |
649 | QTimer::singleShot( 5000, mTimerStartLabel, SLOT ( hide() ) ); | 649 | QTimer::singleShot( 4000, mTimerStartLabel, SLOT ( hide() ) ); |
650 | mTimerTime = 1; | 650 | mTimerTime = 1; |
651 | } | 651 | } |
652 | 652 | ||
653 | void SimpleAlarmDaemonImpl::confFontSize( int size ) | 653 | void SimpleAlarmDaemonImpl::confFontSize( int size ) |