summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-09-08 11:34:38 (UTC)
committer zautrix <zautrix>2004-09-08 11:34:38 (UTC)
commit1fcec858408b88bb412af18fbf853b49b6970d8a (patch) (unidiff)
tree702e94a74f0bb90335b9b193d28e31c1dc392c03 /kaddressbook
parentcdff4506a9148c47406af86968da73c0dbfca0ba (diff)
downloadkdepimpi-1fcec858408b88bb412af18fbf853b49b6970d8a.zip
kdepimpi-1fcec858408b88bb412af18fbf853b49b6970d8a.tar.gz
kdepimpi-1fcec858408b88bb412af18fbf853b49b6970d8a.tar.bz2
Fixed QCOP call problem of kopiemail
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d1d385c..74e5cf7 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2001,142 +2001,142 @@ void KABCore::updateActionMenu()
2001 if ( !redo->top() ) 2001 if ( !redo->top() )
2002 mActionRedo->setText( i18n( "Redo" ) ); 2002 mActionRedo->setText( i18n( "Redo" ) );
2003 else 2003 else
2004 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2004 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2005 2005
2006 mActionRedo->setEnabled( !redo->isEmpty() ); 2006 mActionRedo->setEnabled( !redo->isEmpty() );
2007} 2007}
2008 2008
2009void KABCore::configureKeyBindings() 2009void KABCore::configureKeyBindings()
2010{ 2010{
2011#ifndef KAB_EMBEDDED 2011#ifndef KAB_EMBEDDED
2012 KKeyDialog::configure( actionCollection(), true ); 2012 KKeyDialog::configure( actionCollection(), true );
2013#else //KAB_EMBEDDED 2013#else //KAB_EMBEDDED
2014 qDebug("KABCore::configureKeyBindings() not implemented"); 2014 qDebug("KABCore::configureKeyBindings() not implemented");
2015#endif //KAB_EMBEDDED 2015#endif //KAB_EMBEDDED
2016} 2016}
2017 2017
2018#ifdef KAB_EMBEDDED 2018#ifdef KAB_EMBEDDED
2019void KABCore::configureResources() 2019void KABCore::configureResources()
2020{ 2020{
2021 KRES::KCMKResources dlg( this, "" , 0 ); 2021 KRES::KCMKResources dlg( this, "" , 0 );
2022 2022
2023 if ( !dlg.exec() ) 2023 if ( !dlg.exec() )
2024 return; 2024 return;
2025 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2025 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2026} 2026}
2027#endif //KAB_EMBEDDED 2027#endif //KAB_EMBEDDED
2028 2028
2029 2029
2030/* this method will be called through the QCop interface from Ko/Pi to select addresses 2030/* this method will be called through the QCop interface from Ko/Pi to select addresses
2031 * for the attendees list of an event. 2031 * for the attendees list of an event.
2032 */ 2032 */
2033void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2033void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2034{ 2034{
2035 QStringList nameList; 2035 QStringList nameList;
2036 QStringList emailList; 2036 QStringList emailList;
2037 QStringList uidList; 2037 QStringList uidList;
2038 2038
2039 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2039 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2040 uint i=0; 2040 uint i=0;
2041 for (i=0; i < list.count(); i++) 2041 for (i=0; i < list.count(); i++)
2042 { 2042 {
2043 nameList.append(list[i].realName()); 2043 nameList.append(list[i].realName());
2044 emailList.append(list[i].preferredEmail()); 2044 emailList.append(list[i].preferredEmail());
2045 uidList.append(list[i].uid()); 2045 uidList.append(list[i].uid());
2046 } 2046 }
2047 2047
2048 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); 2048 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
2049 2049
2050} 2050}
2051 2051
2052/* this method will be called through the QCop interface from other apps to show details of a contact. 2052/* this method will be called through the QCop interface from other apps to show details of a contact.
2053 */ 2053 */
2054void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2054void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2055{ 2055{
2056 qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2056 qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2057 2057
2058 QString foundUid = QString::null; 2058 QString foundUid = QString::null;
2059 if ( ! uid.isEmpty() ) { 2059 if ( ! uid.isEmpty() ) {
2060 Addressee adrr = mAddressBook->findByUid( uid ); 2060 Addressee adrr = mAddressBook->findByUid( uid );
2061 if ( !adrr.isEmpty() ) { 2061 if ( !adrr.isEmpty() ) {
2062 foundUid = uid; 2062 foundUid = uid;
2063 } 2063 }
2064 if ( email == "sendbacklist" ) { 2064 if ( email == "sendbacklist" ) {
2065 qDebug("ssssssssssssssssssssssend "); 2065 //qDebug("ssssssssssssssssssssssend ");
2066 QStringList nameList; 2066 QStringList nameList;
2067 QStringList emailList; 2067 QStringList emailList;
2068 QStringList uidList; 2068 QStringList uidList;
2069 nameList.append(adrr.realName()); 2069 nameList.append(adrr.realName());
2070 emailList = adrr.emails(); 2070 emailList = adrr.emails();
2071 uidList.append( adrr.preferredEmail()); 2071 uidList.append( adrr.preferredEmail());
2072 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2072 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2073 return; 2073 return;
2074 } 2074 }
2075 2075
2076 } 2076 }
2077 2077
2078 if ( email == "sendback" ) 2078 if ( email == "sendbacklist" )
2079 return; 2079 return;
2080 if (foundUid.isEmpty()) 2080 if (foundUid.isEmpty())
2081 { 2081 {
2082 //find the uid of the person first 2082 //find the uid of the person first
2083 Addressee::List namelist; 2083 Addressee::List namelist;
2084 Addressee::List emaillist; 2084 Addressee::List emaillist;
2085 2085
2086 if (!name.isEmpty()) 2086 if (!name.isEmpty())
2087 namelist = mAddressBook->findByName( name ); 2087 namelist = mAddressBook->findByName( name );
2088 2088
2089 if (!email.isEmpty()) 2089 if (!email.isEmpty())
2090 emaillist = mAddressBook->findByEmail( email ); 2090 emaillist = mAddressBook->findByEmail( email );
2091 qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2091 qDebug("count %d %d ", namelist.count(),emaillist.count() );
2092 //check if we have a match in Namelist and Emaillist 2092 //check if we have a match in Namelist and Emaillist
2093 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2093 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2094 foundUid = emaillist[0].uid(); 2094 foundUid = emaillist[0].uid();
2095 } 2095 }
2096 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2096 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2097 foundUid = namelist[0].uid(); 2097 foundUid = namelist[0].uid();
2098 else 2098 else
2099 { 2099 {
2100 for (int i = 0; i < namelist.count(); i++) 2100 for (int i = 0; i < namelist.count(); i++)
2101 { 2101 {
2102 for (int j = 0; j < emaillist.count(); j++) 2102 for (int j = 0; j < emaillist.count(); j++)
2103 { 2103 {
2104 if (namelist[i] == emaillist[j]) 2104 if (namelist[i] == emaillist[j])
2105 { 2105 {
2106 foundUid = namelist[i].uid(); 2106 foundUid = namelist[i].uid();
2107 } 2107 }
2108 } 2108 }
2109 } 2109 }
2110 } 2110 }
2111 } 2111 }
2112 else 2112 else
2113 { 2113 {
2114 foundUid = uid; 2114 foundUid = uid;
2115 } 2115 }
2116 2116
2117 if (!foundUid.isEmpty()) 2117 if (!foundUid.isEmpty())
2118 { 2118 {
2119 2119
2120 // raise Ka/Pi if it is in the background 2120 // raise Ka/Pi if it is in the background
2121#ifndef DESKTOP_VERSION 2121#ifndef DESKTOP_VERSION
2122#ifndef KORG_NODCOP 2122#ifndef KORG_NODCOP
2123 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2123 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2124#endif 2124#endif
2125#endif 2125#endif
2126 2126
2127 mMainWindow->showMaximized(); 2127 mMainWindow->showMaximized();
2128 mMainWindow-> raise(); 2128 mMainWindow-> raise();
2129 2129
2130 mViewManager->setSelected( "", false); 2130 mViewManager->setSelected( "", false);
2131 mViewManager->refreshView( "" ); 2131 mViewManager->refreshView( "" );
2132 mViewManager->setSelected( foundUid, true ); 2132 mViewManager->setSelected( foundUid, true );
2133 mViewManager->refreshView( foundUid ); 2133 mViewManager->refreshView( foundUid );
2134 2134
2135 if ( !mMultipleViewsAtOnce ) 2135 if ( !mMultipleViewsAtOnce )
2136 { 2136 {
2137 setDetailsVisible( true ); 2137 setDetailsVisible( true );
2138 mActionDetails->setChecked(true); 2138 mActionDetails->setChecked(true);
2139 } 2139 }
2140 } 2140 }
2141} 2141}
2142 2142