summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt11
-rw-r--r--kmicromail/accountitem.cpp4
-rw-r--r--kmicromail/accountview.cpp15
-rw-r--r--kmicromail/mainwindow.cpp24
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp4
6 files changed, 49 insertions, 10 deletions
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt
index 14e5c0b..f8fd0a8 100644
--- a/bin/kdepim/kopiemail/germantranslation.txt
+++ b/bin/kdepim/kopiemail/germantranslation.txt
@@ -88,195 +88,204 @@
88{ "Userdefined email client","Benutzerdef. Email Klient" }, 88{ "Userdefined email client","Benutzerdef. Email Klient" },
89{ "OM/Pi email client","OM/Pi Email Klient" }, 89{ "OM/Pi email client","OM/Pi Email Klient" },
90{ "Delete","Löschen" }, 90{ "Delete","Löschen" },
91{ "New","Neu" }, 91{ "New","Neu" },
92{ "Edit","Bearbeite" }, 92{ "Edit","Bearbeite" },
93{ "Close","Schließen" }, 93{ "Close","Schließen" },
94{ "Size","Größe" }, 94{ "Size","Größe" },
95{ "Date","Datum" }, 95{ "Date","Datum" },
96{ "Please set at","Bitte einstellen in" }, 96{ "Please set at","Bitte einstellen in" },
97{ "Settings@General TAB","Einstellungen@Allgemein TAB" }, 97{ "Settings@General TAB","Einstellungen@Allgemein TAB" },
98{ "KOpieMail/Pi","KOpieMail/Pi" }, 98{ "KOpieMail/Pi","KOpieMail/Pi" },
99{ "Mail","Mail" }, 99{ "Mail","Mail" },
100{ "Settings","Konfig" }, 100{ "Settings","Konfig" },
101{ "Get all new mails","Hole alle neuen Mails" }, 101{ "Get all new mails","Hole alle neuen Mails" },
102{ "Get new messages","Hole neue mails" }, 102{ "Get new messages","Hole neue mails" },
103{ "Compose new mail","Schreibe neue Mail" }, 103{ "Compose new mail","Schreibe neue Mail" },
104{ "Send queued mails","Sende gespeicherte Mails" }, 104{ "Send queued mails","Sende gespeicherte Mails" },
105{ "Show/Hide folders","Zeige Verzeichnisse" }, 105{ "Show/Hide folders","Zeige Verzeichnisse" },
106{ "Delete Mail","Lösche Mail" }, 106{ "Delete Mail","Lösche Mail" },
107{ "Edit settings","Ändere Einstellungen" }, 107{ "Edit settings","Ändere Einstellungen" },
108{ "Configure accounts","Konfiguriere Zugänge" }, 108{ "Configure accounts","Konfiguriere Zugänge" },
109{ "Mailbox","Mailbox" }, 109{ "Mailbox","Mailbox" },
110{ "Subject","Betreff" }, 110{ "Subject","Betreff" },
111{ "Sender","Sender" }, 111{ "Sender","Sender" },
112{ "Size","Größe" }, 112{ "Size","Größe" },
113{ "Date","Datum" }, 113{ "Date","Datum" },
114{ "Close","Schliessen" }, 114{ "Close","Schliessen" },
115{ "Help","Hilfe" }, 115{ "Help","Hilfe" },
116{ "About","Über" }, 116{ "About","Über" },
117{ "Licence","Lizenz" }, 117{ "Licence","Lizenz" },
118{ "LibEtPan Licence","LibEtPan Lizenz" }, 118{ "LibEtPan Licence","LibEtPan Lizenz" },
119{ "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, 119{ "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" },
120{ "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" }, 120{ "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" },
121{ "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" }, 121{ "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" },
122{ "View mail as html","Zeige Mails als html" }, 122{ "View mail as html","Zeige Mails als html" },
123{ "Send mails later","Sende Mails später" }, 123{ "Send mails later","Sende Mails später" },
124{ "Application(nr)","Applikation(nr)" }, 124{ "Application(nr)","Applikation(nr)" },
125{ "OK","OK" }, 125{ "OK","OK" },
126{ "Compose mail:","Verfasse Mail:" }, 126{ "Compose mail:","Verfasse Mail:" },
127{ "Dear Mr.","Hallo Herr" }, 127{ "Dear Mr.","Hallo Herr" },
128{ "Read mail:","Lese Mail:" }, 128{ "Read mail:","Lese Mail:" },
129{ "Hello","Hallo" }, 129{ "Hello","Hallo" },
130{ "Configure Accounts","Konfigure Zugänge" }, 130{ "Configure Accounts","Konfigure Zugänge" },
131{ "Name of the Account","Name des Zugangs" }, 131{ "Name of the Account","Name des Zugangs" },
132{ "News","News" }, 132{ "News","News" },
133{ "Account","Zugang" }, 133{ "Account","Zugang" },
134{ "Type","Typ" }, 134{ "Type","Typ" },
135{ "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, 135{ "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" },
136{ "Error","Fehler" }, 136{ "Error","Fehler" },
137{ "Configure NNTP","Konfiguriere News" }, 137{ "Configure NNTP","Konfiguriere News" },
138{ "Port","Port" }, 138{ "Port","Port" },
139{ "Server","Server" }, 139{ "Server","Server" },
140{ "Use SSL","Benutze SSL" }, 140{ "Use SSL","Benutze SSL" },
141{ "User","Benutzer" }, 141{ "User","Benutzer" },
142{ "Password","Passwort" }, 142{ "Password","Passwort" },
143{ "Use Login","Benutze Login" }, 143{ "Use Login","Benutze Login" },
144{ "Newsgroup","Newsgroup" }, 144{ "Newsgroup","Newsgroup" },
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 Liste" }, 188{ "Refresh folder list","Aktualisiere Liste" },
189{ "Create new folder","Neues Verzeichnis" }, 189{ "Create new folder","Neues Verzeichnis" },
190{ "Disconnect","Diskonnect" }, 190{ "Disconnect","Diskonnect" },
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{ "Show next mail","Zeige nächste Mail" }, 241{ "Show next mail","Zeige nächste Mail" },
242{ "End of List","Ende der Liste" }, 242{ "End of List","Ende der Liste" },
243{ "Language","Sprache" }, 243{ "Language","Sprache" },
244{ "Time Format","Zeit Format" }, 244{ "Time Format","Zeit Format" },
245{ "%1 groups subscribed","%1 Guppen abboniert" }, 245{ "%1 groups subscribed","%1 Guppen abboniert" },
246{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 246{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
247{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 247{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
248{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 248{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
249{ "Save settings","Speichere Einstellungen" }, 249{ "Save settings","Speichere Einstellungen" },
250{ "Save standard","Speichere Standard" }, 250{ "Save standard","Speichere Standard" },
251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
252{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 252{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
253{ "Data storage path","Daten Speicherpfad" }, 253{ "Data storage path","Daten Speicherpfad" },
254{ "userdefined","benutzerdefiniert" }, 254{ "userdefined","benutzerdefiniert" },
255{ "Reply to this mail","Beantworte diese Mail" }, 255{ "Reply to this mail","Beantworte diese Mail" },
256{ "Su:","Be:" }, 256{ "Su:","Be:" },
257{ "Fr:","Vo:" }, 257{ "Fr:","Vo:" },
258{ "To:","An:" }, 258{ "To:","An:" },
259{ "Download Mail","Mail runterladen" }, 259{ "Download Mail","Mail runterladen" },
260{ "View Source","Zeige Source" }, 260{ "View Source","Zeige Source" },
261{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" }, 261{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" },
262{ "Show info fields at startup","Zeige Info Felder beim Start" }, 262{ "Show info fields at startup","Zeige Info Felder beim Start" },
263{ "Show "Subject" info field","Zeige "Betreff" Info Feld" }, 263{ "Show "Subject" info field","Zeige "Betreff" Info Feld" },
264{ "Show "From" info field","Zeige "Von" Info Feld" }, 264{ "Show "From" info field","Zeige "Von" Info Feld" },
265{ "Show "To" info field","Zeige "An" Info Feld" }, 265{ "Show "To" info field","Zeige "An" Info Feld" },
266{ "Mail saved as draft!","Mail als Entwurf gespeichert!" }, 266{ "Mail saved as draft!","Mail als Entwurf gespeichert!" },
267{ "Save signature","Speichere Signatur" }, 267{ "Save signature","Speichere Signatur" },
268{ "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." }, 268{ "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." },
269{ "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" }, 269{ "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" },
270{ "Sending all mails","Senden aller Mails" }, 270{ "Sending all mails","Senden aller Mails" },
271{ "SMTP Account:","SMTP Zugang:" }, 271{ "SMTP Account:","SMTP Zugang:" },
272{ "Select SMTP Account","Wähle SMTP Zugang" }, 272{ "Select SMTP Account","Wähle SMTP Zugang" },
273{ "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" }, 273{ "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" },
274{ "Error sending mail","Fehler beim Mailversand" }, 274{ "Error sending mail","Fehler beim Mailversand" },
275{ "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." }, 275{ "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." },
276{ "Colors","Farben" }, 276{ "Colors","Farben" },
277{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 277{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
278{ "Configure OM/Pi...","Konfiguriere OM/Pi..." }, 278{ "Configure OM/Pi...","Konfiguriere OM/Pi..." },
279{ "Global Settings...","Globale Einstellungen..." }, 279{ "Global Settings...","Globale Einstellungen..." },
280{ " Local Mailfolders"," Lokale Mailordner" },
281{ "Refreshing %1 ... please wait","Lese %1 neu ein ... bitte warten" },
282{ "Refresh\n%1\n?","%1\nneu einlesen?" },
283{ "Refresh","Neu einlesen" },
284{ "Select all","Selektiere alle" },
285{ "","" },
286{ "","" },
287{ "","" },
288{ "","" },
289{ "","" },
280{ "","" }, 290{ "","" },
281{ "","" }, 291{ "","" },
282{ "","" }, \ No newline at end of file
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index fcb2052..985a762 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -594,387 +594,387 @@ void IMAPviewItem::contextMenuSelected(int id)
594 } 594 }
595 AccountView*bl = accountView(); 595 AccountView*bl = accountView();
596 if (!bl) return; 596 if (!bl) return;
597 AccountViewItem* in = findSubItem( "inbox" , 0); 597 AccountViewItem* in = findSubItem( "inbox" , 0);
598 if ( ! in ) 598 if ( ! in )
599 return; 599 return;
600 bl->downloadMailsInbox(in->getFolder(),getWrapper()); 600 bl->downloadMailsInbox(in->getFolder(),getWrapper());
601 } 601 }
602 break; 602 break;
603 default: 603 default:
604 break; 604 break;
605 } 605 }
606} 606}
607 607
608RECBODYP IMAPviewItem::fetchBody(const RecMailP&) 608RECBODYP IMAPviewItem::fetchBody(const RecMailP&)
609{ 609{
610 return new RecBody(); 610 return new RecBody();
611} 611}
612 612
613bool IMAPviewItem::offline() 613bool IMAPviewItem::offline()
614{ 614{
615 return account->getOffline(); 615 return account->getOffline();
616} 616}
617 617
618IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after ) 618IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after )
619 : AccountViewItem( folderInit, parent , after ) 619 : AccountViewItem( folderInit, parent , after )
620{ 620{
621 imap = parent; 621 imap = parent;
622 if (folder->getDisplayName().lower()!="inbox") 622 if (folder->getDisplayName().lower()!="inbox")
623 { 623 {
624 setPixmap( 0, PIXMAP_IMAPFOLDER ); 624 setPixmap( 0, PIXMAP_IMAPFOLDER );
625 } 625 }
626 else 626 else
627 { 627 {
628 setPixmap( 0, PIXMAP_INBOXFOLDER); 628 setPixmap( 0, PIXMAP_INBOXFOLDER);
629 } 629 }
630 setText( 0, folder->getDisplayName() ); 630 setText( 0, folder->getDisplayName() );
631} 631}
632 632
633IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) 633IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master )
634 : AccountViewItem(folderInit, parent,after ) 634 : AccountViewItem(folderInit, parent,after )
635{ 635{
636 imap = master; 636 imap = master;
637 if (folder->getDisplayName().lower()!="inbox") 637 if (folder->getDisplayName().lower()!="inbox")
638 { 638 {
639 setPixmap( 0, PIXMAP_IMAPFOLDER ); 639 setPixmap( 0, PIXMAP_IMAPFOLDER );
640 } 640 }
641 else 641 else
642 { 642 {
643 setPixmap( 0, PIXMAP_INBOXFOLDER); 643 setPixmap( 0, PIXMAP_INBOXFOLDER);
644 } 644 }
645 setText( 0, folder->getDisplayName() ); 645 setText( 0, folder->getDisplayName() );
646} 646}
647 647
648IMAPfolderItem::~IMAPfolderItem() 648IMAPfolderItem::~IMAPfolderItem()
649{} 649{}
650 650
651const QString& IMAPfolderItem::Delemiter()const 651const QString& IMAPfolderItem::Delemiter()const
652{ 652{
653 return folder->Separator(); 653 return folder->Separator();
654} 654}
655 655
656void IMAPfolderItem::refresh(QValueList<RecMailP>&target) 656void IMAPfolderItem::refresh(QValueList<RecMailP>&target)
657{ 657{
658 if (folder->may_select()) 658 if (folder->may_select())
659 { 659 {
660 imap->getWrapper()->listMessages( folder->getName(),target ); 660 imap->getWrapper()->listMessages( folder->getName(),target );
661 } 661 }
662 else 662 else
663 { 663 {
664 target.clear(); 664 target.clear();
665 } 665 }
666} 666}
667 667
668RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail) 668RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail)
669{ 669{
670 return imap->getWrapper()->fetchBody(aMail); 670 return imap->getWrapper()->fetchBody(aMail);
671} 671}
672 672
673QPopupMenu * IMAPfolderItem::getContextMenu() 673QPopupMenu * IMAPfolderItem::getContextMenu()
674{ 674{
675 QPopupMenu *m = new QPopupMenu(0); 675 QPopupMenu *m = new QPopupMenu(0);
676 if (m) 676 if (m)
677 { 677 {
678 if (folder->may_select()) 678 if (folder->may_select())
679 { 679 {
680 m->insertItem(i18n("Get new messages"),GET_NEW_MAILS); 680 m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
681 m->insertItem(i18n("Refresh header list"),0); 681 m->insertItem(i18n("Refresh header list"),0);
682 m->insertItem(i18n("Move/Copie all mails"),4); 682 m->insertItem(i18n("Move/Copie all mails"),4);
683 m->insertItem(i18n("Delete all mails"),1); 683 m->insertItem(i18n("Delete all mails"),1);
684 } 684 }
685 if (folder->no_inferior()==false) 685 if (folder->no_inferior()==false)
686 { 686 {
687 m->insertItem(i18n("Create new subfolder"),2); 687 m->insertItem(i18n("Create new subfolder"),2);
688 } 688 }
689 if (folder->getDisplayName().lower()!="inbox") 689 if (folder->getDisplayName().lower()!="inbox")
690 { 690 {
691 m->insertItem(i18n("Delete folder"),3); 691 m->insertItem(i18n("Delete folder"),3);
692 } 692 }
693 } 693 }
694 return m; 694 return m;
695} 695}
696 696
697void IMAPfolderItem::createNewFolder() 697void IMAPfolderItem::createNewFolder()
698{ 698{
699 Newmdirdlg ndirdlg; 699 Newmdirdlg ndirdlg;
700 //ndirdlg.showMaximized(); 700 //ndirdlg.showMaximized();
701 if ( ndirdlg.exec() ) 701 if ( ndirdlg.exec() )
702 { 702 {
703 QString ndir = ndirdlg.Newdir(); 703 QString ndir = ndirdlg.Newdir();
704 bool makesubs = ndirdlg.subpossible(); 704 bool makesubs = ndirdlg.subpossible();
705 QString delemiter = Delemiter(); 705 QString delemiter = Delemiter();
706 if (imap->wrapper->createMbox(ndir,folder,delemiter,makesubs)) 706 if (imap->wrapper->createMbox(ndir,folder,delemiter,makesubs))
707 { 707 {
708 imap->refreshFolders(true); 708 imap->refreshFolders(true);
709 } 709 }
710 } 710 }
711} 711}
712 712
713void IMAPfolderItem::deleteFolder() 713void IMAPfolderItem::deleteFolder()
714{ 714{
715 int yesno = QMessageBox::warning(0,i18n("Delete folder"), 715 int yesno = QMessageBox::warning(0,i18n("Delete folder"),
716 i18n("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>").arg(folder->getDisplayName()), 716 i18n("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>").arg(folder->getDisplayName()),
717 i18n("Yes"), 717 i18n("Yes"),
718 i18n("No"),QString::null,1,1); 718 i18n("No"),QString::null,1,1);
719 719
720 if (yesno == 0) 720 if (yesno == 0)
721 { 721 {
722 if (imap->getWrapper()->deleteMbox(folder)) 722 if (imap->getWrapper()->deleteMbox(folder))
723 { 723 {
724 QListView*v=listView(); 724 QListView*v=listView();
725 IMAPviewItem * box = imap; 725 IMAPviewItem * box = imap;
726 /* be carefull - after that this object is destroyd so don't use 726 /* be carefull - after that this object is destroyd so don't use
727 * any member of it after that call!!*/ 727 * any member of it after that call!!*/
728 imap->refreshFolders(true); 728 imap->refreshFolders(true);
729 if (v) 729 if (v)
730 { 730 {
731 v->setSelected(box,true); 731 v->setSelected(box,true);
732 } 732 }
733 } 733 }
734 } 734 }
735} 735}
736 736
737void IMAPfolderItem::downloadMails() 737void IMAPfolderItem::downloadMails()
738{ 738{
739 AccountView*bl = imap->accountView(); 739 AccountView*bl = imap->accountView();
740 if (!bl) return; 740 if (!bl) return;
741 bl->downloadMails(folder,imap->getWrapper()); 741 bl->downloadMails(folder,imap->getWrapper());
742} 742}
743 743
744void IMAPfolderItem::contextMenuSelected(int id) 744void IMAPfolderItem::contextMenuSelected(int id)
745{ 745{
746 746
747 AccountView * view = (AccountView*)listView(); 747 AccountView * view = (AccountView*)listView();
748 switch(id) 748 switch(id)
749 { 749 {
750 case 0: 750 case 0:
751 view->refreshCurrent(); 751 view->refreshCurrent();
752 break; 752 break;
753 case 1: 753 case 1:
754 deleteAllMail(imap->getWrapper(),folder); 754 deleteAllMail(imap->getWrapper(),folder);
755 break; 755 break;
756 case 2: 756 case 2:
757 createNewFolder(); 757 createNewFolder();
758 break; 758 break;
759 case 3: 759 case 3:
760 deleteFolder(); 760 deleteFolder();
761 break; 761 break;
762 case 4: 762 case 4:
763 downloadMails(); 763 downloadMails();
764 break; 764 break;
765 case GET_NEW_MAILS: // daunlood 765 case GET_NEW_MAILS: // daunlood
766 { 766 {
767 if (!view) return; 767 if (!view) return;
768 view->downloadMailsInbox(getFolder(),imap->getWrapper()); 768 view->downloadMailsInbox(getFolder(),imap->getWrapper());
769 } 769 }
770 break; 770 break;
771 default: 771 default:
772 break; 772 break;
773 } 773 }
774} 774}
775 775
776/** 776/**
777 * MH Account stuff 777 * MH Account stuff
778 */ 778 */
779/* MH is a little bit different - the top folder can contains messages other than in IMAP and 779/* MH is a little bit different - the top folder can contains messages other than in IMAP and
780 POP3 and MBOX */ 780 POP3 and MBOX */
781MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) 781MHviewItem::MHviewItem( const QString&aPath, AccountView *parent )
782 : AccountViewItem( parent ) 782 : AccountViewItem( parent )
783{ 783{
784 m_Path = aPath; 784 m_Path = aPath;
785 /* be carefull - the space within settext is wanted - thats why the string twice */ 785 /* be carefull - the space within settext is wanted - thats why the string twice */
786 wrapper = AbstractMail::getWrapper( m_Path,"Local Folders"); 786 wrapper = AbstractMail::getWrapper( m_Path,"Local Mailfolders");
787 setPixmap( 0, PIXMAP_LOCALFOLDER ); 787 setPixmap( 0, PIXMAP_LOCALFOLDER );
788 setText( 0, " Local Folders" ); 788 setText( 0, i18n(" Local Mailfolders") );
789 setOpen( true ); 789 setOpen( true );
790 folder = 0; 790 folder = 0;
791} 791}
792 792
793MHviewItem::~MHviewItem() 793MHviewItem::~MHviewItem()
794{ 794{
795 delete wrapper; 795 delete wrapper;
796} 796}
797 797
798AbstractMail *MHviewItem::getWrapper() 798AbstractMail *MHviewItem::getWrapper()
799{ 799{
800 return wrapper; 800 return wrapper;
801} 801}
802 802
803void MHviewItem::refresh( QValueList<RecMailP> & target) 803void MHviewItem::refresh( QValueList<RecMailP> & target)
804{ 804{
805 refresh(false); 805 refresh(false);
806 getWrapper()->listMessages( "",target ); 806 getWrapper()->listMessages( "",target );
807} 807}
808 808
809void MHviewItem::refresh(bool force) 809void MHviewItem::refresh(bool force)
810{ 810{
811 if (childCount()>0 && force==false) return; 811 if (childCount()>0 && force==false) return;
812 removeChilds(); 812 removeChilds();
813 currentFolders.clear(); 813 currentFolders.clear();
814 QValueList<FolderP> *folders = wrapper->listFolders(); 814 QValueList<FolderP> *folders = wrapper->listFolders();
815 QValueList<FolderP>::ConstIterator it; 815 QValueList<FolderP>::ConstIterator it;
816 MHfolderItem*item = 0; 816 MHfolderItem*item = 0;
817 MHfolderItem*pmaster = 0; 817 MHfolderItem*pmaster = 0;
818 QString fname = ""; 818 QString fname = "";
819 int pos; 819 int pos;
820 for ( it = folders->begin(); it!=folders->end(); ++it) 820 for ( it = folders->begin(); it!=folders->end(); ++it)
821 { 821 {
822 fname = (*it)->getDisplayName(); 822 fname = (*it)->getDisplayName();
823 /* this folder itself */ 823 /* this folder itself */
824 if (fname=="/") 824 if (fname=="/")
825 { 825 {
826 currentFolders.append(fname); 826 currentFolders.append(fname);
827 folder = (*it); 827 folder = (*it);
828 continue; 828 continue;
829 } 829 }
830 currentFolders.append(fname); 830 currentFolders.append(fname);
831 pos = fname.findRev("/"); 831 pos = fname.findRev("/");
832 if (pos > 0) 832 if (pos > 0)
833 { 833 {
834 fname = fname.left(pos); 834 fname = fname.left(pos);
835 pmaster = (MHfolderItem*)findSubItem(fname); 835 pmaster = (MHfolderItem*)findSubItem(fname);
836 } 836 }
837 else 837 else
838 { 838 {
839 pmaster = 0; 839 pmaster = 0;
840 } 840 }
841 if (pmaster) 841 if (pmaster)
842 { 842 {
843 item = new MHfolderItem( (*it), pmaster, item, this ); 843 item = new MHfolderItem( (*it), pmaster, item, this );
844 } 844 }
845 else 845 else
846 { 846 {
847 item = new MHfolderItem( (*it), this , item ); 847 item = new MHfolderItem( (*it), this , item );
848 } 848 }
849 item->setSelectable((*it)->may_select()); 849 item->setSelectable((*it)->may_select());
850 } 850 }
851 delete folders; 851 delete folders;
852} 852}
853 853
854RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) 854RECBODYP MHviewItem::fetchBody( const RecMailP &mail )
855{ 855{
856 856
857 return wrapper->fetchBody( mail ); 857 return wrapper->fetchBody( mail );
858} 858}
859 859
860QPopupMenu * MHviewItem::getContextMenu() 860QPopupMenu * MHviewItem::getContextMenu()
861{ 861{
862 QPopupMenu *m = new QPopupMenu(0); 862 QPopupMenu *m = new QPopupMenu(0);
863 if (m) 863 if (m)
864 { 864 {
865 m->insertItem(i18n("Refresh folder list"),0); 865 m->insertItem(i18n("Refresh folder list"),0);
866 m->insertItem(i18n("Create new folder"),1); 866 m->insertItem(i18n("Create new folder"),1);
867 m->insertItem(i18n("Delete all mails"),2); 867 m->insertItem(i18n("Delete all mails"),2);
868 m->insertItem(i18n("Move/Copie all mails"),3); 868 m->insertItem(i18n("Move/Copie all mails"),3);
869 } 869 }
870 return m; 870 return m;
871} 871}
872 872
873void MHviewItem::createFolder() 873void MHviewItem::createFolder()
874{ 874{
875 Newmdirdlg ndirdlg(0,0,true); 875 Newmdirdlg ndirdlg(0,0,true);
876 //ndirdlg.showMaximized(); 876 //ndirdlg.showMaximized();
877 if ( ndirdlg.exec() ) 877 if ( ndirdlg.exec() )
878 { 878 {
879 QString ndir = ndirdlg.Newdir(); 879 QString ndir = ndirdlg.Newdir();
880 if (wrapper->createMbox(ndir)) 880 if (wrapper->createMbox(ndir))
881 { 881 {
882 refresh(true); 882 refresh(true);
883 } 883 }
884 } 884 }
885} 885}
886 886
887void MHviewItem::downloadMails() 887void MHviewItem::downloadMails()
888{ 888{
889 AccountView*bl = accountView(); 889 AccountView*bl = accountView();
890 if (!bl) return; 890 if (!bl) return;
891 bl->downloadMails(folder,getWrapper()); 891 bl->downloadMails(folder,getWrapper());
892} 892}
893 893
894QStringList MHviewItem::subFolders() 894QStringList MHviewItem::subFolders()
895{ 895{
896 return currentFolders; 896 return currentFolders;
897} 897}
898 898
899void MHviewItem::contextMenuSelected(int which) 899void MHviewItem::contextMenuSelected(int which)
900{ 900{
901 switch (which) 901 switch (which)
902 { 902 {
903 case 0: 903 case 0:
904 refresh(true); 904 refresh(true);
905 break; 905 break;
906 case 1: 906 case 1:
907 createFolder(); 907 createFolder();
908 break; 908 break;
909 case 2: 909 case 2:
910 deleteAllMail(getWrapper(),folder); 910 deleteAllMail(getWrapper(),folder);
911 break; 911 break;
912 case 3: 912 case 3:
913 downloadMails(); 913 downloadMails();
914 break; 914 break;
915 default: 915 default:
916 break; 916 break;
917 } 917 }
918} 918}
919 919
920MHfolderItem::~MHfolderItem() 920MHfolderItem::~MHfolderItem()
921{} 921{}
922 922
923MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) 923MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after )
924 : AccountViewItem(folderInit, parent,after ) 924 : AccountViewItem(folderInit, parent,after )
925{ 925{
926 mbox = parent; 926 mbox = parent;
927 initName(); 927 initName();
928} 928}
929 929
930MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) 930MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master)
931 : AccountViewItem(folderInit, parent,after ) 931 : AccountViewItem(folderInit, parent,after )
932{ 932{
933 folder = folderInit; 933 folder = folderInit;
934 mbox = master; 934 mbox = master;
935 initName(); 935 initName();
936} 936}
937 937
938void MHfolderItem::initName() 938void MHfolderItem::initName()
939{ 939{
940 QString bName = folder->getDisplayName(); 940 QString bName = folder->getDisplayName();
941 if (bName.startsWith("/")&&bName.length()>1) 941 if (bName.startsWith("/")&&bName.length()>1)
942 { 942 {
943 bName.replace(0,1,""); 943 bName.replace(0,1,"");
944 } 944 }
945 int pos = bName.findRev("/"); 945 int pos = bName.findRev("/");
946 if (pos > 0) 946 if (pos > 0)
947 { 947 {
948 bName.replace(0,pos+1,""); 948 bName.replace(0,pos+1,"");
949 } 949 }
950 if (bName.lower() == "outgoing") 950 if (bName.lower() == "outgoing")
951 { 951 {
952 setPixmap( 0, PIXMAP_OUTBOXFOLDER ); 952 setPixmap( 0, PIXMAP_OUTBOXFOLDER );
953 } 953 }
954 else if (bName.lower() == "inbox") 954 else if (bName.lower() == "inbox")
955 { 955 {
956 setPixmap( 0, PIXMAP_INBOXFOLDER); 956 setPixmap( 0, PIXMAP_INBOXFOLDER);
957 } else if (bName.lower() == "drafts") { 957 } else if (bName.lower() == "drafts") {
958 setPixmap(0, SmallIcon ("edit")); 958 setPixmap(0, SmallIcon ("edit"));
959 } else { 959 } else {
960 setPixmap( 0, PIXMAP_MBOXFOLDER ); 960 setPixmap( 0, PIXMAP_MBOXFOLDER );
961 } 961 }
962 setText( 0, bName ); 962 setText( 0, bName );
963} 963}
964 964
965const FolderP&MHfolderItem::getFolder()const 965const FolderP&MHfolderItem::getFolder()const
966{ 966{
967 return folder; 967 return folder;
968} 968}
969 969
970void MHfolderItem::refresh(QValueList<RecMailP>&target) 970void MHfolderItem::refresh(QValueList<RecMailP>&target)
971{ 971{
972 if (folder->may_select()) 972 if (folder->may_select())
973 mbox->getWrapper()->listMessages( folder->getName(),target ); 973 mbox->getWrapper()->listMessages( folder->getName(),target );
974} 974}
975 975
976RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail) 976RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail)
977{ 977{
978 return mbox->getWrapper()->fetchBody(aMail); 978 return mbox->getWrapper()->fetchBody(aMail);
979} 979}
980 980
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index cef55ab..4879d57 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -1,252 +1,263 @@
1 1
2#include "accountview.h" 2#include "accountview.h"
3#include "accountitem.h" 3#include "accountitem.h"
4#include "selectstore.h" 4#include "selectstore.h"
5 5
6#include <libmailwrapper/settings.h> 6#include <libmailwrapper/settings.h>
7#include <libmailwrapper/mailwrapper.h> 7#include <libmailwrapper/mailwrapper.h>
8#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
9#include <libmailwrapper/abstractmail.h> 9#include <libmailwrapper/abstractmail.h>
10 10
11/* OPIE */ 11/* OPIE */
12#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13 13
14/* QT */ 14/* QT */
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qpopupmenu.h> 16#include <qpopupmenu.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qtimer.h> 18#include <qtimer.h>
19#include <qspinbox.h> 19#include <qspinbox.h>
20#include <klocale.h> 20#include <klocale.h>
21#include <kmessagebox.h> 21#include <kmessagebox.h>
22 22
23using namespace Opie::Core; 23using namespace Opie::Core;
24AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) 24AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
25 : QListView( parent, name, flags ) 25 : QListView( parent, name, flags )
26{ 26{
27 //connect( this, SIGNAL( selectionChanged(QListViewItem*) ), 27 //connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
28 // SLOT( refresh(QListViewItem*) ) ); 28 // SLOT( refresh(QListViewItem*) ) );
29 connect( this, SIGNAL( clicked(QListViewItem*) ), 29 connect( this, SIGNAL( clicked(QListViewItem*) ),
30 SLOT( refresh(QListViewItem*) ) ); 30 SLOT( refresh(QListViewItem*) ) );
31 connect( this, SIGNAL( returnPressed(QListViewItem*) ), 31 connect( this, SIGNAL( returnPressed(QListViewItem*) ),
32 SLOT( refresh(QListViewItem*) ) ); 32 SLOT( refresh(QListViewItem*) ) );
33 connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 33 connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
34 SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); 34 SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) );
35 setSorting(0); 35 setSorting(0);
36} 36}
37 37
38AccountView::~AccountView() 38AccountView::~AccountView()
39{ 39{
40 imapAccounts.clear(); 40 imapAccounts.clear();
41 mhAccounts.clear(); 41 mhAccounts.clear();
42} 42}
43 43
44void AccountView::slotContextMenu(int id) 44void AccountView::slotContextMenu(int id)
45{ 45{
46 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); 46 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem());
47 if (!view) return; 47 if (!view) return;
48 view->contextMenuSelected(id); 48 view->contextMenuSelected(id);
49} 49}
50 50
51void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) 51void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
52{ 52{
53 if (button==1) {return;} 53 if (button==1) {return;}
54 if (!item) return; 54 if (!item) return;
55 AccountViewItem *view = static_cast<AccountViewItem *>(item); 55 AccountViewItem *view = static_cast<AccountViewItem *>(item);
56 QPopupMenu*m = view->getContextMenu(); 56 QPopupMenu*m = view->getContextMenu();
57 if (!m) return; 57 if (!m) return;
58 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); 58 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
59 m->setFocus(); 59 m->setFocus();
60 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 60 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
61 delete m; 61 delete m;
62} 62}
63 63
64void AccountView::populate( QList<Account> list ) 64void AccountView::populate( QList<Account> list )
65{ 65{
66 clear(); 66 clear();
67 67
68 imapAccounts.clear(); 68 imapAccounts.clear();
69 mhAccounts.clear(); 69 mhAccounts.clear();
70 70
71 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); 71 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this));
72 72
73 Account *it; 73 Account *it;
74 for ( it = list.first(); it; it = list.next() ) 74 for ( it = list.first(); it; it = list.next() )
75 { 75 {
76 if ( it->getType() == MAILLIB::A_IMAP ) 76 if ( it->getType() == MAILLIB::A_IMAP )
77 { 77 {
78 IMAPaccount *imap = static_cast<IMAPaccount *>(it); 78 IMAPaccount *imap = static_cast<IMAPaccount *>(it);
79 imapAccounts.append(new IMAPviewItem( imap, this )); 79 imapAccounts.append(new IMAPviewItem( imap, this ));
80 } 80 }
81 else if ( it->getType() == MAILLIB::A_POP3 ) 81 else if ( it->getType() == MAILLIB::A_POP3 )
82 { 82 {
83 POP3account *pop3 = static_cast<POP3account *>(it); 83 POP3account *pop3 = static_cast<POP3account *>(it);
84 /* must not be hold 'cause it isn't required */ 84 /* must not be hold 'cause it isn't required */
85 (void) new POP3viewItem( pop3, this ); 85 (void) new POP3viewItem( pop3, this );
86 } 86 }
87 else if ( it->getType() == MAILLIB::A_NNTP ) 87 else if ( it->getType() == MAILLIB::A_NNTP )
88 { 88 {
89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it); 89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
90 /* must not be hold 'cause it isn't required */ 90 /* must not be hold 'cause it isn't required */
91 (void) new NNTPviewItem( nntp, this ); 91 (void) new NNTPviewItem( nntp, this );
92 } 92 }
93 } 93 }
94} 94}
95 95
96void AccountView::refresh(QListViewItem *item) 96void AccountView::refresh(QListViewItem *item)
97{ 97{
98 if ( item ) 98 if ( item )
99 { 99 {
100 int result = KMessageBox::warningContinueCancel(this, 100 bool ask = true;
101 qDebug("text -%s- ",item->text( 0 ).latin1() );
102 if ( item->text( 0 ) == i18n (" Local Mailfolders") )
103 ask = false;
104 else {
105 if ( item->parent() )
106 if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") )
107 ask = false;
108 }
109 if ( ask ) {
110 int result = KMessageBox::warningContinueCancel(this,
101 i18n("Refresh\n%1\n?").arg( item->text(0) ), 111 i18n("Refresh\n%1\n?").arg( item->text(0) ),
102 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), 112 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"),
103 true); 113 true);
104 if (result != KMessageBox::Continue) return; 114 if (result != KMessageBox::Continue) return;
115 }
105 m_currentItem = item; 116 m_currentItem = item;
106 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; 117 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ;
107 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); 118 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) );
108 119
109 } 120 }
110} 121}
111void AccountView::refreshOutgoing() 122void AccountView::refreshOutgoing()
112{ 123{
113 m_currentItem = currentItem(); 124 m_currentItem = currentItem();
114 if ( !m_currentItem ) return; 125 if ( !m_currentItem ) return;
115 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); 126 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
116 if ( !view->getFolder() ) 127 if ( !view->getFolder() )
117 return; 128 return;
118 QString bName = view->getFolder()->getDisplayName(); 129 QString bName = view->getFolder()->getDisplayName();
119 if (bName.startsWith("/")&&bName.length()>1) 130 if (bName.startsWith("/")&&bName.length()>1)
120 { 131 {
121 bName.replace(0,1,""); 132 bName.replace(0,1,"");
122 } 133 }
123 int pos = bName.findRev("/"); 134 int pos = bName.findRev("/");
124 if (pos > 0) 135 if (pos > 0)
125 { 136 {
126 bName.replace(0,pos+1,""); 137 bName.replace(0,pos+1,"");
127 } 138 }
128 //qDebug("name *%s* ",bName.lower().latin1() ); 139 //qDebug("name *%s* ",bName.lower().latin1() );
129 if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { 140 if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) {
130 refreshCurrent(); 141 refreshCurrent();
131 // qDebug("refresh "); 142 // qDebug("refresh ");
132 } 143 }
133} 144}
134void AccountView::refreshCurrentSelected() 145void AccountView::refreshCurrentSelected()
135{ 146{
136 if ( !m_currentItem ) return; 147 if ( !m_currentItem ) return;
137 QValueList<RecMailP> headerlist; 148 QValueList<RecMailP> headerlist;
138 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); 149 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
139 view->refresh(headerlist); 150 view->refresh(headerlist);
140 emit refreshMailview(headerlist); 151 emit refreshMailview(headerlist);
141 topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ; 152 topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ;
142} 153}
143 154
144void AccountView::refreshCurrent() 155void AccountView::refreshCurrent()
145{ 156{
146 m_currentItem = currentItem(); 157 m_currentItem = currentItem();
147 if ( !m_currentItem ) return; 158 if ( !m_currentItem ) return;
148 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; 159 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ;
149 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); 160 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) );
150} 161}
151 162
152void AccountView::refreshAll() 163void AccountView::refreshAll()
153{ 164{
154} 165}
155 166
156RecBodyP AccountView::fetchBody(const RecMailP&aMail) 167RecBodyP AccountView::fetchBody(const RecMailP&aMail)
157{ 168{
158 QListViewItem*item = selectedItem (); 169 QListViewItem*item = selectedItem ();
159 if (!item) return new RecBody(); 170 if (!item) return new RecBody();
160 AccountViewItem *view = static_cast<AccountViewItem *>(item); 171 AccountViewItem *view = static_cast<AccountViewItem *>(item);
161 return view->fetchBody(aMail); 172 return view->fetchBody(aMail);
162} 173}
163 174
164void AccountView::setupFolderselect(Selectstore*sels) 175void AccountView::setupFolderselect(Selectstore*sels)
165{ 176{
166 177
167#ifndef DESKTOP_VERSION 178#ifndef DESKTOP_VERSION
168 sels->showMaximized(); 179 sels->showMaximized();
169#else 180#else
170 sels->show(); 181 sels->show();
171#endif 182#endif
172 QStringList sFolders; 183 QStringList sFolders;
173 unsigned int i = 0; 184 unsigned int i = 0;
174 for (i=0; i < mhAccounts.count();++i) 185 for (i=0; i < mhAccounts.count();++i)
175 { 186 {
176 mhAccounts[i]->refresh(false); 187 mhAccounts[i]->refresh(false);
177 sFolders = mhAccounts[i]->subFolders(); 188 sFolders = mhAccounts[i]->subFolders();
178 sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders); 189 sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders);
179 } 190 }
180 for (i=0; i < imapAccounts.count();++i) 191 for (i=0; i < imapAccounts.count();++i)
181 { 192 {
182 if (imapAccounts[i]->offline()) 193 if (imapAccounts[i]->offline())
183 continue; 194 continue;
184 imapAccounts[i]->refreshFolders(false); 195 imapAccounts[i]->refreshFolders(false);
185 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); 196 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders());
186 } 197 }
187} 198}
188void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper) 199void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper)
189{ 200{
190#if 0 201#if 0
191 AbstractMail*targetMail = 0; 202 AbstractMail*targetMail = 0;
192 QString targetFolder = ""; 203 QString targetFolder = "";
193 Selectstore sels; 204 Selectstore sels;
194 setupFolderselect(&sels); 205 setupFolderselect(&sels);
195 if (!sels.exec()) return; 206 if (!sels.exec()) return;
196 targetMail = sels.currentMail(); 207 targetMail = sels.currentMail();
197 targetFolder = sels.currentFolder(); 208 targetFolder = sels.currentFolder();
198 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || 209 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
199 targetFolder.isEmpty()) 210 targetFolder.isEmpty())
200 { 211 {
201 return; 212 return;
202 } 213 }
203 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 214 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
204 { 215 {
205 QMessageBox::critical(0,i18n("Error creating new Folder"), 216 QMessageBox::critical(0,i18n("Error creating new Folder"),
206 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 217 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
207 return; 218 return;
208 } 219 }
209 int maxsize = 0; 220 int maxsize = 0;
210 if ( sels.useSize->isChecked()) 221 if ( sels.useSize->isChecked())
211 maxsize = sels.sizeSpinBox->value(); 222 maxsize = sels.sizeSpinBox->value();
212 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); 223 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize);
213#endif 224#endif
214 fromWrapper->downloadNewMails( fromFolder, mhAccounts[0]->getWrapper()); 225 fromWrapper->downloadNewMails( fromFolder, mhAccounts[0]->getWrapper());
215 refreshCurrent(); 226 refreshCurrent();
216 227
217} 228}
218 229
219void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) 230void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper)
220{ 231{
221 AbstractMail*targetMail = 0; 232 AbstractMail*targetMail = 0;
222 QString targetFolder = ""; 233 QString targetFolder = "";
223 Selectstore sels; 234 Selectstore sels;
224 setupFolderselect(&sels); 235 setupFolderselect(&sels);
225 if (!sels.exec()) return; 236 if (!sels.exec()) return;
226 targetMail = sels.currentMail(); 237 targetMail = sels.currentMail();
227 targetFolder = sels.currentFolder(); 238 targetFolder = sels.currentFolder();
228 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || 239 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
229 targetFolder.isEmpty()) 240 targetFolder.isEmpty())
230 { 241 {
231 return; 242 return;
232 } 243 }
233 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 244 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
234 { 245 {
235 QMessageBox::critical(0,i18n("Error creating new Folder"), 246 QMessageBox::critical(0,i18n("Error creating new Folder"),
236 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 247 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
237 return; 248 return;
238 } 249 }
239 int maxsize = 0; 250 int maxsize = 0;
240 if ( sels.useSize->isChecked()) 251 if ( sels.useSize->isChecked())
241 maxsize = sels.sizeSpinBox->value(); 252 maxsize = sels.sizeSpinBox->value();
242 253
243 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); 254 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize);
244 refreshCurrent(); 255 refreshCurrent();
245} 256}
246 257
247bool AccountView::currentisDraft() 258bool AccountView::currentisDraft()
248{ 259{
249 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); 260 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem());
250 if (!view) return false; 261 if (!view) return false;
251 return view->isDraftfolder(); 262 return view->isDraftfolder();
252} 263}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 82a915e..3dde3cd 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -176,258 +176,272 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
176 mailView->addColumn( i18n( "To" ),QListView::Manual); 176 mailView->addColumn( i18n( "To" ),QListView::Manual);
177 mailView->setAllColumnsShowFocus(true); 177 mailView->setAllColumnsShowFocus(true);
178 //mailView->setSorting(-1); 178 //mailView->setSorting(-1);
179 mailView->setRootIsDecorated( false ); 179 mailView->setRootIsDecorated( false );
180 statusWidget = new StatusWidget( wrapperBox ); 180 statusWidget = new StatusWidget( wrapperBox );
181 statusWidget->hide(); 181 statusWidget->hide();
182 mailView->setSelectionMode( QListView::Multi ); 182 mailView->setSelectionMode( QListView::Multi );
183 mailView->setMultiSelection( true); 183 mailView->setMultiSelection( true);
184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor ); 184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
185 //layout->addWidget( mailView ); 185 //layout->addWidget( mailView );
186 //layout->setStretchFactor( folderView, 1 ); 186 //layout->setStretchFactor( folderView, 1 );
187 //layout->setStretchFactor( mailView, 2 ); 187 //layout->setStretchFactor( mailView, 2 );
188 188
189 slotAdjustLayout(); 189 slotAdjustLayout();
190#ifndef DESKTOP_VERSION 190#ifndef DESKTOP_VERSION
191 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 191 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
192 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 192 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
193 if ( subLE ) 193 if ( subLE )
194 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 194 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
195 if ( fromLE ) 195 if ( fromLE )
196 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 196 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
197 if ( toLE ) 197 if ( toLE )
198 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 198 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
199#endif 199#endif
200 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 200 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
201 SLOT( mailLeftClicked(QListViewItem*) ) ); 201 SLOT( mailLeftClicked(QListViewItem*) ) );
202 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 202 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
203 SLOT( mailLeftClicked(QListViewItem*) ) ); 203 SLOT( mailLeftClicked(QListViewItem*) ) );
204 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 204 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
205 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 205 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
206 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 206 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
207 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 207 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
208 208
209 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 209 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
210 SLOT( setInfoFields(QListViewItem*) ) ); 210 SLOT( setInfoFields(QListViewItem*) ) );
211 211
212 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 212 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
213 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 213 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
214// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 214// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
216 //mailView->setMultiSelection ( true ); 216 //mailView->setMultiSelection ( true );
217 //mailView->setSelectionMode( QListView::Extended ); 217 //mailView->setSelectionMode( QListView::Extended );
218 QValueList<int> list; 218 QValueList<int> list;
219 int fw = 100; 219 int fw = 100;
220 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
221 fw = 50; 221 fw = 50;
222 list.append( fw ); 222 list.append( fw );
223 list.append( 100 ); 223 list.append( 100 );
224 split->setSizes( list ); 224 split->setSizes( list );
225 QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) ); 225 QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) );
226 mailView->setShowSortIndicator ( true ); 226 mailView->setShowSortIndicator ( true );
227 QLabel *spacer = new QLabel( toolBar ); 227 QLabel *spacer = new QLabel( toolBar );
228 spacer->setBackgroundMode( QWidget::PaletteButton ); 228 spacer->setBackgroundMode( QWidget::PaletteButton );
229 toolBar->setStretchableWidget( spacer ); 229 toolBar->setStretchableWidget( spacer );
230 230
231 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 231 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
232 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 232 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
233 if ( QApplication::desktop()->width() > 320 ) 233 if ( QApplication::desktop()->width() > 320 )
234 closeMail->addTo(toolBar); 234 closeMail->addTo(toolBar);
235 closeMail->addTo(mailMenu); 235 closeMail->addTo(mailMenu);
236 236
237 237
238 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 238 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
239 menuBar->insertItem( i18n( "Help" ), helpMenu ); 239 menuBar->insertItem( i18n( "Help" ), helpMenu );
240 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 240 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
241 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 241 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
242 li->addTo(helpMenu); 242 li->addTo(helpMenu);
243 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 243 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
244 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 244 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
245 li->addTo(helpMenu); 245 li->addTo(helpMenu);
246 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 246 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
247 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 247 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
248 li->addTo(helpMenu); 248 li->addTo(helpMenu);
249 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 249 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
250 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 250 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
251 menuBar->setMaximumWidth( menuBar->sizeHint().width()); 251 menuBar->setMaximumWidth( menuBar->sizeHint().width());
252 //menuBar->setMaximumSize( menuBar->sizeHint()); 252 //menuBar->setMaximumSize( menuBar->sizeHint());
253#ifdef DESKTOP_VERSION 253#ifdef DESKTOP_VERSION
254 resize ( 640, 480 ); 254 resize ( 640, 480 );
255#endif 255#endif
256} 256}
257 257
258MainWindow::~MainWindow() 258MainWindow::~MainWindow()
259{ 259{
260} 260}
261 261
262void MainWindow::setInfoFields(QListViewItem* item ) 262void MainWindow::setInfoFields(QListViewItem* item )
263{ 263{
264 if ( item == 0) { 264 if ( item == 0) {
265 if ( subLE ) subLE->setText(""); 265 if ( subLE ) subLE->setText("");
266 if ( fromLE ) fromLE->setText(""); 266 if ( fromLE ) fromLE->setText("");
267 if ( toLE ) toLE->setText(""); 267 if ( toLE ) toLE->setText("");
268 return; 268 return;
269 } 269 }
270 RecMailP mail = ((MailListViewItem*)item)->data(); 270 RecMailP mail = ((MailListViewItem*)item)->data();
271 if ( subLE ) subLE->setText(mail->getSubject()); 271 if ( subLE ) subLE->setText(mail->getSubject());
272 if ( fromLE ) fromLE->setText(mail->getFrom()); 272 if ( fromLE ) fromLE->setText(mail->getFrom());
273 if ( toLE ) toLE->setText(mail->To().join(";" )); 273 if ( toLE ) toLE->setText(mail->To().join(";" ));
274 if ( subLE ) subLE->setCursorPosition(0); 274 if ( subLE ) subLE->setCursorPosition(0);
275 if ( fromLE ) fromLE->setCursorPosition(0); 275 if ( fromLE ) fromLE->setCursorPosition(0);
276 if ( toLE ) toLE->setCursorPosition(0); 276 if ( toLE ) toLE->setCursorPosition(0);
277 277
278} 278}
279void MainWindow::slotSetCodec( int codec ) 279void MainWindow::slotSetCodec( int codec )
280{ 280{
281 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 281 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
282 //qDebug("codec %d ", codec); 282 //qDebug("codec %d ", codec);
283 KOPrefs::instance()->mCurrentCodec = codec; 283 KOPrefs::instance()->mCurrentCodec = codec;
284 KOPrefs::instance()->isDirty = true; 284 KOPrefs::instance()->isDirty = true;
285 QString name; 285 QString name;
286 switch ( codec ) { 286 switch ( codec ) {
287 case 0: 287 case 0:
288 name = "iso-8859-1"; 288 name = "iso-8859-1";
289 break; 289 break;
290 case 1: 290 case 1:
291 name = "iso-8859-5"; 291 name = "iso-8859-5";
292 break; 292 break;
293 case 2: 293 case 2:
294 name = "iso-8859-15"; 294 name = "iso-8859-15";
295 break; 295 break;
296 case 3: 296 case 3:
297 name = "big-5"; 297 name = "big-5";
298 break; 298 break;
299 case 4: 299 case 4:
300 name = "utf-8"; 300 name = "utf-8";
301 break; 301 break;
302 case 5: 302 case 5:
303 name = KOPrefs::instance()->mSendCodec.lower(); 303 name = KOPrefs::instance()->mSendCodec.lower();
304 break; 304 break;
305 } 305 }
306 KOPrefs::instance()->mCurrentCodeName = name ; 306 KOPrefs::instance()->mCurrentCodeName = name ;
307 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 307 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
308 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 308 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
309} 309}
310void MainWindow::showLicence() 310void MainWindow::showLicence()
311{ 311{
312 KApplication::showLicence(); 312 KApplication::showLicence();
313} 313}
314void MainWindow::showAbout() 314void MainWindow::showAbout()
315{ 315{
316 QString version; 316 QString version;
317#include <../version> 317#include <../version>
318 318
319 QString cap = "About KOpieMail/Pi"; 319 QString cap = "About KOpieMail/Pi";
320 QString text =i18n("KOpieMail/Platform-independent\n") + 320 QString text =i18n("KOpieMail/Platform-independent\n") +
321 "(OM/Pi) " + version + " - " 321 "(OM/Pi) " + version + " - "
322 322
323#ifdef DESKTOP_VERSION 323#ifdef DESKTOP_VERSION
324 "Desktop Edition\n" 324 "Desktop Edition\n"
325#else 325#else
326 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 326 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
327#endif 327#endif
328 "www.pi-sync.info\n\n" 328 "www.pi-sync.info\n\n"
329 329
330 330
331 331
332"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" 332"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n"
333 "KOpieMail/Pi is based on Opie Mail\n" 333 "KOpieMail/Pi is based on Opie Mail\n"
334 "Copyright (c) Rajko Albrecht and the Opie team\n" 334 "Copyright (c) Rajko Albrecht and the Opie team\n"
335 "KOpieMail/Pi is licensed under the GPL\n" 335 "KOpieMail/Pi is licensed under the GPL\n"
336 "\n" 336 "\n"
337 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 337 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
338 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 338 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
339 "libEtPan has its own licence - see LibEtPan licence\n"; 339 "libEtPan has its own licence - see LibEtPan licence\n";
340 340
341 KApplication::showText( cap, text ); 341 KApplication::showText( cap, text );
342} 342}
343void MainWindow::showEtpanLicence() 343void MainWindow::showEtpanLicence()
344{ 344{
345 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 345 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
346 346
347} 347}
348void MainWindow::appMessage(const QCString &, const QByteArray &) 348void MainWindow::appMessage(const QCString &, const QByteArray &)
349{ 349{
350 qDebug("appMessage implemented by subclass"); 350 qDebug("appMessage implemented by subclass");
351} 351}
352 352
353void MainWindow::slotAdjustLayout() { 353void MainWindow::slotAdjustLayout() {
354 354
355 /* 355 /*
356 QWidget *d = QApplication::desktop(); 356 QWidget *d = QApplication::desktop();
357 357
358 if ( d->width() < d->height() ) { 358 if ( d->width() < d->height() ) {
359 layout->setDirection( QBoxLayout::TopToBottom ); 359 layout->setDirection( QBoxLayout::TopToBottom );
360 } else { 360 } else {
361 layout->setDirection( QBoxLayout::LeftToRight ); 361 layout->setDirection( QBoxLayout::LeftToRight );
362 } 362 }
363 */ 363 */
364} 364}
365 365
366void MainWindow::slotAdjustColumns() 366void MainWindow::slotAdjustColumns()
367{ 367{
368 bool hidden = folderView->isHidden(); 368
369 if ( hidden ) folderView->show(); 369 if ( !folderView->isHidden() )
370 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 370 folderView->setColumnWidth( 0, folderView->visibleWidth() );
371 if ( hidden ) folderView->hide();
372 371
373 mailView->setColumnWidth( 0, 10 ); 372 mailView->setColumnWidth( 0, 10 );
374 mailView->setColumnWidth( 1, 100 ); 373 mailView->setColumnWidth( 1, 100 );
375 mailView->setColumnWidth( 2, 100 ); 374 mailView->setColumnWidth( 2, 100 );
376 mailView->setColumnWidth( 3, 70 ); 375 mailView->setColumnWidth( 3, 70 );
377 mailView->setColumnWidth( 4, 170 ); 376 mailView->setColumnWidth( 4, 180 );
377 if ( KOPrefs::instance()->mShowToField )
378 mailView->setColumnWidth( 5, 100 );
379 mailView->setColumnAlignment( 3, AlignRight);
380 mailView->setColumnAlignment( 4, AlignRight);
381}
382void MainWindow::slotAdjustColumnsWide()
383{
384 if ( !folderView->isHidden() )
385 folderView->setColumnWidth( 0, folderView->visibleWidth() );
386
387 mailView->setColumnWidth( 0, 10 );
388 mailView->setColumnWidth( 1, 200 );
389 mailView->setColumnWidth( 2, 200 );
390 mailView->setColumnWidth( 3, 70 );
391 mailView->setColumnWidth( 4, 180 );
378 if ( KOPrefs::instance()->mShowToField ) 392 if ( KOPrefs::instance()->mShowToField )
379 mailView->setColumnWidth( 5, 100 ); 393 mailView->setColumnWidth( 5, 100 );
380 mailView->setColumnAlignment( 3, AlignRight); 394 mailView->setColumnAlignment( 3, AlignRight);
381} 395}
382 396
383void MainWindow::slotEditSettings() 397void MainWindow::slotEditSettings()
384{ 398{
385} 399}
386void MainWindow::slotEditGlobalSettings() 400void MainWindow::slotEditGlobalSettings()
387{ 401{
388} 402}
389 403
390void MainWindow::slotShowFolders( bool ) 404void MainWindow::slotShowFolders( bool )
391{ 405{
392 qDebug("not implemented: "); 406 qDebug("not implemented: ");
393} 407}
394 408
395void MainWindow::refreshMailView(const QValueList<RecMailP>&) 409void MainWindow::refreshMailView(const QValueList<RecMailP>&)
396{ 410{
397 qDebug("not implemented: "); 411 qDebug("not implemented: ");
398} 412}
399 413
400void MainWindow::mailLeftClicked(QListViewItem * ) 414void MainWindow::mailLeftClicked(QListViewItem * )
401{ 415{
402 qDebug("not implemented: "); 416 qDebug("not implemented: ");
403} 417}
404 418
405void MainWindow::displayMail() 419void MainWindow::displayMail()
406{ 420{
407 qDebug("not implemented: "); 421 qDebug("not implemented: ");
408} 422}
409 423
410void MainWindow::slotDeleteMail() 424void MainWindow::slotDeleteMail()
411{ 425{
412 qDebug("not implemented: "); 426 qDebug("not implemented: ");
413} 427}
414 428
415void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 429void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
416{ 430{
417 qDebug("not implemented: "); 431 qDebug("not implemented: ");
418} 432}
419 433
420void MainWindow::slotSendQueued() 434void MainWindow::slotSendQueued()
421{ 435{
422 qDebug("not implemented: "); 436 qDebug("not implemented: ");
423} 437}
424 438
425void MainWindow::slotEditAccounts() 439void MainWindow::slotEditAccounts()
426{ 440{
427 qDebug("not implemented: "); 441 qDebug("not implemented: ");
428} 442}
429 443
430void MainWindow::slotComposeMail() 444void MainWindow::slotComposeMail()
431{ 445{
432 qDebug("not implemented: "); 446 qDebug("not implemented: ");
433} 447}
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 178d2bb..f65f3b4 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,74 +1,75 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#ifndef MAINWINDOW_H 3#ifndef MAINWINDOW_H
4#define MAINWINDOW_H 4#define MAINWINDOW_H
5 5
6#include <qmainwindow.h> 6#include <qmainwindow.h>
7#include <klistview.h> 7#include <klistview.h>
8#include <qaction.h> 8#include <qaction.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10 10
11#include <qtoolbar.h> 11#include <qtoolbar.h>
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qmenubar.h> 13#include <qmenubar.h>
14#define QPEMenuBar QMenuBar 14#define QPEMenuBar QMenuBar
15#else 15#else
16#include <qpe/qpemenubar.h> 16#include <qpe/qpemenubar.h>
17#endif 17#endif
18 18
19#include "accountview.h" 19#include "accountview.h"
20#include "statuswidget.h" 20#include "statuswidget.h"
21 21
22#include <libmailwrapper/mailtypes.h> 22#include <libmailwrapper/mailtypes.h>
23#include <opie2/osmartpointer.h> 23#include <opie2/osmartpointer.h>
24 24
25class RecMail; 25class RecMail;
26 26
27class MainWindow : public QMainWindow 27class MainWindow : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
33 virtual ~MainWindow(); 33 virtual ~MainWindow();
34 34
35public slots: 35public slots:
36 virtual void slotAdjustColumns(); 36 virtual void slotAdjustColumns();
37 virtual void slotAdjustColumnsWide();
37 virtual void appMessage(const QCString &msg, const QByteArray &data); 38 virtual void appMessage(const QCString &msg, const QByteArray &data);
38 virtual void slotComposeMail(); 39 virtual void slotComposeMail();
39 40
40protected slots: 41protected slots:
41 virtual void setInfoFields(QListViewItem* ); 42 virtual void setInfoFields(QListViewItem* );
42 virtual void slotSendQueued(); 43 virtual void slotSendQueued();
43 virtual void slotEditAccounts(); 44 virtual void slotEditAccounts();
44 virtual void slotShowFolders( bool show ); 45 virtual void slotShowFolders( bool show );
45 virtual void refreshMailView(const QValueList<RecMailP>&); 46 virtual void refreshMailView(const QValueList<RecMailP>&);
46 virtual void displayMail(); 47 virtual void displayMail();
47 virtual void slotGetMail() = 0; 48 virtual void slotGetMail() = 0;
48 virtual void slotGetAllMail() = 0; 49 virtual void slotGetAllMail() = 0;
49 virtual void slotDeleteMail(); 50 virtual void slotDeleteMail();
50 virtual void slotDeleteAllMail() = 0; 51 virtual void slotDeleteAllMail() = 0;
51 virtual void slotSetCodec(int); 52 virtual void slotSetCodec(int);
52 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 53 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
53 virtual void slotAdjustLayout(); 54 virtual void slotAdjustLayout();
54 virtual void slotEditSettings(); 55 virtual void slotEditSettings();
55 virtual void slotEditGlobalSettings(); 56 virtual void slotEditGlobalSettings();
56 virtual void mailLeftClicked( QListViewItem * ); 57 virtual void mailLeftClicked( QListViewItem * );
57 void showLicence(); 58 void showLicence();
58 void showAbout(); 59 void showAbout();
59 void showEtpanLicence(); 60 void showEtpanLicence();
60 61
61protected: 62protected:
62 QToolBar *toolBar; 63 QToolBar *toolBar;
63 StatusWidget *statusWidget; 64 StatusWidget *statusWidget;
64 QPEMenuBar *menuBar; 65 QPEMenuBar *menuBar;
65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 66 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 67 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
67 *editSettings, *editAccounts, *syncFolders; 68 *editSettings, *editAccounts, *syncFolders;
68 AccountView *folderView; 69 AccountView *folderView;
69 KListView *mailView; 70 KListView *mailView;
70 QLineEdit* toLE,*fromLE,*subLE; 71 QLineEdit* toLE,*fromLE,*subLE;
71 //QBoxLayout *layout; 72 //QBoxLayout *layout;
72}; 73};
73 74
74#endif 75#endif
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index e296d9c..75a75b9 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -352,339 +352,343 @@ void OpieMail::slotDownloadMail( )
352 Global::statusMessage("Mail is already locally stored!"); 352 Global::statusMessage("Mail is already locally stored!");
353 return; 353 return;
354 } 354 }
355 if ( !targetMail->createMbox(lfName)) { 355 if ( !targetMail->createMbox(lfName)) {
356 Global::statusMessage("Error creating folder!"); 356 Global::statusMessage("Error creating folder!");
357 return; 357 return;
358 } 358 }
359 Global::statusMessage("Fetching mail...please wait!"); 359 Global::statusMessage("Fetching mail...please wait!");
360 qApp->processEvents(); 360 qApp->processEvents();
361 encodedString*st = 0; 361 encodedString*st = 0;
362 st = mail->Wrapper()->fetchRawBody(mail); 362 st = mail->Wrapper()->fetchRawBody(mail);
363 if ( st ) { 363 if ( st ) {
364 targetMail->storeMessage(st->Content(),st->Length(),lfName); 364 targetMail->storeMessage(st->Content(),st->Length(),lfName);
365 Global::statusMessage("Mail stored in "+ lfName); 365 Global::statusMessage("Mail stored in "+ lfName);
366 delete st; 366 delete st;
367 } else { 367 } else {
368 Global::statusMessage("Error: Cannot fetch mail!"); 368 Global::statusMessage("Error: Cannot fetch mail!");
369 } 369 }
370} 370}
371 371
372 372
373void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) 373void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
374{ 374{
375 QListViewItem*item = mailView->currentItem(); 375 QListViewItem*item = mailView->currentItem();
376 if (!item ) { 376 if (!item ) {
377 closeViewMail(vm); 377 closeViewMail(vm);
378 return; 378 return;
379 } 379 }
380 RecMailP mail = ((MailListViewItem*)item)->data(); 380 RecMailP mail = ((MailListViewItem*)item)->data();
381 mail->Wrapper()->deleteMail( mail ); 381 mail->Wrapper()->deleteMail( mail );
382 item = item->itemBelow(); 382 item = item->itemBelow();
383 if (!item ) { 383 if (!item ) {
384 closeViewMail(vm); 384 closeViewMail(vm);
385 return; 385 return;
386 } 386 }
387 mailView->setCurrentItem(item); 387 mailView->setCurrentItem(item);
388 mail = ((MailListViewItem*)item)->data(); 388 mail = ((MailListViewItem*)item)->data();
389 RecBodyP body = folderView->fetchBody(mail); 389 RecBodyP body = folderView->fetchBody(mail);
390 vm->setBody( body ); 390 vm->setBody( body );
391 vm->setMail( mail ); 391 vm->setMail( mail );
392} 392}
393void OpieMail::displayNextMail(ViewMail * vm) 393void OpieMail::displayNextMail(ViewMail * vm)
394{ 394{
395 QListViewItem*item = mailView->currentItem(); 395 QListViewItem*item = mailView->currentItem();
396 if (!item) return; 396 if (!item) return;
397 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 397 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
398 item = item->itemBelow(); 398 item = item->itemBelow();
399 if (!item) { 399 if (!item) {
400 vm->setCaption(i18n("End of List" )); 400 vm->setCaption(i18n("End of List" ));
401 return; 401 return;
402 } 402 }
403 mailView->setCurrentItem(item); 403 mailView->setCurrentItem(item);
404 RecMailP mail = ((MailListViewItem*)item)->data(); 404 RecMailP mail = ((MailListViewItem*)item)->data();
405 RecBodyP body = folderView->fetchBody(mail); 405 RecBodyP body = folderView->fetchBody(mail);
406 vm->setBody( body ); 406 vm->setBody( body );
407 vm->setMail( mail ); 407 vm->setMail( mail );
408} 408}
409void OpieMail::displayMail() 409void OpieMail::displayMail()
410{ 410{
411 QListViewItem*item = mailView->currentItem(); 411 QListViewItem*item = mailView->currentItem();
412 if (!item) return; 412 if (!item) return;
413 RecMailP mail = ((MailListViewItem*)item)->data(); 413 RecMailP mail = ((MailListViewItem*)item)->data();
414 RecBodyP body = folderView->fetchBody(mail); 414 RecBodyP body = folderView->fetchBody(mail);
415 ViewMail readMail( this,"", Qt::WType_Modal ); 415 ViewMail readMail( this,"", Qt::WType_Modal );
416 readMail.setBody( body ); 416 readMail.setBody( body );
417 readMail.setMail( mail ); 417 readMail.setMail( mail );
418#ifndef DESKTOP_VERSION 418#ifndef DESKTOP_VERSION
419 readMail.showMaximized(); 419 readMail.showMaximized();
420#else 420#else
421 readMail.resize( 640, 480); 421 readMail.resize( 640, 480);
422#endif 422#endif
423 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); 423 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
424 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) ); 424 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
425 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) ); 425 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) );
426 426
427 readMail.exec(); 427 readMail.exec();
428 428
429 if ( readMail.deleted ) 429 if ( readMail.deleted )
430 { 430 {
431 folderView->refreshCurrent(); 431 folderView->refreshCurrent();
432 } 432 }
433 else 433 else
434 { 434 {
435 QListViewItem*item = mailView->currentItem(); 435 QListViewItem*item = mailView->currentItem();
436 if (item) 436 if (item)
437 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 437 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
438 } 438 }
439} 439}
440void OpieMail::slotGetAllMail() 440void OpieMail::slotGetAllMail()
441{ 441{
442 QListViewItem * item = folderView->firstChild(); 442 QListViewItem * item = folderView->firstChild();
443 while ( item ){ 443 while ( item ){
444 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 444 ((AccountViewItem *)item)->contextMenuSelected( 101 );
445 item = item->nextSibling (); 445 item = item->nextSibling ();
446 } 446 }
447} 447}
448void OpieMail::slotGetMail() 448void OpieMail::slotGetMail()
449{ 449{
450 QListViewItem * item = folderView->currentItem(); 450 QListViewItem * item = folderView->currentItem();
451 if ( ! item ) return; 451 if ( ! item ) return;
452 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 452 ((AccountViewItem *)item)->contextMenuSelected( 101 );
453} 453}
454void OpieMail::slotDeleteMail() 454void OpieMail::slotDeleteMail()
455{ 455{
456 if (!mailView->currentItem()) return; 456 if (!mailView->currentItem()) return;
457 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 457 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
458 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 ) 458 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 )
459 { 459 {
460 mail->Wrapper()->deleteMail( mail ); 460 mail->Wrapper()->deleteMail( mail );
461 folderView->refreshCurrent(); 461 folderView->refreshCurrent();
462 } 462 }
463} 463}
464void OpieMail::slotDeleteAllMail() 464void OpieMail::slotDeleteAllMail()
465{ 465{
466 466
467 QValueList<RecMailP> t; 467 QValueList<RecMailP> t;
468 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 468 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
469 { 469 {
470 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 470 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
471 while ( item ) { 471 while ( item ) {
472 if ( item->isSelected() ) { 472 if ( item->isSelected() ) {
473 t.append( item->data() ); 473 t.append( item->data() );
474 } 474 }
475 item = (MailListViewItem*)item->nextSibling(); 475 item = (MailListViewItem*)item->nextSibling();
476 } 476 }
477 } 477 }
478 else 478 else
479 return; 479 return;
480 if ( t.count() == 0 ) 480 if ( t.count() == 0 )
481 return; 481 return;
482 RecMailP mail = t.first(); 482 RecMailP mail = t.first();
483 mail->Wrapper()->deleteMailList(t); 483 mail->Wrapper()->deleteMailList(t);
484 folderView->refreshCurrent(); 484 folderView->refreshCurrent();
485 485
486 486
487} 487}
488void OpieMail::clearSelection() 488void OpieMail::clearSelection()
489{ 489{
490 mailView->clearSelection(); 490 mailView->clearSelection();
491 491
492} 492}
493void OpieMail::selectAll() 493void OpieMail::selectAll()
494{ 494{
495 QListViewItem* item = mailView->firstChild (); 495 QListViewItem* item = mailView->firstChild ();
496 while ( item ) { 496 while ( item ) {
497 mailView->setSelected ( item, true ); 497 mailView->setSelected ( item, true );
498 item = item->nextSibling(); 498 item = item->nextSibling();
499 } 499 }
500} 500}
501 501
502void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 502void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
503{ 503{
504 if (!mailView->currentItem()) return; 504 if (!mailView->currentItem()) return;
505 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 505 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
506 /* just the RIGHT button - or hold on pda */ 506 /* just the RIGHT button - or hold on pda */
507 if (button!=2) {return;} 507 if (button!=2) {return;}
508 if (!item) return; 508 if (!item) return;
509 QPopupMenu *m = new QPopupMenu(0); 509 QPopupMenu *m = new QPopupMenu(0);
510 if (m) 510 if (m)
511 { 511 {
512 if (mailtype==MAILLIB::A_NNTP) { 512 if (mailtype==MAILLIB::A_NNTP) {
513 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); 513 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
514 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); 514 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
515 m->insertSeparator(); 515 m->insertSeparator();
516 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); 516 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
517 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 517 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
518 } else { 518 } else {
519 if (folderView->currentisDraft()) { 519 if (folderView->currentisDraft()) {
520 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); 520 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
521 } 521 }
522 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); 522 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail()));
523 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); 523 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
524 m->insertSeparator(); 524 m->insertSeparator();
525 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); 525 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
526 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); 526 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
527 m->insertSeparator(); 527 m->insertSeparator();
528 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); 528 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
529 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 529 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
530 m->insertSeparator(); 530 m->insertSeparator();
531 m->insertItem(i18n("Select all"),this,SLOT(selectAll())); 531 m->insertItem(i18n("Select all"),this,SLOT(selectAll()));
532 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 532 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
533 } 533 }
534 m->setFocus(); 534 m->setFocus();
535 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 535 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
536 delete m; 536 delete m;
537 } 537 }
538} 538}
539 539
540void OpieMail::slotShowFolders( bool show ) 540void OpieMail::slotShowFolders( bool show )
541{ 541{
542 if ( show && folderView->isHidden() ) 542 if ( show && folderView->isHidden() )
543 { 543 {
544 slotAdjustColumns();
544 folderView->show(); 545 folderView->show();
546 //slotAdjustColumns();
545 } 547 }
546 else if ( !show && !folderView->isHidden() ) 548 else if ( !show && !folderView->isHidden() )
547 { 549 {
550 slotAdjustColumnsWide();
548 folderView->hide(); 551 folderView->hide();
552 //slotAdjustColumnsWide();
549 } 553 }
550} 554}
551 555
552void OpieMail::refreshMailView(const QValueList<RecMailP>&list) 556void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
553{ 557{
554 MailListViewItem*item = 0; 558 MailListViewItem*item = 0;
555 mailView->clear(); 559 mailView->clear();
556 560
557 QValueList<RecMailP>::ConstIterator it; 561 QValueList<RecMailP>::ConstIterator it;
558 for (it = list.begin(); it != list.end();++it) 562 for (it = list.begin(); it != list.end();++it)
559 { 563 {
560 item = new MailListViewItem(mailView,item); 564 item = new MailListViewItem(mailView,item);
561 item->storeData((*it)); 565 item->storeData((*it));
562 item->showEntry(); 566 item->showEntry();
563 } 567 }
564 mailView->setSorting ( 4, false ); 568 mailView->setSorting ( 4, false );
565} 569}
566 570
567void OpieMail::mailLeftClicked( QListViewItem *item ) 571void OpieMail::mailLeftClicked( QListViewItem *item )
568{ 572{
569 mailView->clearSelection(); 573 mailView->clearSelection();
570 /* just LEFT button - or tap with stylus on pda */ 574 /* just LEFT button - or tap with stylus on pda */
571 //if (button!=1) return; 575 //if (button!=1) return;
572 if (!item) return; 576 if (!item) return;
573 if (folderView->currentisDraft()) { 577 if (folderView->currentisDraft()) {
574 reEditMail(); 578 reEditMail();
575 } else { 579 } else {
576 displayMail(); 580 displayMail();
577 } 581 }
578} 582}
579 583
580void OpieMail::slotMoveCopyMail() 584void OpieMail::slotMoveCopyMail()
581{ 585{
582 if (!mailView->currentItem()) return; 586 if (!mailView->currentItem()) return;
583 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 587 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
584 AbstractMail*targetMail = 0; 588 AbstractMail*targetMail = 0;
585 QString targetFolder = ""; 589 QString targetFolder = "";
586 Selectstore sels; 590 Selectstore sels;
587 folderView->setupFolderselect(&sels); 591 folderView->setupFolderselect(&sels);
588 if (!sels.exec()) return; 592 if (!sels.exec()) return;
589 targetMail = sels.currentMail(); 593 targetMail = sels.currentMail();
590 targetFolder = sels.currentFolder(); 594 targetFolder = sels.currentFolder();
591 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 595 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
592 targetFolder.isEmpty()) 596 targetFolder.isEmpty())
593 { 597 {
594 return; 598 return;
595 } 599 }
596 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 600 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
597 { 601 {
598 QMessageBox::critical(0,i18n("Error creating new Folder"), 602 QMessageBox::critical(0,i18n("Error creating new Folder"),
599 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 603 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
600 return; 604 return;
601 } 605 }
602 sels.hide(); 606 sels.hide();
603 qApp->processEvents(); 607 qApp->processEvents();
604 // qDebug("hiding sels "); 608 // qDebug("hiding sels ");
605 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); 609 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails());
606 folderView->refreshCurrent(); 610 folderView->refreshCurrent();
607} 611}
608 612
609void OpieMail::slotMoveCopyAllMail() 613void OpieMail::slotMoveCopyAllMail()
610{ 614{
611 615
612 if (!mailView->currentItem()) return; 616 if (!mailView->currentItem()) return;
613 QValueList<RecMailP> t; 617 QValueList<RecMailP> t;
614 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 618 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
615 { 619 {
616 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 620 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
617 while ( item ) { 621 while ( item ) {
618 if ( item->isSelected() ) { 622 if ( item->isSelected() ) {
619 t.append( item->data() ); 623 t.append( item->data() );
620 } 624 }
621 item = (MailListViewItem*)item->nextSibling(); 625 item = (MailListViewItem*)item->nextSibling();
622 } 626 }
623 } 627 }
624 // else 628 // else
625 // return; 629 // return;
626 if ( t.count() == 0 ) 630 if ( t.count() == 0 )
627 return; 631 return;
628 RecMailP mail = t.first(); 632 RecMailP mail = t.first();
629 AbstractMail*targetMail = 0; 633 AbstractMail*targetMail = 0;
630 QString targetFolder = ""; 634 QString targetFolder = "";
631 Selectstore sels; 635 Selectstore sels;
632 folderView->setupFolderselect(&sels); 636 folderView->setupFolderselect(&sels);
633 if (!sels.exec()) return; 637 if (!sels.exec()) return;
634 targetMail = sels.currentMail(); 638 targetMail = sels.currentMail();
635 targetFolder = sels.currentFolder(); 639 targetFolder = sels.currentFolder();
636 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 640 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
637 targetFolder.isEmpty()) 641 targetFolder.isEmpty())
638 { 642 {
639 return; 643 return;
640 } 644 }
641 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 645 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
642 { 646 {
643 QMessageBox::critical(0,i18n("Error creating new Folder"), 647 QMessageBox::critical(0,i18n("Error creating new Folder"),
644 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 648 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
645 return; 649 return;
646 } 650 }
647 sels.hide(); 651 sels.hide();
648 qApp->processEvents(); 652 qApp->processEvents();
649 //qDebug("hiding sels "); 653 //qDebug("hiding sels ");
650 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); 654 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
651 folderView->refreshCurrent(); 655 folderView->refreshCurrent();
652} 656}
653 657
654void OpieMail::reEditMail() 658void OpieMail::reEditMail()
655{ 659{
656 if (!mailView->currentItem()) return; 660 if (!mailView->currentItem()) return;
657 661
658 ComposeMail compose( settings, this, 0, true ); 662 ComposeMail compose( settings, this, 0, true );
659 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); 663 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
660 compose.slotAdjustColumns(); 664 compose.slotAdjustColumns();
661#ifndef DESKTOP_VERSION 665#ifndef DESKTOP_VERSION
662 compose.showMaximized(); 666 compose.showMaximized();
663#else 667#else
664 compose.resize(640,480); 668 compose.resize(640,480);
665#endif 669#endif
666 mCurrentComposer = &compose; 670 mCurrentComposer = &compose;
667 compose.exec(); 671 compose.exec();
668 folderView->refreshOutgoing(); 672 folderView->refreshOutgoing();
669 mCurrentComposer = 0; 673 mCurrentComposer = 0;
670} 674}
671 675
672void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) 676void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
673{ 677{
674 678
675 if ( mCurrentComposer ) { 679 if ( mCurrentComposer ) {
676 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); 680 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
677 } else { 681 } else {
678 ComposeMail compose( settings, this, 0, true ); 682 ComposeMail compose( settings, this, 0, true );
679 compose.slotAdjustColumns(); 683 compose.slotAdjustColumns();
680#ifndef DESKTOP_VERSION 684#ifndef DESKTOP_VERSION
681 compose.showMaximized(); 685 compose.showMaximized();
682#endif 686#endif
683 mCurrentComposer = &compose; 687 mCurrentComposer = &compose;
684 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); 688 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
685 compose.exec(); 689 compose.exec();
686 mCurrentComposer = 0; 690 mCurrentComposer = 0;
687 folderView->refreshOutgoing(); 691 folderView->refreshOutgoing();
688 raise(); 692 raise();
689 } 693 }
690} 694}