-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 | |||
@@ -403,47 +403,60 @@ void ExternalAppHandler::loadConfig() | |||
403 | { | 403 | { |
404 | 404 | ||
405 | mDefaultItems.clear(); | 405 | mDefaultItems.clear(); |
406 | mEmailAppAvailable = UNDEFINED; | 406 | mEmailAppAvailable = UNDEFINED; |
407 | mPhoneAppAvailable = UNDEFINED; | 407 | mPhoneAppAvailable = UNDEFINED; |
408 | mFaxAppAvailable = UNDEFINED; | 408 | mFaxAppAvailable = UNDEFINED; |
409 | mSMSAppAvailable = UNDEFINED; | 409 | mSMSAppAvailable = UNDEFINED; |
410 | mPagerAppAvailable = UNDEFINED; | 410 | mPagerAppAvailable = UNDEFINED; |
411 | mSIPAppAvailable = UNDEFINED; | 411 | mSIPAppAvailable = UNDEFINED; |
412 | 412 | ||
413 | QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); | 413 | QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); |
414 | QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); | 414 | QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); |
415 | QString qtpath = QString::fromLatin1( getenv("QTDIR") ); | ||
415 | 416 | ||
417 | //if qtopiapath is not set, fallback to qt | ||
418 | if (qtopiapath.isEmpty()) | ||
419 | qtopiapath = qtpath; | ||
420 | |||
421 | //if opiepath is not set, fallback to qtopia | ||
416 | if (opiepath.isEmpty()) | 422 | if (opiepath.isEmpty()) |
417 | opiepath = qtopiapath; | 423 | opiepath = qtopiapath; |
418 | 424 | ||
425 | |||
426 | |||
419 | //mailclients | 427 | //mailclients |
420 | QString mailmsg1 = "writeMail(QString,QString)"; | 428 | QString mailmsg1 = "writeMail(QString,QString)"; |
421 | QString mailmsg2 = "writeMail(QMap(QString,QString))"; | 429 | QString mailmsg2 = "writeMail(QMap(QString,QString))"; |
422 | 430 | ||
423 | QString undefined = ""; | 431 | QString undefined = ""; |
424 | 432 | ||
425 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); | 433 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); |
426 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); | 434 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); |
427 | 435 | ||
428 | if (( QFile::exists( qtopiapath + "/bin/ompi" )) || | 436 | if (( QFile::exists( qtopiapath + "/bin/ompi" )) || |
429 | ( QFile::exists( opiepath + "/bin/ompi" ))) | 437 | ( QFile::exists( opiepath + "/bin/ompi" )) || |
438 | ( QFile::exists( qtpath + "/bin/ompi" ))) | ||
430 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 439 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
431 | 440 | ||
432 | if ( QFile::exists( qtopiapath + "/bin/qtmail" )) | 441 | if (( QFile::exists( qtopiapath + "/bin/qtmail" )) || |
442 | ( QFile::exists( qtpath + "/bin/qtmail" ))) | ||
433 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 443 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
434 | 444 | ||
435 | if ( QFile::exists( opiepath + "/bin/opiemail" )) | 445 | if ( QFile::exists( opiepath + "/bin/opiemail" )) |
436 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 446 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
437 | 447 | ||
448 | if ( QFile::exists( opiepath + "/bin/mailit" )) | ||
449 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | ||
450 | |||
438 | 451 | ||
439 | 452 | ||
440 | //phoneclients | 453 | //phoneclients |
441 | 454 | ||
442 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); | 455 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); |
443 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); | 456 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); |
444 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || | 457 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || |
445 | ( QFile::exists( opiepath + "/bin/kppi" ))) | 458 | ( QFile::exists( opiepath + "/bin/kppi" ))) |
446 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); | 459 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); |
447 | 460 | ||
448 | //faxclients | 461 | //faxclients |
449 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); | 462 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax 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 | |||
@@ -41,25 +41,26 @@ class KPimGlobalPrefs : public KPrefs | |||
41 | void setGlobalConfig(); | 41 | void setGlobalConfig(); |
42 | static KPimGlobalPrefs *instance(); | 42 | static KPimGlobalPrefs *instance(); |
43 | 43 | ||
44 | 44 | ||
45 | virtual ~KPimGlobalPrefs(); | 45 | virtual ~KPimGlobalPrefs(); |
46 | 46 | ||
47 | 47 | ||
48 | enum EMailClients { | 48 | enum EMailClients { |
49 | NONE_EMC = 0, | 49 | NONE_EMC = 0, |
50 | OTHER_EMC = 1, | 50 | OTHER_EMC = 1, |
51 | OMPI_EMC = 2, | 51 | OMPI_EMC = 2, |
52 | QTOPIA_EMC = 3, | 52 | QTOPIA_EMC = 3, |
53 | OPIE_EMC = 4 | 53 | OPIE_EMC = 4, |
54 | OPIE_MAILIT_EMC = 5 | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | enum PhoneClients { | 57 | enum PhoneClients { |
57 | NONE_PHC = 0, | 58 | NONE_PHC = 0, |
58 | OTHER_PHC = 1, | 59 | OTHER_PHC = 1, |
59 | KPPI_PHC = 2 | 60 | KPPI_PHC = 2 |
60 | }; | 61 | }; |
61 | 62 | ||
62 | enum FaxClients { | 63 | enum FaxClients { |
63 | NONE_FAC = 0, | 64 | NONE_FAC = 0, |
64 | OTHER_FAC = 1 | 65 | OTHER_FAC = 1 |
65 | }; | 66 | }; |