summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt4
-rw-r--r--kmicromail/opiemail.cpp16
-rw-r--r--kmicromail/opiemail.h2
-rw-r--r--kmicromail/viewmail.cpp3
-rw-r--r--kmicromail/viewmail.h4
-rw-r--r--kmicromail/viewmailbase.cpp13
-rw-r--r--kmicromail/viewmailbase.h4
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,129 +1,134 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.14 ************ 3********** VERSION 1.9.14 ************
4 4
5Fixed some problems with the dialog sizes when switching 5Fixed some problems with the dialog sizes when switching
6portrait/landscape mode on 640x480 PDA display. 6portrait/landscape mode on 640x480 PDA display.
7 7
8Fixed some other small bugs. 8Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
9 9
10Fixed an ugly bug in KOpieMail: 10Fixed an ugly bug in KOpieMail:
11KOpieMail was not able to write files (mails) to MSDOS file system, 11KOpieMail was not able to write files (mails) to MSDOS file system,
12like on an usual preformatted SD card. That should work now. 12like on an usual preformatted SD card. That should work now.
13To save your mail data on the Sd card do the following: 13To save your mail data on the Sd card do the following:
14Create a dir on the SD card: 14Create a dir on the SD card:
15mkdir /mnt/card/localmail 15mkdir /mnt/card/localmail
16Go to your home dir: 16Go to your home dir:
17cd 17cd
18Go to kopiemail data storage dir: 18Go to kopiemail data storage dir:
19cd kdepim/apps/kopiemail 19cd kdepim/apps/kopiemail
20Create a symlink to the SD card: 20Create a symlink to the SD card:
21ls -s /mnt/card/localmail 21ls -s /mnt/card/localmail
22Now KOpieMail will store all mails on the SD card. 22Now KOpieMail will store all mails on the SD card.
23 23
24KO/Pi Monthview: 24KO/Pi Monthview:
25Now "Go to Today" selects the current month from day 1-end, 25Now "Go to Today" selects the current month from day 1-end,
26not the current date + some days. 26not the current date + some days.
27I.e. "Go to Today" shows now always 27I.e. "Go to Today" shows now always
28the current month with first day of month in the first row. 28the current month with first day of month in the first row.
29 29
30Added missing German translation. 30Added missing German translation.
31 31
32Fixed icons of executeable on Wintendo. 32Fixed icons of executeable on Wintendo.
33 33
34Added a "Show next Mail" button to the OM/Pi
35mail viewer such that the mail below the current mail
36in the mail list view of the current folder
37can be read with a single click.
38
34 39
35********** VERSION 1.9.13 ************ 40********** VERSION 1.9.13 ************
36 41
37Fixed nasty PwM/Pi file reading bug, when 42Fixed nasty PwM/Pi file reading bug, when
38the used hash algo of file is different then the global 43the used hash algo of file is different then the global
39hash algo. 44hash algo.
40 45
41Added KA/Pi support for opie mailit mailapplication. 46Added KA/Pi support for opie mailit mailapplication.
42 47
43Fixed some bugs in OM/Pi. 48Fixed some bugs in OM/Pi.
44Now character conversion tables are available for the Zaurus 49Now character conversion tables are available for the Zaurus
45to make OM/Pi working properly. 50to make OM/Pi working properly.
46To get the character conversion in OM/Pi working, please download 51To get the character conversion in OM/Pi working, please download
47at the sourceforge project site the package 52at the sourceforge project site the package
48sr-character-conversion_SharpROM_arm.ipk.zip 53sr-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)
50from the section "general files for KDE/Pim" 55from the section "general files for KDE/Pim"
51Instructions how to install this package are in a ReadMe in this file. 56Instructions how to install this package are in a ReadMe in this file.
52 57
53 58
54Fixed the orientation change problem in KA/Pi when switching 59Fixed the orientation change problem in KA/Pi when switching
55portrait/landscape mode. 60portrait/landscape mode.
56 61
57French translation available for KA/Pi and OM/Pi. 62French translation available for KA/Pi and OM/Pi.
58 63
59Fixed some problems with categories in KO/Pi in DTM sync. 64Fixed some problems with categories in KO/Pi in DTM sync.
60 65
61Added selection dialog for export to phone in KA/Pi. 66Added selection dialog for export to phone in KA/Pi.
62 67
63If in KO/Pi is an attendee selected to add to a meeting and this 68If in KO/Pi is an attendee selected to add to a meeting and this
64attendee is already in the list of attendees, this person is not added 69attendee is already in the list of attendees, this person is not added
65again. 70again.
66 71
67Some menu cleanup in KA/Pi. 72Some menu cleanup in KA/Pi.
68 73
69********** VERSION 1.9.12 ************ 74********** VERSION 1.9.12 ************
70 75
71Fix for the bug in KO/Pi What's Next view of version 1.9.11. 76Fix for the bug in KO/Pi What's Next view of version 1.9.11.
72 77
73Bugfix: Licence file is now shown again. 78Bugfix: Licence file is now shown again.
74 79
75OM/Pi now supports Unicode (utf8 charset). 80OM/Pi now supports Unicode (utf8 charset).
76Fixed some bugs in OM/Pi. 81Fixed some bugs in OM/Pi.
77 82
78KA/Pi has more German translation. 83KA/Pi has more German translation.
79 84
80 85
81********** VERSION 1.9.11 ************ 86********** VERSION 1.9.11 ************
82 87
83Fixed several problems in PWM/Pi, like 88Fixed several problems in PWM/Pi, like
84asking the user, if unsaved changed are pending 89asking the user, if unsaved changed are pending
85when closing the app. 90when closing the app.
86And PwM/Pi handles now different texts for the 91And PwM/Pi handles now different texts for the
87fields Description, Username, Password, configurable per category. 92fields Description, Username, Password, configurable per category.
88 93
89Fixed a crash in KO/Pi , when importing/loading vcs files 94Fixed a crash in KO/Pi , when importing/loading vcs files
90which have an entry with an attendee with state: 95which have an entry with an attendee with state:
91NEEDS ACTION 96NEEDS ACTION
92 97
93Fixed some problems in the German translation of OM/Pi, 98Fixed some problems in the German translation of OM/Pi,
94which makes some dialogs not fitting on the screen 99which makes some dialogs not fitting on the screen
95of the Z 5500. 100of the Z 5500.
96 101
97Fixed Qtopia crash, when disabling/deinstalling 102Fixed Qtopia crash, when disabling/deinstalling
98KO/Pi alarm applet. 103KO/Pi alarm applet.
99 104
100Implemented direct KDE<->KA/Pi sync for KA/Pi running 105Implemented direct KDE<->KA/Pi sync for KA/Pi running
101on Linux desktop. 106on Linux desktop.
102 107
103Added feature "remove sync info" to sync menu. 108Added feature "remove sync info" to sync menu.
104 109
105Tweaked the KO/Pi What's next view a bit, added 110Tweaked the KO/Pi What's next view a bit, added
106setting to hide events that are done. 111setting to hide events that are done.
107 112
108Disabled "beam receive enabled" on startup to 113Disabled "beam receive enabled" on startup to
109avoid problems if Fastload is enabled. 114avoid problems if Fastload is enabled.
110Please set "beam receive enabled", 115Please set "beam receive enabled",
111if you want to receive data via IR. 116if you want to receive data via IR.
112 117
113Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 118Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
114on Linux desktop. 119on Linux desktop.
115 120
116Made in KA/Pi scrolling possible, if details view is selected. 121Made in KA/Pi scrolling possible, if details view is selected.
117(The keyboard focus is set automatically to the search line) 122(The keyboard focus is set automatically to the search line)
118 123
119Fixed a bug in DMT sync, that a new entry in DTM was added 124Fixed a bug in DMT sync, that a new entry in DTM was added
120on every sync to Kx/Pi. 125on every sync to Kx/Pi.
121 126
122Fixed missing writing of KA/Pi categories to DMT entries when syncing. 127Fixed missing writing of KA/Pi categories to DMT entries when syncing.
123 128
124Fixed a bug in DMT sync with todos created in KO/Pi containing 129Fixed a bug in DMT sync with todos created in KO/Pi containing
125non-latin1 characters. 130non-latin1 characters.
126 131
127Rearranged package contents of Sharp-ipks and made all 132Rearranged package contents of Sharp-ipks and made all
128packages installable on SD again. 133packages installable on SD again.
129 134
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
@@ -145,103 +145,103 @@
145{ "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, 145{ "Get newsgroup list from server","Hole Newsgroup Liste vom Server" },
146{ "Filter:","Filter:" }, 146{ "Filter:","Filter:" },
147{ "Show subscribed","Zeige abbonnierte" }, 147{ "Show subscribed","Zeige abbonnierte" },
148{ "Groups","NewsGroups" }, 148{ "Groups","NewsGroups" },
149{ "Configure IMAP","Konfiguriere IMAP" }, 149{ "Configure IMAP","Konfiguriere IMAP" },
150{ "Use secure sockets:","Benutze sichere Verbindung:" }, 150{ "Use secure sockets:","Benutze sichere Verbindung:" },
151{ "ssh $SERVER exec","ssh $SERVER exec" }, 151{ "ssh $SERVER exec","ssh $SERVER exec" },
152{ "Prefix","Prefix" }, 152{ "Prefix","Prefix" },
153{ "Local storage folder:","Lokales Verzeichnis:" }, 153{ "Local storage folder:","Lokales Verzeichnis:" },
154{ "Get only messages smaller","Hole nur Nachrichten kleiner" }, 154{ "Get only messages smaller","Hole nur Nachrichten kleiner" },
155{ "kB","kB" }, 155{ "kB","kB" },
156{ "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, 156{ "Leave Messages on Server","Belasse Nachrichten auf dem Server" },
157{ "Configure POP3","Konfiguriere POP3" }, 157{ "Configure POP3","Konfiguriere POP3" },
158{ "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, 158{ "ssh $SERVER exec imapd","ssh $SERVER exec imapd" },
159{ "Configure SMTP","Konfiguriere SMTP" }, 159{ "Configure SMTP","Konfiguriere SMTP" },
160{ "Name of the SMTP Server","Name des SMTP Servers" }, 160{ "Name of the SMTP Server","Name des SMTP Servers" },
161{ "Port of the SMTP Server","Port des SMTP Servers" }, 161{ "Port of the SMTP Server","Port des SMTP Servers" },
162{ "Fetching folder list","Hole Verzeichnis Liste" }, 162{ "Fetching folder list","Hole Verzeichnis Liste" },
163{ "Fetch ","Hole " }, 163{ "Fetch ","Hole " },
164{ "Fetching header list","Hole Titel Liste" }, 164{ "Fetching header list","Hole Titel Liste" },
165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" }, 165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" },
166{ "Read this mail","Lies diese Mail" }, 166{ "Read this mail","Lies diese Mail" },
167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, 167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" },
168{ "Delete this mail","Lösche diese Mail" }, 168{ "Delete this mail","Lösche diese Mail" },
169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, 169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" },
170{ "Delete all selected mails","Lösche alle selektierten Mails" }, 170{ "Delete all selected mails","Lösche alle selektierten Mails" },
171{ "Clear selection","Selektion aufheben" }, 171{ "Clear selection","Selektion aufheben" },
172{ "Reply","Antworten" }, 172{ "Reply","Antworten" },
173{ "Forward","Weiterleiten" }, 173{ "Forward","Weiterleiten" },
174{ "Attachments","Anhang" }, 174{ "Attachments","Anhang" },
175{ "Show Html","Zeige in html" }, 175{ "Show Html","Zeige in html" },
176{ "Description","Beschreibung" }, 176{ "Description","Beschreibung" },
177{ "Filename","Dateiname" }, 177{ "Filename","Dateiname" },
178{ "E-Mail by %1","E-Mail von %1" }, 178{ "E-Mail by %1","E-Mail von %1" },
179{ "Cc","Kopie" }, 179{ "Cc","Kopie" },
180{ "To","An" }, 180{ "To","An" },
181{ "From","Von" }, 181{ "From","Von" },
182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, 182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" },
183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, 183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" },
184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, 184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" },
185{ "Delete all mails","Lösche alle Mails" }, 185{ "Delete all mails","Lösche alle Mails" },
186{ "Create new subfolder","Neues Unterverzeichnis" }, 186{ "Create new subfolder","Neues Unterverzeichnis" },
187{ "Delete folder","Lösche Verzeichnis" }, 187{ "Delete folder","Lösche Verzeichnis" },
188{ "Refresh folder list","Aktualisiere Verzeichnis Liste" }, 188{ "Refresh folder list","Aktualisiere Verzeichnis Liste" },
189{ "Create new folder","Neues Verzeichnis" }, 189{ "Create new folder","Neues Verzeichnis" },
190{ "Disconnect","Disconnect" }, 190{ "Disconnect","Disconnect" },
191{ "Set offline","Gehe offline" }, 191{ "Set offline","Gehe offline" },
192{ "Select target box","Wähle Ziel Box" }, 192{ "Select target box","Wähle Ziel Box" },
193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, 193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" },
194{ "Folder:","Verzeichnis:" }, 194{ "Folder:","Verzeichnis:" },
195{ "Account:","Zugang:" }, 195{ "Account:","Zugang:" },
196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, 196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" },
197{ "Move mail(s)","Verschiebe Mail(s)" }, 197{ "Move mail(s)","Verschiebe Mail(s)" },
198{ "only mails smaller","nur Mails kleiner" }, 198{ "only mails smaller","nur Mails kleiner" },
199{ " kB"," kB" }, 199{ " kB"," kB" },
200{ " message %1 of %2"," Nachricht %1 von %2" }, 200{ " message %1 of %2"," Nachricht %1 von %2" },
201{ "Copying...","Am Kopieren..." }, 201{ "Copying...","Am Kopieren..." },
202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, 202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" },
203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, 203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" },
204{ "Delete All Mails","Lösche alle Mails" }, 204{ "Delete All Mails","Lösche alle Mails" },
205{ "Deleting ...","Am Löschen..." }, 205{ "Deleting ...","Am Löschen..." },
206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, 206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" },
207{ "Compose Message","Verfasse Nachricht" }, 207{ "Compose Message","Verfasse Nachricht" },
208{ "Reply-To","Antwort-An" }, 208{ "Reply-To","Antwort-An" },
209{ "BCC","BCC" }, 209{ "BCC","BCC" },
210{ "Signature","Signatur" }, 210{ "Signature","Signatur" },
211{ "CC","Kopie" }, 211{ "CC","Kopie" },
212{ "Options","Optionen" }, 212{ "Options","Optionen" },
213{ "Delete File","Lösche Datei" }, 213{ "Delete File","Lösche Datei" },
214{ "Add File","Füge Datei hinzu" }, 214{ "Add File","Füge Datei hinzu" },
215{ "Attachment","Anhang" }, 215{ "Attachment","Anhang" },
216{ "send later","sende später" }, 216{ "send later","sende später" },
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
@@ -206,206 +206,222 @@ void OpieMail::slotSendQueued()
206 selsmtp.showMaximized(); 206 selsmtp.showMaximized();
207#endif 207#endif
208 if ( selsmtp.exec() == QDialog::Accepted ) 208 if ( selsmtp.exec() == QDialog::Accepted )
209 { 209 {
210 smtp = selsmtp.selected_smtp(); 210 smtp = selsmtp.selected_smtp();
211 } 211 }
212 } 212 }
213 if (smtp) 213 if (smtp)
214 { 214 {
215 215
216 Global::statusMessage("Sending mails...!"); 216 Global::statusMessage("Sending mails...!");
217 SMTPwrapper * wrap = new SMTPwrapper(smtp); 217 SMTPwrapper * wrap = new SMTPwrapper(smtp);
218 if ( wrap->flushOutbox() ) 218 if ( wrap->flushOutbox() )
219 { 219 {
220 Global::statusMessage("Mails sent!"); 220 Global::statusMessage("Mails sent!");
221 } 221 }
222 delete wrap; 222 delete wrap;
223 } 223 }
224 // pending refresh list view, if outgoing is displayed 224 // pending refresh list view, if outgoing is displayed
225} 225}
226 226
227void OpieMail::slotSearchMails() 227void OpieMail::slotSearchMails()
228{ 228{
229 qDebug("OpieMail::slotSearchMails():not implemented "); 229 qDebug("OpieMail::slotSearchMails():not implemented ");
230} 230}
231 231
232void OpieMail::slotEditSettings() 232void OpieMail::slotEditSettings()
233{ 233{
234 234
235 KOPrefsDialog settingsDialog( this, "koprefs", true ); 235 KOPrefsDialog settingsDialog( this, "koprefs", true );
236#ifndef DESKTOP_VERSION 236#ifndef DESKTOP_VERSION
237 settingsDialog.showMaximized(); 237 settingsDialog.showMaximized();
238#endif 238#endif
239 settingsDialog.exec(); 239 settingsDialog.exec();
240 240
241 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 241 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
242 // KApplication::execDialog(settingsDialog); 242 // KApplication::execDialog(settingsDialog);
243} 243}
244 244
245void OpieMail::slotEditAccounts() 245void OpieMail::slotEditAccounts()
246{ 246{
247 EditAccounts eaDialog( settings, this, 0, true ); 247 EditAccounts eaDialog( settings, this, 0, true );
248 eaDialog.slotAdjustColumns(); 248 eaDialog.slotAdjustColumns();
249#ifndef DESKTOP_VERSION 249#ifndef DESKTOP_VERSION
250 eaDialog.showMaximized(); 250 eaDialog.showMaximized();
251#endif 251#endif
252 eaDialog.exec(); 252 eaDialog.exec();
253 if ( settings ) delete settings; 253 if ( settings ) delete settings;
254 settings = new Settings(); 254 settings = new Settings();
255 255
256 folderView->populate( settings->getAccounts() ); 256 folderView->populate( settings->getAccounts() );
257} 257}
258void OpieMail::replyMail() 258void OpieMail::replyMail()
259{ 259{
260 260
261 QListViewItem*item = mailView->currentItem(); 261 QListViewItem*item = mailView->currentItem();
262 if (!item) return; 262 if (!item) return;
263 RecMailP mail = ((MailListViewItem*)item)->data(); 263 RecMailP mail = ((MailListViewItem*)item)->data();
264 RecBodyP body = folderView->fetchBody(mail); 264 RecBodyP body = folderView->fetchBody(mail);
265 265
266 QString rtext; 266 QString rtext;
267 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose 267 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose
268 .arg( mail->getFrom()) 268 .arg( mail->getFrom())
269 .arg( mail->getDate()); 269 .arg( mail->getDate());
270 270
271 QString text = body->Bodytext(); 271 QString text = body->Bodytext();
272 QStringList lines = QStringList::split(QRegExp("\\n"), text); 272 QStringList lines = QStringList::split(QRegExp("\\n"), text);
273 QStringList::Iterator it; 273 QStringList::Iterator it;
274 for (it = lines.begin(); it != lines.end(); it++) 274 for (it = lines.begin(); it != lines.end(); it++)
275 { 275 {
276 rtext += "> " + *it + "\n"; 276 rtext += "> " + *it + "\n";
277 } 277 }
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}
302void 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}
302void OpieMail::displayMail() 317void 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}
327void OpieMail::slotGetAllMail() 343void 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}
335void OpieMail::slotGetMail() 351void 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 );
340} 356}
341void OpieMail::slotDeleteMail() 357void OpieMail::slotDeleteMail()
342{ 358{
343 if (!mailView->currentItem()) return; 359 if (!mailView->currentItem()) return;
344 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 360 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
345 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 361 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
346 { 362 {
347 mail->Wrapper()->deleteMail( mail ); 363 mail->Wrapper()->deleteMail( mail );
348 folderView->refreshCurrent(); 364 folderView->refreshCurrent();
349 } 365 }
350} 366}
351void OpieMail::slotDeleteAllMail() 367void OpieMail::slotDeleteAllMail()
352{ 368{
353 369
354 QValueList<RecMailP> t; 370 QValueList<RecMailP> t;
355 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 371 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
356 { 372 {
357 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 373 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
358 while ( item ) { 374 while ( item ) {
359 if ( item->isSelected() ) { 375 if ( item->isSelected() ) {
360 t.append( item->data() ); 376 t.append( item->data() );
361 } 377 }
362 item = (MailListViewItem*)item->nextSibling(); 378 item = (MailListViewItem*)item->nextSibling();
363 } 379 }
364 } 380 }
365 else 381 else
366 return; 382 return;
367 if ( t.count() == 0 ) 383 if ( t.count() == 0 )
368 return; 384 return;
369 RecMailP mail = t.first(); 385 RecMailP mail = t.first();
370 mail->Wrapper()->deleteMailList(t); 386 mail->Wrapper()->deleteMailList(t);
371 folderView->refreshCurrent(); 387 folderView->refreshCurrent();
372 388
373 389
374} 390}
375void OpieMail::clearSelection() 391void OpieMail::clearSelection()
376{ 392{
377 mailView->clearSelection(); 393 mailView->clearSelection();
378 394
379} 395}
380 396
381void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 397void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
382{ 398{
383 if (!mailView->currentItem()) return; 399 if (!mailView->currentItem()) return;
384 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 400 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
385 /* just the RIGHT button - or hold on pda */ 401 /* just the RIGHT button - or hold on pda */
386 if (button!=2) {return;} 402 if (button!=2) {return;}
387 if (!item) return; 403 if (!item) return;
388 QPopupMenu *m = new QPopupMenu(0); 404 QPopupMenu *m = new QPopupMenu(0);
389 if (m) 405 if (m)
390 { 406 {
391 if (mailtype==MAILLIB::A_NNTP) { 407 if (mailtype==MAILLIB::A_NNTP) {
392 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); 408 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
393 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); 409 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
394 m->insertSeparator(); 410 m->insertSeparator();
395 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); 411 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
396 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 412 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
397 } else { 413 } else {
398 if (folderView->currentisDraft()) { 414 if (folderView->currentisDraft()) {
399 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); 415 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
400 } 416 }
401 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); 417 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail()));
402 m->insertSeparator(); 418 m->insertSeparator();
403 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); 419 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
404 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); 420 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
405 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); 421 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
406 m->insertSeparator(); 422 m->insertSeparator();
407 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); 423 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
408 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 424 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
409 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 425 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
410 } 426 }
411 m->setFocus(); 427 m->setFocus();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 44ab1ec..30968a7 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -1,56 +1,58 @@
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
11class OpieMail : public MainWindow 12class OpieMail : public MainWindow
12{ 13{
13 Q_OBJECT 14 Q_OBJECT
14 15
15public: 16public:
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
20public slots: 21public 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);
27protected slots: 28protected 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
47private: 49private:
48 QString mPendingEmail; 50 QString mPendingEmail;
49 QString mPendingName; 51 QString mPendingName;
50 QByteArray mPendingData; 52 QByteArray mPendingData;
51 QCString mPendingMessage; 53 QCString mPendingMessage;
52 Settings *settings; 54 Settings *settings;
53 55
54}; 56};
55 57
56#endif 58#endif
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 3bd6f41..60c764c 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -232,193 +232,194 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
232 menu->insertItem( i18n( "Save Attachment" ), 0 ); 232 menu->insertItem( i18n( "Save Attachment" ), 0 );
233 menu->insertSeparator(1); 233 menu->insertSeparator(1);
234 234
235 ret = menu->exec( point, 0 ); 235 ret = menu->exec( point, 0 );
236 236
237 switch(ret) 237 switch(ret)
238 { 238 {
239 case 0: 239 case 0:
240 { 240 {
241 //MimeTypes types; 241 //MimeTypes types;
242 //types.insert( "all", "*" ); 242 //types.insert( "all", "*" );
243 QString str = KFileDialog::getSaveFileName( "/", item->text( 2 ), this ); 243 QString str = KFileDialog::getSaveFileName( "/", item->text( 2 ), this );
244 244
245 if( !str.isEmpty() ) 245 if( !str.isEmpty() )
246 { 246 {
247 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 247 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
248 if (content) 248 if (content)
249 { 249 {
250 QFile output(str); 250 QFile output(str);
251 output.open(IO_WriteOnly); 251 output.open(IO_WriteOnly);
252 output.writeBlock(content->Content(),content->Length()); 252 output.writeBlock(content->Content(),content->Length());
253 output.close(); 253 output.close();
254 delete content; 254 delete content;
255 } 255 }
256 } 256 }
257 } 257 }
258 break ; 258 break ;
259 259
260 case 2: 260 case 2:
261 { 261 {
262#ifdef DESKTOP_VERSION 262#ifdef DESKTOP_VERSION
263 QString tmpfile = locateLocal( "tmp", "opiemail-image"); 263 QString tmpfile = locateLocal( "tmp", "opiemail-image");
264#else 264#else
265 QString tmpfile = "/tmp/opiemail-image"; 265 QString tmpfile = "/tmp/opiemail-image";
266#endif 266#endif
267 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 267 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
268 if (content) { 268 if (content) {
269 QFile output(tmpfile); 269 QFile output(tmpfile);
270 output.open(IO_WriteOnly); 270 output.open(IO_WriteOnly);
271 output.writeBlock(content->Content(),content->Length()); 271 output.writeBlock(content->Content(),content->Length());
272 output.close(); 272 output.close();
273 delete content; 273 delete content;
274 MailImageDlg iview(""); 274 MailImageDlg iview("");
275 iview.setName(tmpfile); 275 iview.setName(tmpfile);
276 KApplication::execDialog(&iview); 276 KApplication::execDialog(&iview);
277 output.remove(); 277 output.remove();
278 } 278 }
279 } 279 }
280 break; 280 break;
281 case 1: 281 case 1:
282 if ( ( ( AttachItem* )item )->Partnumber() == -1 ) 282 if ( ( ( AttachItem* )item )->Partnumber() == -1 )
283 { 283 {
284 setText(); 284 setText();
285 } 285 }
286 else 286 else
287 { 287 {
288 if ( m_recMail->Wrapper() != 0l ) 288 if ( m_recMail->Wrapper() != 0l )
289 { // make sure that there is a wrapper , even after delete or simular actions 289 { // make sure that there is a wrapper , even after delete or simular actions
290 browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) ); 290 browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
291 } 291 }
292 } 292 }
293 break; 293 break;
294 } 294 }
295 delete menu; 295 delete menu;
296} 296}
297 297
298 298
299void ViewMail::setMail(const RecMailP&mail ) 299void ViewMail::setMail(const RecMailP&mail )
300{ 300{
301 301
302 m_recMail = mail; 302 m_recMail = mail;
303 303
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
318ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) 318ViewMail::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
337void ViewMail::readConfig() 338void 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
345void ViewMail::setText() 346void 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
353 toString = m_mail2[0].join(","); 354 toString = m_mail2[0].join(",");
354 ccString = m_mail2[1].join(","); 355 ccString = m_mail2[1].join(",");
355 bccString = m_mail2[2].join(","); 356 bccString = m_mail2[2].join(",");
356 357
357 358
358 setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) ); 359 setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) );
359 360
360 m_mailHtml = "<html><body>" 361 m_mailHtml = "<html><body>"
361 "<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>" 362 "<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>"
362 "<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>" 363 "<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>"
363 "</td></tr><tr bgcolor=\"#EEEEE6\"><td>" 364 "</td></tr><tr bgcolor=\"#EEEEE6\"><td>"
364 "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>" 365 "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>"
365 "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" + 366 "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" +
366 i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>" 367 i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>"
367 "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] + 368 "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] +
368 "</td></tr></table><font>"; 369 "</td></tr></table><font>";
369 370
370 if ( !m_showHtml ) 371 if ( !m_showHtml )
371 { 372 {
372 browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" ); 373 browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" );
373 } 374 }
374 else 375 else
375 { 376 {
376 browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" ); 377 browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" );
377 } 378 }
378 // remove later in favor of a real handling 379 // remove later in favor of a real handling
379 m_gotBody = true; 380 m_gotBody = true;
380} 381}
381 382
382 383
383ViewMail::~ViewMail() 384ViewMail::~ViewMail()
384{ 385{
385 m_recMail->Wrapper()->cleanMimeCache(); 386 m_recMail->Wrapper()->cleanMimeCache();
386 hide(); 387 hide();
387} 388}
388 389
389void ViewMail::hide() 390void ViewMail::hide()
390{ 391{
391 QWidget::hide(); 392 QWidget::hide();
392 393
393 if (_inLoop) 394 if (_inLoop)
394 { 395 {
395 _inLoop = false; 396 _inLoop = false;
396 qApp->exit_loop(); 397 qApp->exit_loop();
397 398
398 } 399 }
399 400
400} 401}
401 402
402void ViewMail::exec() 403void ViewMail::exec()
403{ 404{
404 show(); 405 show();
405 406
406 if (!_inLoop) 407 if (!_inLoop)
407 { 408 {
408 _inLoop = true; 409 _inLoop = true;
409 qApp->enter_loop(); 410 qApp->enter_loop();
410 } 411 }
411 412
412} 413}
413 414
414QString ViewMail::deHtml(const QString &string) 415QString ViewMail::deHtml(const QString &string)
415{ 416{
416 QString string_ = string; 417 QString string_ = string;
417 string_.replace(QRegExp("&"), "&amp;"); 418 string_.replace(QRegExp("&"), "&amp;");
418 string_.replace(QRegExp("<"), "&lt;"); 419 string_.replace(QRegExp("<"), "&lt;");
419 string_.replace(QRegExp(">"), "&gt;"); 420 string_.replace(QRegExp(">"), "&gt;");
420 string_.replace(QRegExp("\\n"), "<br>"); 421 string_.replace(QRegExp("\\n"), "<br>");
421 return string_; 422 return string_;
422} 423}
423 424
424void ViewMail::slotReply() 425void ViewMail::slotReply()
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index 194ac8e..c2c2ce3 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -1,86 +1,88 @@
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 <qdialog.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
16class AttachItem : public QListViewItem 16class AttachItem : public QListViewItem
17{ 17{
18public: 18public:
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
26private: 26private:
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
32class ViewMail : public ViewMailBase 32class ViewMail : public ViewMailBase
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36public: 36public:
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*);
46protected: 47protected:
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
51protected slots: 52protected 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
59private: 61private:
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
75class MailImageDlg:public QDialog 77class MailImageDlg:public QDialog
76{ 78{
77 Q_OBJECT 79 Q_OBJECT
78public: 80public:
79 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); 81 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0);
80 ~MailImageDlg(); 82 ~MailImageDlg();
81 void setName(const QString&); 83 void setName(const QString&);
82protected: 84protected:
83 //Opie::MM::OImageScrollView*m_imageview; 85 //Opie::MM::OImageScrollView*m_imageview;
84}; 86};
85 87
86#endif 88#endif
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3d7ed42..c4731a7 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,93 +1,104 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include <qtextbrowser.h> 2#include <qtextbrowser.h>
3#include <qlistview.h> 3#include <qlistview.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qvbox.h> 6#include <qvbox.h>
7 7
8#include <qtoolbar.h> 8#include <qtoolbar.h>
9#include <qmenubar.h> 9#include <qmenubar.h>
10#include <kiconloader.h> 10#include <kiconloader.h>
11//#include <qpe/resource.h> 11//#include <qpe/resource.h>
12#include <klocale.h> 12#include <klocale.h>
13 13
14#include "viewmailbase.h" 14#include "viewmailbase.h"
15//#include "opendiag.h" 15//#include "opendiag.h"
16 16
17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
18 : QMainWindow(parent, name, fl) 18 : QMainWindow(parent, name, fl)
19{ 19{
20 20
21 setToolBarsMovable(false); 21 setToolBarsMovable(false);
22 22
23 toolbar = new QToolBar(this); 23 toolbar = new QToolBar(this);
24 menubar = new QMenuBar( toolbar ); 24 menubar = new QMenuBar( toolbar );
25 mailmenu = new QPopupMenu( menubar ); 25 mailmenu = new QPopupMenu( menubar );
26 menubar->insertItem( i18n( "Mail" ), mailmenu ); 26 menubar->insertItem( i18n( "Mail" ), mailmenu );
27 27
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}
78 89
79void ViewMailBase::slotChangeAttachview(bool state) 90void ViewMailBase::slotChangeAttachview(bool state)
80{ 91{
81 if (state) attachments->show(); 92 if (state) attachments->show();
82 else attachments->hide(); 93 else attachments->hide();
83} 94}
84 95
85void ViewMailBase::keyPressEvent ( QKeyEvent * e ) 96void ViewMailBase::keyPressEvent ( QKeyEvent * e )
86{ 97{
87 if( e->key()==Qt::Key_Escape ) { 98 if( e->key()==Qt::Key_Escape ) {
88 close(); 99 close();
89 e->accept(); 100 e->accept();
90 return; 101 return;
91 } 102 }
92 QWidget::keyPressEvent(e); 103 QWidget::keyPressEvent(e);
93} 104}
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
7class QAction; 7class QAction;
8class OpenDiag; 8class OpenDiag;
9class QListView; 9class QListView;
10class QToolBar; 10class QToolBar;
11class QTextBrowser; 11class QTextBrowser;
12class QMenuBar; 12class QMenuBar;
13class QPopupMenu; 13class QPopupMenu;
14 14
15class ViewMailBase : public QMainWindow 15class ViewMailBase : public QMainWindow
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
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
22protected: 22protected:
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
31protected slots: 31protected 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