-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | bin/kdepim/kopiemail/germantranslation.txt | 4 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 16 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 2 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 3 | ||||
-rw-r--r-- | kmicromail/viewmail.h | 4 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 13 | ||||
-rw-r--r-- | kmicromail/viewmailbase.h | 4 |
8 files changed, 45 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6be5222..5021212 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,57 +1,62 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.14 ************ | 3 | ********** VERSION 1.9.14 ************ |
4 | 4 | ||
5 | Fixed some problems with the dialog sizes when switching | 5 | Fixed some problems with the dialog sizes when switching |
6 | portrait/landscape mode on 640x480 PDA display. | 6 | portrait/landscape mode on 640x480 PDA display. |
7 | 7 | ||
8 | Fixed some other small bugs. | 8 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
9 | 9 | ||
10 | Fixed an ugly bug in KOpieMail: | 10 | Fixed an ugly bug in KOpieMail: |
11 | KOpieMail was not able to write files (mails) to MSDOS file system, | 11 | KOpieMail was not able to write files (mails) to MSDOS file system, |
12 | like on an usual preformatted SD card. That should work now. | 12 | like on an usual preformatted SD card. That should work now. |
13 | To save your mail data on the Sd card do the following: | 13 | To save your mail data on the Sd card do the following: |
14 | Create a dir on the SD card: | 14 | Create a dir on the SD card: |
15 | mkdir /mnt/card/localmail | 15 | mkdir /mnt/card/localmail |
16 | Go to your home dir: | 16 | Go to your home dir: |
17 | cd | 17 | cd |
18 | Go to kopiemail data storage dir: | 18 | Go to kopiemail data storage dir: |
19 | cd kdepim/apps/kopiemail | 19 | cd kdepim/apps/kopiemail |
20 | Create a symlink to the SD card: | 20 | Create a symlink to the SD card: |
21 | ls -s /mnt/card/localmail | 21 | ls -s /mnt/card/localmail |
22 | Now KOpieMail will store all mails on the SD card. | 22 | Now KOpieMail will store all mails on the SD card. |
23 | 23 | ||
24 | KO/Pi Monthview: | 24 | KO/Pi Monthview: |
25 | Now "Go to Today" selects the current month from day 1-end, | 25 | Now "Go to Today" selects the current month from day 1-end, |
26 | not the current date + some days. | 26 | not the current date + some days. |
27 | I.e. "Go to Today" shows now always | 27 | I.e. "Go to Today" shows now always |
28 | the current month with first day of month in the first row. | 28 | the current month with first day of month in the first row. |
29 | 29 | ||
30 | Added missing German translation. | 30 | Added missing German translation. |
31 | 31 | ||
32 | Fixed icons of executeable on Wintendo. | 32 | Fixed icons of executeable on Wintendo. |
33 | 33 | ||
34 | Added a "Show next Mail" button to the OM/Pi | ||
35 | mail viewer such that the mail below the current mail | ||
36 | in the mail list view of the current folder | ||
37 | can be read with a single click. | ||
38 | |||
34 | 39 | ||
35 | ********** VERSION 1.9.13 ************ | 40 | ********** VERSION 1.9.13 ************ |
36 | 41 | ||
37 | Fixed nasty PwM/Pi file reading bug, when | 42 | Fixed nasty PwM/Pi file reading bug, when |
38 | the used hash algo of file is different then the global | 43 | the used hash algo of file is different then the global |
39 | hash algo. | 44 | hash algo. |
40 | 45 | ||
41 | Added KA/Pi support for opie mailit mailapplication. | 46 | Added KA/Pi support for opie mailit mailapplication. |
42 | 47 | ||
43 | Fixed some bugs in OM/Pi. | 48 | Fixed some bugs in OM/Pi. |
44 | Now character conversion tables are available for the Zaurus | 49 | Now character conversion tables are available for the Zaurus |
45 | to make OM/Pi working properly. | 50 | to make OM/Pi working properly. |
46 | To get the character conversion in OM/Pi working, please download | 51 | To get the character conversion in OM/Pi working, please download |
47 | at the sourceforge project site the package | 52 | at the sourceforge project site the package |
48 | sr-character-conversion_SharpROM_arm.ipk.zip | 53 | sr-character-conversion_SharpROM_arm.ipk.zip |
49 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 54 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
50 | from the section "general files for KDE/Pim" | 55 | from the section "general files for KDE/Pim" |
51 | Instructions how to install this package are in a ReadMe in this file. | 56 | Instructions how to install this package are in a ReadMe in this file. |
52 | 57 | ||
53 | 58 | ||
54 | Fixed the orientation change problem in KA/Pi when switching | 59 | Fixed the orientation change problem in KA/Pi when switching |
55 | portrait/landscape mode. | 60 | portrait/landscape mode. |
56 | 61 | ||
57 | French translation available for KA/Pi and OM/Pi. | 62 | French translation available for KA/Pi and OM/Pi. |
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 1abe14a..5039848 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt | |||
@@ -217,31 +217,31 @@ | |||
217 | { "use:","via:" }, | 217 | { "use:","via:" }, |
218 | { "Save","Speichern" }, | 218 | { "Save","Speichern" }, |
219 | { "Name","Name" }, | 219 | { "Name","Name" }, |
220 | { "No Receiver spezified","Kein Empfänger angegeben" }, | 220 | { "No Receiver spezified","Kein Empfänger angegeben" }, |
221 | { "Sending mail","Sende Mail" }, | 221 | { "Sending mail","Sende Mail" }, |
222 | { "No","Nein" }, | 222 | { "No","Nein" }, |
223 | { "Yes","Ja" }, | 223 | { "Yes","Ja" }, |
224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, | 224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, |
225 | { "Store message?","Nachricht speichern?" }, | 225 | { "Store message?","Nachricht speichern?" }, |
226 | { "Select Type","Selektiere Typ" }, | 226 | { "Select Type","Selektiere Typ" }, |
227 | { "Select Account Type","Wähle Art des Zugangs" }, | 227 | { "Select Account Type","Wähle Art des Zugangs" }, |
228 | { "IMAP","IMAP (online lesen)" }, | 228 | { "IMAP","IMAP (online lesen)" }, |
229 | { "POP3","POP3 (holen)" }, | 229 | { "POP3","POP3 (holen)" }, |
230 | { "SMTP","SMTP (senden)" }, | 230 | { "SMTP","SMTP (senden)" }, |
231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, | 231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, |
232 | { "Question","Eine Frage..." }, | 232 | { "Question","Eine Frage..." }, |
233 | { "Send this message?","Nachricht wirklich senden?" }, | 233 | { "Send this message?","Nachricht wirklich senden?" }, |
234 | { "Stop editing message","Stop editing message" }, | 234 | { "Stop editing message","Stop editing message" }, |
235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, | 235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, |
236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, | 236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, |
237 | { "Refresh header list","Aktualisiere Titel Liste" }, | 237 | { "Refresh header list","Aktualisiere Titel Liste" }, |
238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, | 238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, |
239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, | 239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, |
240 | { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, | 240 | { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, |
241 | { "","" }, | 241 | { "Show next mail","Zeige nächste Mail" }, |
242 | { "","" }, | 242 | { "End of List","Ende der Liste" }, |
243 | { "","" }, | 243 | { "","" }, |
244 | { "","" }, | 244 | { "","" }, |
245 | { "","" }, | 245 | { "","" }, |
246 | { "","" }, | 246 | { "","" }, |
247 | { "","" }, | 247 | { "","" }, |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index c20c7ce..ec192ea 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -278,62 +278,78 @@ void OpieMail::replyMail() | |||
278 | rtext += "\n"; | 278 | rtext += "\n"; |
279 | 279 | ||
280 | QString prefix; | 280 | QString prefix; |
281 | if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = ""; | 281 | if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = ""; |
282 | else prefix = "Re: "; // no i18n on purpose | 282 | else prefix = "Re: "; // no i18n on purpose |
283 | 283 | ||
284 | Settings *settings = new Settings(); | 284 | Settings *settings = new Settings(); |
285 | ComposeMail composer( settings ,this, 0, true); | 285 | ComposeMail composer( settings ,this, 0, true); |
286 | if (mail->Replyto().isEmpty()) { | 286 | if (mail->Replyto().isEmpty()) { |
287 | composer.setTo( mail->getFrom()); | 287 | composer.setTo( mail->getFrom()); |
288 | } else { | 288 | } else { |
289 | composer.setTo( mail->Replyto()); | 289 | composer.setTo( mail->Replyto()); |
290 | } | 290 | } |
291 | composer.setSubject( prefix + mail->getSubject()); | 291 | composer.setSubject( prefix + mail->getSubject()); |
292 | composer.setMessage( rtext ); | 292 | composer.setMessage( rtext ); |
293 | composer.setInReplyTo( mail->Msgid()); | 293 | composer.setInReplyTo( mail->Msgid()); |
294 | composer.setCharset( body->getCharset() ); | 294 | composer.setCharset( body->getCharset() ); |
295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) | 295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) |
296 | { | 296 | { |
297 | mail->Wrapper()->answeredMail(mail); | 297 | mail->Wrapper()->answeredMail(mail); |
298 | } | 298 | } |
299 | delete settings; | 299 | delete settings; |
300 | 300 | ||
301 | } | 301 | } |
302 | void OpieMail::displayNextMail(ViewMail * vm) | ||
303 | { | ||
304 | QListViewItem*item = mailView->currentItem(); | ||
305 | if (!item) return; | ||
306 | item = item->itemBelow(); | ||
307 | if (!item) { | ||
308 | vm->setCaption(i18n("End of List" )); | ||
309 | return; | ||
310 | } | ||
311 | mailView->setCurrentItem(item); | ||
312 | RecMailP mail = ((MailListViewItem*)item)->data(); | ||
313 | RecBodyP body = folderView->fetchBody(mail); | ||
314 | vm->setBody( body ); | ||
315 | vm->setMail( mail ); | ||
316 | } | ||
302 | void OpieMail::displayMail() | 317 | void OpieMail::displayMail() |
303 | { | 318 | { |
304 | QListViewItem*item = mailView->currentItem(); | 319 | QListViewItem*item = mailView->currentItem(); |
305 | if (!item) return; | 320 | if (!item) return; |
306 | RecMailP mail = ((MailListViewItem*)item)->data(); | 321 | RecMailP mail = ((MailListViewItem*)item)->data(); |
307 | RecBodyP body = folderView->fetchBody(mail); | 322 | RecBodyP body = folderView->fetchBody(mail); |
308 | ViewMail readMail( this,"", Qt::WType_Modal ); | 323 | ViewMail readMail( this,"", Qt::WType_Modal ); |
309 | readMail.setBody( body ); | 324 | readMail.setBody( body ); |
310 | readMail.setMail( mail ); | 325 | readMail.setMail( mail ); |
311 | #ifndef DESKTOP_VERSION | 326 | #ifndef DESKTOP_VERSION |
312 | readMail.showMaximized(); | 327 | readMail.showMaximized(); |
313 | #else | 328 | #else |
314 | readMail.resize( 640, 480); | 329 | readMail.resize( 640, 480); |
315 | #endif | 330 | #endif |
331 | connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); | ||
316 | readMail.exec(); | 332 | readMail.exec(); |
317 | 333 | ||
318 | if ( readMail.deleted ) | 334 | if ( readMail.deleted ) |
319 | { | 335 | { |
320 | folderView->refreshCurrent(); | 336 | folderView->refreshCurrent(); |
321 | } | 337 | } |
322 | else | 338 | else |
323 | { | 339 | { |
324 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); | 340 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); |
325 | } | 341 | } |
326 | } | 342 | } |
327 | void OpieMail::slotGetAllMail() | 343 | void OpieMail::slotGetAllMail() |
328 | { | 344 | { |
329 | QListViewItem * item = folderView->firstChild(); | 345 | QListViewItem * item = folderView->firstChild(); |
330 | while ( item ){ | 346 | while ( item ){ |
331 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 347 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |
332 | item = item->nextSibling (); | 348 | item = item->nextSibling (); |
333 | } | 349 | } |
334 | } | 350 | } |
335 | void OpieMail::slotGetMail() | 351 | void OpieMail::slotGetMail() |
336 | { | 352 | { |
337 | QListViewItem * item = folderView->currentItem(); | 353 | QListViewItem * item = folderView->currentItem(); |
338 | if ( ! item ) return; | 354 | if ( ! item ) return; |
339 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 355 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 44ab1ec..30968a7 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h | |||
@@ -1,51 +1,53 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | 1 | // CHANGED 2004-09-31 Lutz Rogowski |
2 | #ifndef OPIEMAIL_H | 2 | #ifndef OPIEMAIL_H |
3 | #define OPIEMAIL_H | 3 | #define OPIEMAIL_H |
4 | 4 | ||
5 | #include "mainwindow.h" | 5 | #include "mainwindow.h" |
6 | #include <libmailwrapper/settings.h> | 6 | #include <libmailwrapper/settings.h> |
7 | 7 | ||
8 | #include <opie2/osmartpointer.h> | 8 | #include <opie2/osmartpointer.h> |
9 | #include <libmailwrapper/mailtypes.h> | 9 | #include <libmailwrapper/mailtypes.h> |
10 | #include <viewmail.h> | ||
10 | 11 | ||
11 | class OpieMail : public MainWindow | 12 | class OpieMail : public MainWindow |
12 | { | 13 | { |
13 | Q_OBJECT | 14 | Q_OBJECT |
14 | 15 | ||
15 | public: | 16 | public: |
16 | OpieMail( QWidget *parent = 0, const char *name = 0 ); | 17 | OpieMail( QWidget *parent = 0, const char *name = 0 ); |
17 | virtual ~OpieMail(); | 18 | virtual ~OpieMail(); |
18 | static QString appName() { return QString::fromLatin1("kopiemail"); } | 19 | static QString appName() { return QString::fromLatin1("kopiemail"); } |
19 | 20 | ||
20 | public slots: | 21 | public slots: |
21 | virtual void slotwriteMail(const QString&name,const QString&email); | 22 | virtual void slotwriteMail(const QString&name,const QString&email); |
22 | virtual void slotwriteMail2(const QString&nameemail); | 23 | virtual void slotwriteMail2(const QString&nameemail); |
23 | virtual void slotComposeMail(); | 24 | virtual void slotComposeMail(); |
24 | virtual void slotExtAppHandler(); | 25 | virtual void slotExtAppHandler(); |
25 | virtual void appMessage(const QCString &msg, const QByteArray &data); | 26 | virtual void appMessage(const QCString &msg, const QByteArray &data); |
26 | virtual void message(const QCString &msg, const QByteArray &data); | 27 | virtual void message(const QCString &msg, const QByteArray &data); |
27 | protected slots: | 28 | protected slots: |
29 | virtual void displayNextMail(ViewMail * vm); | ||
28 | virtual void slotSendQueued(); | 30 | virtual void slotSendQueued(); |
29 | virtual void slotSearchMails(); | 31 | virtual void slotSearchMails(); |
30 | virtual void slotEditSettings(); | 32 | virtual void slotEditSettings(); |
31 | virtual void slotEditAccounts(); | 33 | virtual void slotEditAccounts(); |
32 | virtual void displayMail(); | 34 | virtual void displayMail(); |
33 | virtual void replyMail(); | 35 | virtual void replyMail(); |
34 | virtual void slotDeleteMail(); | 36 | virtual void slotDeleteMail(); |
35 | virtual void slotGetMail(); | 37 | virtual void slotGetMail(); |
36 | virtual void slotGetAllMail(); | 38 | virtual void slotGetAllMail(); |
37 | virtual void slotDeleteAllMail(); | 39 | virtual void slotDeleteAllMail(); |
38 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); | 40 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); |
39 | virtual void slotShowFolders( bool show ); | 41 | virtual void slotShowFolders( bool show ); |
40 | virtual void refreshMailView(const QValueList<RecMailP>&); | 42 | virtual void refreshMailView(const QValueList<RecMailP>&); |
41 | virtual void mailLeftClicked( QListViewItem * ); | 43 | virtual void mailLeftClicked( QListViewItem * ); |
42 | virtual void slotMoveCopyMail(); | 44 | virtual void slotMoveCopyMail(); |
43 | virtual void slotMoveCopyAllMail(); | 45 | virtual void slotMoveCopyAllMail(); |
44 | virtual void reEditMail(); | 46 | virtual void reEditMail(); |
45 | void clearSelection(); | 47 | void clearSelection(); |
46 | 48 | ||
47 | private: | 49 | private: |
48 | QString mPendingEmail; | 50 | QString mPendingEmail; |
49 | QString mPendingName; | 51 | QString mPendingName; |
50 | QByteArray mPendingData; | 52 | QByteArray mPendingData; |
51 | QCString mPendingMessage; | 53 | QCString mPendingMessage; |
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 3bd6f41..60c764c 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp | |||
@@ -304,49 +304,50 @@ void ViewMail::setMail(const RecMailP&mail ) | |||
304 | m_mail[0] = mail->getFrom(); | 304 | m_mail[0] = mail->getFrom(); |
305 | m_mail[1] = mail->getSubject(); | 305 | m_mail[1] = mail->getSubject(); |
306 | m_mail[3] = mail->getDate(); | 306 | m_mail[3] = mail->getDate(); |
307 | m_mail[4] = mail->Msgid(); | 307 | m_mail[4] = mail->Msgid(); |
308 | 308 | ||
309 | m_mail2[0] = mail->To(); | 309 | m_mail2[0] = mail->To(); |
310 | m_mail2[1] = mail->CC(); | 310 | m_mail2[1] = mail->CC(); |
311 | m_mail2[2] = mail->Bcc(); | 311 | m_mail2[2] = mail->Bcc(); |
312 | 312 | ||
313 | setText(); | 313 | setText(); |
314 | } | 314 | } |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | 318 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) |
319 | : ViewMailBase(parent, name, fl), _inLoop(false) | 319 | : ViewMailBase(parent, name, fl), _inLoop(false) |
320 | { | 320 | { |
321 | m_gotBody = false; | 321 | m_gotBody = false; |
322 | deleted = false; | 322 | deleted = false; |
323 | 323 | ||
324 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); | 324 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); |
325 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); | 325 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); |
326 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); | 326 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); |
327 | connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); | 327 | connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); |
328 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 328 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
329 | connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) ); | ||
329 | 330 | ||
330 | attachments->setEnabled(m_gotBody); | 331 | attachments->setEnabled(m_gotBody); |
331 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); | 332 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); |
332 | 333 | ||
333 | readConfig(); | 334 | readConfig(); |
334 | attachments->setSorting(-1); | 335 | attachments->setSorting(-1); |
335 | } | 336 | } |
336 | 337 | ||
337 | void ViewMail::readConfig() | 338 | void ViewMail::readConfig() |
338 | { | 339 | { |
339 | 340 | ||
340 | setFont ( KOPrefs::instance()->mReadFont ); | 341 | setFont ( KOPrefs::instance()->mReadFont ); |
341 | m_showHtml = KOPrefs::instance()->mViewAsHtml; | 342 | m_showHtml = KOPrefs::instance()->mViewAsHtml; |
342 | showHtml->setOn( m_showHtml ); | 343 | showHtml->setOn( m_showHtml ); |
343 | } | 344 | } |
344 | 345 | ||
345 | void ViewMail::setText() | 346 | void ViewMail::setText() |
346 | { | 347 | { |
347 | 348 | ||
348 | QString toString; | 349 | QString toString; |
349 | QString ccString; | 350 | QString ccString; |
350 | QString bccString; | 351 | QString bccString; |
351 | 352 | ||
352 | 353 | ||
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index 194ac8e..c2c2ce3 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -21,55 +21,57 @@ public: | |||
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 | signals: | |
46 | void showNextMail(ViewMail*); | ||
46 | protected: | 47 | protected: |
47 | QString deHtml(const QString &string); | 48 | QString deHtml(const QString &string); |
48 | AttachItem* searchParent(const QValueList<int>&path); | 49 | AttachItem* searchParent(const QValueList<int>&path); |
49 | AttachItem* lastChild(AttachItem*parent); | 50 | AttachItem* lastChild(AttachItem*parent); |
50 | 51 | ||
51 | protected slots: | 52 | protected slots: |
53 | void slotNextMail() { emit showNextMail(this); }; | ||
52 | void slotReply(); | 54 | void slotReply(); |
53 | void slotForward(); | 55 | void slotForward(); |
54 | void setText(); | 56 | void setText(); |
55 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 57 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |
56 | void slotDeleteMail( ); | 58 | void slotDeleteMail( ); |
57 | void slotShowHtml( bool ); | 59 | void slotShowHtml( bool ); |
58 | 60 | ||
59 | private: | 61 | private: |
60 | void readConfig(); | 62 | void readConfig(); |
61 | 63 | ||
62 | bool _inLoop; | 64 | bool _inLoop; |
63 | QString m_mailHtml; | 65 | QString m_mailHtml; |
64 | bool m_gotBody; | 66 | bool m_gotBody; |
65 | RecBodyP m_body; | 67 | RecBodyP m_body; |
66 | RecMailP m_recMail; | 68 | RecMailP m_recMail; |
67 | bool m_showHtml; | 69 | bool m_showHtml; |
68 | 70 | ||
69 | // 0 from 1 subject 2 bodytext 3 date | 71 | // 0 from 1 subject 2 bodytext 3 date |
70 | QMap <int,QString> m_mail; | 72 | QMap <int,QString> m_mail; |
71 | // 0 to 1 cc 2 bcc | 73 | // 0 to 1 cc 2 bcc |
72 | QMap <int,QStringList> m_mail2; | 74 | QMap <int,QStringList> m_mail2; |
73 | }; | 75 | }; |
74 | 76 | ||
75 | class MailImageDlg:public QDialog | 77 | class MailImageDlg:public QDialog |
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3d7ed42..c4731a7 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp | |||
@@ -28,50 +28,61 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | |||
28 | toolbar->setHorizontalStretchable(true); | 28 | toolbar->setHorizontalStretchable(true); |
29 | addToolBar(toolbar); | 29 | addToolBar(toolbar); |
30 | 30 | ||
31 | reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); | 31 | reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); |
32 | reply->addTo(toolbar); | 32 | reply->addTo(toolbar); |
33 | reply->addTo(mailmenu); | 33 | reply->addTo(mailmenu); |
34 | 34 | ||
35 | forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); | 35 | forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); |
36 | forward->addTo(toolbar); | 36 | forward->addTo(toolbar); |
37 | forward->addTo(mailmenu); | 37 | forward->addTo(mailmenu); |
38 | 38 | ||
39 | attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); | 39 | attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); |
40 | attachbutton->addTo(toolbar); | 40 | attachbutton->addTo(toolbar); |
41 | attachbutton->addTo(mailmenu); | 41 | attachbutton->addTo(mailmenu); |
42 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); | 42 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); |
43 | 43 | ||
44 | 44 | ||
45 | showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); | 45 | showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); |
46 | showHtml->addTo( toolbar ); | 46 | showHtml->addTo( toolbar ); |
47 | showHtml->addTo( mailmenu ); | 47 | showHtml->addTo( mailmenu ); |
48 | 48 | ||
49 | deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); | 49 | deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); |
50 | deleteMail->addTo(toolbar); | 50 | deleteMail->addTo(toolbar); |
51 | deleteMail->addTo(mailmenu); | 51 | deleteMail->addTo(mailmenu); |
52 | closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | 52 | |
53 | |||
54 | |||
55 | nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); | ||
53 | QLabel *spacer = new QLabel(toolbar); | 56 | QLabel *spacer = new QLabel(toolbar); |
57 | nextMail->addTo(toolbar); | ||
58 | nextMail->addTo(mailmenu); | ||
59 | |||
60 | |||
61 | |||
62 | |||
63 | closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | ||
64 | //QLabel *spacer = new QLabel(toolbar); | ||
54 | spacer->setBackgroundMode(QWidget::PaletteButton); | 65 | spacer->setBackgroundMode(QWidget::PaletteButton); |
55 | toolbar->setStretchableWidget(spacer); | 66 | toolbar->setStretchableWidget(spacer); |
56 | closeMail->addTo(toolbar); | 67 | closeMail->addTo(toolbar); |
57 | closeMail->addTo(mailmenu); | 68 | closeMail->addTo(mailmenu); |
58 | QVBox *view = new QVBox(this); | 69 | QVBox *view = new QVBox(this); |
59 | setCentralWidget(view); | 70 | setCentralWidget(view); |
60 | 71 | ||
61 | attachments = new QListView(view); | 72 | attachments = new QListView(view); |
62 | attachments->setMinimumHeight(90); | 73 | attachments->setMinimumHeight(90); |
63 | attachments->setMaximumHeight(90); | 74 | attachments->setMaximumHeight(90); |
64 | attachments->setAllColumnsShowFocus(true); | 75 | attachments->setAllColumnsShowFocus(true); |
65 | attachments->addColumn("Mime Type", 60); | 76 | attachments->addColumn("Mime Type", 60); |
66 | attachments->addColumn(i18n("Description"), 100); | 77 | attachments->addColumn(i18n("Description"), 100); |
67 | attachments->addColumn(i18n("Filename"), 80); | 78 | attachments->addColumn(i18n("Filename"), 80); |
68 | attachments->addColumn(i18n("Size"), 80); | 79 | attachments->addColumn(i18n("Size"), 80); |
69 | attachments->setSorting(-1); | 80 | attachments->setSorting(-1); |
70 | attachments->hide(); | 81 | attachments->hide(); |
71 | 82 | ||
72 | browser = new QTextBrowser(view); | 83 | browser = new QTextBrowser(view); |
73 | 84 | ||
74 | //openDiag = new OpenDiag(view); | 85 | //openDiag = new OpenDiag(view); |
75 | //openDiag->hide(); | 86 | //openDiag->hide(); |
76 | 87 | ||
77 | } | 88 | } |
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index 1c8948a..c97e9e3 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h | |||
@@ -1,39 +1,39 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | #ifndef VIEWMAILBASE_H | 2 | #ifndef VIEWMAILBASE_H |
3 | #define VIEWMAILBASE_H | 3 | #define VIEWMAILBASE_H |
4 | 4 | ||
5 | #include <qmainwindow.h> | 5 | #include <qmainwindow.h> |
6 | 6 | ||
7 | class QAction; | 7 | class QAction; |
8 | class OpenDiag; | 8 | class OpenDiag; |
9 | class QListView; | 9 | class QListView; |
10 | class QToolBar; | 10 | class QToolBar; |
11 | class QTextBrowser; | 11 | class QTextBrowser; |
12 | class QMenuBar; | 12 | class QMenuBar; |
13 | class QPopupMenu; | 13 | class QPopupMenu; |
14 | 14 | ||
15 | class ViewMailBase : public QMainWindow | 15 | class ViewMailBase : public QMainWindow |
16 | { | 16 | { |
17 | Q_OBJECT | 17 | Q_OBJECT |
18 | 18 | ||
19 | public: | 19 | public: |
20 | ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 20 | ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
21 | 21 | ||
22 | protected: | 22 | protected: |
23 | QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail; | 23 | QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail; |
24 | QListView *attachments; | 24 | QListView *attachments; |
25 | QToolBar *toolbar; | 25 | QToolBar *toolbar; |
26 | QTextBrowser *browser; | 26 | QTextBrowser *browser; |
27 | OpenDiag *openDiag; | 27 | OpenDiag *openDiag; |
28 | QMenuBar *menubar; | 28 | QMenuBar *menubar; |
29 | QPopupMenu *mailmenu; | 29 | QPopupMenu *mailmenu; |
30 | 30 | ||
31 | protected slots: | 31 | protected slots: |
32 | void slotChangeAttachview(bool state); | 32 | void slotChangeAttachview(bool state); |
33 | virtual void keyPressEvent ( QKeyEvent * e ); | 33 | virtual void keyPressEvent ( QKeyEvent * e ); |
34 | 34 | ||
35 | 35 | ||
36 | }; | 36 | }; |
37 | 37 | ||
38 | #endif | 38 | #endif |
39 | 39 | ||