-rw-r--r-- | kmicromail/composemail.cpp | 26 | ||||
-rw-r--r-- | kmicromail/defines.h | 2 | ||||
-rw-r--r-- | kmicromail/editaccounts.cpp | 3 | ||||
-rw-r--r-- | kmicromail/kmicromail.pro | 3 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/libmailwrapper.pro | 3 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 2 | ||||
-rw-r--r-- | kmicromail/nntpgroupsdlg.cpp | 2 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 9 | ||||
-rw-r--r-- | kmicromail/qpe/qdialog.h | 35 | ||||
-rw-r--r-- | kmicromail/qpe/qdialog_hacked.cpp | 30 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 27 | ||||
-rw-r--r-- | kmicromail/viewmail.h | 4 | ||||
-rw-r--r-- | microkde/kapplication.h | 3 | ||||
-rw-r--r-- | microkde/microkde.pro | 6 |
15 files changed, 118 insertions, 39 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 0cd0b23..5945b7f 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -1,230 +1,236 @@ | |||
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) |
71 | QMessageBox::information( 0, i18n( "Hint" ), | 77 | QMessageBox::information( 0, i18n( "Hint" ), |
72 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), | 78 | i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), |
73 | i18n( "Ok" ) ); | 79 | i18n( "Ok" ) ); |
74 | if (defmail.length()!=0) { | 80 | if (defmail.length()!=0) { |
75 | fromBox->insertItem(defmail); | 81 | fromBox->insertItem(defmail); |
76 | } | 82 | } |
77 | QStringList::ConstIterator sit = mails.begin(); | 83 | QStringList::ConstIterator sit = mails.begin(); |
78 | for (;sit!=mails.end();++sit) { | 84 | for (;sit!=mails.end();++sit) { |
79 | if ( (*sit)==defmail) | 85 | if ( (*sit)==defmail) |
80 | continue; | 86 | continue; |
81 | fromBox->insertItem((*sit)); | 87 | fromBox->insertItem((*sit)); |
82 | } | 88 | } |
83 | senderNameEdit->setText(con.formattedName()); | 89 | senderNameEdit->setText(con.formattedName()); |
84 | #endif | 90 | #endif |
85 | 91 | ||
86 | } else { | 92 | } else { |
87 | fillSettings(); | 93 | fillSettings(); |
88 | } | 94 | } |
89 | checkBoxLater->setChecked( KOPrefs::instance()->mSendLater ); | 95 | checkBoxLater->setChecked( KOPrefs::instance()->mSendLater ); |
90 | 96 | ||
91 | attList->addColumn( i18n( "Name" ) ); | 97 | attList->addColumn( i18n( "Name" ) ); |
92 | attList->addColumn( i18n( "Size" ) ); | 98 | attList->addColumn( i18n( "Size" ) ); |
93 | QList<Account> accounts = settings->getAccounts(); | 99 | QList<Account> accounts = settings->getAccounts(); |
94 | 100 | ||
95 | if ( QApplication::desktop()->width() < 320 ) | 101 | if ( QApplication::desktop()->width() < 320 ) |
96 | smtpAccountBox->setMaximumWidth( 80 ); | 102 | smtpAccountBox->setMaximumWidth( 80 ); |
97 | Account *it; | 103 | Account *it; |
98 | for ( it = accounts.first(); it; it = accounts.next() ) { | 104 | for ( it = accounts.first(); it; it = accounts.next() ) { |
99 | if ( it->getType()==MAILLIB::A_SMTP ) { | 105 | if ( it->getType()==MAILLIB::A_SMTP ) { |
100 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 106 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
101 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 107 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
102 | smtpAccounts.append( smtp ); | 108 | smtpAccounts.append( smtp ); |
103 | } | 109 | } |
104 | } | 110 | } |
105 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 111 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
106 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 112 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
107 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 113 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
108 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); | 114 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); |
109 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); | 115 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); |
110 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); | 116 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); |
111 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); | 117 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); |
112 | mMail = 0; | 118 | mMail = 0; |
113 | warnAttach = true; | 119 | warnAttach = true; |
114 | QIconSet icon; | 120 | QIconSet icon; |
115 | //icon = SmallIcon("fileexport"); | 121 | //icon = SmallIcon("fileexport"); |
116 | icon = SmallIcon("filesave"); | 122 | icon = SmallIcon("filesave"); |
117 | SaveButton->setIconSet (icon ) ; | 123 | SaveButton->setIconSet (icon ) ; |
118 | if ( QApplication::desktop()->width() < 320 ) { | 124 | if ( QApplication::desktop()->width() < 320 ) { |
119 | SaveButton->setText ("") ; | 125 | SaveButton->setText ("") ; |
120 | SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ; | 126 | SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ; |
121 | } | 127 | } |
122 | else | 128 | else |
123 | SaveButton->setText (i18n("Save")); | 129 | SaveButton->setText (i18n("Save")); |
124 | #ifndef DESKTOP_VERSION | 130 | #ifndef DESKTOP_VERSION |
125 | QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); | 131 | QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); |
126 | QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); | 132 | QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); |
127 | QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); | 133 | QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); |
128 | #endif | 134 | #endif |
129 | message->setFont ( KOPrefs::instance()->mComposeFont ); | 135 | message->setFont ( KOPrefs::instance()->mComposeFont ); |
130 | message->setWordWrap (QMultiLineEdit::WidgetWidth); | 136 | message->setWordWrap (QMultiLineEdit::WidgetWidth); |
131 | if ( smtpAccounts.count() > 0 ) { | 137 | if ( smtpAccounts.count() > 0 ) { |
132 | fillValues( smtpAccountBox->currentItem() ); | 138 | fillValues( smtpAccountBox->currentItem() ); |
133 | } else { | 139 | } else { |
134 | QMessageBox::information( 0, i18n( "Problem" ), | 140 | QMessageBox::information( 0, i18n( "Problem" ), |
135 | i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), | 141 | i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), |
136 | i18n( "Ok" ) ); | 142 | i18n( "Ok" ) ); |
137 | return; | 143 | return; |
138 | } | 144 | } |
139 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); | 145 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
140 | 146 | ||
141 | 147 | ||
142 | } | 148 | } |
143 | 149 | ||
144 | void ComposeMail::fillSettings() | 150 | void ComposeMail::fillSettings() |
145 | { | 151 | { |
146 | if ( QApplication::desktop()->width() < 320 ) | 152 | if ( QApplication::desktop()->width() < 320 ) |
147 | fromBox->setMaximumWidth( 100 ); | 153 | fromBox->setMaximumWidth( 100 ); |
148 | QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); | 154 | QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); |
149 | QStringList::ConstIterator sit = mailList.begin(); | 155 | QStringList::ConstIterator sit = mailList.begin(); |
150 | int pref = 0; | 156 | int pref = 0; |
151 | for (;sit!=mailList.end();++sit) { | 157 | for (;sit!=mailList.end();++sit) { |
152 | fromBox->insertItem((*sit)); | 158 | fromBox->insertItem((*sit)); |
153 | } | 159 | } |
154 | senderNameEdit->setText(KOPrefs::instance()->mName); | 160 | senderNameEdit->setText(KOPrefs::instance()->mName); |
155 | } | 161 | } |
156 | 162 | ||
157 | 163 | ||
158 | void ComposeMail::saveAsDraft() | 164 | void ComposeMail::saveAsDraft() |
159 | { | 165 | { |
160 | 166 | ||
161 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); | 167 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); |
162 | mail->setMail(fromBox->currentText()); | 168 | mail->setMail(fromBox->currentText()); |
163 | mail->setTo( toLine->text() ); | 169 | mail->setTo( toLine->text() ); |
164 | mail->setName(senderNameEdit->text()); | 170 | mail->setName(senderNameEdit->text()); |
165 | mail->setCC( ccLine->text() ); | 171 | mail->setCC( ccLine->text() ); |
166 | mail->setBCC( bccLine->text() ); | 172 | mail->setBCC( bccLine->text() ); |
167 | mail->setReply( replyLine->text() ); | 173 | mail->setReply( replyLine->text() ); |
168 | mail->setSubject( subjectLine->text() ); | 174 | mail->setSubject( subjectLine->text() ); |
169 | if (!m_replyid.isEmpty()) { | 175 | if (!m_replyid.isEmpty()) { |
170 | QStringList ids; | 176 | QStringList ids; |
171 | ids.append(m_replyid); | 177 | ids.append(m_replyid); |
172 | mail->setInreply(ids); | 178 | mail->setInreply(ids); |
173 | } | 179 | } |
174 | QString txt = message->text(); | 180 | QString txt = message->text(); |
175 | if ( !sigMultiLine->text().isEmpty() ) { | 181 | if ( !sigMultiLine->text().isEmpty() ) { |
176 | txt.append( "\n--\n" ); | 182 | txt.append( "\n--\n" ); |
177 | txt.append( sigMultiLine->text() ); | 183 | txt.append( sigMultiLine->text() ); |
178 | } | 184 | } |
179 | mail->setMessage( txt ); | 185 | mail->setMessage( txt ); |
180 | 186 | ||
181 | /* only use the default drafts folder name! */ | 187 | /* only use the default drafts folder name! */ |
182 | Storemail wrapper(AbstractMail::draftFolder()); | 188 | Storemail wrapper(AbstractMail::draftFolder()); |
183 | wrapper.storeMail(mail); | 189 | wrapper.storeMail(mail); |
184 | 190 | ||
185 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 191 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
186 | /* attachments we will ignore! */ | 192 | /* attachments we will ignore! */ |
187 | if ( it != 0 ) { | 193 | if ( it != 0 ) { |
188 | if ( warnAttach ) | 194 | if ( warnAttach ) |
189 | QMessageBox::warning(0,i18n("Store message"), | 195 | QMessageBox::warning(0,i18n("Store message"), |
190 | i18n("<center>Attachments will not be stored in \"Draft\" folder</center>")); | 196 | i18n("<center>Attachments will not be stored in \"Draft\" folder</center>")); |
191 | warnAttach = false; | 197 | warnAttach = false; |
192 | } | 198 | } |
193 | setStatus( i18n("Mail saved as draft!") ); | 199 | setStatus( i18n("Mail saved as draft!") ); |
194 | } | 200 | } |
195 | void ComposeMail::clearStatus() | 201 | void ComposeMail::clearStatus() |
196 | { | 202 | { |
197 | topLevelWidget()->setCaption( i18n("Compose mail") ); | 203 | topLevelWidget()->setCaption( i18n("Compose mail") ); |
198 | } | 204 | } |
199 | void ComposeMail::setStatus( QString status ) | 205 | void ComposeMail::setStatus( QString status ) |
200 | { | 206 | { |
201 | topLevelWidget()->setCaption( status ); | 207 | topLevelWidget()->setCaption( status ); |
202 | QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; | 208 | QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; |
203 | } | 209 | } |
204 | void ComposeMail::pickAddress( ) | 210 | void ComposeMail::pickAddress( ) |
205 | { | 211 | { |
206 | 212 | ||
207 | QLineEdit *line = mPickLineEdit; | 213 | QLineEdit *line = mPickLineEdit; |
208 | if ( line == 0 ) | 214 | if ( line == 0 ) |
209 | return; | 215 | return; |
210 | #ifdef DESKTOP_VERSION | 216 | #ifdef DESKTOP_VERSION |
211 | //qDebug(" ComposeMail::pickAddress "); | 217 | //qDebug(" ComposeMail::pickAddress "); |
212 | QString names ;//= AddressPicker::getNames(); | 218 | QString names ;//= AddressPicker::getNames(); |
213 | 219 | ||
214 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 220 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
215 | uint i=0; | 221 | uint i=0; |
216 | for (i=0; i < list.count(); i++) { | 222 | for (i=0; i < list.count(); i++) { |
217 | if ( !list[i].preferredEmail().isEmpty()) { | 223 | if ( !list[i].preferredEmail().isEmpty()) { |
218 | if ( ! names.isEmpty() ) | 224 | if ( ! names.isEmpty() ) |
219 | names+= ","; | 225 | names+= ","; |
220 | names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">"; | 226 | names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">"; |
221 | 227 | ||
222 | } | 228 | } |
223 | } | 229 | } |
224 | 230 | ||
225 | 231 | ||
226 | if ( line->text().isEmpty() ) { | 232 | if ( line->text().isEmpty() ) { |
227 | line->setText( names ); | 233 | line->setText( names ); |
228 | } else if ( !names.isEmpty() ) { | 234 | } else if ( !names.isEmpty() ) { |
229 | line->setText( line->text() + ", " + names ); | 235 | line->setText( line->text() + ", " + names ); |
230 | } | 236 | } |
diff --git a/kmicromail/defines.h b/kmicromail/defines.h index f2d7265..c890def 100644 --- a/kmicromail/defines.h +++ b/kmicromail/defines.h | |||
@@ -1,36 +1,36 @@ | |||
1 | #ifndef DEFINE_CONSTANTS_H | 1 | #ifndef DEFINE_CONSTANTS_H |
2 | #define DEFINE_CONSTANTS_H | 2 | #define DEFINE_CONSTANTS_H |
3 | 3 | ||
4 | 4 | ||
5 | 5 | ||
6 | #define USER_AGENT "KMicroMail v1.92" | 6 | #define USER_AGENT "KOpieMail v1.9.11" |
7 | 7 | ||
8 | #define PIXMAP_IMAPFOLDER SmallIcon ( "imapfolder" ) | 8 | #define PIXMAP_IMAPFOLDER SmallIcon ( "imapfolder" ) |
9 | #define PIXMAP_POP3FOLDER SmallIcon ( "pop3folder" ) | 9 | #define PIXMAP_POP3FOLDER SmallIcon ( "pop3folder" ) |
10 | #define PIXMAP_INBOXFOLDER SmallIcon ( "inbox" ) | 10 | #define PIXMAP_INBOXFOLDER SmallIcon ( "inbox" ) |
11 | #define PIXMAP_MBOXFOLDER SmallIcon ( "mboxfolder" ) | 11 | #define PIXMAP_MBOXFOLDER SmallIcon ( "mboxfolder" ) |
12 | #define PIXMAP_OUTBOXFOLDER SmallIcon ( "outbox" ) | 12 | #define PIXMAP_OUTBOXFOLDER SmallIcon ( "outbox" ) |
13 | #define PIXMAP_LOCALFOLDER SmallIcon ( "localfolder" ) | 13 | #define PIXMAP_LOCALFOLDER SmallIcon ( "localfolder" ) |
14 | #define PIXMAP_OFFLINE SmallIcon ( "notconnected" ) | 14 | #define PIXMAP_OFFLINE SmallIcon ( "notconnected" ) |
15 | 15 | ||
16 | #define IMAP_PORT "143" | 16 | #define IMAP_PORT "143" |
17 | #define IMAP_SSL_PORT "993" | 17 | #define IMAP_SSL_PORT "993" |
18 | #define SMTP_PORT "25" | 18 | #define SMTP_PORT "25" |
19 | #define SMTP_SSL_PORT "465" | 19 | #define SMTP_SSL_PORT "465" |
20 | #define POP3_PORT "110" | 20 | #define POP3_PORT "110" |
21 | #define POP3_SSL_PORT "995" | 21 | #define POP3_SSL_PORT "995" |
22 | #define NNTP_PORT "119" | 22 | #define NNTP_PORT "119" |
23 | #define NNTP_SSL_PORT "563" | 23 | #define NNTP_SSL_PORT "563" |
24 | 24 | ||
25 | /* used for decoding imapfoldername */ | 25 | /* used for decoding imapfoldername */ |
26 | #define UNDEFINED 64 | 26 | #define UNDEFINED 64 |
27 | #define MAXLINE 76 | 27 | #define MAXLINE 76 |
28 | #define UTF16MASK 0x03FFUL | 28 | #define UTF16MASK 0x03FFUL |
29 | #define UTF16SHIFT 10 | 29 | #define UTF16SHIFT 10 |
30 | #define UTF16BASE 0x10000UL | 30 | #define UTF16BASE 0x10000UL |
31 | #define UTF16HIGHSTART 0xD800UL | 31 | #define UTF16HIGHSTART 0xD800UL |
32 | #define UTF16HIGHEND 0xDBFFUL | 32 | #define UTF16HIGHEND 0xDBFFUL |
33 | #define UTF16LOSTART 0xDC00UL | 33 | #define UTF16LOSTART 0xDC00UL |
34 | #define UTF16LOEND 0xDFFFUL | 34 | #define UTF16LOEND 0xDFFFUL |
35 | 35 | ||
36 | #endif | 36 | #endif |
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index c931e45..0d30097 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -1,196 +1,197 @@ | |||
1 | 1 | ||
2 | #include <qdialog.h> | ||
3 | #include "kapplication.h" | ||
2 | #include "defines.h" | 4 | #include "defines.h" |
3 | #include "editaccounts.h" | 5 | #include "editaccounts.h" |
4 | #include "kapplication.h" | ||
5 | /* OPIE */ | 6 | /* OPIE */ |
6 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
7 | 8 | ||
8 | /* QT */ | 9 | /* QT */ |
9 | #include <qstringlist.h> | 10 | #include <qstringlist.h> |
10 | 11 | ||
11 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
12 | #include <qcheckbox.h> | 13 | #include <qcheckbox.h> |
13 | #include <qmessagebox.h> | 14 | #include <qmessagebox.h> |
14 | #include <qpushbutton.h> | 15 | #include <qpushbutton.h> |
15 | #include <qlineedit.h> | 16 | #include <qlineedit.h> |
16 | #include <qlabel.h> | 17 | #include <qlabel.h> |
17 | #include <qtabwidget.h> | 18 | #include <qtabwidget.h> |
18 | #include <qlistview.h> | 19 | #include <qlistview.h> |
19 | #include <qspinbox.h> | 20 | #include <qspinbox.h> |
20 | #include <klocale.h> | 21 | #include <klocale.h> |
21 | 22 | ||
22 | #include <libmailwrapper/nntpwrapper.h> | 23 | #include <libmailwrapper/nntpwrapper.h> |
23 | 24 | ||
24 | using namespace Opie::Core; | 25 | using namespace Opie::Core; |
25 | 26 | ||
26 | AccountListItem::AccountListItem( QListView *parent, Account *a) | 27 | AccountListItem::AccountListItem( QListView *parent, Account *a) |
27 | : QListViewItem( parent ) | 28 | : QListViewItem( parent ) |
28 | { | 29 | { |
29 | account = a; | 30 | account = a; |
30 | setText( 0, account->getAccountName() ); | 31 | setText( 0, account->getAccountName() ); |
31 | QString ttext = ""; | 32 | QString ttext = ""; |
32 | switch (account->getType()) { | 33 | switch (account->getType()) { |
33 | case MAILLIB::A_NNTP: | 34 | case MAILLIB::A_NNTP: |
34 | ttext="NNTP"; | 35 | ttext="NNTP"; |
35 | break; | 36 | break; |
36 | case MAILLIB::A_POP3: | 37 | case MAILLIB::A_POP3: |
37 | ttext = "POP3"; | 38 | ttext = "POP3"; |
38 | break; | 39 | break; |
39 | case MAILLIB::A_IMAP: | 40 | case MAILLIB::A_IMAP: |
40 | ttext = "IMAP"; | 41 | ttext = "IMAP"; |
41 | break; | 42 | break; |
42 | case MAILLIB::A_SMTP: | 43 | case MAILLIB::A_SMTP: |
43 | ttext = "SMTP"; | 44 | ttext = "SMTP"; |
44 | break; | 45 | break; |
45 | default: | 46 | default: |
46 | ttext = "UNKNOWN"; | 47 | ttext = "UNKNOWN"; |
47 | break; | 48 | break; |
48 | } | 49 | } |
49 | setText( 1, ttext); | 50 | setText( 1, ttext); |
50 | } | 51 | } |
51 | 52 | ||
52 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 53 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
53 | : EditAccountsUI( parent, name, modal, flags ) | 54 | : EditAccountsUI( parent, name, modal, flags ) |
54 | { | 55 | { |
55 | settings = s; | 56 | settings = s; |
56 | 57 | ||
57 | mailList->addColumn( i18n( "Account" ) ); | 58 | mailList->addColumn( i18n( "Account" ) ); |
58 | mailList->addColumn( i18n( "Type" ) ); | 59 | mailList->addColumn( i18n( "Type" ) ); |
59 | 60 | ||
60 | newsList->addColumn( i18n( "Account" ) ); | 61 | newsList->addColumn( i18n( "Account" ) ); |
61 | 62 | ||
62 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); | 63 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); |
63 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); | 64 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); |
64 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); | 65 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); |
65 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); | 66 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); |
66 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); | 67 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); |
67 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); | 68 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); |
68 | 69 | ||
69 | slotFillLists(); | 70 | slotFillLists(); |
70 | } | 71 | } |
71 | 72 | ||
72 | void EditAccounts::slotFillLists() | 73 | void EditAccounts::slotFillLists() |
73 | { | 74 | { |
74 | mailList->clear(); | 75 | mailList->clear(); |
75 | newsList->clear(); | 76 | newsList->clear(); |
76 | 77 | ||
77 | QList<Account> accounts = settings->getAccounts(); | 78 | QList<Account> accounts = settings->getAccounts(); |
78 | Account *it; | 79 | Account *it; |
79 | for ( it = accounts.first(); it; it = accounts.next() ) | 80 | for ( it = accounts.first(); it; it = accounts.next() ) |
80 | { | 81 | { |
81 | if ( it->getType()==MAILLIB::A_NNTP ) | 82 | if ( it->getType()==MAILLIB::A_NNTP ) |
82 | { | 83 | { |
83 | (void) new AccountListItem( newsList, it ); | 84 | (void) new AccountListItem( newsList, it ); |
84 | } | 85 | } |
85 | else | 86 | else |
86 | { | 87 | { |
87 | (void) new AccountListItem( mailList, it ); | 88 | (void) new AccountListItem( mailList, it ); |
88 | } | 89 | } |
89 | } | 90 | } |
90 | } | 91 | } |
91 | 92 | ||
92 | void EditAccounts::slotNewMail() | 93 | void EditAccounts::slotNewMail() |
93 | { | 94 | { |
94 | QString *selection = new QString(); | 95 | QString *selection = new QString(); |
95 | SelectMailType selType( selection, this, 0, true ); | 96 | SelectMailType selType( selection, this, 0, true ); |
96 | selType.show(); | 97 | selType.show(); |
97 | if ( QDialog::Accepted == selType.exec() ) | 98 | if ( QDialog::Accepted == selType.exec() ) |
98 | { | 99 | { |
99 | slotNewAccount( *selection ); | 100 | slotNewAccount( *selection ); |
100 | } | 101 | } |
101 | } | 102 | } |
102 | 103 | ||
103 | void EditAccounts::slotNewAccount( const QString &type ) | 104 | void EditAccounts::slotNewAccount( const QString &type ) |
104 | { | 105 | { |
105 | if ( type.compare( i18n("IMAP") ) == 0 ) | 106 | if ( type.compare( i18n("IMAP") ) == 0 ) |
106 | { | 107 | { |
107 | IMAPaccount *account = new IMAPaccount(); | 108 | IMAPaccount *account = new IMAPaccount(); |
108 | IMAPconfig imap( account, this, 0, true ); | 109 | IMAPconfig imap( account, this, 0, true ); |
109 | imap.showMaximized(); | 110 | imap.showMaximized(); |
110 | if ( QDialog::Accepted == imap.exec() ) | 111 | if ( QDialog::Accepted == imap.exec() ) |
111 | { | 112 | { |
112 | settings->addAccount( account ); | 113 | settings->addAccount( account ); |
113 | account->save(); | 114 | account->save(); |
114 | slotFillLists(); | 115 | slotFillLists(); |
115 | } | 116 | } |
116 | else | 117 | else |
117 | { | 118 | { |
118 | account->remove(); | 119 | account->remove(); |
119 | } | 120 | } |
120 | } | 121 | } |
121 | else if ( type.compare( i18n("POP3") ) == 0 ) | 122 | else if ( type.compare( i18n("POP3") ) == 0 ) |
122 | { | 123 | { |
123 | POP3account *account = new POP3account(); | 124 | POP3account *account = new POP3account(); |
124 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); | 125 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); |
125 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 126 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
126 | { | 127 | { |
127 | settings->addAccount( account ); | 128 | settings->addAccount( account ); |
128 | account->save(); | 129 | account->save(); |
129 | slotFillLists(); | 130 | slotFillLists(); |
130 | } | 131 | } |
131 | else | 132 | else |
132 | { | 133 | { |
133 | account->remove(); | 134 | account->remove(); |
134 | } | 135 | } |
135 | } | 136 | } |
136 | else if ( type.compare( i18n("SMTP") ) == 0 ) | 137 | else if ( type.compare( i18n("SMTP") ) == 0 ) |
137 | { | 138 | { |
138 | SMTPaccount *account = new SMTPaccount(); | 139 | SMTPaccount *account = new SMTPaccount(); |
139 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); | 140 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); |
140 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 141 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
141 | { | 142 | { |
142 | settings->addAccount( account ); | 143 | settings->addAccount( account ); |
143 | account->save(); | 144 | account->save(); |
144 | slotFillLists(); | 145 | slotFillLists(); |
145 | 146 | ||
146 | } | 147 | } |
147 | else | 148 | else |
148 | { | 149 | { |
149 | account->remove(); | 150 | account->remove(); |
150 | } | 151 | } |
151 | } | 152 | } |
152 | else if ( type.compare( i18n("NNTP") ) == 0 ) | 153 | else if ( type.compare( i18n("NNTP") ) == 0 ) |
153 | { | 154 | { |
154 | NNTPaccount *account = new NNTPaccount(); | 155 | NNTPaccount *account = new NNTPaccount(); |
155 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); | 156 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); |
156 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) | 157 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) |
157 | { | 158 | { |
158 | settings->addAccount( account ); | 159 | settings->addAccount( account ); |
159 | account->save(); | 160 | account->save(); |
160 | slotFillLists(); | 161 | slotFillLists(); |
161 | } | 162 | } |
162 | else | 163 | else |
163 | { | 164 | { |
164 | account->remove(); | 165 | account->remove(); |
165 | } | 166 | } |
166 | } | 167 | } |
167 | } | 168 | } |
168 | 169 | ||
169 | void EditAccounts::slotEditAccount( Account *account ) | 170 | void EditAccounts::slotEditAccount( Account *account ) |
170 | { | 171 | { |
171 | if ( account->getType() == MAILLIB::A_IMAP ) | 172 | if ( account->getType() == MAILLIB::A_IMAP ) |
172 | { | 173 | { |
173 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); | 174 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); |
174 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); | 175 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); |
175 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) | 176 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) |
176 | { | 177 | { |
177 | slotFillLists(); | 178 | slotFillLists(); |
178 | } | 179 | } |
179 | } | 180 | } |
180 | else if ( account->getType()==MAILLIB::A_POP3 ) | 181 | else if ( account->getType()==MAILLIB::A_POP3 ) |
181 | { | 182 | { |
182 | POP3account *pop3Acc = static_cast<POP3account *>(account); | 183 | POP3account *pop3Acc = static_cast<POP3account *>(account); |
183 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); | 184 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); |
184 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 185 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
185 | { | 186 | { |
186 | slotFillLists(); | 187 | slotFillLists(); |
187 | } | 188 | } |
188 | } | 189 | } |
189 | else if ( account->getType()==MAILLIB::A_SMTP ) | 190 | else if ( account->getType()==MAILLIB::A_SMTP ) |
190 | { | 191 | { |
191 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); | 192 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); |
192 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); | 193 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); |
193 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 194 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
194 | { | 195 | { |
195 | slotFillLists(); | 196 | slotFillLists(); |
196 | } | 197 | } |
diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro index cd5a3c1..927dc8a 100644 --- a/kmicromail/kmicromail.pro +++ b/kmicromail/kmicromail.pro | |||
@@ -1,77 +1,78 @@ | |||
1 | CONFIG += qt warn_on | 1 | CONFIG += qt warn_on |
2 | TEMPLATE= app | 2 | TEMPLATE= app |
3 | HEADERS = defines.h \ | 3 | HEADERS = defines.h \ |
4 | editaccounts.h \ | 4 | editaccounts.h \ |
5 | composemail.h \ | 5 | composemail.h \ |
6 | accountview.h \ | 6 | accountview.h \ |
7 | accountitem.h \ | 7 | accountitem.h \ |
8 | mainwindow.h \ | 8 | mainwindow.h \ |
9 | viewmail.h \ | 9 | viewmail.h \ |
10 | viewmailbase.h \ | 10 | viewmailbase.h \ |
11 | opiemail.h \ | 11 | opiemail.h \ |
12 | mailistviewitem.h \ | 12 | mailistviewitem.h \ |
13 | settingsdialog.h \ | 13 | settingsdialog.h \ |
14 | statuswidget.h \ | 14 | statuswidget.h \ |
15 | newmaildir.h \ | 15 | newmaildir.h \ |
16 | selectstore.h \ | 16 | selectstore.h \ |
17 | selectsmtp.h \ | 17 | selectsmtp.h \ |
18 | ./qpe/qdialog.h \ | ||
18 | nntpgroups.h \ | 19 | nntpgroups.h \ |
19 | koprefs.h \ | 20 | koprefs.h \ |
20 | koprefsdialog.h \ | 21 | koprefsdialog.h \ |
21 | nntpgroupsdlg.h | 22 | nntpgroupsdlg.h |
22 | 23 | ||
23 | SOURCES = main.cpp \ | 24 | SOURCES = main.cpp \ |
24 | opiemail.cpp \ | 25 | opiemail.cpp \ |
25 | mainwindow.cpp \ | 26 | mainwindow.cpp \ |
26 | accountview.cpp \ | 27 | accountview.cpp \ |
27 | accountitem.cpp \ | 28 | accountitem.cpp \ |
28 | composemail.cpp \ | 29 | composemail.cpp \ |
29 | editaccounts.cpp \ | 30 | editaccounts.cpp \ |
30 | viewmail.cpp \ | 31 | viewmail.cpp \ |
31 | viewmailbase.cpp \ | 32 | viewmailbase.cpp \ |
32 | mailistviewitem.cpp \ | 33 | mailistviewitem.cpp \ |
33 | settingsdialog.cpp \ | 34 | settingsdialog.cpp \ |
34 | statuswidget.cpp \ | 35 | statuswidget.cpp \ |
35 | newmaildir.cpp \ | 36 | newmaildir.cpp \ |
36 | selectstore.cpp \ | 37 | selectstore.cpp \ |
37 | selectsmtp.cpp \ | 38 | selectsmtp.cpp \ |
38 | nntpgroups.cpp \ | 39 | nntpgroups.cpp \ |
39 | koprefs.cpp\ | 40 | koprefs.cpp\ |
40 | koprefsdialog.cpp\ | 41 | koprefsdialog.cpp\ |
41 | nntpgroupsdlg.cpp | 42 | nntpgroupsdlg.cpp |
42 | 43 | ||
43 | INTERFACES = editaccountsui.ui \ | 44 | INTERFACES = editaccountsui.ui \ |
44 | selectmailtypeui.ui \ | 45 | selectmailtypeui.ui \ |
45 | imapconfigui.ui \ | 46 | imapconfigui.ui \ |
46 | pop3configui.ui \ | 47 | pop3configui.ui \ |
47 | nntpconfigui.ui \ | 48 | nntpconfigui.ui \ |
48 | smtpconfigui.ui \ | 49 | smtpconfigui.ui \ |
49 | composemailui.ui \ | 50 | composemailui.ui \ |
50 | settingsdialogui.ui \ | 51 | settingsdialogui.ui \ |
51 | statuswidgetui.ui \ | 52 | statuswidgetui.ui \ |
52 | newmaildirui.ui \ | 53 | newmaildirui.ui \ |
53 | selectstoreui.ui \ | 54 | selectstoreui.ui \ |
54 | nntpgroupsui.ui | 55 | nntpgroupsui.ui |
55 | 56 | ||
56 | 57 | ||
57 | INCLUDEPATH += . .. ../libkdepim ../microkde ../microkde/kdecore libetpan/include ../microkde/kdeui | 58 | INCLUDEPATH += ./qpe . .. ../libkdepim ../microkde ../microkde/kdecore libetpan/include ../microkde/kdeui |
58 | LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc | 59 | LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc |
59 | 60 | ||
60 | DESTDIR= ../bin | 61 | DESTDIR= ../bin |
61 | TARGET = ompi | 62 | TARGET = ompi |
62 | 63 | ||
63 | DEFINES += DESKTOP_VERSION | 64 | DEFINES += DESKTOP_VERSION |
64 | unix : { | 65 | unix : { |
65 | OBJECTS_DIR = obj/unix | 66 | OBJECTS_DIR = obj/unix |
66 | MOC_DIR = moc/unix | 67 | MOC_DIR = moc/unix |
67 | } | 68 | } |
68 | win32: { | 69 | win32: { |
69 | DEFINES += _WIN32_ | 70 | DEFINES += _WIN32_ |
70 | LIBS += mfc71u.lib | 71 | LIBS += mfc71u.lib |
71 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 72 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
72 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT | 73 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT |
73 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib | 74 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib |
74 | OBJECTS_DIR = obj/win | 75 | OBJECTS_DIR = obj/win |
75 | MOC_DIR = moc/win | 76 | MOC_DIR = moc/win |
76 | } | 77 | } |
77 | 78 | ||
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 598d12f..c878fc9 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,215 +1,215 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | #include <kdialog.h> | |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | 56 | ||
57 | #include <klineedit.h> | 57 | #include <klineedit.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "koprefs.h" | 60 | #include "koprefs.h" |
61 | 61 | ||
62 | #include "koprefsdialog.h" | 62 | #include "koprefsdialog.h" |
63 | //#include <kprefswidget.h> | 63 | //#include <kprefswidget.h> |
64 | 64 | ||
65 | 65 | ||
66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
68 | { | 68 | { |
69 | 69 | ||
70 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | 71 | setupGlobalTab(); |
72 | setupMainTab(); | 72 | setupMainTab(); |
73 | setupMailTab();; | 73 | setupMailTab();; |
74 | setupFontsTab(); | 74 | setupFontsTab(); |
75 | readConfig(); | 75 | readConfig(); |
76 | 76 | ||
77 | #if 0 | 77 | #if 0 |
78 | 78 | ||
79 | setupMainTab(); | 79 | setupMainTab(); |
80 | setupLocaleTab(); | 80 | setupLocaleTab(); |
81 | setupTimeZoneTab(); | 81 | setupTimeZoneTab(); |
82 | setupTimeTab(); | 82 | setupTimeTab(); |
83 | setupLocaleDateTab(); | 83 | setupLocaleDateTab(); |
84 | setupFontsTab(); | 84 | setupFontsTab(); |
85 | setupColorsTab(); | 85 | setupColorsTab(); |
86 | setupViewsTab(); | 86 | setupViewsTab(); |
87 | //setupSyncTab(); | 87 | //setupSyncTab(); |
88 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
89 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
90 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
91 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
95 | #include "kpimglobalprefs.h" | 95 | #include "kpimglobalprefs.h" |
96 | 96 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | void KOPrefsDialog::setupGlobalTab() | 100 | void KOPrefsDialog::setupGlobalTab() |
101 | { | 101 | { |
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 102 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
105 | topLayout->addWidget( kdelibcfg ); | 105 | topLayout->addWidget( kdelibcfg ); |
106 | 106 | ||
107 | 107 | ||
108 | } | 108 | } |
109 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
110 | { | 110 | { |
111 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
112 | 112 | ||
113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
114 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
115 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
116 | 116 | ||
117 | 117 | ||
118 | mNameEdit = new QLineEdit(topFrame); | 118 | mNameEdit = new QLineEdit(topFrame); |
119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
120 | topLayout->addWidget(mNameLabel,0,0); | 120 | topLayout->addWidget(mNameLabel,0,0); |
121 | topLayout->addWidget(mNameEdit,0,1); | 121 | topLayout->addWidget(mNameEdit,0,1); |
122 | 122 | ||
123 | mEmailEdit = new QLineEdit(topFrame); | 123 | mEmailEdit = new QLineEdit(topFrame); |
124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
125 | topLayout->addWidget(mEmailLabel,1,0); | 125 | topLayout->addWidget(mEmailLabel,1,0); |
126 | topLayout->addWidget(mEmailEdit,1,1); | 126 | topLayout->addWidget(mEmailEdit,1,1); |
127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
128 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 128 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
130 | &(KOPrefs::instance()->mUseKapi),topFrame); | 130 | &(KOPrefs::instance()->mUseKapi),topFrame); |
131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
132 | } | 132 | } |
133 | 133 | ||
134 | void KOPrefsDialog::setupMailTab() | 134 | void KOPrefsDialog::setupMailTab() |
135 | { | 135 | { |
136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
137 | 137 | ||
138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
139 | topLayout->setSpacing(spacingHint()); | 139 | topLayout->setSpacing(spacingHint()); |
140 | topLayout->setMargin(marginHint()); | 140 | topLayout->setMargin(marginHint()); |
141 | 141 | ||
142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
145 | 145 | ||
146 | 146 | ||
147 | ttt = addWidBool(i18n("Send mails later"), | 147 | ttt = addWidBool(i18n("Send mails later"), |
148 | &(KOPrefs::instance()->mSendLater),topFrame); | 148 | &(KOPrefs::instance()->mSendLater),topFrame); |
149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
150 | 150 | ||
151 | 151 | ||
152 | } | 152 | } |
153 | void KOPrefsDialog::setupFontsTab() | 153 | void KOPrefsDialog::setupFontsTab() |
154 | { | 154 | { |
155 | 155 | ||
156 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 156 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
157 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 157 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
158 | 158 | ||
159 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 159 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
160 | topLayout->setSpacing(1); | 160 | topLayout->setSpacing(1); |
161 | topLayout->setMargin(3); | 161 | topLayout->setMargin(3); |
162 | KPrefsDialogWidFont * tVFont; | 162 | KPrefsDialogWidFont * tVFont; |
163 | int i = 0; | 163 | int i = 0; |
164 | KPrefsDialogWidFont *timeLabelsFont = | 164 | KPrefsDialogWidFont *timeLabelsFont = |
165 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 165 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
166 | &(KOPrefs::instance()->mAppFont),topFrame); | 166 | &(KOPrefs::instance()->mAppFont),topFrame); |
167 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 167 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
168 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 168 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
169 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 169 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
170 | ++i; | 170 | ++i; |
171 | 171 | ||
172 | 172 | ||
173 | timeLabelsFont = | 173 | timeLabelsFont = |
174 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 174 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
175 | &(KOPrefs::instance()->mComposeFont),topFrame); | 175 | &(KOPrefs::instance()->mComposeFont),topFrame); |
176 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 176 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
177 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 177 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
178 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 178 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
179 | ++i; | 179 | ++i; |
180 | 180 | ||
181 | KPrefsDialogWidFont *timeBarFont = | 181 | KPrefsDialogWidFont *timeBarFont = |
182 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 182 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
183 | &(KOPrefs::instance()->mReadFont),topFrame); | 183 | &(KOPrefs::instance()->mReadFont),topFrame); |
184 | topLayout->addWidget(timeBarFont->label(),i,0); | 184 | topLayout->addWidget(timeBarFont->label(),i,0); |
185 | topLayout->addWidget(timeBarFont->preview(),i,1); | 185 | topLayout->addWidget(timeBarFont->preview(),i,1); |
186 | topLayout->addWidget(timeBarFont->button(),i,2); | 186 | topLayout->addWidget(timeBarFont->button(),i,2); |
187 | ++i; | 187 | ++i; |
188 | 188 | ||
189 | topLayout->setColStretch(1,1); | 189 | topLayout->setColStretch(1,1); |
190 | topLayout->setRowStretch(4,1); | 190 | topLayout->setRowStretch(4,1); |
191 | 191 | ||
192 | } | 192 | } |
193 | void KOPrefsDialog::usrReadConfig() | 193 | void KOPrefsDialog::usrReadConfig() |
194 | { | 194 | { |
195 | 195 | ||
196 | mNameEdit->setText(KOPrefs::instance()->mName); | 196 | mNameEdit->setText(KOPrefs::instance()->mName); |
197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
198 | kdelibcfg->readConfig(); | 198 | kdelibcfg->readConfig(); |
199 | } | 199 | } |
200 | void KOPrefsDialog::usrWriteConfig() | 200 | void KOPrefsDialog::usrWriteConfig() |
201 | { | 201 | { |
202 | KOPrefs::instance()->mName = mNameEdit->text(); | 202 | KOPrefs::instance()->mName = mNameEdit->text(); |
203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
204 | kdelibcfg->writeConfig(); | 204 | kdelibcfg->writeConfig(); |
205 | 205 | ||
206 | 206 | ||
207 | } | 207 | } |
208 | 208 | ||
209 | #if 0 | 209 | #if 0 |
210 | void KOPrefsDialog::setupLocaleDateTab() | 210 | void KOPrefsDialog::setupLocaleDateTab() |
211 | { | 211 | { |
212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
213 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 213 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
214 | topLayout->setSpacing(spacingHint()); | 214 | topLayout->setSpacing(spacingHint()); |
215 | topLayout->setMargin(marginHint()); | 215 | topLayout->setMargin(marginHint()); |
diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro index 2b005d8..10d45b1 100644 --- a/kmicromail/libmailwrapper/libmailwrapper.pro +++ b/kmicromail/libmailwrapper/libmailwrapper.pro | |||
@@ -1,64 +1,65 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | 3 | ||
4 | HEADERS = mailwrapper.h \ | 4 | HEADERS = mailwrapper.h \ |
5 | imapwrapper.h \ | 5 | imapwrapper.h \ |
6 | mailtypes.h \ | 6 | mailtypes.h \ |
7 | pop3wrapper.h \ | 7 | pop3wrapper.h \ |
8 | abstractmail.h \ | 8 | abstractmail.h \ |
9 | smtpwrapper.h \ | 9 | smtpwrapper.h \ |
10 | genericwrapper.h \ | 10 | genericwrapper.h \ |
11 | mboxwrapper.h \ | 11 | mboxwrapper.h \ |
12 | settings.h \ | 12 | settings.h \ |
13 | logindialog.h \ | 13 | logindialog.h \ |
14 | sendmailprogress.h \ | 14 | sendmailprogress.h \ |
15 | statusmail.h \ | 15 | statusmail.h \ |
16 | mhwrapper.h \ | 16 | mhwrapper.h \ |
17 | nntpwrapper.h \ | 17 | nntpwrapper.h \ |
18 | generatemail.h \ | 18 | generatemail.h \ |
19 | storemail.h \ | 19 | storemail.h \ |
20 | ../qpe/global.h | 20 | ../qpe/global.h |
21 | 21 | ||
22 | SOURCES = imapwrapper.cpp \ | 22 | SOURCES = imapwrapper.cpp \ |
23 | mailwrapper.cpp \ | 23 | mailwrapper.cpp \ |
24 | mailtypes.cpp \ | 24 | mailtypes.cpp \ |
25 | pop3wrapper.cpp \ | 25 | pop3wrapper.cpp \ |
26 | abstractmail.cpp \ | 26 | abstractmail.cpp \ |
27 | smtpwrapper.cpp \ | 27 | smtpwrapper.cpp \ |
28 | genericwrapper.cpp \ | 28 | genericwrapper.cpp \ |
29 | mboxwrapper.cpp \ | 29 | mboxwrapper.cpp \ |
30 | settings.cpp \ | 30 | settings.cpp \ |
31 | logindialog.cpp \ | 31 | logindialog.cpp \ |
32 | sendmailprogress.cpp \ | 32 | sendmailprogress.cpp \ |
33 | statusmail.cpp \ | 33 | statusmail.cpp \ |
34 | mhwrapper.cpp \ | 34 | mhwrapper.cpp \ |
35 | nntpwrapper.cpp \ | 35 | nntpwrapper.cpp \ |
36 | generatemail.cpp \ | 36 | generatemail.cpp \ |
37 | storemail.cpp \ | 37 | storemail.cpp \ |
38 | ./qpe/qdialog_hacked.cpp \ | ||
38 | ../qpe/global.cpp | 39 | ../qpe/global.cpp |
39 | 40 | ||
40 | INTERFACES = logindialogui.ui \ | 41 | INTERFACES = logindialogui.ui \ |
41 | sendmailprogressui.ui | 42 | sendmailprogressui.ui |
42 | 43 | ||
43 | INCLUDEPATH += .. ../../microkde ../../microkde/kdecore ../libetpan/include | 44 | INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../libetpan/include |
44 | LIBS += -lssl -lcrypto | 45 | LIBS += -lssl -lcrypto |
45 | 46 | ||
46 | #-lqpe -letpan | 47 | #-lqpe -letpan |
47 | 48 | ||
48 | DESTDIR = ../../bin | 49 | DESTDIR = ../../bin |
49 | TARGET = micromailwrapper | 50 | TARGET = micromailwrapper |
50 | 51 | ||
51 | DEFINES += DESKTOP_VERSION | 52 | DEFINES += DESKTOP_VERSION |
52 | unix : { | 53 | unix : { |
53 | OBJECTS_DIR = obj/unix | 54 | OBJECTS_DIR = obj/unix |
54 | MOC_DIR = moc/unix | 55 | MOC_DIR = moc/unix |
55 | } | 56 | } |
56 | win32: { | 57 | win32: { |
57 | DEFINES += _WIN32_ | 58 | DEFINES += _WIN32_ |
58 | LIBS += mfc71u.lib | 59 | LIBS += mfc71u.lib |
59 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 60 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
60 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT | 61 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT |
61 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib | 62 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib |
62 | OBJECTS_DIR = obj/win | 63 | OBJECTS_DIR = obj/win |
63 | MOC_DIR = moc/win | 64 | MOC_DIR = moc/win |
64 | } | 65 | } |
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index b19dbbe..7655385 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -1,200 +1,200 @@ | |||
1 | 1 | ||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qvbox.h> | 4 | #include <qvbox.h> |
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <qtimer.h> | 6 | #include <qtimer.h> |
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | #include <kdialog.h> | 8 | //#include <kdialog.h> |
9 | #include <kiconloader.h> | 9 | #include <kiconloader.h> |
10 | #include <kapplication.h> | 10 | #include <kapplication.h> |
11 | 11 | ||
12 | #ifdef DESKTOP_VERSION | 12 | #ifdef DESKTOP_VERSION |
13 | #include <qapplication.h> | 13 | #include <qapplication.h> |
14 | #else | 14 | #else |
15 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
16 | #endif | 16 | #endif |
17 | #include "defines.h" | 17 | #include "defines.h" |
18 | #include "mainwindow.h" | 18 | #include "mainwindow.h" |
19 | #include <KDGanttMinimizeSplitter.h> | 19 | #include <KDGanttMinimizeSplitter.h> |
20 | 20 | ||
21 | 21 | ||
22 | #include <kabc/stdaddressbook.h> | 22 | #include <kabc/stdaddressbook.h> |
23 | 23 | ||
24 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 24 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
25 | : QMainWindow( parent, name ) //, flags ) | 25 | : QMainWindow( parent, name ) //, flags ) |
26 | { | 26 | { |
27 | setCaption( i18n( "KOpieMail/Pi" ) ); | 27 | setCaption( i18n( "KOpieMail/Pi" ) ); |
28 | setToolBarsMovable( false ); | 28 | setToolBarsMovable( false ); |
29 | //KABC::StdAddressBook::self(); | 29 | //KABC::StdAddressBook::self(); |
30 | toolBar = new QToolBar( this ); | 30 | toolBar = new QToolBar( this ); |
31 | menuBar = new QPEMenuBar( toolBar ); | 31 | menuBar = new QPEMenuBar( toolBar ); |
32 | mailMenu = new QPopupMenu( menuBar ); | 32 | mailMenu = new QPopupMenu( menuBar ); |
33 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); | 33 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); |
34 | settingsMenu = new QPopupMenu( menuBar ); | 34 | settingsMenu = new QPopupMenu( menuBar ); |
35 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); | 35 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); |
36 | 36 | ||
37 | addToolBar( toolBar ); | 37 | addToolBar( toolBar ); |
38 | toolBar->setHorizontalStretchable( true ); | 38 | toolBar->setHorizontalStretchable( true ); |
39 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), | 39 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), |
40 | 0, 0, this ); | 40 | 0, 0, this ); |
41 | connect(getMail, SIGNAL( activated() ), | 41 | connect(getMail, SIGNAL( activated() ), |
42 | SLOT( slotGetAllMail() ) ); | 42 | SLOT( slotGetAllMail() ) ); |
43 | getMail->addTo( mailMenu ); | 43 | getMail->addTo( mailMenu ); |
44 | 44 | ||
45 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), | 45 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), |
46 | 0, 0, this ); | 46 | 0, 0, this ); |
47 | getMail->addTo( toolBar ); | 47 | getMail->addTo( toolBar ); |
48 | getMail->addTo( mailMenu ); | 48 | getMail->addTo( mailMenu ); |
49 | connect(getMail, SIGNAL( activated() ), | 49 | connect(getMail, SIGNAL( activated() ), |
50 | SLOT( slotGetMail() ) ); | 50 | SLOT( slotGetMail() ) ); |
51 | 51 | ||
52 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), | 52 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), |
53 | 0, 0, this ); | 53 | 0, 0, this ); |
54 | composeMail->addTo( toolBar ); | 54 | composeMail->addTo( toolBar ); |
55 | composeMail->addTo( mailMenu ); | 55 | composeMail->addTo( mailMenu ); |
56 | 56 | ||
57 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , | 57 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , |
58 | 0, 0, this ); | 58 | 0, 0, this ); |
59 | sendQueued->addTo( toolBar ); | 59 | sendQueued->addTo( toolBar ); |
60 | sendQueued->addTo( mailMenu ); | 60 | sendQueued->addTo( mailMenu ); |
61 | 61 | ||
62 | /* | 62 | /* |
63 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, | 63 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, |
64 | 0, 0, this ); | 64 | 0, 0, this ); |
65 | syncFolders->addTo( toolBar ); | 65 | syncFolders->addTo( toolBar ); |
66 | syncFolders->addTo( mailMenu ); | 66 | syncFolders->addTo( mailMenu ); |
67 | */ | 67 | */ |
68 | 68 | ||
69 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , | 69 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , |
70 | 0, 0, this, 0, true ); | 70 | 0, 0, this, 0, true ); |
71 | showFolders->addTo( toolBar ); | 71 | showFolders->addTo( toolBar ); |
72 | showFolders->addTo( mailMenu ); | 72 | showFolders->addTo( mailMenu ); |
73 | showFolders->setOn( true ); | 73 | showFolders->setOn( true ); |
74 | connect(showFolders, SIGNAL( toggled(bool) ), | 74 | connect(showFolders, SIGNAL( toggled(bool) ), |
75 | SLOT( slotShowFolders(bool) ) ); | 75 | SLOT( slotShowFolders(bool) ) ); |
76 | 76 | ||
77 | /* | 77 | /* |
78 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), | 78 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), |
79 | 0, 0, this ); | 79 | 0, 0, this ); |
80 | searchMails->addTo( toolBar ); | 80 | searchMails->addTo( toolBar ); |
81 | searchMails->addTo( mailMenu ); | 81 | searchMails->addTo( mailMenu ); |
82 | */ | 82 | */ |
83 | 83 | ||
84 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 84 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
85 | deleteMails->addTo( toolBar ); | 85 | deleteMails->addTo( toolBar ); |
86 | deleteMails->addTo( mailMenu ); | 86 | deleteMails->addTo( mailMenu ); |
87 | connect( deleteMails, SIGNAL( activated() ), | 87 | connect( deleteMails, SIGNAL( activated() ), |
88 | SLOT( slotDeleteMail() ) ); | 88 | SLOT( slotDeleteMail() ) ); |
89 | 89 | ||
90 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , | 90 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , |
91 | 0, 0, this ); | 91 | 0, 0, this ); |
92 | editSettings->addTo( settingsMenu ); | 92 | editSettings->addTo( settingsMenu ); |
93 | connect( editSettings, SIGNAL( activated() ), | 93 | connect( editSettings, SIGNAL( activated() ), |
94 | SLOT( slotEditSettings() ) ); | 94 | SLOT( slotEditSettings() ) ); |
95 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , | 95 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , |
96 | 0, 0, this ); | 96 | 0, 0, this ); |
97 | editAccounts->addTo( settingsMenu ); | 97 | editAccounts->addTo( settingsMenu ); |
98 | 98 | ||
99 | //setCentralWidget( view ); | 99 | //setCentralWidget( view ); |
100 | 100 | ||
101 | QVBox* wrapperBox = new QVBox( this ); | 101 | QVBox* wrapperBox = new QVBox( this ); |
102 | setCentralWidget( wrapperBox ); | 102 | setCentralWidget( wrapperBox ); |
103 | 103 | ||
104 | // QWidget *view = new QWidget( wrapperBox ); | 104 | // QWidget *view = new QWidget( wrapperBox ); |
105 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); | 105 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); |
106 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); | 106 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); |
107 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); | 107 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); |
108 | 108 | ||
109 | folderView = new AccountView( split ); | 109 | folderView = new AccountView( split ); |
110 | folderView->header()->hide(); | 110 | folderView->header()->hide(); |
111 | folderView->setRootIsDecorated( false ); | 111 | folderView->setRootIsDecorated( false ); |
112 | folderView->addColumn( i18n( "Mailbox" ) ); | 112 | folderView->addColumn( i18n( "Mailbox" ) ); |
113 | 113 | ||
114 | //layout->addWidget( folderView ); | 114 | //layout->addWidget( folderView ); |
115 | 115 | ||
116 | mailView = new QListView( split ); | 116 | mailView = new QListView( split ); |
117 | mailView->addColumn( i18n( " " ) ); | 117 | mailView->addColumn( i18n( " " ) ); |
118 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); | 118 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); |
119 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); | 119 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); |
120 | mailView->addColumn( i18n( "Size" ),QListView::Manual); | 120 | mailView->addColumn( i18n( "Size" ),QListView::Manual); |
121 | mailView->addColumn( i18n( "Date" ),QListView::Manual); | 121 | mailView->addColumn( i18n( "Date" ),QListView::Manual); |
122 | mailView->setAllColumnsShowFocus(true); | 122 | mailView->setAllColumnsShowFocus(true); |
123 | //mailView->setSorting(-1); | 123 | //mailView->setSorting(-1); |
124 | mailView->setRootIsDecorated( false ); | 124 | mailView->setRootIsDecorated( false ); |
125 | statusWidget = new StatusWidget( wrapperBox ); | 125 | statusWidget = new StatusWidget( wrapperBox ); |
126 | statusWidget->hide(); | 126 | statusWidget->hide(); |
127 | 127 | ||
128 | //layout->addWidget( mailView ); | 128 | //layout->addWidget( mailView ); |
129 | //layout->setStretchFactor( folderView, 1 ); | 129 | //layout->setStretchFactor( folderView, 1 ); |
130 | //layout->setStretchFactor( mailView, 2 ); | 130 | //layout->setStretchFactor( mailView, 2 ); |
131 | 131 | ||
132 | slotAdjustLayout(); | 132 | slotAdjustLayout(); |
133 | #ifndef DESKTOP_VERSION | 133 | #ifndef DESKTOP_VERSION |
134 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 134 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
135 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 135 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
136 | #endif | 136 | #endif |
137 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, | 137 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, |
138 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 138 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
139 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, | 139 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, |
140 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 140 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
141 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 141 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
142 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); | 142 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
143 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), | 143 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), |
144 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 144 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |
145 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 145 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
146 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 146 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
147 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 147 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
148 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 148 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
149 | //mailView->setMultiSelection ( true ); | 149 | //mailView->setMultiSelection ( true ); |
150 | mailView->setSelectionMode( QListView::Extended ); | 150 | mailView->setSelectionMode( QListView::Extended ); |
151 | QValueList<int> list; | 151 | QValueList<int> list; |
152 | int fw = 100; | 152 | int fw = 100; |
153 | if ( QApplication::desktop()->width() > 320 ) | 153 | if ( QApplication::desktop()->width() > 320 ) |
154 | fw = 50; | 154 | fw = 50; |
155 | list.append( fw ); | 155 | list.append( fw ); |
156 | list.append( 100 ); | 156 | list.append( 100 ); |
157 | split->setSizes( list ); | 157 | split->setSizes( list ); |
158 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 158 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
159 | mailView->setShowSortIndicator ( true ); | 159 | mailView->setShowSortIndicator ( true ); |
160 | QLabel *spacer = new QLabel( toolBar ); | 160 | QLabel *spacer = new QLabel( toolBar ); |
161 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 161 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
162 | toolBar->setStretchableWidget( spacer ); | 162 | toolBar->setStretchableWidget( spacer ); |
163 | 163 | ||
164 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | 164 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); |
165 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 165 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
166 | if ( QApplication::desktop()->width() > 320 ) | 166 | if ( QApplication::desktop()->width() > 320 ) |
167 | closeMail->addTo(toolBar); | 167 | closeMail->addTo(toolBar); |
168 | closeMail->addTo(mailMenu); | 168 | closeMail->addTo(mailMenu); |
169 | 169 | ||
170 | 170 | ||
171 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); | 171 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); |
172 | menuBar->insertItem( i18n( "Help" ), helpMenu ); | 172 | menuBar->insertItem( i18n( "Help" ), helpMenu ); |
173 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); | 173 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); |
174 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); | 174 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); |
175 | li->addTo(helpMenu); | 175 | li->addTo(helpMenu); |
176 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); | 176 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); |
177 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); | 177 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); |
178 | li->addTo(helpMenu); | 178 | li->addTo(helpMenu); |
179 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); | 179 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); |
180 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); | 180 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); |
181 | li->addTo(helpMenu); | 181 | li->addTo(helpMenu); |
182 | } | 182 | } |
183 | 183 | ||
184 | MainWindow::~MainWindow() | 184 | MainWindow::~MainWindow() |
185 | { | 185 | { |
186 | } | 186 | } |
187 | 187 | ||
188 | void MainWindow::showLicence() | 188 | void MainWindow::showLicence() |
189 | { | 189 | { |
190 | KApplication::showLicence(); | 190 | KApplication::showLicence(); |
191 | } | 191 | } |
192 | void MainWindow::showAbout() | 192 | void MainWindow::showAbout() |
193 | { | 193 | { |
194 | QString version; | 194 | QString version; |
195 | #include <../version> | 195 | #include <../version> |
196 | 196 | ||
197 | QString cap = "About KOpieMail/Pi"; | 197 | QString cap = "About KOpieMail/Pi"; |
198 | QString text =i18n("KOpieMail/Platform-independent\n") + | 198 | QString text =i18n("KOpieMail/Platform-independent\n") + |
199 | "(OM/Pi) " + version + " - " | 199 | "(OM/Pi) " + version + " - " |
200 | 200 | ||
diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp index a461bdf..f564b10 100644 --- a/kmicromail/nntpgroupsdlg.cpp +++ b/kmicromail/nntpgroupsdlg.cpp | |||
@@ -1,30 +1,30 @@ | |||
1 | #include "nntpgroupsdlg.h" | 1 | #include "nntpgroupsdlg.h" |
2 | #include "nntpgroups.h" | 2 | #include "nntpgroups.h" |
3 | #include <klocale.h> | 3 | #include <klocale.h> |
4 | 4 | ||
5 | #include <libmailwrapper/settings.h> | 5 | #include <libmailwrapper/settings.h> |
6 | 6 | ||
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | 8 | ||
9 | NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name) | 9 | NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name) |
10 | : QDialog(parent,name,true,WStyle_ContextHelp) | 10 | : QDialog(parent,name,true,0) |
11 | { | 11 | { |
12 | setCaption(i18n("Subscribed newsgroups")); | 12 | setCaption(i18n("Subscribed newsgroups")); |
13 | m_Account = account; | 13 | m_Account = account; |
14 | QVBoxLayout*dlglayout = new QVBoxLayout(this); | 14 | QVBoxLayout*dlglayout = new QVBoxLayout(this); |
15 | dlglayout->setSpacing(2); | 15 | dlglayout->setSpacing(2); |
16 | dlglayout->setMargin(1); | 16 | dlglayout->setMargin(1); |
17 | groupsWidget = new NNTPGroups(account,this); | 17 | groupsWidget = new NNTPGroups(account,this); |
18 | dlglayout->addWidget(groupsWidget); | 18 | dlglayout->addWidget(groupsWidget); |
19 | } | 19 | } |
20 | 20 | ||
21 | NNTPGroupsDlg::~NNTPGroupsDlg() | 21 | NNTPGroupsDlg::~NNTPGroupsDlg() |
22 | { | 22 | { |
23 | } | 23 | } |
24 | 24 | ||
25 | void NNTPGroupsDlg::accept() | 25 | void NNTPGroupsDlg::accept() |
26 | { | 26 | { |
27 | groupsWidget->storeValues(); | 27 | groupsWidget->storeValues(); |
28 | m_Account->save(); | 28 | m_Account->save(); |
29 | QDialog::accept(); | 29 | QDialog::accept(); |
30 | } | 30 | } |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 153c7c0..e088b9e 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -1,213 +1,216 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | 1 | // CHANGED 2004-09-31 Lutz Rogowski |
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | 3 | ||
4 | #include "koprefsdialog.h" | ||
5 | #include <libkdepim/externalapphandler.h> | ||
6 | #include <libkdepim/kpimglobalprefs.h> | ||
7 | #ifdef MINIKDE_KDIALOG_H | ||
8 | #undef MINIKDE_KDIALOG_H | ||
9 | #endif | ||
4 | #include "settingsdialog.h" | 10 | #include "settingsdialog.h" |
5 | #include "opiemail.h" | 11 | #include "opiemail.h" |
6 | #include "editaccounts.h" | 12 | #include "editaccounts.h" |
7 | #include "composemail.h" | 13 | #include "composemail.h" |
8 | #include "mailistviewitem.h" | 14 | #include "mailistviewitem.h" |
9 | #include "viewmail.h" | 15 | #include "viewmail.h" |
10 | #include "selectstore.h" | 16 | #include "selectstore.h" |
11 | #include "selectsmtp.h" | 17 | #include "selectsmtp.h" |
12 | #include "accountitem.h" | 18 | #include "accountitem.h" |
13 | #include "koprefsdialog.h" | ||
14 | #include "klocale.h" | 19 | #include "klocale.h" |
15 | 20 | ||
16 | #include <qmessagebox.h> | 21 | #include <qmessagebox.h> |
17 | #include <qtimer.h> | 22 | #include <qtimer.h> |
18 | #include <qcursor.h> | 23 | #include <qcursor.h> |
19 | #include <qregexp.h> | 24 | #include <qregexp.h> |
20 | #include <libkdepim/externalapphandler.h> | ||
21 | #include <libkdepim/kpimglobalprefs.h> | ||
22 | 25 | ||
23 | #ifdef DESKTOP_VERSION | 26 | #ifdef DESKTOP_VERSION |
24 | #include <qapplication.h> | 27 | #include <qapplication.h> |
25 | #else | 28 | #else |
26 | #include <qpe/qpeapplication.h> | 29 | #include <qpe/qpeapplication.h> |
27 | #endif | 30 | #endif |
28 | #include <libmailwrapper/smtpwrapper.h> | 31 | #include <libmailwrapper/smtpwrapper.h> |
29 | #include <libmailwrapper/mailtypes.h> | 32 | #include <libmailwrapper/mailtypes.h> |
30 | #include <libmailwrapper/abstractmail.h> | 33 | #include <libmailwrapper/abstractmail.h> |
31 | /* OPIE */ | 34 | /* OPIE */ |
32 | //#include <qpe/resource.h> | 35 | //#include <qpe/resource.h> |
33 | //#include <qpe/qpeapplication.h> | 36 | //#include <qpe/qpeapplication.h> |
34 | 37 | ||
35 | /* QT */ | 38 | /* QT */ |
36 | 39 | ||
37 | //using namespace Opie::Core; | 40 | //using namespace Opie::Core; |
38 | 41 | ||
39 | OpieMail::OpieMail( QWidget *parent, const char *name ) | 42 | OpieMail::OpieMail( QWidget *parent, const char *name ) |
40 | : MainWindow( parent, name) //, WStyle_ContextHelp ) | 43 | : MainWindow( parent, name) //, WStyle_ContextHelp ) |
41 | { | 44 | { |
42 | settings = new Settings(); | 45 | settings = new Settings(); |
43 | 46 | ||
44 | folderView->populate( settings->getAccounts() ); | 47 | folderView->populate( settings->getAccounts() ); |
45 | 48 | ||
46 | } | 49 | } |
47 | 50 | ||
48 | OpieMail::~OpieMail() | 51 | OpieMail::~OpieMail() |
49 | { | 52 | { |
50 | if (settings) delete settings; | 53 | if (settings) delete settings; |
51 | } | 54 | } |
52 | 55 | ||
53 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 56 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
54 | { | 57 | { |
55 | 58 | ||
56 | } | 59 | } |
57 | #include <stdlib.h> | 60 | #include <stdlib.h> |
58 | void OpieMail::message(const QCString &msg, const QByteArray &data) | 61 | void OpieMail::message(const QCString &msg, const QByteArray &data) |
59 | { | 62 | { |
60 | // copied from old mail2 | 63 | // copied from old mail2 |
61 | static int ii = 0; | 64 | static int ii = 0; |
62 | //qDebug("QCOP CALL ############################# %d ", ii); | 65 | //qDebug("QCOP CALL ############################# %d ", ii); |
63 | //QString mess ( msg ); | 66 | //QString mess ( msg ); |
64 | //qDebug("Message = %s ",mess.latin1()); | 67 | //qDebug("Message = %s ",mess.latin1()); |
65 | ++ii; | 68 | ++ii; |
66 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); | 69 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); |
67 | 70 | ||
68 | mPendingEmail = QString::null; | 71 | mPendingEmail = QString::null; |
69 | mPendingName = QString::null; | 72 | mPendingName = QString::null; |
70 | if (msg == "writeMail(QString,QString)") | 73 | if (msg == "writeMail(QString,QString)") |
71 | { | 74 | { |
72 | //qDebug("writeMail(QString,QString) "); | 75 | //qDebug("writeMail(QString,QString) "); |
73 | QDataStream stream(data,IO_ReadOnly); | 76 | QDataStream stream(data,IO_ReadOnly); |
74 | stream >> mPendingName >> mPendingEmail; | 77 | stream >> mPendingName >> mPendingEmail; |
75 | // removing the whitespaces at beginning and end is needed! | 78 | // removing the whitespaces at beginning and end is needed! |
76 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); | 79 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); |
77 | } | 80 | } |
78 | else if (msg == "newMail()") | 81 | else if (msg == "newMail()") |
79 | { | 82 | { |
80 | //qDebug("slotComposeMail() "); | 83 | //qDebug("slotComposeMail() "); |
81 | // we cannot call slotComposeMail(); directly, because may be executing a QCOP call | 84 | // we cannot call slotComposeMail(); directly, because may be executing a QCOP call |
82 | // and a QCOP call does not like a processevents in his execution | 85 | // and a QCOP call does not like a processevents in his execution |
83 | // with the Qtimer we call slotComposeMail() after we reached the main event loop | 86 | // with the Qtimer we call slotComposeMail() after we reached the main event loop |
84 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); | 87 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); |
85 | // slotComposeMail(); | 88 | // slotComposeMail(); |
86 | } | 89 | } |
87 | else if (msg == "newMail(QString)") | 90 | else if (msg == "newMail(QString)") |
88 | { | 91 | { |
89 | //qDebug(" newMail(QString)"); | 92 | //qDebug(" newMail(QString)"); |
90 | QDataStream stream(data,IO_ReadOnly); | 93 | QDataStream stream(data,IO_ReadOnly); |
91 | stream >> mPendingName; | 94 | stream >> mPendingName; |
92 | // the format is | 95 | // the format is |
93 | // NAME <EMAIL>:SUBJECT | 96 | // NAME <EMAIL>:SUBJECT |
94 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); | 97 | QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); |
95 | } else { | 98 | } else { |
96 | mPendingData = data; | 99 | mPendingData = data; |
97 | mPendingMessage = msg; | 100 | mPendingMessage = msg; |
98 | QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) ); | 101 | QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) ); |
99 | } | 102 | } |
100 | 103 | ||
101 | //qDebug("END OpieMail::message "); | 104 | //qDebug("END OpieMail::message "); |
102 | } | 105 | } |
103 | void OpieMail::slotExtAppHandler() | 106 | void OpieMail::slotExtAppHandler() |
104 | { | 107 | { |
105 | ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); | 108 | ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); |
106 | } | 109 | } |
107 | void OpieMail::slotwriteMail2(const QString& namemail ) | 110 | void OpieMail::slotwriteMail2(const QString& namemail ) |
108 | { | 111 | { |
109 | //qDebug("OpieMail::slotwriteMail2 "); | 112 | //qDebug("OpieMail::slotwriteMail2 "); |
110 | //qApp->processEvents(); | 113 | //qApp->processEvents(); |
111 | ComposeMail compose( settings, this, 0, true ); | 114 | ComposeMail compose( settings, this, 0, true ); |
112 | if ( !namemail.isEmpty() ) { | 115 | if ( !namemail.isEmpty() ) { |
113 | QString to = namemail; | 116 | QString to = namemail; |
114 | if ( namemail.find( " <") > 1 ) { | 117 | if ( namemail.find( " <") > 1 ) { |
115 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; | 118 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; |
116 | } else | 119 | } else |
117 | if ( namemail.find( "<") > 1 ) { | 120 | if ( namemail.find( "<") > 1 ) { |
118 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; | 121 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; |
119 | } | 122 | } |
120 | int sub = to.find( ">:"); | 123 | int sub = to.find( ">:"); |
121 | if ( sub > 0 ) { | 124 | if ( sub > 0 ) { |
122 | compose.setTo( to.left(sub+1) ); | 125 | compose.setTo( to.left(sub+1) ); |
123 | compose.setSubject( to.mid(sub+2) ); | 126 | compose.setSubject( to.mid(sub+2) ); |
124 | } else | 127 | } else |
125 | compose.setTo( to ); | 128 | compose.setTo( to ); |
126 | } | 129 | } |
127 | compose.slotAdjustColumns(); | 130 | compose.slotAdjustColumns(); |
128 | compose.showMaximized(); | 131 | compose.showMaximized(); |
129 | compose.exec(); | 132 | compose.exec(); |
130 | raise(); | 133 | raise(); |
131 | //qDebug("retttich "); | 134 | //qDebug("retttich "); |
132 | } | 135 | } |
133 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 136 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
134 | { | 137 | { |
135 | // qDebug("OpieMail::slotwriteMail "); | 138 | // qDebug("OpieMail::slotwriteMail "); |
136 | ComposeMail compose( settings, this, 0, true ); | 139 | ComposeMail compose( settings, this, 0, true ); |
137 | if (!email.isEmpty()) | 140 | if (!email.isEmpty()) |
138 | { | 141 | { |
139 | if (!name.isEmpty()) | 142 | if (!name.isEmpty()) |
140 | { | 143 | { |
141 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); | 144 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); |
142 | } | 145 | } |
143 | else | 146 | else |
144 | { | 147 | { |
145 | compose.setTo(email); | 148 | compose.setTo(email); |
146 | } | 149 | } |
147 | } | 150 | } |
148 | compose.slotAdjustColumns(); | 151 | compose.slotAdjustColumns(); |
149 | compose.showMaximized(); | 152 | compose.showMaximized(); |
150 | compose.exec(); | 153 | compose.exec(); |
151 | raise(); | 154 | raise(); |
152 | } | 155 | } |
153 | 156 | ||
154 | void OpieMail::slotComposeMail() | 157 | void OpieMail::slotComposeMail() |
155 | { | 158 | { |
156 | if ( mPendingEmail == QString::null && mPendingName == QString::null) | 159 | if ( mPendingEmail == QString::null && mPendingName == QString::null) |
157 | slotwriteMail2( QString () ); | 160 | slotwriteMail2( QString () ); |
158 | else { | 161 | else { |
159 | if ( mPendingEmail == QString::null ) | 162 | if ( mPendingEmail == QString::null ) |
160 | slotwriteMail2( mPendingName ); | 163 | slotwriteMail2( mPendingName ); |
161 | else | 164 | else |
162 | slotwriteMail( mPendingName, mPendingEmail ); | 165 | slotwriteMail( mPendingName, mPendingEmail ); |
163 | } | 166 | } |
164 | //slotwriteMail(0l,0l); | 167 | //slotwriteMail(0l,0l); |
165 | } | 168 | } |
166 | 169 | ||
167 | void OpieMail::slotSendQueued() | 170 | void OpieMail::slotSendQueued() |
168 | { | 171 | { |
169 | SMTPaccount *smtp = 0; | 172 | SMTPaccount *smtp = 0; |
170 | 173 | ||
171 | QList<Account> list = settings->getAccounts(); | 174 | QList<Account> list = settings->getAccounts(); |
172 | QList<SMTPaccount> smtpList; | 175 | QList<SMTPaccount> smtpList; |
173 | smtpList.setAutoDelete(false); | 176 | smtpList.setAutoDelete(false); |
174 | Account *it; | 177 | Account *it; |
175 | for ( it = list.first(); it; it = list.next() ) | 178 | for ( it = list.first(); it; it = list.next() ) |
176 | { | 179 | { |
177 | if ( it->getType() == MAILLIB::A_SMTP ) | 180 | if ( it->getType() == MAILLIB::A_SMTP ) |
178 | { | 181 | { |
179 | smtp = static_cast<SMTPaccount *>(it); | 182 | smtp = static_cast<SMTPaccount *>(it); |
180 | smtpList.append(smtp); | 183 | smtpList.append(smtp); |
181 | } | 184 | } |
182 | } | 185 | } |
183 | if (smtpList.count()==0) | 186 | if (smtpList.count()==0) |
184 | { | 187 | { |
185 | QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); | 188 | QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); |
186 | return; | 189 | return; |
187 | } | 190 | } |
188 | if (smtpList.count()==1) | 191 | if (smtpList.count()==1) |
189 | { | 192 | { |
190 | smtp = smtpList.at(0); | 193 | smtp = smtpList.at(0); |
191 | } | 194 | } |
192 | else | 195 | else |
193 | { | 196 | { |
194 | smtp = 0; | 197 | smtp = 0; |
195 | selectsmtp selsmtp; | 198 | selectsmtp selsmtp; |
196 | selsmtp.setSelectionlist(&smtpList); | 199 | selsmtp.setSelectionlist(&smtpList); |
197 | selsmtp.showMaximized(); | 200 | selsmtp.showMaximized(); |
198 | if ( selsmtp.exec() == QDialog::Accepted ) | 201 | if ( selsmtp.exec() == QDialog::Accepted ) |
199 | { | 202 | { |
200 | smtp = selsmtp.selected_smtp(); | 203 | smtp = selsmtp.selected_smtp(); |
201 | } | 204 | } |
202 | } | 205 | } |
203 | if (smtp) | 206 | if (smtp) |
204 | { | 207 | { |
205 | SMTPwrapper * wrap = new SMTPwrapper(smtp); | 208 | SMTPwrapper * wrap = new SMTPwrapper(smtp); |
206 | if ( wrap->flushOutbox() ) | 209 | if ( wrap->flushOutbox() ) |
207 | { | 210 | { |
208 | QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); | 211 | QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); |
209 | } | 212 | } |
210 | delete wrap; | 213 | delete wrap; |
211 | } | 214 | } |
212 | } | 215 | } |
213 | 216 | ||
diff --git a/kmicromail/qpe/qdialog.h b/kmicromail/qpe/qdialog.h new file mode 100644 index 0000000..d671e34 --- a/dev/null +++ b/kmicromail/qpe/qdialog.h | |||
@@ -0,0 +1,35 @@ | |||
1 | |||
2 | #ifndef MINIKDE_KDIALOG_H | ||
3 | |||
4 | #ifndef DEFINE_QDIALOG_HACK | ||
5 | #define DEFINE_QDIALOG_HACK | ||
6 | #warning call of include <qdialog.h> | ||
7 | #warning including /usr/local/qt/include/qdialog.h | ||
8 | #warning if you get an compiling error please adjust your path her | ||
9 | |||
10 | #include "/usr/local/qt/include/qdialog.h" | ||
11 | class QDialog_hacked : public QDialog | ||
12 | { | ||
13 | //Q__OBJECT | ||
14 | |||
15 | public: | ||
16 | QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 ); | ||
17 | |||
18 | }; | ||
19 | |||
20 | #define QDialog QDialog_hacked | ||
21 | |||
22 | #endif | ||
23 | |||
24 | #else | ||
25 | #warning ****************************************** | ||
26 | #warning ****************************************** | ||
27 | #warning ****************************************** | ||
28 | #warning ****************************************** | ||
29 | #warning ****************************************** | ||
30 | #warning ****************************************** | ||
31 | #warning ****************************************** | ||
32 | #warning ****************************************** | ||
33 | #include "/usr/local/qt/include/qdialog.h" | ||
34 | |||
35 | #endif | ||
diff --git a/kmicromail/qpe/qdialog_hacked.cpp b/kmicromail/qpe/qdialog_hacked.cpp new file mode 100644 index 0000000..e2ce21a --- a/dev/null +++ b/kmicromail/qpe/qdialog_hacked.cpp | |||
@@ -0,0 +1,30 @@ | |||
1 | |||
2 | #include <qdialog.h> | ||
3 | #include <qhbox.h> | ||
4 | #include <qpushbutton.h> | ||
5 | #include <klocale.h> | ||
6 | #ifdef QDialog | ||
7 | #undef QDialog | ||
8 | #endif | ||
9 | QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f ) | ||
10 | : QDialog( parent,name,modal) | ||
11 | { | ||
12 | qDebug("******************** "); | ||
13 | qDebug("******************** "); | ||
14 | qDebug("******************** "); | ||
15 | qDebug("******************** "); | ||
16 | qDebug("New hacked QDialog == KDialogBase "); | ||
17 | //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) ); | ||
18 | |||
19 | setOrientation ( Vertical ); | ||
20 | QHBox * hb = new QHBox ( this ); | ||
21 | QPushButton *ok = new QPushButton( i18n("OK"), hb ); | ||
22 | QPushButton *cancel = new QPushButton( i18n("Cancel"), hb ); | ||
23 | setExtension ( hb ); | ||
24 | showExtension ( true ); | ||
25 | connect ( ok, SIGNAL ( clicked()),this, SLOT (accept() ) ); | ||
26 | connect ( cancel, SIGNAL ( clicked()),this, SLOT (reject() ) ); | ||
27 | |||
28 | } | ||
29 | |||
30 | |||
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 0b4c322..f1e0225 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp | |||
@@ -1,222 +1,225 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | |||
3 | |||
4 | |||
5 | #include <kfiledialog.h> | ||
6 | #include "koprefs.h" | ||
7 | #include <klocale.h> | ||
8 | #include <kglobal.h> | ||
9 | #include <kapplication.h> | ||
10 | |||
11 | #ifdef MINIKDE_KDIALOG_H | ||
12 | #undef MINIKDE_KDIALOG_H | ||
13 | #endif | ||
14 | |||
2 | #include "composemail.h" | 15 | #include "composemail.h" |
3 | #include "viewmail.h" | 16 | #include "viewmail.h" |
4 | 17 | ||
5 | #include <libmailwrapper/settings.h> | 18 | #include <libmailwrapper/settings.h> |
6 | #include <libmailwrapper/abstractmail.h> | 19 | #include <libmailwrapper/abstractmail.h> |
7 | #include <libmailwrapper/mailtypes.h> | 20 | #include <libmailwrapper/mailtypes.h> |
8 | #include <kapplication.h> | ||
9 | |||
10 | /* OPIE */ | ||
11 | //#include <opie2/odebug.h> | ||
12 | //#include <opie2/ofiledialog.h> | ||
13 | //#include <opie2/oimagescrollview.h> | ||
14 | 21 | ||
15 | #include <kfiledialog.h> | 22 | #include <qdialog.h> |
16 | #include <kdialog.h> | ||
17 | 23 | ||
18 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
19 | 25 | ||
20 | /* QT */ | 26 | /* QT */ |
21 | #include <qtextbrowser.h> | 27 | #include <qtextbrowser.h> |
22 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
23 | #include <qtextstream.h> | 29 | #include <qtextstream.h> |
24 | #include <qaction.h> | 30 | #include <qaction.h> |
25 | #include <qpopupmenu.h> | 31 | #include <qpopupmenu.h> |
26 | #include <qfile.h> | 32 | #include <qfile.h> |
27 | #include <qlayout.h> | 33 | #include <qlayout.h> |
28 | #include "koprefs.h" | ||
29 | #include <klocale.h> | ||
30 | #include <kglobal.h> | ||
31 | 34 | ||
32 | //using namespace Opie::Ui; | 35 | //using namespace Opie::Ui; |
33 | //using namespace Opie::Core; | 36 | //using namespace Opie::Core; |
34 | 37 | ||
35 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 38 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
36 | const QString&fsize,int num,const QValueList<int>&path) | 39 | const QString&fsize,int num,const QValueList<int>&path) |
37 | : QListViewItem(parent,after),_partNum(num) | 40 | : QListViewItem(parent,after),_partNum(num) |
38 | { | 41 | { |
39 | _path=path; | 42 | _path=path; |
40 | setText(0, mime); | 43 | setText(0, mime); |
41 | setText(1, desc); | 44 | setText(1, desc); |
42 | setText(2, file); | 45 | setText(2, file); |
43 | setText(3, fsize); | 46 | setText(3, fsize); |
44 | } | 47 | } |
45 | 48 | ||
46 | AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 49 | AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
47 | const QString&fsize,int num,const QValueList<int>&path) | 50 | const QString&fsize,int num,const QValueList<int>&path) |
48 | : QListViewItem(parent,after),_partNum(num) | 51 | : QListViewItem(parent,after),_partNum(num) |
49 | { | 52 | { |
50 | _path=path; | 53 | _path=path; |
51 | setText(0, mime); | 54 | setText(0, mime); |
52 | setText(1, desc); | 55 | setText(1, desc); |
53 | setText(2, file); | 56 | setText(2, file); |
54 | setText(3, fsize); | 57 | setText(3, fsize); |
55 | } | 58 | } |
56 | 59 | ||
57 | bool AttachItem::isParentof(const QValueList<int>&path) | 60 | bool AttachItem::isParentof(const QValueList<int>&path) |
58 | { | 61 | { |
59 | /* if not set, then no parent */ | 62 | /* if not set, then no parent */ |
60 | if (path.count()==0||_path.count()==0) return false; | 63 | if (path.count()==0||_path.count()==0) return false; |
61 | /* the parent must have one digit less then a child */ | 64 | /* the parent must have one digit less then a child */ |
62 | if (path.count()!=_path.count()+1) return false; | 65 | if (path.count()!=_path.count()+1) return false; |
63 | for (unsigned int i=0; i < _path.count();++i) | 66 | for (unsigned int i=0; i < _path.count();++i) |
64 | { | 67 | { |
65 | if (_path[i]!=path[i]) return false; | 68 | if (_path[i]!=path[i]) return false; |
66 | } | 69 | } |
67 | return true; | 70 | return true; |
68 | } | 71 | } |
69 | 72 | ||
70 | AttachItem* ViewMail::searchParent(const QValueList<int>&path) | 73 | AttachItem* ViewMail::searchParent(const QValueList<int>&path) |
71 | { | 74 | { |
72 | QListViewItemIterator it( attachments ); | 75 | QListViewItemIterator it( attachments ); |
73 | for ( ; it.current(); ++it ) | 76 | for ( ; it.current(); ++it ) |
74 | { | 77 | { |
75 | AttachItem*ati = (AttachItem*)it.current(); | 78 | AttachItem*ati = (AttachItem*)it.current(); |
76 | if (ati->isParentof(path)) return ati; | 79 | if (ati->isParentof(path)) return ati; |
77 | } | 80 | } |
78 | return 0; | 81 | return 0; |
79 | } | 82 | } |
80 | 83 | ||
81 | AttachItem* ViewMail::lastChild(AttachItem*parent) | 84 | AttachItem* ViewMail::lastChild(AttachItem*parent) |
82 | { | 85 | { |
83 | if (!parent) return 0; | 86 | if (!parent) return 0; |
84 | AttachItem* item = (AttachItem*)parent->firstChild(); | 87 | AttachItem* item = (AttachItem*)parent->firstChild(); |
85 | if (!item) return item; | 88 | if (!item) return item; |
86 | AttachItem*temp=0; | 89 | AttachItem*temp=0; |
87 | while( (temp=(AttachItem*)item->nextSibling())) | 90 | while( (temp=(AttachItem*)item->nextSibling())) |
88 | { | 91 | { |
89 | item = temp; | 92 | item = temp; |
90 | } | 93 | } |
91 | return item; | 94 | return item; |
92 | } | 95 | } |
93 | 96 | ||
94 | void ViewMail::setBody(const RecBodyP&body ) | 97 | void ViewMail::setBody(const RecBodyP&body ) |
95 | { | 98 | { |
96 | 99 | ||
97 | m_body = body; | 100 | m_body = body; |
98 | m_mail[2] = body->Bodytext(); | 101 | m_mail[2] = body->Bodytext(); |
99 | attachbutton->setEnabled(body->Parts().count()>0); | 102 | attachbutton->setEnabled(body->Parts().count()>0); |
100 | attachments->setEnabled(body->Parts().count()>0); | 103 | attachments->setEnabled(body->Parts().count()>0); |
101 | if (body->Parts().count()==0) | 104 | if (body->Parts().count()==0) |
102 | { | 105 | { |
103 | return; | 106 | return; |
104 | } | 107 | } |
105 | AttachItem * curItem=0; | 108 | AttachItem * curItem=0; |
106 | AttachItem * parentItem = 0; | 109 | AttachItem * parentItem = 0; |
107 | QString type=body->Description()->Type()+"/"+body->Description()->Subtype(); | 110 | QString type=body->Description()->Type()+"/"+body->Description()->Subtype(); |
108 | QString desc,fsize; | 111 | QString desc,fsize; |
109 | double s = body->Description()->Size(); | 112 | double s = body->Description()->Size(); |
110 | int w; | 113 | int w; |
111 | w=0; | 114 | w=0; |
112 | 115 | ||
113 | while (s>1024) | 116 | while (s>1024) |
114 | { | 117 | { |
115 | s/=1024; | 118 | s/=1024; |
116 | ++w; | 119 | ++w; |
117 | if (w>=2) break; | 120 | if (w>=2) break; |
118 | } | 121 | } |
119 | 122 | ||
120 | QString q=""; | 123 | QString q=""; |
121 | switch(w) | 124 | switch(w) |
122 | { | 125 | { |
123 | case 1: | 126 | case 1: |
124 | q="k"; | 127 | q="k"; |
125 | break; | 128 | break; |
126 | case 2: | 129 | case 2: |
127 | q="M"; | 130 | q="M"; |
128 | break; | 131 | break; |
129 | default: | 132 | default: |
130 | break; | 133 | break; |
131 | } | 134 | } |
132 | 135 | ||
133 | { | 136 | { |
134 | /* I did not found a method to make a CONTENT reset on a QTextStream | 137 | /* I did not found a method to make a CONTENT reset on a QTextStream |
135 | so I use this construct that the stream will re-constructed in each | 138 | so I use this construct that the stream will re-constructed in each |
136 | loop. To let it work, the textstream is packed into a own area of | 139 | loop. To let it work, the textstream is packed into a own area of |
137 | code is it will be destructed after finishing its small job. | 140 | code is it will be destructed after finishing its small job. |
138 | */ | 141 | */ |
139 | QTextOStream o(&fsize); | 142 | QTextOStream o(&fsize); |
140 | if (w>0) o.precision(2); else o.precision(0); | 143 | if (w>0) o.precision(2); else o.precision(0); |
141 | o.setf(QTextStream::fixed); | 144 | o.setf(QTextStream::fixed); |
142 | o << s << " " << q << "Byte"; | 145 | o << s << " " << q << "Byte"; |
143 | } | 146 | } |
144 | 147 | ||
145 | curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body->Description()->Positionlist()); | 148 | curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body->Description()->Positionlist()); |
146 | QString filename = ""; | 149 | QString filename = ""; |
147 | 150 | ||
148 | for (unsigned int i = 0; i < body->Parts().count();++i) | 151 | for (unsigned int i = 0; i < body->Parts().count();++i) |
149 | { | 152 | { |
150 | filename = ""; | 153 | filename = ""; |
151 | type = body->Parts()[i]->Type()+"/"+body->Parts()[i]->Subtype(); | 154 | type = body->Parts()[i]->Type()+"/"+body->Parts()[i]->Subtype(); |
152 | part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin(); | 155 | part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin(); |
153 | for (;it!=body->Parts()[i]->Parameters().end();++it) | 156 | for (;it!=body->Parts()[i]->Parameters().end();++it) |
154 | { | 157 | { |
155 | if (it.key().lower()=="name") | 158 | if (it.key().lower()=="name") |
156 | { | 159 | { |
157 | filename=it.data(); | 160 | filename=it.data(); |
158 | } | 161 | } |
159 | } | 162 | } |
160 | s = body->Parts()[i]->Size(); | 163 | s = body->Parts()[i]->Size(); |
161 | w = 0; | 164 | w = 0; |
162 | while (s>1024) | 165 | while (s>1024) |
163 | { | 166 | { |
164 | s/=1024; | 167 | s/=1024; |
165 | ++w; | 168 | ++w; |
166 | if (w>=2) break; | 169 | if (w>=2) break; |
167 | } | 170 | } |
168 | switch(w) | 171 | switch(w) |
169 | { | 172 | { |
170 | case 1: | 173 | case 1: |
171 | q="k"; | 174 | q="k"; |
172 | break; | 175 | break; |
173 | case 2: | 176 | case 2: |
174 | q="M"; | 177 | q="M"; |
175 | break; | 178 | break; |
176 | default: | 179 | default: |
177 | q=""; | 180 | q=""; |
178 | break; | 181 | break; |
179 | } | 182 | } |
180 | QTextOStream o(&fsize); | 183 | QTextOStream o(&fsize); |
181 | if (w>0) o.precision(2); else o.precision(0); | 184 | if (w>0) o.precision(2); else o.precision(0); |
182 | o.setf(QTextStream::fixed); | 185 | o.setf(QTextStream::fixed); |
183 | o << s << " " << q << "Byte"; | 186 | o << s << " " << q << "Byte"; |
184 | desc = body->Parts()[i]->Description(); | 187 | desc = body->Parts()[i]->Description(); |
185 | parentItem = searchParent(body->Parts()[i]->Positionlist()); | 188 | parentItem = searchParent(body->Parts()[i]->Positionlist()); |
186 | if (parentItem) | 189 | if (parentItem) |
187 | { | 190 | { |
188 | AttachItem*temp = lastChild(parentItem); | 191 | AttachItem*temp = lastChild(parentItem); |
189 | if (temp) curItem = temp; | 192 | if (temp) curItem = temp; |
190 | curItem=new AttachItem(parentItem,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist()); | 193 | curItem=new AttachItem(parentItem,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist()); |
191 | attachments->setRootIsDecorated(true); | 194 | attachments->setRootIsDecorated(true); |
192 | curItem = parentItem; | 195 | curItem = parentItem; |
193 | } | 196 | } |
194 | else | 197 | else |
195 | { | 198 | { |
196 | curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist()); | 199 | curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist()); |
197 | } | 200 | } |
198 | } | 201 | } |
199 | } | 202 | } |
200 | 203 | ||
201 | 204 | ||
202 | void ViewMail::slotShowHtml( bool state ) | 205 | void ViewMail::slotShowHtml( bool state ) |
203 | { | 206 | { |
204 | m_showHtml = state; | 207 | m_showHtml = state; |
205 | setText(); | 208 | setText(); |
206 | } | 209 | } |
207 | 210 | ||
208 | void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) | 211 | void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) |
209 | { | 212 | { |
210 | if (!item ) | 213 | if (!item ) |
211 | return; | 214 | return; |
212 | 215 | ||
213 | if ( ( ( AttachItem* )item )->Partnumber() == -1 ) | 216 | if ( ( ( AttachItem* )item )->Partnumber() == -1 ) |
214 | { | 217 | { |
215 | setText(); | 218 | setText(); |
216 | return; | 219 | return; |
217 | } | 220 | } |
218 | QPopupMenu *menu = new QPopupMenu(); | 221 | QPopupMenu *menu = new QPopupMenu(); |
219 | int ret=0; | 222 | int ret=0; |
220 | 223 | ||
221 | if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) | 224 | if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) |
222 | { | 225 | { |
@@ -324,210 +327,210 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
324 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 327 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
325 | 328 | ||
326 | attachments->setEnabled(m_gotBody); | 329 | attachments->setEnabled(m_gotBody); |
327 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); | 330 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); |
328 | 331 | ||
329 | readConfig(); | 332 | readConfig(); |
330 | attachments->setSorting(-1); | 333 | attachments->setSorting(-1); |
331 | } | 334 | } |
332 | 335 | ||
333 | void ViewMail::readConfig() | 336 | void ViewMail::readConfig() |
334 | { | 337 | { |
335 | 338 | ||
336 | setFont ( KOPrefs::instance()->mReadFont ); | 339 | setFont ( KOPrefs::instance()->mReadFont ); |
337 | m_showHtml = KOPrefs::instance()->mViewAsHtml; | 340 | m_showHtml = KOPrefs::instance()->mViewAsHtml; |
338 | showHtml->setOn( m_showHtml ); | 341 | showHtml->setOn( m_showHtml ); |
339 | } | 342 | } |
340 | 343 | ||
341 | void ViewMail::setText() | 344 | void ViewMail::setText() |
342 | { | 345 | { |
343 | 346 | ||
344 | QString toString; | 347 | QString toString; |
345 | QString ccString; | 348 | QString ccString; |
346 | QString bccString; | 349 | QString bccString; |
347 | 350 | ||
348 | for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) | 351 | for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) |
349 | { | 352 | { |
350 | toString += (*it); | 353 | toString += (*it); |
351 | } | 354 | } |
352 | for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) | 355 | for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) |
353 | { | 356 | { |
354 | ccString += (*it); | 357 | ccString += (*it); |
355 | } | 358 | } |
356 | for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) | 359 | for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) |
357 | { | 360 | { |
358 | bccString += (*it); | 361 | bccString += (*it); |
359 | } | 362 | } |
360 | 363 | ||
361 | setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) ); | 364 | setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) ); |
362 | 365 | ||
363 | m_mailHtml = "<html><body>" | 366 | m_mailHtml = "<html><body>" |
364 | "<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>" | 367 | "<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>" |
365 | "<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>" | 368 | "<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>" |
366 | "</td></tr><tr bgcolor=\"#EEEEE6\"><td>" | 369 | "</td></tr><tr bgcolor=\"#EEEEE6\"><td>" |
367 | "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>" | 370 | "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>" |
368 | "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" + | 371 | "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" + |
369 | i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>" | 372 | i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>" |
370 | "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] + | 373 | "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] + |
371 | "</td></tr></table><font>"; | 374 | "</td></tr></table><font>"; |
372 | 375 | ||
373 | if ( !m_showHtml ) | 376 | if ( !m_showHtml ) |
374 | { | 377 | { |
375 | browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" ); | 378 | browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" ); |
376 | } | 379 | } |
377 | else | 380 | else |
378 | { | 381 | { |
379 | browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" ); | 382 | browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" ); |
380 | } | 383 | } |
381 | // remove later in favor of a real handling | 384 | // remove later in favor of a real handling |
382 | m_gotBody = true; | 385 | m_gotBody = true; |
383 | } | 386 | } |
384 | 387 | ||
385 | 388 | ||
386 | ViewMail::~ViewMail() | 389 | ViewMail::~ViewMail() |
387 | { | 390 | { |
388 | m_recMail->Wrapper()->cleanMimeCache(); | 391 | m_recMail->Wrapper()->cleanMimeCache(); |
389 | hide(); | 392 | hide(); |
390 | } | 393 | } |
391 | 394 | ||
392 | void ViewMail::hide() | 395 | void ViewMail::hide() |
393 | { | 396 | { |
394 | QWidget::hide(); | 397 | QWidget::hide(); |
395 | 398 | ||
396 | if (_inLoop) | 399 | if (_inLoop) |
397 | { | 400 | { |
398 | _inLoop = false; | 401 | _inLoop = false; |
399 | qApp->exit_loop(); | 402 | qApp->exit_loop(); |
400 | 403 | ||
401 | } | 404 | } |
402 | 405 | ||
403 | } | 406 | } |
404 | 407 | ||
405 | void ViewMail::exec() | 408 | void ViewMail::exec() |
406 | { | 409 | { |
407 | show(); | 410 | show(); |
408 | 411 | ||
409 | if (!_inLoop) | 412 | if (!_inLoop) |
410 | { | 413 | { |
411 | _inLoop = true; | 414 | _inLoop = true; |
412 | qApp->enter_loop(); | 415 | qApp->enter_loop(); |
413 | } | 416 | } |
414 | 417 | ||
415 | } | 418 | } |
416 | 419 | ||
417 | QString ViewMail::deHtml(const QString &string) | 420 | QString ViewMail::deHtml(const QString &string) |
418 | { | 421 | { |
419 | QString string_ = string; | 422 | QString string_ = string; |
420 | string_.replace(QRegExp("&"), "&"); | 423 | string_.replace(QRegExp("&"), "&"); |
421 | string_.replace(QRegExp("<"), "<"); | 424 | string_.replace(QRegExp("<"), "<"); |
422 | string_.replace(QRegExp(">"), ">"); | 425 | string_.replace(QRegExp(">"), ">"); |
423 | string_.replace(QRegExp("\\n"), "<br>"); | 426 | string_.replace(QRegExp("\\n"), "<br>"); |
424 | return string_; | 427 | return string_; |
425 | } | 428 | } |
426 | 429 | ||
427 | void ViewMail::slotReply() | 430 | void ViewMail::slotReply() |
428 | { | 431 | { |
429 | if (!m_gotBody) | 432 | if (!m_gotBody) |
430 | { | 433 | { |
431 | QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot reply yet."), i18n("Ok")); | 434 | QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot reply yet."), i18n("Ok")); |
432 | return; | 435 | return; |
433 | } | 436 | } |
434 | 437 | ||
435 | QString rtext; | 438 | QString rtext; |
436 | rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose | 439 | rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose |
437 | .arg( m_mail[0] ) | 440 | .arg( m_mail[0] ) |
438 | .arg( m_mail[3] ); | 441 | .arg( m_mail[3] ); |
439 | 442 | ||
440 | QString text = m_mail[2]; | 443 | QString text = m_mail[2]; |
441 | QStringList lines = QStringList::split(QRegExp("\\n"), text); | 444 | QStringList lines = QStringList::split(QRegExp("\\n"), text); |
442 | QStringList::Iterator it; | 445 | QStringList::Iterator it; |
443 | for (it = lines.begin(); it != lines.end(); it++) | 446 | for (it = lines.begin(); it != lines.end(); it++) |
444 | { | 447 | { |
445 | rtext += "> " + *it + "\n"; | 448 | rtext += "> " + *it + "\n"; |
446 | } | 449 | } |
447 | rtext += "\n"; | 450 | rtext += "\n"; |
448 | 451 | ||
449 | QString prefix; | 452 | QString prefix; |
450 | if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = ""; | 453 | if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = ""; |
451 | else prefix = "Re: "; // no i18n on purpose | 454 | else prefix = "Re: "; // no i18n on purpose |
452 | 455 | ||
453 | Settings *settings = new Settings(); | 456 | Settings *settings = new Settings(); |
454 | ComposeMail composer( settings ,this, 0, true); | 457 | ComposeMail composer( settings ,this, 0, true); |
455 | if (m_recMail->Replyto().isEmpty()) { | 458 | if (m_recMail->Replyto().isEmpty()) { |
456 | composer.setTo( m_recMail->getFrom()); | 459 | composer.setTo( m_recMail->getFrom()); |
457 | } else { | 460 | } else { |
458 | composer.setTo( m_recMail->Replyto()); | 461 | composer.setTo( m_recMail->Replyto()); |
459 | } | 462 | } |
460 | composer.setSubject( prefix + m_mail[1] ); | 463 | composer.setSubject( prefix + m_mail[1] ); |
461 | composer.setMessage( rtext ); | 464 | composer.setMessage( rtext ); |
462 | composer.setInReplyTo(m_recMail->Msgid()); | 465 | composer.setInReplyTo(m_recMail->Msgid()); |
463 | 466 | ||
464 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) | 467 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) |
465 | { | 468 | { |
466 | m_recMail->Wrapper()->answeredMail(m_recMail); | 469 | m_recMail->Wrapper()->answeredMail(m_recMail); |
467 | } | 470 | } |
468 | } | 471 | } |
469 | 472 | ||
470 | void ViewMail::slotForward() | 473 | void ViewMail::slotForward() |
471 | { | 474 | { |
472 | if (!m_gotBody) | 475 | if (!m_gotBody) |
473 | { | 476 | { |
474 | QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot forward yet."), i18n("Ok")); | 477 | QMessageBox::information(this, i18n("Error"), i18n("<p>The mail body is not yet downloaded, so you cannot forward yet."), i18n("Ok")); |
475 | return; | 478 | return; |
476 | } | 479 | } |
477 | 480 | ||
478 | QString ftext; | 481 | QString ftext; |
479 | ftext += QString("\n----- Forwarded message from %1 -----\n\n") | 482 | ftext += QString("\n----- Forwarded message from %1 -----\n\n") |
480 | .arg( m_mail[0] ); | 483 | .arg( m_mail[0] ); |
481 | if (!m_mail[3].isNull()) | 484 | if (!m_mail[3].isNull()) |
482 | ftext += QString("Date: %1\n") | 485 | ftext += QString("Date: %1\n") |
483 | .arg( m_mail[3] ); | 486 | .arg( m_mail[3] ); |
484 | if (!m_mail[0].isNull()) | 487 | if (!m_mail[0].isNull()) |
485 | ftext += QString("From: %1\n") | 488 | ftext += QString("From: %1\n") |
486 | .arg( m_mail[0] ); | 489 | .arg( m_mail[0] ); |
487 | if (!m_mail[1].isNull()) | 490 | if (!m_mail[1].isNull()) |
488 | ftext += QString("Subject: %1\n") | 491 | ftext += QString("Subject: %1\n") |
489 | .arg( m_mail[1] ); | 492 | .arg( m_mail[1] ); |
490 | 493 | ||
491 | ftext += QString("\n%1\n") | 494 | ftext += QString("\n%1\n") |
492 | .arg( m_mail[2]); | 495 | .arg( m_mail[2]); |
493 | 496 | ||
494 | ftext += QString("----- End forwarded message -----\n"); | 497 | ftext += QString("----- End forwarded message -----\n"); |
495 | 498 | ||
496 | Settings *settings = new Settings(); | 499 | Settings *settings = new Settings(); |
497 | ComposeMail composer( settings ,this, 0, true); | 500 | ComposeMail composer( settings ,this, 0, true); |
498 | composer.setSubject( "Fwd: " + m_mail[1] ); | 501 | composer.setSubject( "Fwd: " + m_mail[1] ); |
499 | composer.setMessage( ftext ); | 502 | composer.setMessage( ftext ); |
500 | if ( QDialog::Accepted == KApplication::execDialog( &composer )) | 503 | if ( QDialog::Accepted == KApplication::execDialog( &composer )) |
501 | { | 504 | { |
502 | } | 505 | } |
503 | } | 506 | } |
504 | 507 | ||
505 | void ViewMail::slotDeleteMail( ) | 508 | void ViewMail::slotDeleteMail( ) |
506 | { | 509 | { |
507 | if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 510 | if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
508 | { | 511 | { |
509 | m_recMail->Wrapper()->deleteMail( m_recMail ); | 512 | m_recMail->Wrapper()->deleteMail( m_recMail ); |
510 | hide(); | 513 | hide(); |
511 | deleted = true; | 514 | deleted = true; |
512 | } | 515 | } |
513 | } | 516 | } |
514 | 517 | ||
515 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) | 518 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) |
516 | : KDialog(parent,name,modal) | 519 | : QDialog(parent,name,modal) |
517 | { | 520 | { |
518 | QVBoxLayout*dlglayout = new QVBoxLayout(this); | 521 | QVBoxLayout*dlglayout = new QVBoxLayout(this); |
519 | dlglayout->setSpacing(2); | 522 | dlglayout->setSpacing(2); |
520 | dlglayout->setMargin(1); | 523 | dlglayout->setMargin(1); |
521 | //m_imageview = new Opie::MM::OImageScrollView(this); | 524 | //m_imageview = new Opie::MM::OImageScrollView(this); |
522 | //dlglayout->addWidget(m_imageview); | 525 | //dlglayout->addWidget(m_imageview); |
523 | } | 526 | } |
524 | 527 | ||
525 | MailImageDlg::~MailImageDlg() | 528 | MailImageDlg::~MailImageDlg() |
526 | { | 529 | { |
527 | } | 530 | } |
528 | 531 | ||
529 | void MailImageDlg::setName(const QString&fname) | 532 | void MailImageDlg::setName(const QString&fname) |
530 | { | 533 | { |
531 | qDebug("viewmail.cpp: MailImageDlg::setName Pending"); | 534 | qDebug("viewmail.cpp: MailImageDlg::setName Pending"); |
532 | // m_imageview->setImage(fname); | 535 | // m_imageview->setImage(fname); |
533 | } | 536 | } |
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index c42577e..194ac8e 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -1,86 +1,86 @@ | |||
1 | #ifndef VIEWMAIL_H | 1 | #ifndef VIEWMAIL_H |
2 | #define VIEWMAIL_H | 2 | #define VIEWMAIL_H |
3 | 3 | ||
4 | #include "viewmailbase.h" | 4 | #include "viewmailbase.h" |
5 | #include <libmailwrapper/mailtypes.h> | 5 | #include <libmailwrapper/mailtypes.h> |
6 | 6 | ||
7 | #include <kdialog.h> | 7 | #include <qdialog.h> |
8 | 8 | ||
9 | #include <qlistview.h> | 9 | #include <qlistview.h> |
10 | #include <qmap.h> | 10 | #include <qmap.h> |
11 | #include <qstringlist.h> | 11 | #include <qstringlist.h> |
12 | #include <qvaluelist.h> | 12 | #include <qvaluelist.h> |
13 | 13 | ||
14 | //namespace Opie { namespace MM { class OImageScrollView; } } | 14 | //namespace Opie { namespace MM { class OImageScrollView; } } |
15 | 15 | ||
16 | class AttachItem : public QListViewItem | 16 | class AttachItem : public QListViewItem |
17 | { | 17 | { |
18 | public: | 18 | public: |
19 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 19 | AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
20 | const QString&fsize,int num,const QValueList<int>&path); | 20 | const QString&fsize,int num,const QValueList<int>&path); |
21 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 21 | AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
22 | const QString&fsize,int num,const QValueList<int>&path); | 22 | const QString&fsize,int num,const QValueList<int>&path); |
23 | int Partnumber() { return _partNum; } | 23 | int Partnumber() { return _partNum; } |
24 | bool isParentof(const QValueList<int>&path); | 24 | bool isParentof(const QValueList<int>&path); |
25 | 25 | ||
26 | private: | 26 | private: |
27 | int _partNum; | 27 | int _partNum; |
28 | /* needed for a better display of attachments */ | 28 | /* needed for a better display of attachments */ |
29 | QValueList<int> _path; | 29 | QValueList<int> _path; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | class ViewMail : public ViewMailBase | 32 | class ViewMail : public ViewMailBase |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
36 | public: | 36 | public: |
37 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 37 | ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
38 | ~ViewMail(); | 38 | ~ViewMail(); |
39 | 39 | ||
40 | void hide(); | 40 | void hide(); |
41 | void exec(); | 41 | void exec(); |
42 | void setMail(const RecMailP&mail ); | 42 | void setMail(const RecMailP&mail ); |
43 | void setBody(const RecBodyP&body); | 43 | void setBody(const RecBodyP&body); |
44 | bool deleted; | 44 | bool deleted; |
45 | 45 | ||
46 | protected: | 46 | protected: |
47 | QString deHtml(const QString &string); | 47 | QString deHtml(const QString &string); |
48 | AttachItem* searchParent(const QValueList<int>&path); | 48 | AttachItem* searchParent(const QValueList<int>&path); |
49 | AttachItem* lastChild(AttachItem*parent); | 49 | AttachItem* lastChild(AttachItem*parent); |
50 | 50 | ||
51 | protected slots: | 51 | protected slots: |
52 | void slotReply(); | 52 | void slotReply(); |
53 | void slotForward(); | 53 | void slotForward(); |
54 | void setText(); | 54 | void setText(); |
55 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 55 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |
56 | void slotDeleteMail( ); | 56 | void slotDeleteMail( ); |
57 | void slotShowHtml( bool ); | 57 | void slotShowHtml( bool ); |
58 | 58 | ||
59 | private: | 59 | private: |
60 | void readConfig(); | 60 | void readConfig(); |
61 | 61 | ||
62 | bool _inLoop; | 62 | bool _inLoop; |
63 | QString m_mailHtml; | 63 | QString m_mailHtml; |
64 | bool m_gotBody; | 64 | bool m_gotBody; |
65 | RecBodyP m_body; | 65 | RecBodyP m_body; |
66 | RecMailP m_recMail; | 66 | RecMailP m_recMail; |
67 | bool m_showHtml; | 67 | bool m_showHtml; |
68 | 68 | ||
69 | // 0 from 1 subject 2 bodytext 3 date | 69 | // 0 from 1 subject 2 bodytext 3 date |
70 | QMap <int,QString> m_mail; | 70 | QMap <int,QString> m_mail; |
71 | // 0 to 1 cc 2 bcc | 71 | // 0 to 1 cc 2 bcc |
72 | QMap <int,QStringList> m_mail2; | 72 | QMap <int,QStringList> m_mail2; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | class MailImageDlg:public KDialog | 75 | class MailImageDlg:public QDialog |
76 | { | 76 | { |
77 | Q_OBJECT | 77 | Q_OBJECT |
78 | public: | 78 | public: |
79 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); | 79 | MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); |
80 | ~MailImageDlg(); | 80 | ~MailImageDlg(); |
81 | void setName(const QString&); | 81 | void setName(const QString&); |
82 | protected: | 82 | protected: |
83 | //Opie::MM::OImageScrollView*m_imageview; | 83 | //Opie::MM::OImageScrollView*m_imageview; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #endif | 86 | #endif |
diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 41546a0..497ec2f 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h | |||
@@ -1,27 +1,30 @@ | |||
1 | #ifndef MINIKDE_KAPPLICATION_H | 1 | #ifndef MINIKDE_KAPPLICATION_H |
2 | #define MINIKDE_KAPPLICATION_H | 2 | #define MINIKDE_KAPPLICATION_H |
3 | 3 | ||
4 | #include "qstring.h" | 4 | #include "qstring.h" |
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | #ifdef QDialog | ||
7 | #undef QDialog | ||
8 | #endif | ||
6 | 9 | ||
7 | class KApplication | 10 | class KApplication |
8 | { | 11 | { |
9 | public: | 12 | public: |
10 | static int random(); | 13 | static int random(); |
11 | 14 | ||
12 | //US | 15 | //US |
13 | /** | 16 | /** |
14 | * Generates a random string. It operates in the range [A-Za-z0-9] | 17 | * Generates a random string. It operates in the range [A-Za-z0-9] |
15 | * @param length Generate a string of this length. | 18 | * @param length Generate a string of this length. |
16 | * @return the random string | 19 | * @return the random string |
17 | */ | 20 | */ |
18 | static QString randomString(int length); | 21 | static QString randomString(int length); |
19 | static int execDialog( QDialog* ); | 22 | static int execDialog( QDialog* ); |
20 | static void showLicence(); | 23 | static void showLicence(); |
21 | static void showFile(QString caption, QString file); | 24 | static void showFile(QString caption, QString file); |
22 | static void showText(QString caption, QString text); | 25 | static void showText(QString caption, QString text); |
23 | static bool convert2latin1(QString file); | 26 | static bool convert2latin1(QString file); |
24 | }; | 27 | }; |
25 | 28 | ||
26 | 29 | ||
27 | #endif | 30 | #endif |
diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 6e75442..c58e184 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro | |||
@@ -1,179 +1,175 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | #INCLUDEPATH += $(QTDIR)/include . | 3 | #INCLUDEPATH += $(QTDIR)/include . |
4 | #DEPENDPATH += $(QTDIR)/include | 4 | #DEPENDPATH += $(QTDIR)/include |
5 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio | 5 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio |
6 | #LIBS += -lqtcompat | 6 | #LIBS += -lqtcompat |
7 | 7 | ||
8 | TARGET = microkde | 8 | TARGET = microkde |
9 | DESTDIR= ../bin | 9 | DESTDIR= ../bin |
10 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY | 10 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY |
11 | unix : { | 11 | unix : { |
12 | OBJECTS_DIR = obj/unix | 12 | OBJECTS_DIR = obj/unix |
13 | MOC_DIR = moc/unix | 13 | MOC_DIR = moc/unix |
14 | } | 14 | } |
15 | win32: { | 15 | win32: { |
16 | DEFINES += _WIN32_ | 16 | DEFINES += _WIN32_ |
17 | OBJECTS_DIR = obj/win | 17 | OBJECTS_DIR = obj/win |
18 | MOC_DIR = moc/win | 18 | MOC_DIR = moc/win |
19 | } | 19 | } |
20 | include( ../variables.pri ) | 20 | include( ../variables.pri ) |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | HEADERS = \ | 24 | HEADERS = \ |
25 | qlayoutengine_p.h \ | 25 | qlayoutengine_p.h \ |
26 | KDGanttMinimizeSplitter.h \ | 26 | KDGanttMinimizeSplitter.h \ |
27 | kapplication.h \ | 27 | kapplication.h \ |
28 | kaudioplayer.h \ | 28 | kaudioplayer.h \ |
29 | kcalendarsystem.h \ | 29 | kcalendarsystem.h \ |
30 | kcalendarsystemgregorian.h \ | 30 | kcalendarsystemgregorian.h \ |
31 | kcolorbutton.h \ | 31 | kcolorbutton.h \ |
32 | kcolordialog.h \ | 32 | kcolordialog.h \ |
33 | kcombobox.h \ | 33 | kcombobox.h \ |
34 | kconfig.h \ | 34 | kconfig.h \ |
35 | kdatetbl.h \ | 35 | kdatetbl.h \ |
36 | kdebug.h \ | 36 | kdebug.h \ |
37 | kdialog.h \ | 37 | kdialog.h \ |
38 | kdialogbase.h \ | 38 | kdialogbase.h \ |
39 | keditlistbox.h \ | 39 | keditlistbox.h \ |
40 | kemailsettings.h \ | 40 | kemailsettings.h \ |
41 | kfiledialog.h \ | 41 | kfiledialog.h \ |
42 | kfontdialog.h \ | 42 | kfontdialog.h \ |
43 | kglobal.h \ | 43 | kglobal.h \ |
44 | kglobalsettings.h \ | 44 | kglobalsettings.h \ |
45 | kiconloader.h \ | 45 | kiconloader.h \ |
46 | klineedit.h \ | 46 | klineedit.h \ |
47 | klineeditdlg.h \ | 47 | klineeditdlg.h \ |
48 | kmessagebox.h \ | 48 | kmessagebox.h \ |
49 | knotifyclient.h \ | 49 | knotifyclient.h \ |
50 | kprinter.h \ | 50 | kprinter.h \ |
51 | kprocess.h \ | 51 | kprocess.h \ |
52 | krestrictedline.h \ | 52 | krestrictedline.h \ |
53 | krun.h \ | 53 | krun.h \ |
54 | ksimpleconfig.h \ | 54 | ksimpleconfig.h \ |
55 | kstaticdeleter.h \ | 55 | kstaticdeleter.h \ |
56 | ksystemtray.h \ | 56 | ksystemtray.h \ |
57 | ktempfile.h \ | 57 | ktempfile.h \ |
58 | ktextedit.h \ | 58 | ktextedit.h \ |
59 | kunload.h \ | 59 | kunload.h \ |
60 | kurl.h \ | 60 | kurl.h \ |
61 | oprocctrl.h \ | ||
62 | oprocess.h \ | ||
63 | osmartpointer.h \ | 61 | osmartpointer.h \ |
64 | kdeui/kguiitem.h \ | 62 | kdeui/kguiitem.h \ |
65 | kdeui/kcmodule.h \ | 63 | kdeui/kcmodule.h \ |
66 | kdeui/kbuttonbox.h \ | 64 | kdeui/kbuttonbox.h \ |
67 | kdeui/klistbox.h \ | 65 | kdeui/klistbox.h \ |
68 | kdeui/klistview.h \ | 66 | kdeui/klistview.h \ |
69 | kdeui/kjanuswidget.h \ | 67 | kdeui/kjanuswidget.h \ |
70 | kdeui/kseparator.h \ | 68 | kdeui/kseparator.h \ |
71 | kdeui/knuminput.h \ | 69 | kdeui/knuminput.h \ |
72 | kdeui/knumvalidator.h \ | 70 | kdeui/knumvalidator.h \ |
73 | kdeui/ksqueezedtextlabel.h \ | 71 | kdeui/ksqueezedtextlabel.h \ |
74 | kio/job.h \ | 72 | kio/job.h \ |
75 | kio/kio/kdirwatch.h \ | 73 | kio/kio/kdirwatch.h \ |
76 | kio/kio/kdirwatch_p.h \ | 74 | kio/kio/kdirwatch_p.h \ |
77 | kio/kfile/kurlrequester.h \ | 75 | kio/kfile/kurlrequester.h \ |
78 | kresources/resource.h \ | 76 | kresources/resource.h \ |
79 | kresources/factory.h \ | 77 | kresources/factory.h \ |
80 | kresources/managerimpl.h \ | 78 | kresources/managerimpl.h \ |
81 | kresources/manager.h \ | 79 | kresources/manager.h \ |
82 | kresources/selectdialog.h \ | 80 | kresources/selectdialog.h \ |
83 | kresources/configpage.h \ | 81 | kresources/configpage.h \ |
84 | kresources/configwidget.h \ | 82 | kresources/configwidget.h \ |
85 | kresources/configdialog.h \ | 83 | kresources/configdialog.h \ |
86 | kresources/kcmkresources.h \ | 84 | kresources/kcmkresources.h \ |
87 | kdecore/kmdcodec.h \ | 85 | kdecore/kmdcodec.h \ |
88 | kdecore/kconfigbase.h \ | 86 | kdecore/kconfigbase.h \ |
89 | kdecore/klocale.h \ | 87 | kdecore/klocale.h \ |
90 | kdecore/kcatalogue.h \ | 88 | kdecore/kcatalogue.h \ |
91 | kdecore/ksharedptr.h \ | 89 | kdecore/ksharedptr.h \ |
92 | kdecore/kshell.h \ | 90 | kdecore/kshell.h \ |
93 | kdecore/kstandarddirs.h \ | 91 | kdecore/kstandarddirs.h \ |
94 | kdecore/kstringhandler.h \ | 92 | kdecore/kstringhandler.h \ |
95 | kdecore/kshortcut.h \ | 93 | kdecore/kshortcut.h \ |
96 | kutils/kcmultidialog.h \ | 94 | kutils/kcmultidialog.h \ |
97 | kdeui/kxmlguiclient.h \ | 95 | kdeui/kxmlguiclient.h \ |
98 | kdeui/kstdaction.h \ | 96 | kdeui/kstdaction.h \ |
99 | kdeui/kmainwindow.h \ | 97 | kdeui/kmainwindow.h \ |
100 | kdeui/ktoolbar.h \ | 98 | kdeui/ktoolbar.h \ |
101 | kdeui/ktoolbarbutton.h \ | 99 | kdeui/ktoolbarbutton.h \ |
102 | kdeui/ktoolbarhandler.h \ | 100 | kdeui/ktoolbarhandler.h \ |
103 | kdeui/kaction.h \ | 101 | kdeui/kaction.h \ |
104 | kdeui/kactionclasses.h \ | 102 | kdeui/kactionclasses.h \ |
105 | kdeui/kactioncollection.h \ | 103 | kdeui/kactioncollection.h \ |
106 | kdecore/kprefs.h \ | 104 | kdecore/kprefs.h \ |
107 | kdecore/klibloader.h \ | 105 | kdecore/klibloader.h \ |
108 | kidmanager.h | 106 | kidmanager.h |
109 | 107 | ||
110 | 108 | ||
111 | # kdecore/klibloader.h \ | 109 | # kdecore/klibloader.h \ |
112 | 110 | ||
113 | 111 | ||
114 | SOURCES = \ | 112 | SOURCES = \ |
115 | KDGanttMinimizeSplitter.cpp \ | 113 | KDGanttMinimizeSplitter.cpp \ |
116 | kapplication.cpp \ | 114 | kapplication.cpp \ |
117 | kcalendarsystem.cpp \ | 115 | kcalendarsystem.cpp \ |
118 | kcalendarsystemgregorian.cpp \ | 116 | kcalendarsystemgregorian.cpp \ |
119 | kcolorbutton.cpp \ | 117 | kcolorbutton.cpp \ |
120 | kcolordialog.cpp \ | 118 | kcolordialog.cpp \ |
121 | kconfig.cpp \ | 119 | kconfig.cpp \ |
122 | kdatetbl.cpp \ | 120 | kdatetbl.cpp \ |
123 | kdialog.cpp \ | 121 | kdialog.cpp \ |
124 | kdialogbase.cpp \ | 122 | kdialogbase.cpp \ |
125 | keditlistbox.cpp \ | 123 | keditlistbox.cpp \ |
126 | kemailsettings.cpp \ | 124 | kemailsettings.cpp \ |
127 | kfontdialog.cpp \ | 125 | kfontdialog.cpp \ |
128 | kfiledialog.cpp \ | 126 | kfiledialog.cpp \ |
129 | kglobal.cpp \ | 127 | kglobal.cpp \ |
130 | kglobalsettings.cpp \ | 128 | kglobalsettings.cpp \ |
131 | kiconloader.cpp \ | 129 | kiconloader.cpp \ |
132 | kmessagebox.cpp \ | 130 | kmessagebox.cpp \ |
133 | ktextedit.cpp \ | 131 | ktextedit.cpp \ |
134 | kprocess.cpp \ | 132 | kprocess.cpp \ |
135 | krun.cpp \ | 133 | krun.cpp \ |
136 | ksystemtray.cpp \ | 134 | ksystemtray.cpp \ |
137 | ktempfile.cpp \ | 135 | ktempfile.cpp \ |
138 | kurl.cpp \ | 136 | kurl.cpp \ |
139 | kdecore/kcatalogue.cpp \ | 137 | kdecore/kcatalogue.cpp \ |
140 | kdecore/klocale.cpp \ | 138 | kdecore/klocale.cpp \ |
141 | kdecore/kmdcodec.cpp \ | 139 | kdecore/kmdcodec.cpp \ |
142 | kdecore/kshell.cpp \ | 140 | kdecore/kshell.cpp \ |
143 | kdecore/kstandarddirs.cpp \ | 141 | kdecore/kstandarddirs.cpp \ |
144 | kdecore/kstringhandler.cpp \ | 142 | kdecore/kstringhandler.cpp \ |
145 | kdeui/kbuttonbox.cpp \ | 143 | kdeui/kbuttonbox.cpp \ |
146 | kdeui/kcmodule.cpp \ | 144 | kdeui/kcmodule.cpp \ |
147 | kdeui/kguiitem.cpp \ | 145 | kdeui/kguiitem.cpp \ |
148 | kdeui/kjanuswidget.cpp \ | 146 | kdeui/kjanuswidget.cpp \ |
149 | kdeui/klistbox.cpp \ | 147 | kdeui/klistbox.cpp \ |
150 | kdeui/klistview.cpp \ | 148 | kdeui/klistview.cpp \ |
151 | kdeui/knuminput.cpp \ | 149 | kdeui/knuminput.cpp \ |
152 | kdeui/knumvalidator.cpp \ | 150 | kdeui/knumvalidator.cpp \ |
153 | kdeui/kseparator.cpp \ | 151 | kdeui/kseparator.cpp \ |
154 | kdeui/ksqueezedtextlabel.cpp \ | 152 | kdeui/ksqueezedtextlabel.cpp \ |
155 | kio/kio/kdirwatch.cpp \ | 153 | kio/kio/kdirwatch.cpp \ |
156 | kio/kfile/kurlrequester.cpp \ | 154 | kio/kfile/kurlrequester.cpp \ |
157 | kresources/configpage.cpp \ | 155 | kresources/configpage.cpp \ |
158 | kresources/configdialog.cpp \ | 156 | kresources/configdialog.cpp \ |
159 | kresources/configwidget.cpp \ | 157 | kresources/configwidget.cpp \ |
160 | kresources/factory.cpp \ | 158 | kresources/factory.cpp \ |
161 | kresources/kcmkresources.cpp \ | 159 | kresources/kcmkresources.cpp \ |
162 | kresources/managerimpl.cpp \ | 160 | kresources/managerimpl.cpp \ |
163 | kresources/resource.cpp \ | 161 | kresources/resource.cpp \ |
164 | kresources/selectdialog.cpp \ | 162 | kresources/selectdialog.cpp \ |
165 | kutils/kcmultidialog.cpp \ | 163 | kutils/kcmultidialog.cpp \ |
166 | kdeui/kaction.cpp \ | 164 | kdeui/kaction.cpp \ |
167 | kdeui/kactionclasses.cpp \ | 165 | kdeui/kactionclasses.cpp \ |
168 | kdeui/kactioncollection.cpp \ | 166 | kdeui/kactioncollection.cpp \ |
169 | kdeui/kmainwindow.cpp \ | 167 | kdeui/kmainwindow.cpp \ |
170 | kdeui/ktoolbar.cpp \ | 168 | kdeui/ktoolbar.cpp \ |
171 | kdeui/ktoolbarbutton.cpp \ | 169 | kdeui/ktoolbarbutton.cpp \ |
172 | kdeui/ktoolbarhandler.cpp \ | 170 | kdeui/ktoolbarhandler.cpp \ |
173 | kdeui/kstdaction.cpp \ | 171 | kdeui/kstdaction.cpp \ |
174 | kdeui/kxmlguiclient.cpp \ | 172 | kdeui/kxmlguiclient.cpp \ |
175 | kdecore/kprefs.cpp \ | 173 | kdecore/kprefs.cpp \ |
176 | kdecore/klibloader.cpp \ | 174 | kdecore/klibloader.cpp \ |
177 | kidmanager.cpp \ | 175 | kidmanager.cpp |
178 | oprocctrl.cpp \ | ||
179 | oprocess.cpp | ||