-rw-r--r-- | kmicromail/composemail.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 0cd0b23..5945b7f 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -1,70 +1,76 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | 2 | ||
3 | #include <kabc/addresseedialog.h> | ||
4 | #include <kabc/stdaddressbook.h> | ||
5 | #include <kabc/addressee.h> | ||
6 | #ifdef DESKTOP_VERSION | ||
7 | #include <qapplication.h> | ||
8 | #include <kabc/addresseedialog.h> | ||
9 | #endif //DESKTOP_VERSION | ||
10 | #include <libkdepim/externalapphandler.h> | ||
11 | |||
12 | #include "koprefs.h" | ||
13 | |||
14 | #ifdef MINIKDE_KDIALOG_H | ||
15 | #undef MINIKDE_KDIALOG_H | ||
16 | #endif | ||
17 | |||
18 | |||
3 | #include "composemail.h" | 19 | #include "composemail.h" |
4 | 20 | ||
5 | #include <libmailwrapper/smtpwrapper.h> | 21 | #include <libmailwrapper/smtpwrapper.h> |
6 | #include <libmailwrapper/storemail.h> | 22 | #include <libmailwrapper/storemail.h> |
7 | #include <libmailwrapper/abstractmail.h> | 23 | #include <libmailwrapper/abstractmail.h> |
8 | #include <libmailwrapper/mailtypes.h> | 24 | #include <libmailwrapper/mailtypes.h> |
9 | 25 | ||
10 | /* OPIE */ | 26 | /* OPIE */ |
11 | //#include <opie2/ofiledialog.h> | 27 | //#include <opie2/ofiledialog.h> |
12 | //#include <opie2/odebug.h> | 28 | //#include <opie2/odebug.h> |
13 | #include <kfiledialog.h> | 29 | #include <kfiledialog.h> |
14 | //#include <qpe/resource.h> | 30 | //#include <qpe/resource.h> |
15 | #include <qpe/global.h> | 31 | #include <qpe/global.h> |
16 | //#include <qpe/contact.h> | 32 | //#include <qpe/contact.h> |
17 | 33 | ||
18 | 34 | ||
19 | #include <qcombobox.h> | 35 | #include <qcombobox.h> |
20 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
21 | #include <qiconset.h> | 37 | #include <qiconset.h> |
22 | #include <qtimer.h> | 38 | #include <qtimer.h> |
23 | #include <qmessagebox.h> | 39 | #include <qmessagebox.h> |
24 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
25 | #include <qmultilineedit.h> | 41 | #include <qmultilineedit.h> |
26 | #include <qlabel.h> | 42 | #include <qlabel.h> |
27 | #include <qtabwidget.h> | 43 | #include <qtabwidget.h> |
28 | #include <qlistview.h> | 44 | #include <qlistview.h> |
29 | #include <kabc/addresseedialog.h> | ||
30 | #include <kabc/stdaddressbook.h> | ||
31 | #include <kabc/addressee.h> | ||
32 | #ifdef DESKTOP_VERSION | ||
33 | #include <qapplication.h> | ||
34 | #include <kabc/addresseedialog.h> | ||
35 | #endif //DESKTOP_VERSION | ||
36 | #include <libkdepim/externalapphandler.h> | ||
37 | |||
38 | #include "koprefs.h" | ||
39 | 45 | ||
40 | //using namespace Opie::Core; | 46 | //using namespace Opie::Core; |
41 | //using namespace Opie::Ui; | 47 | //using namespace Opie::Ui; |
42 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal ) | 48 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal ) |
43 | : ComposeMailUI( parent, name, modal ) | 49 | : ComposeMailUI( parent, name, modal ) |
44 | { | 50 | { |
45 | mPickLineEdit = 0; | 51 | mPickLineEdit = 0; |
46 | connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), | 52 | 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&))); | 53 | this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); |
48 | settings = s; | 54 | settings = s; |
49 | m_replyid = ""; | 55 | m_replyid = ""; |
50 | if ( KOPrefs::instance()->mUseKapi) { | 56 | if ( KOPrefs::instance()->mUseKapi) { |
51 | KConfig config( locateLocal("config", "kabcrc") ); | 57 | KConfig config( locateLocal("config", "kabcrc") ); |
52 | config.setGroup( "General" ); | 58 | config.setGroup( "General" ); |
53 | QString whoami_uid = config.readEntry( "WhoAmI" ); | 59 | QString whoami_uid = config.readEntry( "WhoAmI" ); |
54 | 60 | ||
55 | if ( whoami_uid.isEmpty() ) { | 61 | if ( whoami_uid.isEmpty() ) { |
56 | QMessageBox::information( 0, i18n( "Hint" ), | 62 | QMessageBox::information( 0, i18n( "Hint" ), |
57 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 63 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
58 | i18n( "Ok" ) ); | 64 | i18n( "Ok" ) ); |
59 | 65 | ||
60 | 66 | ||
61 | fillSettings(); | 67 | fillSettings(); |
62 | } else | 68 | } else |
63 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); | 69 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); |
64 | 70 | ||
65 | 71 | ||
66 | #ifdef DESKTOP_VERSION | 72 | #ifdef DESKTOP_VERSION |
67 | KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); | 73 | KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); |
68 | QStringList mails = con.emails(); | 74 | QStringList mails = con.emails(); |
69 | QString defmail = con.preferredEmail(); | 75 | QString defmail = con.preferredEmail(); |
70 | if ( mails.count() == 0) | 76 | if ( mails.count() == 0) |