author | zautrix <zautrix> | 2004-09-07 23:33:23 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-07 23:33:23 (UTC) |
commit | 199025628054eef739a261437a51a98f5218ab0f (patch) (unidiff) | |
tree | 75ec5c537ee789dbd3e1a87a2e7db9b29d44c626 /kaddressbook | |
parent | 2676646d4744ccceab1063dc02d772a26a203c61 (diff) | |
download | kdepimpi-199025628054eef739a261437a51a98f5218ab0f.zip kdepimpi-199025628054eef739a261437a51a98f5218ab0f.tar.gz kdepimpi-199025628054eef739a261437a51a98f5218ab0f.tar.bz2 |
Fixed default settings
-rw-r--r-- | kaddressbook/kabcore.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 6522ccc..5cd9649 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1996,113 +1996,116 @@ void KABCore::updateActionMenu() | |||
1996 | 1996 | ||
1997 | void KABCore::configureKeyBindings() | 1997 | void KABCore::configureKeyBindings() |
1998 | { | 1998 | { |
1999 | #ifndef KAB_EMBEDDED | 1999 | #ifndef KAB_EMBEDDED |
2000 | KKeyDialog::configure( actionCollection(), true ); | 2000 | KKeyDialog::configure( actionCollection(), true ); |
2001 | #else //KAB_EMBEDDED | 2001 | #else //KAB_EMBEDDED |
2002 | qDebug("KABCore::configureKeyBindings() not implemented"); | 2002 | qDebug("KABCore::configureKeyBindings() not implemented"); |
2003 | #endif //KAB_EMBEDDED | 2003 | #endif //KAB_EMBEDDED |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | #ifdef KAB_EMBEDDED | 2006 | #ifdef KAB_EMBEDDED |
2007 | void KABCore::configureResources() | 2007 | void KABCore::configureResources() |
2008 | { | 2008 | { |
2009 | KRES::KCMKResources dlg( this, "" , 0 ); | 2009 | KRES::KCMKResources dlg( this, "" , 0 ); |
2010 | 2010 | ||
2011 | if ( !dlg.exec() ) | 2011 | if ( !dlg.exec() ) |
2012 | return; | 2012 | return; |
2013 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); | 2013 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); |
2014 | } | 2014 | } |
2015 | #endif //KAB_EMBEDDED | 2015 | #endif //KAB_EMBEDDED |
2016 | 2016 | ||
2017 | 2017 | ||
2018 | /* this method will be called through the QCop interface from Ko/Pi to select addresses | 2018 | /* this method will be called through the QCop interface from Ko/Pi to select addresses |
2019 | * for the attendees list of an event. | 2019 | * for the attendees list of an event. |
2020 | */ | 2020 | */ |
2021 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) | 2021 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) |
2022 | { | 2022 | { |
2023 | QStringList nameList; | 2023 | QStringList nameList; |
2024 | QStringList emailList; | 2024 | QStringList emailList; |
2025 | QStringList uidList; | 2025 | QStringList uidList; |
2026 | 2026 | ||
2027 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 2027 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
2028 | uint i=0; | 2028 | uint i=0; |
2029 | for (i=0; i < list.count(); i++) | 2029 | for (i=0; i < list.count(); i++) |
2030 | { | 2030 | { |
2031 | nameList.append(list[i].realName()); | 2031 | nameList.append(list[i].realName()); |
2032 | emailList.append(list[i].preferredEmail()); | 2032 | emailList.append(list[i].preferredEmail()); |
2033 | uidList.append(list[i].uid()); | 2033 | uidList.append(list[i].uid()); |
2034 | } | 2034 | } |
2035 | 2035 | ||
2036 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); | 2036 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); |
2037 | 2037 | ||
2038 | } | 2038 | } |
2039 | 2039 | ||
2040 | /* this method will be called through the QCop interface from other apps to show details of a contact. | 2040 | /* this method will be called through the QCop interface from other apps to show details of a contact. |
2041 | */ | 2041 | */ |
2042 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) | 2042 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) |
2043 | { | 2043 | { |
2044 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); | 2044 | qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); |
2045 | 2045 | ||
2046 | QString foundUid = QString::null; | 2046 | QString foundUid = QString::null; |
2047 | if ( ! uid.isEmpty() ) { | 2047 | if ( ! uid.isEmpty() ) { |
2048 | Addressee adrr = mAddressBook->findByUid( uid ); | 2048 | Addressee adrr = mAddressBook->findByUid( uid ); |
2049 | if ( !adrr.isEmpty() ) { | 2049 | if ( !adrr.isEmpty() ) { |
2050 | foundUid = uid; | 2050 | foundUid = uid; |
2051 | } | ||
2051 | if ( email == "sendbacklist" ) { | 2052 | if ( email == "sendbacklist" ) { |
2053 | qDebug("ssssssssssssssssssssssend "); | ||
2052 | QStringList nameList; | 2054 | QStringList nameList; |
2053 | QStringList emailList; | 2055 | QStringList emailList; |
2054 | QStringList uidList; | 2056 | QStringList uidList; |
2055 | nameList.append(adrr.realName()); | 2057 | nameList.append(adrr.realName()); |
2056 | emailList = adrr.emails(); | 2058 | emailList = adrr.emails(); |
2057 | uidList.append( adrr.preferredEmail()); | 2059 | uidList.append( adrr.preferredEmail()); |
2058 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 2060 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
2061 | return; | ||
2059 | } | 2062 | } |
2060 | } | 2063 | |
2061 | } | 2064 | } |
2062 | 2065 | ||
2063 | if ( email == "sendback" ) | 2066 | if ( email == "sendback" ) |
2064 | return; | 2067 | return; |
2065 | if (foundUid.isEmpty()) | 2068 | if (foundUid.isEmpty()) |
2066 | { | 2069 | { |
2067 | //find the uid of the person first | 2070 | //find the uid of the person first |
2068 | Addressee::List namelist; | 2071 | Addressee::List namelist; |
2069 | Addressee::List emaillist; | 2072 | Addressee::List emaillist; |
2070 | 2073 | ||
2071 | if (!name.isEmpty()) | 2074 | if (!name.isEmpty()) |
2072 | namelist = mAddressBook->findByName( name ); | 2075 | namelist = mAddressBook->findByName( name ); |
2073 | 2076 | ||
2074 | if (!email.isEmpty()) | 2077 | if (!email.isEmpty()) |
2075 | emaillist = mAddressBook->findByEmail( email ); | 2078 | emaillist = mAddressBook->findByEmail( email ); |
2076 | qDebug("count %d %d ", namelist.count(),emaillist.count() ); | 2079 | qDebug("count %d %d ", namelist.count(),emaillist.count() ); |
2077 | //check if we have a match in Namelist and Emaillist | 2080 | //check if we have a match in Namelist and Emaillist |
2078 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { | 2081 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { |
2079 | foundUid = emaillist[0].uid(); | 2082 | foundUid = emaillist[0].uid(); |
2080 | } | 2083 | } |
2081 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) | 2084 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) |
2082 | foundUid = namelist[0].uid(); | 2085 | foundUid = namelist[0].uid(); |
2083 | else | 2086 | else |
2084 | { | 2087 | { |
2085 | for (int i = 0; i < namelist.count(); i++) | 2088 | for (int i = 0; i < namelist.count(); i++) |
2086 | { | 2089 | { |
2087 | for (int j = 0; j < emaillist.count(); j++) | 2090 | for (int j = 0; j < emaillist.count(); j++) |
2088 | { | 2091 | { |
2089 | if (namelist[i] == emaillist[j]) | 2092 | if (namelist[i] == emaillist[j]) |
2090 | { | 2093 | { |
2091 | foundUid = namelist[i].uid(); | 2094 | foundUid = namelist[i].uid(); |
2092 | } | 2095 | } |
2093 | } | 2096 | } |
2094 | } | 2097 | } |
2095 | } | 2098 | } |
2096 | } | 2099 | } |
2097 | else | 2100 | else |
2098 | { | 2101 | { |
2099 | foundUid = uid; | 2102 | foundUid = uid; |
2100 | } | 2103 | } |
2101 | 2104 | ||
2102 | if (!foundUid.isEmpty()) | 2105 | if (!foundUid.isEmpty()) |
2103 | { | 2106 | { |
2104 | 2107 | ||
2105 | // raise Ka/Pi if it is in the background | 2108 | // raise Ka/Pi if it is in the background |
2106 | #ifndef DESKTOP_VERSION | 2109 | #ifndef DESKTOP_VERSION |
2107 | #ifndef KORG_NODCOP | 2110 | #ifndef KORG_NODCOP |
2108 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); | 2111 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); |