summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
authorzautrix <zautrix>2004-09-08 02:21:24 (UTC)
committer zautrix <zautrix>2004-09-08 02:21:24 (UTC)
commit6650dd66dd13498a6d28844770d9d8c291335ad4 (patch) (unidiff)
tree249b157ae88e869e7dde6f9a1d3b74d2d804aa06 /kmicromail/composemail.cpp
parent858de54fa69a6e93072652a9cb33783ad10a9f0a (diff)
downloadkdepimpi-6650dd66dd13498a6d28844770d9d8c291335ad4.zip
kdepimpi-6650dd66dd13498a6d28844770d9d8c291335ad4.tar.gz
kdepimpi-6650dd66dd13498a6d28844770d9d8c291335ad4.tar.bz2
Some more fixes
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 14feeee..01dd406 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -1,90 +1,90 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3#include "composemail.h" 3#include "composemail.h"
4 4
5#include <libmailwrapper/smtpwrapper.h> 5#include <libmailwrapper/smtpwrapper.h>
6#include <libmailwrapper/storemail.h> 6#include <libmailwrapper/storemail.h>
7#include <libmailwrapper/abstractmail.h> 7#include <libmailwrapper/abstractmail.h>
8#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
9 9
10/* OPIE */ 10/* OPIE */
11//#include <opie2/ofiledialog.h> 11//#include <opie2/ofiledialog.h>
12//#include <opie2/odebug.h> 12//#include <opie2/odebug.h>
13#include <kfiledialog.h> 13#include <kfiledialog.h>
14//#include <qpe/resource.h> 14//#include <qpe/resource.h>
15#include <qpe/config.h> 15#include <qpe/config.h>
16#include <qpe/global.h> 16#include <qpe/global.h>
17//#include <qpe/contact.h> 17//#include <qpe/contact.h>
18 18
19 19
20#include <qcombobox.h> 20#include <qcombobox.h>
21#include <qcheckbox.h> 21#include <qcheckbox.h>
22#include <qtimer.h> 22#include <qtimer.h>
23#include <qmessagebox.h> 23#include <qmessagebox.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25#include <qmultilineedit.h> 25#include <qmultilineedit.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qtabwidget.h> 27#include <qtabwidget.h>
28#include <qlistview.h> 28#include <qlistview.h>
29#include <kabc/addresseedialog.h> 29#include <kabc/addresseedialog.h>
30#include <kabc/stdaddressbook.h> 30#include <kabc/stdaddressbook.h>
31#include <kabc/addressee.h> 31#include <kabc/addressee.h>
32#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
33#include <kabc/addresseedialog.h> 33#include <kabc/addresseedialog.h>
34#else //DESKTOP_VERSION 34#else //DESKTOP_VERSION
35#include <libkdepim/externalapphandler.h> 35#include <libkdepim/externalapphandler.h>
36#endif //DESKTOP_VERSION 36#endif //DESKTOP_VERSION
37 37
38 38
39//using namespace Opie::Core; 39//using namespace Opie::Core;
40//using namespace Opie::Ui; 40//using namespace Opie::Ui;
41ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 41ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal )
42 : ComposeMailUI( parent, name, modal, flags ) 42 : ComposeMailUI( parent, name, modal )
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 if ( whoami_uid.isEmpty() ) { 53 if ( whoami_uid.isEmpty() ) {
54 QMessageBox::information( 0, tr( "Hint" ), 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" ), 55 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
56 tr( "Ok" ) ); 56 tr( "Ok" ) );
57 57
58 } else 58 } else
59 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); 59 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
60#ifdef DESKTOP_VERSION 60#ifdef DESKTOP_VERSION
61 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); 61 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
62 QStringList mails = con.emails(); 62 QStringList mails = con.emails();
63 QString defmail = con.preferredEmail(); 63 QString defmail = con.preferredEmail();
64 if ( mails.count() == 0) 64 if ( mails.count() == 0)
65 QMessageBox::information( 0, tr( "Hint" ), 65 QMessageBox::information( 0, tr( "Hint" ),
66 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" ),
67 tr( "Ok" ) ); 67 tr( "Ok" ) );
68 if (defmail.length()!=0) { 68 if (defmail.length()!=0) {
69 fromBox->insertItem(defmail); 69 fromBox->insertItem(defmail);
70 } 70 }
71 QStringList::ConstIterator sit = mails.begin(); 71 QStringList::ConstIterator sit = mails.begin();
72 for (;sit!=mails.end();++sit) { 72 for (;sit!=mails.end();++sit) {
73 if ( (*sit)==defmail) 73 if ( (*sit)==defmail)
74 continue; 74 continue;
75 fromBox->insertItem((*sit)); 75 fromBox->insertItem((*sit));
76 } 76 }
77 senderNameEdit->setText(con.formattedName()); 77 senderNameEdit->setText(con.formattedName());
78#endif 78#endif
79 Config cfg( "mail" ); 79 Config cfg( "mail" );
80 cfg.setGroup( "Compose" ); 80 cfg.setGroup( "Compose" );
81 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); 81 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
82 82
83 attList->addColumn( tr( "Name" ) ); 83 attList->addColumn( tr( "Name" ) );
84 attList->addColumn( tr( "Size" ) ); 84 attList->addColumn( tr( "Size" ) );
85 85
86 QList<Account> accounts = settings->getAccounts(); 86 QList<Account> accounts = settings->getAccounts();
87 87
88 Account *it; 88 Account *it;
89 for ( it = accounts.first(); it; it = accounts.next() ) { 89 for ( it = accounts.first(); it; it = accounts.next() ) {
90 if ( it->getType()==MAILLIB::A_SMTP ) { 90 if ( it->getType()==MAILLIB::A_SMTP ) {