-rw-r--r-- | kabc/addressee.cpp | 2 | ||||
-rw-r--r-- | kabc/addresseeview.cpp | 29 | ||||
-rw-r--r-- | kabc/phonenumber.cpp | 13 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 2 |
4 files changed, 38 insertions, 8 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 2f4a9af..6cfac80 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -1092,7 +1092,7 @@ QString Addressee::otherPhoneLabel() | |||
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() |
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 5c24acf..cde19a1 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -548,7 +548,7 @@ mText = "<table width=\"100%\">\n"; | |||
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(); |
@@ -561,10 +561,35 @@ QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool pr | |||
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) || |
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index 6db1bcf..897c56d 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp | |||
@@ -99,6 +99,8 @@ int PhoneNumber::getCompatType( int type ) | |||
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) |
@@ -107,9 +109,10 @@ int PhoneNumber::getCompatType( int type ) | |||
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) |
@@ -226,14 +229,14 @@ 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 | ||
@@ -280,8 +283,10 @@ QString PhoneNumber::typeLabel( int type ) | |||
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"); |
287 | if ((type & Voice) == Voice) | ||
284 | return i18n("VoIP"); | 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"); |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index aa61fb8..f134d5b 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -646,7 +646,7 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
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 | ||