summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-07 23:33:23 (UTC)
committer zautrix <zautrix>2004-09-07 23:33:23 (UTC)
commit199025628054eef739a261437a51a98f5218ab0f (patch) (unidiff)
tree75ec5c537ee789dbd3e1a87a2e7db9b29d44c626
parent2676646d4744ccceab1063dc02d772a26a203c61 (diff)
downloadkdepimpi-199025628054eef739a261437a51a98f5218ab0f.zip
kdepimpi-199025628054eef739a261437a51a98f5218ab0f.tar.gz
kdepimpi-199025628054eef739a261437a51a98f5218ab0f.tar.bz2
Fixed default settings
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp7
-rw-r--r--kmicromail/composemail.cpp8
-rw-r--r--libkdepim/externalapphandler.cpp3
-rw-r--r--libkdepim/kpimglobalprefs.cpp4
4 files changed, 15 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 6522ccc..5cd9649 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2032,41 +2032,44 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
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 */
2042void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2042void 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 );
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 5f446fa..f7604ad 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -41,25 +41,31 @@
41ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 41ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
42 : ComposeMailUI( parent, name, modal, flags ) 42 : ComposeMailUI( parent, name, modal, flags )
43{ 43{
44 44
45 mPickLineEdit = 0; 45 mPickLineEdit = 0;
46 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 46 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
47 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 47 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
48 settings = s; 48 settings = s;
49 m_replyid = ""; 49 m_replyid = "";
50 KConfig config( locateLocal("config", "kabcrc") ); 50 KConfig config( locateLocal("config", "kabcrc") );
51 config.setGroup( "General" ); 51 config.setGroup( "General" );
52 QString whoami_uid = config.readEntry( "WhoAmI" ); 52 QString whoami_uid = config.readEntry( "WhoAmI" );
53 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); 53 if ( whoami_uid.isEmpty() ) {
54 QMessageBox::information( 0, tr( "Hint" ),
55 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
56 tr( "Ok" ) );
57
58 } else
59 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
54#ifdef DESKTOP_VERSION 60#ifdef DESKTOP_VERSION
55 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); 61 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
56 QStringList mails = con.emails(); 62 QStringList mails = con.emails();
57 QString defmail = con.preferredEmail(); 63 QString defmail = con.preferredEmail();
58 if ( mails.count() == 0) 64 if ( mails.count() == 0)
59 QMessageBox::information( 0, tr( "Hint" ), 65 QMessageBox::information( 0, tr( "Hint" ),
60 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 66 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
61 tr( "Ok" ) ); 67 tr( "Ok" ) );
62 if (defmail.length()!=0) { 68 if (defmail.length()!=0) {
63 fromBox->insertItem(defmail); 69 fromBox->insertItem(defmail);
64 } 70 }
65 QStringList::ConstIterator sit = mails.begin(); 71 QStringList::ConstIterator sit = mails.begin();
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 6100097..5ba32b6 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -341,25 +341,24 @@ ExternalAppHandler::ExternalAppHandler()
341 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); 341 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", "");
342 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 342 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
343} 343}
344 344
345ExternalAppHandler::~ExternalAppHandler() 345ExternalAppHandler::~ExternalAppHandler()
346{ 346{
347} 347}
348 348
349void ExternalAppHandler::loadConfig() 349void ExternalAppHandler::loadConfig()
350{ 350{
351 351
352 mDefaultItems.clear(); 352 mDefaultItems.clear();
353
354 mEmailAppAvailable = UNDEFINED; 353 mEmailAppAvailable = UNDEFINED;
355 mPhoneAppAvailable = UNDEFINED; 354 mPhoneAppAvailable = UNDEFINED;
356 mFaxAppAvailable = UNDEFINED; 355 mFaxAppAvailable = UNDEFINED;
357 mSMSAppAvailable = UNDEFINED; 356 mSMSAppAvailable = UNDEFINED;
358 mPagerAppAvailable = UNDEFINED; 357 mPagerAppAvailable = UNDEFINED;
359 358
360 359
361 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); 360 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") );
362 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); 361 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") );
363 362
364 if (opiepath.isEmpty()) 363 if (opiepath.isEmpty())
365 opiepath = qtopiapath; 364 opiepath = qtopiapath;
@@ -411,25 +410,25 @@ ExternalAppHandler *ExternalAppHandler::instance()
411{ 410{
412 if ( !sInstance ) { 411 if ( !sInstance ) {
413 sInstance = staticDeleter.setObject( new ExternalAppHandler() ); 412 sInstance = staticDeleter.setObject( new ExternalAppHandler() );
414 sInstance->loadConfig(); 413 sInstance->loadConfig();
415 } 414 }
416 415
417 return sInstance; 416 return sInstance;
418} 417}
419 418
420void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2) 419void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2)
421{ 420{
422 DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2); 421 DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2);
423 422 // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() );
424 mDefaultItems.append(dai); 423 mDefaultItems.append(dai);
425} 424}
426 425
427 426
428QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) 427QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
429{ 428{
430 QList<DefaultAppItem> list; 429 QList<DefaultAppItem> list;
431 430
432 DefaultAppItem* dai; 431 DefaultAppItem* dai;
433 432
434 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) 433 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() )
435 { 434 {
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 4790980..7f683a8 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -36,32 +36,32 @@ $Id$
36 36
37#include "kpimglobalprefs.h" 37#include "kpimglobalprefs.h"
38 38
39KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; 39KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
40static KStaticDeleter<KPimGlobalPrefs> staticDeleter; 40static KStaticDeleter<KPimGlobalPrefs> staticDeleter;
41 41
42 42
43KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) 43KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
44 : KPrefs("kkdepimrc") 44 : KPrefs("kkdepimrc")
45{ 45{
46 KPrefs::setCurrentGroup( "ExternalApplications" ); 46 KPrefs::setCurrentGroup( "ExternalApplications" );
47 47
48 addItemInt( "EmailChannelType", &mEmailClient, NONE_EMC ); 48 addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC );
49 addItemString( "EmailChannel", &mEmailOtherChannel, "" ); 49 addItemString( "EmailChannel", &mEmailOtherChannel, "" );
50 addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); 50 addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" );
51 addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); 51 addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" );
52 addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); 52 addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" );
53 addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); 53 addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" );
54 54
55 addItemInt( "PhoneChannelType", &mPhoneClient, NONE_PHC ); 55 addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC );
56 addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); 56 addItemString( "PhoneChannel", &mPhoneOtherChannel, "" );
57 addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); 57 addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" );
58 addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); 58 addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" );
59 59
60 addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); 60 addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC );
61 addItemString( "FaxChannel", &mFaxOtherChannel, "" ); 61 addItemString( "FaxChannel", &mFaxOtherChannel, "" );
62 addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); 62 addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" );
63 addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); 63 addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" );
64 64
65 addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); 65 addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC );
66 addItemString( "SMSChannel", &mSMSOtherChannel, "" ); 66 addItemString( "SMSChannel", &mSMSOtherChannel, "" );
67 addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); 67 addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" );