-rw-r--r-- | libkdepim/externalapphandler.cpp | 17 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 3 |
2 files changed, 17 insertions, 3 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 9f12152..3079141 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -391,71 +391,84 @@ void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& ) { // this method is a conevnient way to reduce the number of parameters I have to pass emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList); } void ExternalAppHandler::loadConfig() { mDefaultItems.clear(); mEmailAppAvailable = UNDEFINED; mPhoneAppAvailable = UNDEFINED; mFaxAppAvailable = UNDEFINED; mSMSAppAvailable = UNDEFINED; mPagerAppAvailable = UNDEFINED; mSIPAppAvailable = UNDEFINED; QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); + QString qtpath = QString::fromLatin1( getenv("QTDIR") ); + //if qtopiapath is not set, fallback to qt + if (qtopiapath.isEmpty()) + qtopiapath = qtpath; + + //if opiepath is not set, fallback to qtopia if (opiepath.isEmpty()) opiepath = qtopiapath; + + //mailclients QString mailmsg1 = "writeMail(QString,QString)"; QString mailmsg2 = "writeMail(QMap(QString,QString))"; QString undefined = ""; addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); if (( QFile::exists( qtopiapath + "/bin/ompi" )) || - ( QFile::exists( opiepath + "/bin/ompi" ))) + ( QFile::exists( opiepath + "/bin/ompi" )) || + ( QFile::exists( qtpath + "/bin/ompi" ))) addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); - if ( QFile::exists( qtopiapath + "/bin/qtmail" )) + if (( QFile::exists( qtopiapath + "/bin/qtmail" )) || + ( QFile::exists( qtpath + "/bin/qtmail" ))) addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); if ( QFile::exists( opiepath + "/bin/opiemail" )) addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); + if ( QFile::exists( opiepath + "/bin/mailit" )) + addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); + //phoneclients addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); if (( QFile::exists( qtopiapath + "/bin/kppi" )) || ( QFile::exists( opiepath + "/bin/kppi" ))) addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); //faxclients addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined); //smsclients addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined); addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined); //pagerclients addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::NONE_PAC, "No pager client installed", undefined, undefined, undefined, undefined, undefined); addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::OTHER_PAC, "Other pager client", undefined, undefined, undefined, undefined, undefined); //sipclients addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC, "No SIP client installed", undefined, undefined, undefined, undefined, undefined); diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index 11c534a..5e27e85 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -29,49 +29,50 @@ $Id$ */ #ifndef KPIMGLOBALPREFS_H #define KPIMGLOBALPREFS_H #include "kprefs.h" #include <qdict.h> class KPimGlobalPrefs : public KPrefs { public: void setGlobalConfig(); static KPimGlobalPrefs *instance(); virtual ~KPimGlobalPrefs(); enum EMailClients { NONE_EMC = 0, OTHER_EMC = 1, OMPI_EMC = 2, QTOPIA_EMC = 3, - OPIE_EMC = 4 + OPIE_EMC = 4, + OPIE_MAILIT_EMC = 5 }; enum PhoneClients { NONE_PHC = 0, OTHER_PHC = 1, KPPI_PHC = 2 }; enum FaxClients { NONE_FAC = 0, OTHER_FAC = 1 }; enum SMSClients { NONE_SMC = 0, OTHER_SMC = 1 }; enum PagerClients { NONE_PAC = 0, OTHER_PAC = 1 }; enum SIPClients { |