-rw-r--r-- | libkdepim/addresseeview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index 5c69010..b4717d7 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp | |||
@@ -72,26 +72,29 @@ void AddresseeView::setSource(const QString& n) | |||
72 | else if ( n.left( 7 ) == "phoneto" ) | 72 | else if ( n.left( 7 ) == "phoneto" ) |
73 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); | 73 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); |
74 | else if ( n.left( 5 ) == "faxto" ) | 74 | else if ( n.left( 5 ) == "faxto" ) |
75 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); | 75 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); |
76 | else if ( n.left( 5 ) == "smsto" ) | 76 | else if ( n.left( 5 ) == "smsto" ) |
77 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); | 77 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); |
78 | else if ( n.left( 7 ) == "pagerto" ) | 78 | else if ( n.left( 7 ) == "pagerto" ) |
79 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); | 79 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); |
80 | else if ( n.left( 5 ) == "sipto" ) | ||
81 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); | ||
80 | 82 | ||
81 | } | 83 | } |
82 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) | 84 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) |
83 | { | 85 | { |
84 | ExternalAppHandler* eah = ExternalAppHandler::instance(); | 86 | ExternalAppHandler* eah = ExternalAppHandler::instance(); |
85 | bool kemailAvail = eah->isEmailAppAvailable(); | 87 | bool kemailAvail = eah->isEmailAppAvailable(); |
86 | bool kphoneAvail = eah->isPhoneAppAvailable(); | 88 | bool kphoneAvail = eah->isPhoneAppAvailable(); |
87 | bool kfaxAvail = eah->isFaxAppAvailable(); | 89 | bool kfaxAvail = eah->isFaxAppAvailable(); |
88 | bool ksmsAvail = eah->isSMSAppAvailable(); | 90 | bool ksmsAvail = eah->isSMSAppAvailable(); |
89 | bool kpagerAvail = eah->isPagerAppAvailable(); | 91 | bool kpagerAvail = eah->isPagerAppAvailable(); |
92 | bool ksipAvail = eah->isSIPAppAvailable(); | ||
90 | 93 | ||
91 | 94 | ||
92 | mAddressee = addr; | 95 | mAddressee = addr; |
93 | // clear view | 96 | // clear view |
94 | setText( QString::null ); | 97 | setText( QString::null ); |
95 | 98 | ||
96 | if ( mAddressee.isEmpty() ) | 99 | if ( mAddressee.isEmpty() ) |
97 | return; | 100 | return; |
@@ -154,16 +157,19 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) | |||
154 | 157 | ||
155 | extension = QString::null; | 158 | extension = QString::null; |
156 | if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) { | 159 | if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) { |
157 | if (kfaxAvail) extension = "faxto:"; | 160 | if (kfaxAvail) extension = "faxto:"; |
158 | } | 161 | } |
159 | else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) { | 162 | else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) { |
160 | if (kpagerAvail) extension = "pagerto:"; | 163 | if (kpagerAvail) extension = "pagerto:"; |
161 | } | 164 | } |
165 | else if ((phonetype & KABC::PhoneNumber::Sip) == KABC::PhoneNumber::Sip) { | ||
166 | if (ksipAvail) extension = "sipto:"; | ||
167 | } | ||
162 | else if (kphoneAvail) { | 168 | else if (kphoneAvail) { |
163 | extension = "phoneto:"; | 169 | extension = "phoneto:"; |
164 | } | 170 | } |
165 | else | 171 | else |
166 | extension = QString::null; | 172 | extension = QString::null; |
167 | 173 | ||
168 | if ( !extension.isEmpty() ) { | 174 | if ( !extension.isEmpty() ) { |
169 | dynamicPart += QString( | 175 | dynamicPart += QString( |