summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-10 11:53:12 (UTC)
committer zautrix <zautrix>2005-06-10 11:53:12 (UTC)
commitd2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (unidiff)
tree0764371abfdb5d663ffebf408d47d49f0ca919f3
parente5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff)
downloadkdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2
config dialog changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt2
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt2
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/koprefsdialog.h1
-rw-r--r--kmicromail/mainwindow.cpp15
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp5
-rw-r--r--kmicromail/opiemail.h1
-rw-r--r--microkde/kdialogbase.cpp5
-rw-r--r--microkde/kdialogbase.h4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h1
-rw-r--r--pwmanager/pwmanager/pwm.cpp45
-rw-r--r--pwmanager/pwmanager/pwm.h1
15 files changed, 76 insertions, 22 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index e076e1e..d6bf118 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -679,101 +679,103 @@
679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
681{ "Save settings","Speichere Einstellungen" }, 681{ "Save settings","Speichere Einstellungen" },
682{ "Save standard","Speichere Standard" }, 682{ "Save standard","Speichere Standard" },
683{ "Save","Speichern" }, 683{ "Save","Speichern" },
684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
686{ "Multiple Sync options","Multi Sync Optionen" }, 686{ "Multiple Sync options","Multi Sync Optionen" },
687{ "Sync algo options","Sync Ablauf Optionen" }, 687{ "Sync algo options","Sync Ablauf Optionen" },
688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
689{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 689{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
691{ "Write back options","Optionen zum Zurückschreiben" }, 691{ "Write back options","Optionen zum Zurückschreiben" },
692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
697{ "Time period","Zeitspanne" }, 697{ "Time period","Zeitspanne" },
698{ "From ","Von " }, 698{ "From ","Von " },
699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
700{ " weeks in the future "," Wochen in der Zukunft " }, 700{ " weeks in the future "," Wochen in der Zukunft " },
701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
702{ "Local temp file:","Lokale temp Datei:" }, 702{ "Local temp file:","Lokale temp Datei:" },
703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, 705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." },
706{ "Sorry","Tut mir leid" }, 706{ "Sorry","Tut mir leid" },
707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, 707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, 708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" },
709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, 709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" },
710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, 710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, 711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
717{ "Error","Fehler" }, 717{ "Error","Fehler" },
718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
720{ "Warning","Warnung" }, 720{ "Warning","Warnung" },
721{ "Select week number","Wähle Wochen Nummer" }, 721{ "Select week number","Wähle Wochen Nummer" },
722{ "Februar","Februar" }, 722{ "Februar","Februar" },
723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
724{ "Password for remote access:","Passwort für fernen Zugriff:" }, 724{ "Password for remote access:","Passwort für fernen Zugriff:" },
725{ "Remote IP address:","Ferne IP Adresse:" }, 725{ "Remote IP address:","Ferne IP Adresse:" },
726{ "Remote port number:","Ferne Port Nummer:" }, 726{ "Remote port number:","Ferne Port Nummer:" },
727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
728{ "Remote from: ","Fern von: " }, 728{ "Remote from: ","Fern von: " },
729{ "Local from: ","Lokal von: " }, 729{ "Local from: ","Lokal von: " },
730{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 730{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
732{ "Write back","Schreibe zurück" }, 732{ "Write back","Schreibe zurück" },
733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
734{ "Received sync request","Sync Anfrage erhalten" }, 734{ "Received sync request","Sync Anfrage erhalten" },
735{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 735{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
738{ "Sending file...","Sende Datei..." }, 738{ "Sending file...","Sende Datei..." },
739{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 739{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
740{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 740{ "Receiving synced file...","Gesyncte Daten erhalten..." },
741{ "Received %1 bytes","%1 Bytes erhalten" }, 741{ "Received %1 bytes","%1 Bytes erhalten" },
742{ "Writing file to disk...","Speichere Datei..." }, 742{ "Writing file to disk...","Speichere Datei..." },
743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
745{ "Synchronize!","Synchronisiere!" }, 745{ "Synchronize!","Synchronisiere!" },
746{ "High clock skew!","Großer Uhrzeitunterschied!" }, 746{ "High clock skew!","Großer Uhrzeitunterschied!" },
747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
748{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 748{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, 749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, 750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, 751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
752{ "Edit new contact","Bearbeite neuen Kontakt" }, 752{ "Edit new contact","Bearbeite neuen Kontakt" },
753{ "Edit ","Bearbeite " }, 753{ "Edit ","Bearbeite " },
754{ "No contact changed!","Kein Kontakt verändert" }, 754{ "No contact changed!","Kein Kontakt verändert" },
755{ "%1 contacts changed!","%1 Kontakte geändert!" }, 755{ "%1 contacts changed!","%1 Kontakte geändert!" },
756{ "Mobile (home)","Handy (Arbeit)" }, 756{ "Mobile (home)","Handy (Arbeit)" },
757{ "Mobile (work)","Handy (Privat)" }, 757{ "Mobile (work)","Handy (Privat)" },
758{ "Def.Formatted Name","Def. Format. Name" }, 758{ "Def.Formatted Name","Def. Format. Name" },
759{ "Colors","Farben" }, 759{ "Colors","Farben" },
760{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 760{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
761{ "Backup enabled","Backup angeschaltet" }, 761{ "Backup enabled","Backup angeschaltet" },
762{ "Use standard backup dir","Standard Backupverzeichnis" }, 762{ "Use standard backup dir","Standard Backupverzeichnis" },
763{ "Number of Backups:","Anzahl der Backups" }, 763{ "Number of Backups:","Anzahl der Backups" },
764{ "Make backup every ","Mache ein Backup alle " }, 764{ "Make backup every ","Mache ein Backup alle " },
765{ " days"," Tage" }, 765{ " days"," Tage" },
766{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 766{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
767{ "Backup Failed!","Backup Problem!" }, 767{ "Backup Failed!","Backup Problem!" },
768{ "Try again now","Versuche jetzt nochmal" }, 768{ "Try again now","Versuche jetzt nochmal" },
769{ "Try again later","Versuche später nochmal" }, 769{ "Try again later","Versuche später nochmal" },
770{ "Try again tomorrow","Versuche morgen nochmal" }, 770{ "Try again tomorrow","Versuche morgen nochmal" },
771{ "Disable backup","Schalte Backup ab" }, 771{ "Disable backup","Schalte Backup ab" },
772{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 772{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
773{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 773{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
774{ "Choose action","Wähle Aktion" }, 774{ "Choose action","Wähle Aktion" },
775{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
776{ "Global Settings...","Globale Einstellungen..." },
775{ "","" }, 777{ "","" },
776{ "","" }, 778{ "","" },
777{ "","" }, 779{ "","" },
778{ "","" }, 780{ "","" },
779{ "","" }, \ No newline at end of file 781{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt
index 75fdd11..14e5c0b 100644
--- a/bin/kdepim/kopiemail/germantranslation.txt
+++ b/bin/kdepim/kopiemail/germantranslation.txt
@@ -182,99 +182,101 @@
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..." },
279{ "Global Settings...","Globale Einstellungen..." },
278{ "","" }, 280{ "","" },
279{ "","" }, 281{ "","" },
280{ "","" }, \ No newline at end of file 282{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index 06fa727..255f2eb 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -274,103 +274,105 @@
274{ "Twofish (256 bit)","Twofish (256 bit)" }, 274{ "Twofish (256 bit)","Twofish (256 bit)" },
275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" }, 275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
276{ "Hashing:","Hashing:" }, 276{ "Hashing:","Hashing:" },
277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" }, 277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" }, 278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" }, 279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" }, 280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
281{ "MD5 (128 bit)","MD5 (128 bit)" }, 281{ "MD5 (128 bit)","MD5 (128 bit)" },
282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" }, 282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
283{ "Tiger (192 bit)","Tiger (192 bit)" }, 283{ "Tiger (192 bit)","Tiger (192 bit)" },
284{ "Permissions:","Zugriffsrechte:" }, 284{ "Permissions:","Zugriffsrechte:" },
285{ "Make backup before saving","Mache Backup vor dem Speichern" }, 285{ "Make backup before saving","Mache Backup vor dem Speichern" },
286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" }, 286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" },
287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" }, 287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" },
288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" }, 288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
289{ "open deeplocked","Öffne total gesperrt" }, 289{ "open deeplocked","Öffne total gesperrt" },
290{ "Favourite browser:","Bevorzugter Browser:" }, 290{ "Favourite browser:","Bevorzugter Browser:" },
291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" }, 291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" }, 292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
293{ "Look && feel","Aussehen" }, 293{ "Look && feel","Aussehen" },
294{ "File","Datei" }, 294{ "File","Datei" },
295{ "Timeout","Timeout" }, 295{ "Timeout","Timeout" },
296{ "Autostart","Autostart" }, 296{ "Autostart","Autostart" },
297{ "External apps","Externe Applik." }, 297{ "External apps","Externe Applik." },
298{ "Miscellaneous","Verschiedenes" }, 298{ "Miscellaneous","Verschiedenes" },
299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
300{ "edit category descriptions","Ändere Label für Kategorie" }, 300{ "edit category descriptions","Ändere Label für Kategorie" },
301{ "Close","Schließen" }, 301{ "Close","Schließen" },
302{ "Category:","Category:" }, 302{ "Category:","Category:" },
303{ "Text1 (Description):","Text1 (Beschreibung):" }, 303{ "Text1 (Description):","Text1 (Beschreibung):" },
304{ "Text2 (Username):","Text2 (Benutzername):" }, 304{ "Text2 (Username):","Text2 (Benutzername):" },
305{ "Text3 (Password):","Text3 (Passwort):" }, 305{ "Text3 (Password):","Text3 (Passwort):" },
306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" }, 306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
307{ "Description:","Beschreibung:" }, 307{ "Description:","Beschreibung:" },
308{ "Username:","Benutzername:" }, 308{ "Username:","Benutzername:" },
309{ "Password:","Passwort:" }, 309{ "Password:","Passwort:" },
310{ "&Reveal","&Offen zeigen" }, 310{ "&Reveal","&Offen zeigen" },
311{ "&Generate","&Generiere" }, 311{ "&Generate","&Generiere" },
312{ "&Password","&Passwort" }, 312{ "&Password","&Passwort" },
313{ "&Comments","Kommentar" }, 313{ "&Comments","Kommentar" },
314{ "Launcher:","Launcher:" }, 314{ "Launcher:","Launcher:" },
315{ "$d = Description","$d = Beschreibung" }, 315{ "$d = Description","$d = Beschreibung" },
316{ "$n = Username","$n = Benutzername" }, 316{ "$n = Username","$n = Benutzername" },
317{ "$c = Comment","$c = Kommentar" }, 317{ "$c = Comment","$c = Kommentar" },
318{ "$u = URL","$u = URL" }, 318{ "$u = URL","$u = URL" },
319{ "$p = Password","$p = Passwort" }, 319{ "$p = Password","$p = Passwort" },
320{ "&Launcher","&Launcher" }, 320{ "&Launcher","&Launcher" },
321{ "Password generator","Passwort Generator" }, 321{ "Password generator","Passwort Generator" },
322{ "Character set:","Buchstaben Set:" }, 322{ "Character set:","Buchstaben Set:" },
323{ "Lowercase (abc)","Klein (abc)" }, 323{ "Lowercase (abc)","Klein (abc)" },
324{ "Uppercase (ABC)","Groß (ABC)" }, 324{ "Uppercase (ABC)","Groß (ABC)" },
325{ "Numbers (123)","Nummmern (123)" }, 325{ "Numbers (123)","Nummmern (123)" },
326{ "Special characters:","Spezielle Buchstaben:" }, 326{ "Special characters:","Spezielle Buchstaben:" },
327{ "Spaces (blank characters)","Leerzeichen" }, 327{ "Spaces (blank characters)","Leerzeichen" },
328{ "User defined:","Benutzer definiert:" }, 328{ "User defined:","Benutzer definiert:" },
329{ "Password Length:","Passwort Länge:" }, 329{ "Password Length:","Passwort Länge:" },
330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" }, 330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
331{ "no password","Kein Passwort" }, 331{ "no password","Kein Passwort" },
332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." }, 332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
333{ "not saved, yet","not saved, yet" }, 333{ "not saved, yet","not saved, yet" },
334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." }, 334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
335{ "Find","Finde" }, 335{ "Find","Finde" },
336{ "&Exact match","Genaue Übereinstimmung" }, 336{ "&Exact match","Genaue Übereinstimmung" },
337{ "&Case sensitive","Großschrift abhängig" }, 337{ "&Case sensitive","Großschrift abhängig" },
338{ "Search in Column","Suche in Spalten" }, 338{ "Search in Column","Suche in Spalten" },
339{ "&Description","Beschreibung" }, 339{ "&Description","Beschreibung" },
340{ "C&omment","Kommentar" }, 340{ "C&omment","Kommentar" },
341{ "&Username","Benutzername" }, 341{ "&Username","Benutzername" },
342{ "U&RL","URL" }, 342{ "U&RL","URL" },
343{ "delete?","Löschen?" }, 343{ "delete?","Löschen?" },
344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" }, 344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
345{ "Save?","Speichern?" }, 345{ "Save?","Speichern?" },
346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" }, 346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
347{ "The list\n "","Die Liste\n "" }, 347{ "The list\n "","Die Liste\n "" },
348{ "nothing to do","Nichts zu tun" }, 348{ "nothing to do","Nichts zu tun" },
349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." }, 349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
350{ "Add new password","Passwort hinzufügen" }, 350{ "Add new password","Passwort hinzufügen" },
351{ "Successfully saved data.","Datei gespeichert." }, 351{ "Successfully saved data.","Datei gespeichert." },
352{ "Category:","Kategorie:" }, 352{ "Category:","Kategorie:" },
353{ "LOCKED","GESPERRT" }, 353{ "LOCKED","GESPERRT" },
354{ "Colors","Farben" }, 354{ "Colors","Farben" },
355{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 355{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
356{ "Backup enabled","Backup angeschaltet" }, 356{ "Backup enabled","Backup angeschaltet" },
357{ "Use standard backup dir","Standard Backupverzeichnis" }, 357{ "Use standard backup dir","Standard Backupverzeichnis" },
358{ "Number of Backups:","Anzahl der Backups" }, 358{ "Number of Backups:","Anzahl der Backups" },
359{ "Make backup every ","Mache ein Backup alle " }, 359{ "Make backup every ","Mache ein Backup alle " },
360{ " days"," Tage" }, 360{ " days"," Tage" },
361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
362{ "Backup Failed!","Backup Problem!" }, 362{ "Backup Failed!","Backup Problem!" },
363{ "Try again now","Versuche jetzt nochmal" }, 363{ "Try again now","Versuche jetzt nochmal" },
364{ "Try again later","Versuche später nochmal" }, 364{ "Try again later","Versuche später nochmal" },
365{ "Try again tomorrow","Versuche morgen nochmal" }, 365{ "Try again tomorrow","Versuche morgen nochmal" },
366{ "Disable backup","Schalte Backup ab" }, 366{ "Disable backup","Schalte Backup ab" },
367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
369{ "Choose action","Wähle Aktion" }, 369{ "Choose action","Wähle Aktion" },
370{ "&Configure PwM/Pi...","Konfiguriere PwM/Pi..." },
371{ "Global Settings...","Globale Einstellungen..." },
370{ "","" }, 372{ "","" },
371{ "","" }, 373{ "","" },
372{ "","" }, 374{ "","" },
373{ "","" }, 375{ "","" },
374{ "","" }, 376{ "","" },
375{ "","" }, 377{ "","" },
376 378
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index cd833cf..b107e2d 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1534,195 +1534,195 @@ void KABCore::extensionChanged( int id )
1534 mActionDetails->setChecked( true ); 1534 mActionDetails->setChecked( true );
1535 } 1535 }
1536 else 1536 else
1537 { //go back to the listview 1537 { //go back to the listview
1538 setDetailsVisible( false ); 1538 setDetailsVisible( false );
1539 mActionDetails->setChecked( false ); 1539 mActionDetails->setChecked( false );
1540 mActionDetails->setEnabled(true); 1540 mActionDetails->setEnabled(true);
1541 } 1541 }
1542 1542
1543 } 1543 }
1544 else 1544 else
1545 { 1545 {
1546 //the user enabled the extension. 1546 //the user enabled the extension.
1547 setDetailsVisible( false ); 1547 setDetailsVisible( false );
1548 mActionDetails->setChecked( false ); 1548 mActionDetails->setChecked( false );
1549 1549
1550 if (!mMultipleViewsAtOnce) 1550 if (!mMultipleViewsAtOnce)
1551 { 1551 {
1552 mActionDetails->setEnabled(false); 1552 mActionDetails->setEnabled(false);
1553 } 1553 }
1554 1554
1555 mExtensionManager->setSelectionChanged(); 1555 mExtensionManager->setSelectionChanged();
1556 1556
1557 } 1557 }
1558 1558
1559#endif// DESKTOP_VERSION 1559#endif// DESKTOP_VERSION
1560 1560
1561} 1561}
1562 1562
1563 1563
1564void KABCore::extensionModified( const KABC::Addressee::List &list ) 1564void KABCore::extensionModified( const KABC::Addressee::List &list )
1565{ 1565{
1566 1566
1567 if ( list.count() != 0 ) { 1567 if ( list.count() != 0 ) {
1568 KABC::Addressee::List::ConstIterator it; 1568 KABC::Addressee::List::ConstIterator it;
1569 for ( it = list.begin(); it != list.end(); ++it ) 1569 for ( it = list.begin(); it != list.end(); ++it )
1570 mAddressBook->insertAddressee( *it ); 1570 mAddressBook->insertAddressee( *it );
1571 if ( list.count() > 1 ) 1571 if ( list.count() > 1 )
1572 setModified(); 1572 setModified();
1573 else 1573 else
1574 setModifiedWOrefresh(); 1574 setModifiedWOrefresh();
1575 } 1575 }
1576 if ( list.count() == 0 ) 1576 if ( list.count() == 0 )
1577 mViewManager->refreshView(); 1577 mViewManager->refreshView();
1578 else 1578 else
1579 mViewManager->refreshView( list[ 0 ].uid() ); 1579 mViewManager->refreshView( list[ 0 ].uid() );
1580 1580
1581 1581
1582 1582
1583} 1583}
1584 1584
1585QString KABCore::getNameByPhone( const QString &phone ) 1585QString KABCore::getNameByPhone( const QString &phone )
1586{ 1586{
1587#ifndef KAB_EMBEDDED 1587#ifndef KAB_EMBEDDED
1588 QRegExp r( "[/*/-/ ]" ); 1588 QRegExp r( "[/*/-/ ]" );
1589 QString localPhone( phone ); 1589 QString localPhone( phone );
1590 1590
1591 bool found = false; 1591 bool found = false;
1592 QString ownerName = ""; 1592 QString ownerName = "";
1593 KABC::AddressBook::Iterator iter; 1593 KABC::AddressBook::Iterator iter;
1594 KABC::PhoneNumber::List::Iterator phoneIter; 1594 KABC::PhoneNumber::List::Iterator phoneIter;
1595 KABC::PhoneNumber::List phoneList; 1595 KABC::PhoneNumber::List phoneList;
1596 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1596 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1597 phoneList = (*iter).phoneNumbers(); 1597 phoneList = (*iter).phoneNumbers();
1598 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1598 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1599 ++phoneIter) { 1599 ++phoneIter) {
1600 // Get rid of separator chars so just the numbers are compared. 1600 // Get rid of separator chars so just the numbers are compared.
1601 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1601 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1602 ownerName = (*iter).formattedName(); 1602 ownerName = (*iter).formattedName();
1603 found = true; 1603 found = true;
1604 } 1604 }
1605 } 1605 }
1606 } 1606 }
1607 1607
1608 return ownerName; 1608 return ownerName;
1609#else //KAB_EMBEDDED 1609#else //KAB_EMBEDDED
1610 qDebug("KABCore::getNameByPhone finsih method"); 1610 qDebug("KABCore::getNameByPhone finsih method");
1611 return ""; 1611 return "";
1612#endif //KAB_EMBEDDED 1612#endif //KAB_EMBEDDED
1613 1613
1614} 1614}
1615void KABCore::openConfigGlobalDialog() 1615void KABCore::openConfigGlobalDialog()
1616{ 1616{
1617 KPimPrefsGlobalDialog gc ( this ); 1617 KPimPrefsGlobalDialog gc ( this );
1618 gc.exec(); 1618 gc.exec();
1619} 1619}
1620void KABCore::openConfigDialog() 1620void KABCore::openConfigDialog()
1621{ 1621{
1622 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true); 1622 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
1623 1623
1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" ); 1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" );
1625 ConfigureDialog->setMainWidget( kabcfg ); 1625 ConfigureDialog->setMainWidget( kabcfg );
1626 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1626 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1627 this, SLOT( configurationChanged() ) ); 1627 this, SLOT( configurationChanged() ) );
1628 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1628 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1629 kabcfg, SLOT( save() ) ); 1629 kabcfg, SLOT( save() ) );
1630 connect( ConfigureDialog, SIGNAL( okClicked() ), 1630 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1631 this, SLOT( configurationChanged() ) ); 1631 this, SLOT( configurationChanged() ) );
1632 connect( ConfigureDialog, SIGNAL( okClicked() ), 1632 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1633 kabcfg, SLOT( save() ) ); 1633 kabcfg, SLOT( save() ) );
1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ), 1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
1635 kabcfg, SLOT( defaults() ) ); 1635 kabcfg, SLOT( defaults() ) );
1636 saveSettings(); 1636 saveSettings();
1637 kabcfg->load(); 1637 kabcfg->load();
1638#ifndef DESKTOP_VERSION 1638#ifndef DESKTOP_VERSION
1639 if ( QApplication::desktop()->height() <= 480 ) 1639 if ( QApplication::desktop()->height() <= 480 )
1640 ConfigureDialog->hideButtons(); 1640 ConfigureDialog->hideButtons();
1641 ConfigureDialog->showMaximized(); 1641 ConfigureDialog->showMaximized();
1642#endif 1642#endif
1643 if ( ConfigureDialog->exec() ) 1643 if ( ConfigureDialog->exec() )
1644 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1644 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1645 delete ConfigureDialog; 1645 delete ConfigureDialog;
1646} 1646}
1647 1647
1648void KABCore::openLDAPDialog() 1648void KABCore::openLDAPDialog()
1649{ 1649{
1650#ifndef KAB_EMBEDDED 1650#ifndef KAB_EMBEDDED
1651 if ( !mLdapSearchDialog ) { 1651 if ( !mLdapSearchDialog ) {
1652 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1652 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1653 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1653 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1654 SLOT( refreshView() ) ); 1654 SLOT( refreshView() ) );
1655 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1655 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1656 SLOT( setModified() ) ); 1656 SLOT( setModified() ) );
1657 } else 1657 } else
1658 mLdapSearchDialog->restoreSettings(); 1658 mLdapSearchDialog->restoreSettings();
1659 1659
1660 if ( mLdapSearchDialog->isOK() ) 1660 if ( mLdapSearchDialog->isOK() )
1661 mLdapSearchDialog->exec(); 1661 mLdapSearchDialog->exec();
1662#else //KAB_EMBEDDED 1662#else //KAB_EMBEDDED
1663 qDebug("KABCore::openLDAPDialog() finsih method"); 1663 qDebug("KABCore::openLDAPDialog() finsih method");
1664#endif //KAB_EMBEDDED 1664#endif //KAB_EMBEDDED
1665} 1665}
1666 1666
1667void KABCore::print() 1667void KABCore::print()
1668{ 1668{
1669#ifndef KAB_EMBEDDED 1669#ifndef KAB_EMBEDDED
1670 KPrinter printer; 1670 KPrinter printer;
1671 if ( !printer.setup( this ) ) 1671 if ( !printer.setup( this ) )
1672 return; 1672 return;
1673 1673
1674 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1674 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1675 mViewManager->selectedUids(), this ); 1675 mViewManager->selectedUids(), this );
1676 1676
1677 wizard.exec(); 1677 wizard.exec();
1678#else //KAB_EMBEDDED 1678#else //KAB_EMBEDDED
1679 qDebug("KABCore::print() finsih method"); 1679 qDebug("KABCore::print() finsih method");
1680#endif //KAB_EMBEDDED 1680#endif //KAB_EMBEDDED
1681 1681
1682} 1682}
1683 1683
1684 1684
1685void KABCore::addGUIClient( KXMLGUIClient *client ) 1685void KABCore::addGUIClient( KXMLGUIClient *client )
1686{ 1686{
1687 if ( mGUIClient ) 1687 if ( mGUIClient )
1688 mGUIClient->insertChildClient( client ); 1688 mGUIClient->insertChildClient( client );
1689 else 1689 else
1690 KMessageBox::error( this, "no KXMLGUICLient"); 1690 KMessageBox::error( this, "no KXMLGUICLient");
1691} 1691}
1692 1692
1693 1693
1694void KABCore::configurationChanged() 1694void KABCore::configurationChanged()
1695{ 1695{
1696 mExtensionManager->reconfigure(); 1696 mExtensionManager->reconfigure();
1697} 1697}
1698 1698
1699void KABCore::addressBookChanged() 1699void KABCore::addressBookChanged()
1700{ 1700{
1701/*US 1701/*US
1702 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1702 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1703 while ( it.current() ) { 1703 while ( it.current() ) {
1704 if ( it.current()->dirty() ) { 1704 if ( it.current()->dirty() ) {
1705 QString text = i18n( "Data has been changed externally. Unsaved " 1705 QString text = i18n( "Data has been changed externally. Unsaved "
1706 "changes will be lost." ); 1706 "changes will be lost." );
1707 KMessageBox::information( this, text ); 1707 KMessageBox::information( this, text );
1708 } 1708 }
1709 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1709 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1710 ++it; 1710 ++it;
1711 } 1711 }
1712*/ 1712*/
1713 if (mEditorDialog) 1713 if (mEditorDialog)
1714 { 1714 {
1715 if (mEditorDialog->dirty()) 1715 if (mEditorDialog->dirty())
1716 { 1716 {
1717 QString text = i18n( "Data has been changed externally. Unsaved " 1717 QString text = i18n( "Data has been changed externally. Unsaved "
1718 "changes will be lost." ); 1718 "changes will be lost." );
1719 KMessageBox::information( this, text ); 1719 KMessageBox::information( this, text );
1720 } 1720 }
1721 QString currentuid = mEditorDialog->addressee().uid(); 1721 QString currentuid = mEditorDialog->addressee().uid();
1722 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1722 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1723 } 1723 }
1724 mViewManager->refreshView(); 1724 mViewManager->refreshView();
1725 1725
1726 1726
1727} 1727}
1728 1728
@@ -3337,98 +3337,98 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3337 syncManager->hideProgressBar(); 3337 syncManager->hideProgressBar();
3338 if ( syncOK ) { 3338 if ( syncOK ) {
3339 if ( syncManager->mWriteBackFile ) { 3339 if ( syncManager->mWriteBackFile ) {
3340 abLocal.removeSyncAddressees( false ); 3340 abLocal.removeSyncAddressees( false );
3341 message(i18n("Saving DTM address data..."),false); 3341 message(i18n("Saving DTM address data..."),false);
3342 abLocal.saveAB(); 3342 abLocal.saveAB();
3343 message(i18n("Sync postprocessing..."),false); 3343 message(i18n("Sync postprocessing..."),false);
3344 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3344 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3345 } 3345 }
3346 } else 3346 } else
3347 message( i18n("Sync cancelled or failed.") ); 3347 message( i18n("Sync cancelled or failed.") );
3348 setModified(); 3348 setModified();
3349 } 3349 }
3350 abLocal.removeResources(); 3350 abLocal.removeResources();
3351 if ( syncOK ) { 3351 if ( syncOK ) {
3352 mViewManager->refreshView(); 3352 mViewManager->refreshView();
3353 message(i18n("DTM syncing finished.")); 3353 message(i18n("DTM syncing finished."));
3354 } 3354 }
3355 disableBR( false ); 3355 disableBR( false );
3356 return syncOK; 3356 return syncOK;
3357 3357
3358} 3358}
3359void KABCore::message( QString m, bool startTimer) 3359void KABCore::message( QString m, bool startTimer)
3360{ 3360{
3361 topLevelWidget()->setCaption( m ); 3361 topLevelWidget()->setCaption( m );
3362 qApp->processEvents(); 3362 qApp->processEvents();
3363 if ( startTimer ) 3363 if ( startTimer )
3364 mMessageTimer->start( 15000, true ); 3364 mMessageTimer->start( 15000, true );
3365 else 3365 else
3366 mMessageTimer->stop(); 3366 mMessageTimer->stop();
3367} 3367}
3368bool KABCore::syncPhone() 3368bool KABCore::syncPhone()
3369{ 3369{
3370 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3370 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3371 QString fileName = getPhoneFile(); 3371 QString fileName = getPhoneFile();
3372 if ( !PhoneAccess::readFromPhone( fileName) ) { 3372 if ( !PhoneAccess::readFromPhone( fileName) ) {
3373 message(i18n("Phone access failed!")); 3373 message(i18n("Phone access failed!"));
3374 return false; 3374 return false;
3375 } 3375 }
3376 AddressBook abLocal( fileName,"syncContact"); 3376 AddressBook abLocal( fileName,"syncContact");
3377 bool syncOK = false; 3377 bool syncOK = false;
3378 { 3378 {
3379 abLocal.importFromFile( fileName ); 3379 abLocal.importFromFile( fileName );
3380 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3380 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3381 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3381 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3382 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3382 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3383 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3383 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3384 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3384 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3385 syncManager->hideProgressBar(); 3385 syncManager->hideProgressBar();
3386 if ( syncOK ) { 3386 if ( syncOK ) {
3387 if ( syncManager->mWriteBackFile ) { 3387 if ( syncManager->mWriteBackFile ) {
3388 abLocal.removeSyncAddressees( true ); 3388 abLocal.removeSyncAddressees( true );
3389 abLocal.saveABphone( fileName ); 3389 abLocal.saveABphone( fileName );
3390 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3390 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3391 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3391 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3392 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3392 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3393 } 3393 }
3394 } 3394 }
3395 setModified(); 3395 setModified();
3396 } 3396 }
3397 abLocal.removeResources(); 3397 abLocal.removeResources();
3398 if ( syncOK ) 3398 if ( syncOK )
3399 mViewManager->refreshView(); 3399 mViewManager->refreshView();
3400 return syncOK; 3400 return syncOK;
3401} 3401}
3402void KABCore::getFile( bool success ) 3402void KABCore::getFile( bool success )
3403{ 3403{
3404 if ( ! success ) { 3404 if ( ! success ) {
3405 message( i18n("Error receiving file. Nothing changed!") ); 3405 message( i18n("Error receiving file. Nothing changed!") );
3406 return; 3406 return;
3407 } 3407 }
3408 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3408 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3409 if ( count ) 3409 if ( count )
3410 setModified( true ); 3410 setModified( true );
3411 message( i18n("Pi-Sync successful!") ); 3411 message( i18n("Pi-Sync successful!") );
3412 mViewManager->refreshView(); 3412 mViewManager->refreshView();
3413} 3413}
3414void KABCore::syncFileRequest() 3414void KABCore::syncFileRequest()
3415{ 3415{
3416 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3416 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3417 syncManager->slotSyncMenu( 999 ); 3417 syncManager->slotSyncMenu( 999 );
3418 } 3418 }
3419 mAddressBook->export2File( sentSyncFile() ); 3419 mAddressBook->export2File( sentSyncFile() );
3420} 3420}
3421QString KABCore::sentSyncFile() 3421QString KABCore::sentSyncFile()
3422{ 3422{
3423#ifdef DESKTOP_VERSION 3423#ifdef DESKTOP_VERSION
3424 return locateLocal( "tmp", "copysyncab.vcf" ); 3424 return locateLocal( "tmp", "copysyncab.vcf" );
3425#else 3425#else
3426 return QString( "/tmp/copysyncab.vcf" ); 3426 return QString( "/tmp/copysyncab.vcf" );
3427#endif 3427#endif
3428} 3428}
3429 3429
3430void KABCore::setCaptionBack() 3430void KABCore::setCaptionBack()
3431{ 3431{
3432 mMessageTimer->stop(); 3432 mMessageTimer->stop();
3433 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 3433 topLevelWidget()->setCaption( i18n("KA/Pi") );
3434} 3434}
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7de7064..017f1f7 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -12,323 +12,318 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#include <kdialog.h> 23#include <kdialog.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h> 56#include <kglobalsettings.h>
57 57
58#include <klineedit.h> 58#include <klineedit.h>
59 59
60 60
61#include "koprefs.h" 61#include "koprefs.h"
62 62
63#include "koprefsdialog.h" 63#include "koprefsdialog.h"
64//#include <kprefswidget.h> 64//#include <kprefswidget.h>
65 65
66 66
67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
68 KPrefsDialog(KOPrefs::instance(),parent,name,true) 68 KPrefsDialog(KOPrefs::instance(),parent,name,true)
69{ 69{
70 70
71 setFont( KGlobalSettings::generalMaxFont() ); 71 setFont( KGlobalSettings::generalMaxFont() );
72 setCaption( i18n("Settings - some need a restart (nr)")); 72 setCaption( i18n("Settings - some need a restart (nr)"));
73 setupGlobalTab(); 73 setupGlobalTab();
74 setupMainTab(); 74 setupMainTab();
75 setupMailTab();; 75 setupMailTab();;
76 setupFontsTab(); 76 setupFontsTab();
77 readConfig(); 77 readConfig();
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 if ( QApplication::desktop()->height() == 480 ) 79 if ( QApplication::desktop()->height() == 480 )
80 hideButtons(); 80 hideButtons();
81#endif 81#endif
82 82
83#if 0 83#if 0
84 84
85 setupMainTab(); 85 setupMainTab();
86 setupLocaleTab(); 86 setupLocaleTab();
87 setupTimeZoneTab(); 87 setupTimeZoneTab();
88 setupTimeTab(); 88 setupTimeTab();
89 setupLocaleDateTab(); 89 setupLocaleDateTab();
90 setupFontsTab(); 90 setupFontsTab();
91 setupColorsTab(); 91 setupColorsTab();
92 setupViewsTab(); 92 setupViewsTab();
93 //setupSyncTab(); 93 //setupSyncTab();
94 //setupSyncAlgTab(); 94 //setupSyncAlgTab();
95 //setupPrinterTab(); 95 //setupPrinterTab();
96 //setupGroupSchedulingTab(); 96 //setupGroupSchedulingTab();
97 //setupGroupAutomationTab(); 97 //setupGroupAutomationTab();
98#endif 98#endif
99} 99}
100 100
101#include "kpimglobalprefs.h" 101#include "kpimglobalprefs.h"
102 102
103KOPrefsDialog::~KOPrefsDialog() 103KOPrefsDialog::~KOPrefsDialog()
104{ 104{
105} 105}
106void KOPrefsDialog::setupGlobalTab() 106void KOPrefsDialog::setupGlobalTab()
107{ 107{
108 QFrame *topFrame = addPage(i18n("Global"),0,0); 108
109 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
110 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 topLayout->addWidget( kdelibcfg );
112 109
113 110
114} 111}
115void KOPrefsDialog::setupMainTab() 112void KOPrefsDialog::setupMainTab()
116{ 113{
117 QFrame *topFrame = addPage(i18n("General"),0,0); 114 QFrame *topFrame = addPage(i18n("General"),0,0);
118 115
119 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 116 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
120 topLayout->setSpacing(spacingHint()); 117 topLayout->setSpacing(spacingHint());
121 topLayout->setMargin(marginHint()); 118 topLayout->setMargin(marginHint());
122 119
123 120
124 mNameEdit = new QLineEdit(topFrame); 121 mNameEdit = new QLineEdit(topFrame);
125 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 122 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
126 topLayout->addWidget(mNameLabel,0,0); 123 topLayout->addWidget(mNameLabel,0,0);
127 topLayout->addWidget(mNameEdit,0,1); 124 topLayout->addWidget(mNameEdit,0,1);
128 125
129 mEmailEdit = new QLineEdit(topFrame); 126 mEmailEdit = new QLineEdit(topFrame);
130 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 127 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
131 topLayout->addWidget(mEmailLabel,1,0); 128 topLayout->addWidget(mEmailLabel,1,0);
132 topLayout->addWidget(mEmailEdit,1,1); 129 topLayout->addWidget(mEmailEdit,1,1);
133 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 130 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
134 topLayout->addMultiCellWidget(lab,2,2,0,1); 131 topLayout->addMultiCellWidget(lab,2,2,0,1);
135 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 132 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
136 &(KOPrefs::instance()->mUseKapi),topFrame); 133 &(KOPrefs::instance()->mUseKapi),topFrame);
137 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 134 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
138} 135}
139 136
140void KOPrefsDialog::setupMailTab() 137void KOPrefsDialog::setupMailTab()
141{ 138{
142 QFrame *topFrame = addPage(i18n("Mail"),0,0); 139 QFrame *topFrame = addPage(i18n("Mail"),0,0);
143 140
144 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 141 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
145 topLayout->setSpacing(spacingHint()); 142 topLayout->setSpacing(spacingHint());
146 topLayout->setMargin(marginHint()); 143 topLayout->setMargin(marginHint());
147 144
148 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 145 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
149 &(KOPrefs::instance()->mViewAsHtml),topFrame); 146 &(KOPrefs::instance()->mViewAsHtml),topFrame);
150 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 147 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
151 148
152 149
153 ttt = addWidBool(i18n("Send mails later"), 150 ttt = addWidBool(i18n("Send mails later"),
154 &(KOPrefs::instance()->mSendLater),topFrame); 151 &(KOPrefs::instance()->mSendLater),topFrame);
155 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 152 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
156 ttt = addWidBool(i18n("Show \"To\" field in list view"), 153 ttt = addWidBool(i18n("Show \"To\" field in list view"),
157 &(KOPrefs::instance()->mShowToField),topFrame); 154 &(KOPrefs::instance()->mShowToField),topFrame);
158 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); 155 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
159 156
160 int iii =3; 157 int iii =3;
161 ttt = addWidBool(i18n("Show info fields at startup"), 158 ttt = addWidBool(i18n("Show info fields at startup"),
162 &(KOPrefs::instance()->mShowInfoStart),topFrame); 159 &(KOPrefs::instance()->mShowInfoStart),topFrame);
163 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 160 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
164 ++iii; 161 ++iii;
165 ttt = addWidBool(i18n("Show \"Subject\" info field"), 162 ttt = addWidBool(i18n("Show \"Subject\" info field"),
166 &(KOPrefs::instance()->mShowInfoSub),topFrame); 163 &(KOPrefs::instance()->mShowInfoSub),topFrame);
167 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 164 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
168 ++iii; 165 ++iii;
169 ttt = addWidBool(i18n("Show \"From\" info field"), 166 ttt = addWidBool(i18n("Show \"From\" info field"),
170 &(KOPrefs::instance()->mShowInfoFrom),topFrame); 167 &(KOPrefs::instance()->mShowInfoFrom),topFrame);
171 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 168 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
172 ++iii; 169 ++iii;
173 ttt = addWidBool(i18n("Show \"To\" info field"), 170 ttt = addWidBool(i18n("Show \"To\" info field"),
174 &(KOPrefs::instance()->mShowInfoTo),topFrame); 171 &(KOPrefs::instance()->mShowInfoTo),topFrame);
175 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 172 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
176 ++iii; 173 ++iii;
177 174
178 /* 175 /*
179 mCodecEdit = new QLineEdit(topFrame); 176 mCodecEdit = new QLineEdit(topFrame);
180 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 177 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
181 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 178 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
182 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 179 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
183 */ 180 */
184} 181}
185void KOPrefsDialog::setupFontsTab() 182void KOPrefsDialog::setupFontsTab()
186{ 183{
187 184
188 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 185 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
189 // DesktopIcon("fonts",KIcon::SizeMedium)); 186 // DesktopIcon("fonts",KIcon::SizeMedium));
190 187
191 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 188 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
192 topLayout->setSpacing(1); 189 topLayout->setSpacing(1);
193 topLayout->setMargin(3); 190 topLayout->setMargin(3);
194 KPrefsDialogWidFont * tVFont; 191 KPrefsDialogWidFont * tVFont;
195 int i = 0; 192 int i = 0;
196 KPrefsDialogWidFont *timeLabelsFont = 193 KPrefsDialogWidFont *timeLabelsFont =
197 addWidFont(i18n("OK"),i18n("Application(nr)"), 194 addWidFont(i18n("OK"),i18n("Application(nr)"),
198 &(KOPrefs::instance()->mAppFont),topFrame); 195 &(KOPrefs::instance()->mAppFont),topFrame);
199 topLayout->addWidget(timeLabelsFont->label(),i,0); 196 topLayout->addWidget(timeLabelsFont->label(),i,0);
200 topLayout->addWidget(timeLabelsFont->preview(),i,1); 197 topLayout->addWidget(timeLabelsFont->preview(),i,1);
201 topLayout->addWidget(timeLabelsFont->button(),i,2); 198 topLayout->addWidget(timeLabelsFont->button(),i,2);
202 ++i; 199 ++i;
203 200
204 201
205 timeLabelsFont = 202 timeLabelsFont =
206 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 203 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
207 &(KOPrefs::instance()->mComposeFont),topFrame); 204 &(KOPrefs::instance()->mComposeFont),topFrame);
208 topLayout->addWidget(timeLabelsFont->label(),i,0); 205 topLayout->addWidget(timeLabelsFont->label(),i,0);
209 topLayout->addWidget(timeLabelsFont->preview(),i,1); 206 topLayout->addWidget(timeLabelsFont->preview(),i,1);
210 topLayout->addWidget(timeLabelsFont->button(),i,2); 207 topLayout->addWidget(timeLabelsFont->button(),i,2);
211 ++i; 208 ++i;
212 209
213 KPrefsDialogWidFont *timeBarFont = 210 KPrefsDialogWidFont *timeBarFont =
214 addWidFont(i18n("Hello"),i18n("Read mail:"), 211 addWidFont(i18n("Hello"),i18n("Read mail:"),
215 &(KOPrefs::instance()->mReadFont),topFrame); 212 &(KOPrefs::instance()->mReadFont),topFrame);
216 topLayout->addWidget(timeBarFont->label(),i,0); 213 topLayout->addWidget(timeBarFont->label(),i,0);
217 topLayout->addWidget(timeBarFont->preview(),i,1); 214 topLayout->addWidget(timeBarFont->preview(),i,1);
218 topLayout->addWidget(timeBarFont->button(),i,2); 215 topLayout->addWidget(timeBarFont->button(),i,2);
219 ++i; 216 ++i;
220 217
221 topLayout->setColStretch(1,1); 218 topLayout->setColStretch(1,1);
222 topLayout->setRowStretch(4,1); 219 topLayout->setRowStretch(4,1);
223 220
224} 221}
225void KOPrefsDialog::usrReadConfig() 222void KOPrefsDialog::usrReadConfig()
226{ 223{
227 224
228 mNameEdit->setText(KOPrefs::instance()->mName); 225 mNameEdit->setText(KOPrefs::instance()->mName);
229 mEmailEdit->setText(KOPrefs::instance()->mEmail); 226 mEmailEdit->setText(KOPrefs::instance()->mEmail);
230 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 227 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
231 kdelibcfg->readConfig();
232} 228}
233void KOPrefsDialog::usrWriteConfig() 229void KOPrefsDialog::usrWriteConfig()
234{ 230{
235 KOPrefs::instance()->mName = mNameEdit->text(); 231 KOPrefs::instance()->mName = mNameEdit->text();
236 KOPrefs::instance()->mEmail = mEmailEdit->text(); 232 KOPrefs::instance()->mEmail = mEmailEdit->text();
237 //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 233 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
238 kdelibcfg->writeConfig();
239 234
240 235
241} 236}
242 237
243#if 0 238#if 0
244void KOPrefsDialog::setupLocaleDateTab() 239void KOPrefsDialog::setupLocaleDateTab()
245{ 240{
246QFrame *topFrame = addPage(i18n("Date Format"),0,0); 241QFrame *topFrame = addPage(i18n("Date Format"),0,0);
247 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 242 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
248 topLayout->setSpacing(spacingHint()); 243 topLayout->setSpacing(spacingHint());
249 topLayout->setMargin(marginHint()); 244 topLayout->setMargin(marginHint());
250 int iii = 0; 245 int iii = 0;
251 246
252 247
253 KPrefsWidRadios *syncPrefsGroup = 248 KPrefsWidRadios *syncPrefsGroup =
254 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 249 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
255 QString format; 250 QString format;
256 if ( QApplication::desktop()->width() < 480 ) 251 if ( QApplication::desktop()->width() < 480 )
257 format = "(%d.%m.%Y)"; 252 format = "(%d.%m.%Y)";
258 else 253 else
259 format = "(%d.%m.%Y|%A %d %B %Y)"; 254 format = "(%d.%m.%Y|%A %d %B %Y)";
260 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 255 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
261 if ( QApplication::desktop()->width() < 480 ) 256 if ( QApplication::desktop()->width() < 480 )
262 format = "(%m.%d.%Y)"; 257 format = "(%m.%d.%Y)";
263 else 258 else
264 format = "(%m.%d.%Y|%A %B %d %Y)"; 259 format = "(%m.%d.%Y|%A %B %d %Y)";
265 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 260 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
266 if ( QApplication::desktop()->width() < 480 ) 261 if ( QApplication::desktop()->width() < 480 )
267 format = "(%Y-%m-%d)"; 262 format = "(%Y-%m-%d)";
268 else 263 else
269 format = "(%Y-%m-%d|%A %Y %B %d)"; 264 format = "(%Y-%m-%d|%A %Y %B %d)";
270 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 265 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
271 syncPrefsGroup->addRadio(i18n("User defined")); 266 syncPrefsGroup->addRadio(i18n("User defined"));
272 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 267 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
273 ++iii; 268 ++iii;
274 ++iii; 269 ++iii;
275 QLabel * lab; 270 QLabel * lab;
276 mUserDateFormatLong = new QLineEdit(topFrame); 271 mUserDateFormatLong = new QLineEdit(topFrame);
277 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 272 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
278 topLayout->addWidget(lab ,iii,0); 273 topLayout->addWidget(lab ,iii,0);
279 topLayout->addWidget(mUserDateFormatLong,iii,1); 274 topLayout->addWidget(mUserDateFormatLong,iii,1);
280 ++iii; 275 ++iii;
281 mUserDateFormatShort = new QLineEdit(topFrame); 276 mUserDateFormatShort = new QLineEdit(topFrame);
282 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 277 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
283 topLayout->addWidget(lab ,iii,0); 278 topLayout->addWidget(lab ,iii,0);
284 topLayout->addWidget(mUserDateFormatShort,iii,1); 279 topLayout->addWidget(mUserDateFormatShort,iii,1);
285 ++iii; 280 ++iii;
286 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 281 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
287 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 282 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
288 ++iii; 283 ++iii;
289 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 284 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
290 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 285 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
291 ++iii; 286 ++iii;
292 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 287 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
293 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 288 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
294 ++iii; 289 ++iii;
295 290
296} 291}
297 292
298void KOPrefsDialog::setupLocaleTab() 293void KOPrefsDialog::setupLocaleTab()
299{ 294{
300 QFrame *topFrame = addPage(i18n("Locale"),0,0); 295 QFrame *topFrame = addPage(i18n("Locale"),0,0);
301 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 296 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
302 topLayout->setSpacing(spacingHint()); 297 topLayout->setSpacing(spacingHint());
303 topLayout->setMargin(marginHint()); 298 topLayout->setMargin(marginHint());
304 int iii = 0; 299 int iii = 0;
305 KPrefsWidRadios *syncPrefsGroup = 300 KPrefsWidRadios *syncPrefsGroup =
306 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 301 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
307 syncPrefsGroup->addRadio(i18n("English")); 302 syncPrefsGroup->addRadio(i18n("English"));
308 syncPrefsGroup->addRadio(i18n("German")); 303 syncPrefsGroup->addRadio(i18n("German"));
309 syncPrefsGroup->addRadio(i18n("French")); 304 syncPrefsGroup->addRadio(i18n("French"));
310 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 305 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
311 if ( QApplication::desktop()->width() < 300 ) 306 if ( QApplication::desktop()->width() < 300 )
312 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 307 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
313 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 308 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
314 ++iii; 309 ++iii;
315 310
316 syncPrefsGroup = 311 syncPrefsGroup =
317 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 312 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
318 if ( QApplication::desktop()->width() > 300 ) 313 if ( QApplication::desktop()->width() > 300 )
319 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 314 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
320 syncPrefsGroup->addRadio(i18n("24:00")); 315 syncPrefsGroup->addRadio(i18n("24:00"));
321 syncPrefsGroup->addRadio(i18n("12:00am")); 316 syncPrefsGroup->addRadio(i18n("12:00am"));
322 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 317 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
323 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 318 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
324 ++iii; 319 ++iii;
325 KPrefsDialogWidBool *sb; 320 KPrefsDialogWidBool *sb;
326 if ( QApplication::desktop()->width() < 300 ) { 321 if ( QApplication::desktop()->width() < 300 ) {
327 sb = 322 sb =
328 addWidBool(i18n("Week starts on Sunday"), 323 addWidBool(i18n("Week starts on Sunday"),
329 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 324 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
330 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 325 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
331 ++iii; 326 ++iii;
332 sb = 327 sb =
333 addWidBool(i18n("Use short date in (WN/E) view"), 328 addWidBool(i18n("Use short date in (WN/E) view"),
334 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 329 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index a0416ae..7fa9261 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -1,160 +1,159 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <qframe.h>
27#include <qdict.h> 27#include <qdict.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qlistview.h> 29#include <qlistview.h>
30 30
31#include <kdialogbase.h> 31#include <kdialogbase.h>
32 32
33#include <libkdepim/kprefsdialog.h> 33#include <libkdepim/kprefsdialog.h>
34#include <libkdepim/kdateedit.h> 34#include <libkdepim/kdateedit.h>
35#include <kcmconfigs/kdepimconfigwidget.h> 35#include <kcmconfigs/kdepimconfigwidget.h>
36 36
37class KColorButton; 37class KColorButton;
38class QSpinBox; 38class QSpinBox;
39class QSlider; 39class QSlider;
40class KURLRequester; 40class KURLRequester;
41class QComboBox; 41class QComboBox;
42class QLineEdit; 42class QLineEdit;
43class QStringList; 43class QStringList;
44 44
45/** Dialog to change the korganizer configuration. 45/** Dialog to change the korganizer configuration.
46 */ 46 */
47class KOPrefsDialog : public KPrefsDialog 47class KOPrefsDialog : public KPrefsDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 /** Initialize dialog and pages */ 51 /** Initialize dialog and pages */
52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); 52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
53 ~KOPrefsDialog(); 53 ~KOPrefsDialog();
54 54
55protected: 55protected:
56 void usrReadConfig(); 56 void usrReadConfig();
57 void usrWriteConfig(); 57 void usrWriteConfig();
58 58
59 void setupMainTab(); 59 void setupMainTab();
60 void setupGlobalTab(); 60 void setupGlobalTab();
61 void setupMailTab(); 61 void setupMailTab();
62 void setupFontsTab(); 62 void setupFontsTab();
63 private: 63 private:
64 KDEPIMConfigWidget* kdelibcfg;
65 QLineEdit *mNameEdit; 64 QLineEdit *mNameEdit;
66 QLineEdit *mCodecEdit; 65 QLineEdit *mCodecEdit;
67 QLineEdit *mEmailEdit; 66 QLineEdit *mEmailEdit;
68 QLabel *mNameLabel; 67 QLabel *mNameLabel;
69 QLabel *mEmailLabel; 68 QLabel *mEmailLabel;
70#if 0 69#if 0
71 /* 70 /*
72 public slots: 71 public slots:
73 void showPrinterTab(); 72 void showPrinterTab();
74 73
75 74
76 void updateCategories(); 75 void updateCategories();
77 void showSyncPage(); 76 void showSyncPage();
78 protected slots: 77 protected slots:
79 void selectSoundFile(); 78 void selectSoundFile();
80 void setCategoryColor(); 79 void setCategoryColor();
81 void updateCategoryColor(); 80 void updateCategoryColor();
82 void updateTimezoneOffset( int ); 81 void updateTimezoneOffset( int );
83 82
84 83
85 void warningExperimental(bool on); 84 void warningExperimental(bool on);
86 void warningGroupScheduling(); 85 void warningGroupScheduling();
87 void warningProjectView(); 86 void warningProjectView();
88 87
89 void toggleEmailSettings(bool); 88 void toggleEmailSettings(bool);
90 89
91 //additional emails 90 //additional emails
92 void addItem(); 91 void addItem();
93 void removeItem(); 92 void removeItem();
94 void updateItem(); 93 void updateItem();
95 void updateInput(); 94 void updateInput();
96*/ 95*/
97 protected: 96 protected:
98 void usrReadConfig(); 97 void usrReadConfig();
99 void usrWriteConfig(); 98 void usrWriteConfig();
100 99
101 void setupMainTab(); 100 void setupMainTab();
102 void setupTimeTab(); 101 void setupTimeTab();
103 void setupTimeZoneTab(); 102 void setupTimeZoneTab();
104 void setupLocaleTab(); 103 void setupLocaleTab();
105 void setupLocaleDateTab(); 104 void setupLocaleDateTab();
106 void setupFontsTab(); 105 void setupFontsTab();
107 void setupColorsTab(); 106 void setupColorsTab();
108 void setupViewsTab(); 107 void setupViewsTab();
109 void setupDisplayTab(); 108 void setupDisplayTab();
110 void setupPrinterTab(); 109 void setupPrinterTab();
111 void setupGroupSchedulingTab(); 110 void setupGroupSchedulingTab();
112 void setupGroupAutomationTab(); 111 void setupGroupAutomationTab();
113 void setupSyncTab(); 112 void setupSyncTab();
114 void setupSyncAlgTab(); 113 void setupSyncAlgTab();
115 114
116 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); 115 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
117 116
118 117
119 private: 118 private:
120 KPrefsWidBool *mEnableGroupScheduling; 119 KPrefsWidBool *mEnableGroupScheduling;
121 KPrefsWidBool *mEnableProjectView; 120 KPrefsWidBool *mEnableProjectView;
122 121
123 QFrame *mPrinterTab; 122 QFrame *mPrinterTab;
124 123
125 QLineEdit *nameEdit; 124 QLineEdit *nameEdit;
126 QLineEdit *emailEdit; 125 QLineEdit *emailEdit;
127 126
128 QComboBox *timeCombo; 127 QComboBox *timeCombo;
129 QComboBox *tzCombo; 128 QComboBox *tzCombo;
130 129
131 // widgets holding preferences data 130 // widgets holding preferences data
132 QLineEdit *mNameEdit; 131 QLineEdit *mNameEdit;
133 QLineEdit *mEmailEdit; 132 QLineEdit *mEmailEdit;
134 QLabel *mNameLabel; 133 QLabel *mNameLabel;
135 QLabel *mEmailLabel; 134 QLabel *mEmailLabel;
136 QLineEdit *mAdditionalEdit; 135 QLineEdit *mAdditionalEdit;
137 QSpinBox *mAutoSaveIntervalSpin; 136 QSpinBox *mAutoSaveIntervalSpin;
138 QSpinBox *mPrioSpin; 137 QSpinBox *mPrioSpin;
139 // QListView *mAMails; 138 // QListView *mAMails;
140 QLineEdit *aEmailsEdit; 139 QLineEdit *aEmailsEdit;
141 140
142 QComboBox *mTimeZoneCombo; 141 QComboBox *mTimeZoneCombo;
143 QStringList tzonenames; 142 QStringList tzonenames;
144 QSpinBox *mStartTimeSpin; 143 QSpinBox *mStartTimeSpin;
145 QSpinBox *mDefaultDurationSpin; 144 QSpinBox *mDefaultDurationSpin;
146 QComboBox *mAlarmTimeCombo; 145 QComboBox *mAlarmTimeCombo;
147 146
148 QComboBox *mCategoryCombo; 147 QComboBox *mCategoryCombo;
149 KColorButton *mCategoryButton; 148 KColorButton *mCategoryButton;
150 QDict<QColor> mCategoryDict; 149 QDict<QColor> mCategoryDict;
151 150
152 QSlider *mHourSizeSlider; 151 QSlider *mHourSizeSlider;
153 152
154 QSpinBox *mNextXDaysSpin; 153 QSpinBox *mNextXDaysSpin;
155 QSpinBox *mWhatsNextSpin; 154 QSpinBox *mWhatsNextSpin;
156 155
157 QLineEdit * mRemoteIPEdit; 156 QLineEdit * mRemoteIPEdit;
158 QLineEdit * mRemoteUser; 157 QLineEdit * mRemoteUser;
159 QLineEdit * mRemotePassWd; 158 QLineEdit * mRemotePassWd;
160 QLineEdit * mRemoteFile; 159 QLineEdit * mRemoteFile;
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 9a52d1b..e3c5ec3 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -2,197 +2,207 @@
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qvbox.h> 4#include <qvbox.h>
5#include <qheader.h> 5#include <qheader.h>
6#include <qtimer.h> 6#include <qtimer.h>
7#include <qlayout.h> 7#include <qlayout.h>
8//#include <kdialog.h> 8//#include <kdialog.h>
9#include <kiconloader.h> 9#include <kiconloader.h>
10#include <kapplication.h> 10#include <kapplication.h>
11 11
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qapplication.h> 13#include <qapplication.h>
14#include <qstatusbar.h> 14#include <qstatusbar.h>
15#include <kabc/stdaddressbook.h> 15#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h" 22#include "koprefs.h"
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26 26
27#include "koprefs.h" 27#include "koprefs.h"
28 28
29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
30 : QMainWindow( parent, name ) //, flags ) 30 : QMainWindow( parent, name ) //, flags )
31{ 31{
32#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
33 globalSstatusBarMainWindow = statusBar(); 33 globalSstatusBarMainWindow = statusBar();
34#endif 34#endif
35 setCaption( i18n( "KOpieMail/Pi" ) ); 35 setCaption( i18n( "KOpieMail/Pi" ) );
36 setToolBarsMovable( false ); 36 setToolBarsMovable( false );
37 //KABC::StdAddressBook::self(); 37 //KABC::StdAddressBook::self();
38 toolBar = new QToolBar( this ); 38 toolBar = new QToolBar( this );
39 menuBar = new QPEMenuBar( toolBar ); 39 menuBar = new QPEMenuBar( toolBar );
40 mailMenu = new QPopupMenu( menuBar ); 40 mailMenu = new QPopupMenu( menuBar );
41 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 41 menuBar->insertItem( i18n( "Mail" ), mailMenu );
42 settingsMenu = new QPopupMenu( menuBar ); 42 settingsMenu = new QPopupMenu( menuBar );
43 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 43 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
44 44
45 addToolBar( toolBar ); 45 addToolBar( toolBar );
46 toolBar->setHorizontalStretchable( true ); 46 toolBar->setHorizontalStretchable( true );
47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
48 0, 0, this ); 48 0, 0, this );
49 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
50 SLOT( slotGetAllMail() ) ); 50 SLOT( slotGetAllMail() ) );
51 getMail->addTo( mailMenu ); 51 getMail->addTo( mailMenu );
52 52
53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
54 0, 0, this ); 54 0, 0, this );
55 getMail->addTo( toolBar ); 55 getMail->addTo( toolBar );
56 getMail->addTo( mailMenu ); 56 getMail->addTo( mailMenu );
57 connect(getMail, SIGNAL( activated() ), 57 connect(getMail, SIGNAL( activated() ),
58 SLOT( slotGetMail() ) ); 58 SLOT( slotGetMail() ) );
59 59
60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
61 0, 0, this ); 61 0, 0, this );
62 composeMail->addTo( toolBar ); 62 composeMail->addTo( toolBar );
63 composeMail->addTo( mailMenu ); 63 composeMail->addTo( mailMenu );
64 64
65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
66 0, 0, this ); 66 0, 0, this );
67 sendQueued->addTo( toolBar ); 67 sendQueued->addTo( toolBar );
68 sendQueued->addTo( mailMenu ); 68 sendQueued->addTo( mailMenu );
69 69
70 /* 70 /*
71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
72 0, 0, this ); 72 0, 0, this );
73 syncFolders->addTo( toolBar ); 73 syncFolders->addTo( toolBar );
74 syncFolders->addTo( mailMenu ); 74 syncFolders->addTo( mailMenu );
75 */ 75 */
76 76
77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
78 0, 0, this, 0, true ); 78 0, 0, this, 0, true );
79 showFolders->addTo( toolBar ); 79 showFolders->addTo( toolBar );
80 showFolders->addTo( mailMenu ); 80 showFolders->addTo( mailMenu );
81 showFolders->setOn( true ); 81 showFolders->setOn( true );
82 connect(showFolders, SIGNAL( toggled(bool) ), 82 connect(showFolders, SIGNAL( toggled(bool) ),
83 SLOT( slotShowFolders(bool) ) ); 83 SLOT( slotShowFolders(bool) ) );
84 84
85 /* 85 /*
86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
87 0, 0, this ); 87 0, 0, this );
88 searchMails->kopddTo( toolBar ); 88 searchMails->kopddTo( toolBar );
89 searchMails->addTo( mailMenu ); 89 searchMails->addTo( mailMenu );
90 */ 90 */
91 91
92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
93 deleteMails->addTo( toolBar ); 93 deleteMails->addTo( toolBar );
94 deleteMails->addTo( mailMenu ); 94 deleteMails->addTo( mailMenu );
95 connect( deleteMails, SIGNAL( activated() ), 95 connect( deleteMails, SIGNAL( activated() ),
96 SLOT( slotDeleteAllMail() ) ); 96 SLOT( slotDeleteAllMail() ) );
97 97
98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 98 editSettings = new QAction( i18n( "Configure OM/Pi..." ), SmallIcon("SettingsIcon") ,
99 0, 0, this ); 99 0, 0, this );
100 editSettings->addTo( settingsMenu ); 100 editSettings->addTo( settingsMenu );
101 connect( editSettings, SIGNAL( activated() ), 101 connect( editSettings, SIGNAL( activated() ),
102 SLOT( slotEditSettings() ) ); 102 SLOT( slotEditSettings() ) );
103
104
105 QAction * editSettings2 = new QAction( i18n( "Global Settings..." ), SmallIcon("SettingsIcon") ,
106 0, 0, this );
107 editSettings2->addTo( settingsMenu );
108 connect( editSettings2, SIGNAL( activated() ),
109 SLOT( slotEditGlobalSettings() ) );
110
111
112
103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 113 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
104 0, 0, this ); 114 0, 0, this );
105 editAccounts->addTo( settingsMenu ); 115 editAccounts->addTo( settingsMenu );
106 codecMenu = new QPopupMenu( menuBar ); 116 codecMenu = new QPopupMenu( menuBar );
107 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 117 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 118 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
109 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 119 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
110 codecMenu->insertItem( "Chinese (big-5)",3,3); 120 codecMenu->insertItem( "Chinese (big-5)",3,3);
111 codecMenu->insertItem( "Unicode (utf-8)",4,4); 121 codecMenu->insertItem( "Unicode (utf-8)",4,4);
112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 122 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
113 //disabled 123 //disabled
114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 124 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
115 //setCentralWidget( view ); 125 //setCentralWidget( view );
116 126
117 QVBox* wrapperBox = new QVBox( this ); 127 QVBox* wrapperBox = new QVBox( this );
118 setCentralWidget( wrapperBox ); 128 setCentralWidget( wrapperBox );
119 129
120 // QWidget *view = new QWidget( wrapperBox ); 130 // QWidget *view = new QWidget( wrapperBox );
121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 131 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 132 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 133 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 134 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 135 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
126 subLE = 0; 136 subLE = 0;
127 fromLE = 0; 137 fromLE = 0;
128 toLE = 0; 138 toLE = 0;
129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 139 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
130 QWidget* infoBox = new QWidget( splithor ); 140 QWidget* infoBox = new QWidget( splithor );
131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 141 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
132 if ( KOPrefs::instance()->mShowInfoSub ) { 142 if ( KOPrefs::instance()->mShowInfoSub ) {
133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 143 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 144 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
135 } 145 }
136 if ( KOPrefs::instance()->mShowInfoFrom ) { 146 if ( KOPrefs::instance()->mShowInfoFrom ) {
137 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); 147 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 );
138 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; 148 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ;
139 } 149 }
140 if ( KOPrefs::instance()->mShowInfoTo ) { 150 if ( KOPrefs::instance()->mShowInfoTo ) {
141 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); 151 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 );
142 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 152 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
143 } 153 }
144 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 154 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
145 if ( !KOPrefs::instance()->mShowInfoStart ) { 155 if ( !KOPrefs::instance()->mShowInfoStart ) {
146 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); 156 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
147 } 157 }
148 } 158 }
149 159
150 160
151 folderView = new AccountView( split ); 161 folderView = new AccountView( split );
152 folderView->header()->hide(); 162 folderView->header()->hide();
153 folderView->setRootIsDecorated( false ); 163 folderView->setRootIsDecorated( false );
154 folderView->addColumn( i18n( "Mailbox" ) ); 164 folderView->addColumn( i18n( "Mailbox" ) );
155 165
156 //layout->addWidget( folderView ); 166 //layout->addWidget( folderView );
157 167
158 mailView = new QListView( split ); 168 mailView = new QListView( split );
159 mailView->addColumn( i18n( " " ) ); 169 mailView->addColumn( i18n( " " ) );
160 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 170 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
161 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 171 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
162 mailView->addColumn( i18n( "Size" ),QListView::Manual); 172 mailView->addColumn( i18n( "Size" ),QListView::Manual);
163 mailView->addColumn( i18n( "Date" ),QListView::Manual); 173 mailView->addColumn( i18n( "Date" ),QListView::Manual);
164 if ( KOPrefs::instance()->mShowToField ) 174 if ( KOPrefs::instance()->mShowToField )
165 mailView->addColumn( i18n( "To" ),QListView::Manual); 175 mailView->addColumn( i18n( "To" ),QListView::Manual);
166 mailView->setAllColumnsShowFocus(true); 176 mailView->setAllColumnsShowFocus(true);
167 //mailView->setSorting(-1); 177 //mailView->setSorting(-1);
168 mailView->setRootIsDecorated( false ); 178 mailView->setRootIsDecorated( false );
169 statusWidget = new StatusWidget( wrapperBox ); 179 statusWidget = new StatusWidget( wrapperBox );
170 statusWidget->hide(); 180 statusWidget->hide();
171 181
172 //layout->addWidget( mailView ); 182 //layout->addWidget( mailView );
173 //layout->setStretchFactor( folderView, 1 ); 183 //layout->setStretchFactor( folderView, 1 );
174 //layout->setStretchFactor( mailView, 2 ); 184 //layout->setStretchFactor( mailView, 2 );
175 185
176 slotAdjustLayout(); 186 slotAdjustLayout();
177#ifndef DESKTOP_VERSION 187#ifndef DESKTOP_VERSION
178 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 188 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
179 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 189 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
180 if ( subLE ) 190 if ( subLE )
181 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 191 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
182 if ( fromLE ) 192 if ( fromLE )
183 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 193 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
184 if ( toLE ) 194 if ( toLE )
185 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 195 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
186#endif 196#endif
187 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 197 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
188 SLOT( mailLeftClicked(QListViewItem*) ) ); 198 SLOT( mailLeftClicked(QListViewItem*) ) );
189 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 199 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
190 SLOT( mailLeftClicked(QListViewItem*) ) ); 200 SLOT( mailLeftClicked(QListViewItem*) ) );
191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 201 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 202 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 203 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
194 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 204 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
195 205
196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 206 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
197 SLOT( setInfoFields(QListViewItem*) ) ); 207 SLOT( setInfoFields(QListViewItem*) ) );
198 208
@@ -276,141 +286,144 @@ void MainWindow::slotSetCodec( int codec )
276 break; 286 break;
277 case 1: 287 case 1:
278 name = "iso-8859-5"; 288 name = "iso-8859-5";
279 break; 289 break;
280 case 2: 290 case 2:
281 name = "iso-8859-15"; 291 name = "iso-8859-15";
282 break; 292 break;
283 case 3: 293 case 3:
284 name = "big-5"; 294 name = "big-5";
285 break; 295 break;
286 case 4: 296 case 4:
287 name = "utf-8"; 297 name = "utf-8";
288 break; 298 break;
289 case 5: 299 case 5:
290 name = KOPrefs::instance()->mSendCodec.lower(); 300 name = KOPrefs::instance()->mSendCodec.lower();
291 break; 301 break;
292 } 302 }
293 KOPrefs::instance()->mCurrentCodeName = name ; 303 KOPrefs::instance()->mCurrentCodeName = name ;
294 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 304 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
295 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 305 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
296} 306}
297void MainWindow::showLicence() 307void MainWindow::showLicence()
298{ 308{
299 KApplication::showLicence(); 309 KApplication::showLicence();
300} 310}
301void MainWindow::showAbout() 311void MainWindow::showAbout()
302{ 312{
303 QString version; 313 QString version;
304#include <../version> 314#include <../version>
305 315
306 QString cap = "About KOpieMail/Pi"; 316 QString cap = "About KOpieMail/Pi";
307 QString text =i18n("KOpieMail/Platform-independent\n") + 317 QString text =i18n("KOpieMail/Platform-independent\n") +
308 "(OM/Pi) " + version + " - " 318 "(OM/Pi) " + version + " - "
309 319
310#ifdef DESKTOP_VERSION 320#ifdef DESKTOP_VERSION
311 "Desktop Edition\n" 321 "Desktop Edition\n"
312#else 322#else
313 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 323 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
314#endif 324#endif
315 "www.pi-sync.info\n\n" 325 "www.pi-sync.info\n\n"
316 326
317 327
318 328
319"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" 329"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n"
320 "KOpieMail/Pi is based on Opie Mail\n" 330 "KOpieMail/Pi is based on Opie Mail\n"
321 "Copyright (c) Rajko Albrecht and the Opie team\n" 331 "Copyright (c) Rajko Albrecht and the Opie team\n"
322 "KOpieMail/Pi is licensed under the GPL\n" 332 "KOpieMail/Pi is licensed under the GPL\n"
323 "\n" 333 "\n"
324 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 334 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
325 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 335 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
326 "libEtPan has its own licence - see LibEtPan licence\n"; 336 "libEtPan has its own licence - see LibEtPan licence\n";
327 337
328 KApplication::showText( cap, text ); 338 KApplication::showText( cap, text );
329} 339}
330void MainWindow::showEtpanLicence() 340void MainWindow::showEtpanLicence()
331{ 341{
332 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 342 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
333 343
334} 344}
335void MainWindow::appMessage(const QCString &, const QByteArray &) 345void MainWindow::appMessage(const QCString &, const QByteArray &)
336{ 346{
337 qDebug("appMessage implemented by subclass"); 347 qDebug("appMessage implemented by subclass");
338} 348}
339 349
340void MainWindow::slotAdjustLayout() { 350void MainWindow::slotAdjustLayout() {
341 351
342 /* 352 /*
343 QWidget *d = QApplication::desktop(); 353 QWidget *d = QApplication::desktop();
344 354
345 if ( d->width() < d->height() ) { 355 if ( d->width() < d->height() ) {
346 layout->setDirection( QBoxLayout::TopToBottom ); 356 layout->setDirection( QBoxLayout::TopToBottom );
347 } else { 357 } else {
348 layout->setDirection( QBoxLayout::LeftToRight ); 358 layout->setDirection( QBoxLayout::LeftToRight );
349 } 359 }
350 */ 360 */
351} 361}
352 362
353void MainWindow::slotAdjustColumns() 363void MainWindow::slotAdjustColumns()
354{ 364{
355 bool hidden = folderView->isHidden(); 365 bool hidden = folderView->isHidden();
356 if ( hidden ) folderView->show(); 366 if ( hidden ) folderView->show();
357 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 367 folderView->setColumnWidth( 0, folderView->visibleWidth() );
358 if ( hidden ) folderView->hide(); 368 if ( hidden ) folderView->hide();
359 369
360 mailView->setColumnWidth( 0, 10 ); 370 mailView->setColumnWidth( 0, 10 );
361 mailView->setColumnWidth( 1, 100 ); 371 mailView->setColumnWidth( 1, 100 );
362 mailView->setColumnWidth( 2, 100 ); 372 mailView->setColumnWidth( 2, 100 );
363 mailView->setColumnWidth( 3, 50 ); 373 mailView->setColumnWidth( 3, 50 );
364 mailView->setColumnWidth( 4, 120 ); 374 mailView->setColumnWidth( 4, 120 );
365 if ( KOPrefs::instance()->mShowToField ) 375 if ( KOPrefs::instance()->mShowToField )
366 mailView->setColumnWidth( 5, 100 ); 376 mailView->setColumnWidth( 5, 100 );
367} 377}
368 378
369void MainWindow::slotEditSettings() 379void MainWindow::slotEditSettings()
370{ 380{
371} 381}
382void MainWindow::slotEditGlobalSettings()
383{
384}
372 385
373void MainWindow::slotShowFolders( bool ) 386void MainWindow::slotShowFolders( bool )
374{ 387{
375 qDebug("not implemented: "); 388 qDebug("not implemented: ");
376} 389}
377 390
378void MainWindow::refreshMailView(const QValueList<RecMailP>&) 391void MainWindow::refreshMailView(const QValueList<RecMailP>&)
379{ 392{
380 qDebug("not implemented: "); 393 qDebug("not implemented: ");
381} 394}
382 395
383void MainWindow::mailLeftClicked(QListViewItem * ) 396void MainWindow::mailLeftClicked(QListViewItem * )
384{ 397{
385 qDebug("not implemented: "); 398 qDebug("not implemented: ");
386} 399}
387 400
388void MainWindow::displayMail() 401void MainWindow::displayMail()
389{ 402{
390 qDebug("not implemented: "); 403 qDebug("not implemented: ");
391} 404}
392 405
393void MainWindow::slotDeleteMail() 406void MainWindow::slotDeleteMail()
394{ 407{
395 qDebug("not implemented: "); 408 qDebug("not implemented: ");
396} 409}
397 410
398void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 411void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
399{ 412{
400 qDebug("not implemented: "); 413 qDebug("not implemented: ");
401} 414}
402 415
403void MainWindow::slotSendQueued() 416void MainWindow::slotSendQueued()
404{ 417{
405 qDebug("not implemented: "); 418 qDebug("not implemented: ");
406} 419}
407 420
408void MainWindow::slotEditAccounts() 421void MainWindow::slotEditAccounts()
409{ 422{
410 qDebug("not implemented: "); 423 qDebug("not implemented: ");
411} 424}
412 425
413void MainWindow::slotComposeMail() 426void MainWindow::slotComposeMail()
414{ 427{
415 qDebug("not implemented: "); 428 qDebug("not implemented: ");
416} 429}
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index ddb3fca..6894039 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,73 +1,74 @@
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 <qlistview.h> 7#include <qlistview.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 appMessage(const QCString &msg, const QByteArray &data); 37 virtual void appMessage(const QCString &msg, const QByteArray &data);
38 virtual void slotComposeMail(); 38 virtual void slotComposeMail();
39 39
40protected slots: 40protected slots:
41 virtual void setInfoFields(QListViewItem* ); 41 virtual void setInfoFields(QListViewItem* );
42 virtual void slotSendQueued(); 42 virtual void slotSendQueued();
43 virtual void slotEditAccounts(); 43 virtual void slotEditAccounts();
44 virtual void slotShowFolders( bool show ); 44 virtual void slotShowFolders( bool show );
45 virtual void refreshMailView(const QValueList<RecMailP>&); 45 virtual void refreshMailView(const QValueList<RecMailP>&);
46 virtual void displayMail(); 46 virtual void displayMail();
47 virtual void slotGetMail() = 0; 47 virtual void slotGetMail() = 0;
48 virtual void slotGetAllMail() = 0; 48 virtual void slotGetAllMail() = 0;
49 virtual void slotDeleteMail(); 49 virtual void slotDeleteMail();
50 virtual void slotDeleteAllMail() = 0; 50 virtual void slotDeleteAllMail() = 0;
51 virtual void slotSetCodec(int); 51 virtual void slotSetCodec(int);
52 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 52 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
53 virtual void slotAdjustLayout(); 53 virtual void slotAdjustLayout();
54 virtual void slotEditSettings(); 54 virtual void slotEditSettings();
55 virtual void slotEditGlobalSettings();
55 virtual void mailLeftClicked( QListViewItem * ); 56 virtual void mailLeftClicked( QListViewItem * );
56 void showLicence(); 57 void showLicence();
57 void showAbout(); 58 void showAbout();
58 void showEtpanLicence(); 59 void showEtpanLicence();
59 60
60protected: 61protected:
61 QToolBar *toolBar; 62 QToolBar *toolBar;
62 StatusWidget *statusWidget; 63 StatusWidget *statusWidget;
63 QPEMenuBar *menuBar; 64 QPEMenuBar *menuBar;
64 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
65 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
66 *editSettings, *editAccounts, *syncFolders; 67 *editSettings, *editAccounts, *syncFolders;
67 AccountView *folderView; 68 AccountView *folderView;
68 QListView *mailView; 69 QListView *mailView;
69 QLineEdit* toLE,*fromLE,*subLE; 70 QLineEdit* toLE,*fromLE,*subLE;
70 //QBoxLayout *layout; 71 //QBoxLayout *layout;
71}; 72};
72 73
73#endif 74#endif
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 4436ad6..8ac3451 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -151,192 +151,197 @@ void OpieMail::slotwriteMail2(const QString& namemail )
151void OpieMail::slotwriteMail(const QString&name,const QString&email) 151void OpieMail::slotwriteMail(const QString&name,const QString&email)
152{ 152{
153 // qDebug("OpieMail::slotwriteMail "); 153 // qDebug("OpieMail::slotwriteMail ");
154 ComposeMail compose( settings, this, 0, true ); 154 ComposeMail compose( settings, this, 0, true );
155 if (!email.isEmpty()) 155 if (!email.isEmpty())
156 { 156 {
157 if (!name.isEmpty()) 157 if (!name.isEmpty())
158 { 158 {
159 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 159 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
160 } 160 }
161 else 161 else
162 { 162 {
163 compose.setTo(email); 163 compose.setTo(email);
164 } 164 }
165 } 165 }
166 compose.slotAdjustColumns(); 166 compose.slotAdjustColumns();
167#ifndef DESKTOP_VERSION 167#ifndef DESKTOP_VERSION
168 compose.showMaximized(); 168 compose.showMaximized();
169#endif 169#endif
170 170
171 mCurrentComposer = &compose; 171 mCurrentComposer = &compose;
172 compose.exec(); 172 compose.exec();
173 mCurrentComposer = 0; 173 mCurrentComposer = 0;
174 folderView->refreshOutgoing(); 174 folderView->refreshOutgoing();
175 raise(); 175 raise();
176} 176}
177 177
178void OpieMail::slotComposeMail() 178void OpieMail::slotComposeMail()
179{ 179{
180 if ( mPendingEmail == QString::null && mPendingName == QString::null) 180 if ( mPendingEmail == QString::null && mPendingName == QString::null)
181 slotwriteMail2( QString () ); 181 slotwriteMail2( QString () );
182 else { 182 else {
183 if ( mPendingEmail == QString::null ) 183 if ( mPendingEmail == QString::null )
184 slotwriteMail2( mPendingName ); 184 slotwriteMail2( mPendingName );
185 else 185 else
186 slotwriteMail( mPendingName, mPendingEmail ); 186 slotwriteMail( mPendingName, mPendingEmail );
187 } 187 }
188 //slotwriteMail(0l,0l); 188 //slotwriteMail(0l,0l);
189} 189}
190 190
191void OpieMail::slotSendQueued() 191void OpieMail::slotSendQueued()
192{ 192{
193 SMTPaccount *smtp = 0; 193 SMTPaccount *smtp = 0;
194 194
195 QList<Account> list = settings->getAccounts(); 195 QList<Account> list = settings->getAccounts();
196 QList<SMTPaccount> smtpList; 196 QList<SMTPaccount> smtpList;
197 smtpList.setAutoDelete(false); 197 smtpList.setAutoDelete(false);
198 Account *it; 198 Account *it;
199 for ( it = list.first(); it; it = list.next() ) 199 for ( it = list.first(); it; it = list.next() )
200 { 200 {
201 if ( it->getType() == MAILLIB::A_SMTP ) 201 if ( it->getType() == MAILLIB::A_SMTP )
202 { 202 {
203 smtp = static_cast<SMTPaccount *>(it); 203 smtp = static_cast<SMTPaccount *>(it);
204 smtpList.append(smtp); 204 smtpList.append(smtp);
205 } 205 }
206 } 206 }
207 if (smtpList.count()==0) 207 if (smtpList.count()==0)
208 { 208 {
209 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp\n account first!\n")); 209 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp\n account first!\n"));
210 return; 210 return;
211 } 211 }
212 if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to\nsend all queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) 212 if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to\nsend all queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
213 return; 213 return;
214 if (smtpList.count()==1) 214 if (smtpList.count()==1)
215 { 215 {
216 smtp = smtpList.at(0); 216 smtp = smtpList.at(0);
217 } 217 }
218 else 218 else
219 { 219 {
220 smtp = 0; 220 smtp = 0;
221 selectsmtp selsmtp; 221 selectsmtp selsmtp;
222 selsmtp.setSelectionlist(&smtpList); 222 selsmtp.setSelectionlist(&smtpList);
223 selsmtp.resize( selsmtp.sizeHint() ); 223 selsmtp.resize( selsmtp.sizeHint() );
224 if ( selsmtp.exec() == QDialog::Accepted ) 224 if ( selsmtp.exec() == QDialog::Accepted )
225 { 225 {
226 smtp = selsmtp.selected_smtp(); 226 smtp = selsmtp.selected_smtp();
227 } 227 }
228 } 228 }
229 if (smtp) 229 if (smtp)
230 { 230 {
231 231
232 Global::statusMessage("Sending mails...!"); 232 Global::statusMessage("Sending mails...!");
233 SMTPwrapper * wrap = new SMTPwrapper(smtp); 233 SMTPwrapper * wrap = new SMTPwrapper(smtp);
234 if ( wrap->flushOutbox() ) 234 if ( wrap->flushOutbox() )
235 { 235 {
236 Global::statusMessage("Mails sent!"); 236 Global::statusMessage("Mails sent!");
237 } 237 }
238 delete wrap; 238 delete wrap;
239 } 239 }
240 folderView->refreshOutgoing(); 240 folderView->refreshOutgoing();
241} 241}
242 242
243void OpieMail::slotSearchMails() 243void OpieMail::slotSearchMails()
244{ 244{
245 qDebug("OpieMail::slotSearchMails():not implemented "); 245 qDebug("OpieMail::slotSearchMails():not implemented ");
246} 246}
247void OpieMail::slotEditGlobalSettings()
248{
249 KPimPrefsGlobalDialog gc ( this );
250 gc.exec();
251}
247 252
248void OpieMail::slotEditSettings() 253void OpieMail::slotEditSettings()
249{ 254{
250 255
251 KOPrefsDialog settingsDialog( this, "koprefs", true ); 256 KOPrefsDialog settingsDialog( this, "koprefs", true );
252#ifndef DESKTOP_VERSION 257#ifndef DESKTOP_VERSION
253 settingsDialog.showMaximized(); 258 settingsDialog.showMaximized();
254#endif 259#endif
255 settingsDialog.exec(); 260 settingsDialog.exec();
256 261
257 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 262 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
258 // KApplication::execDialog(settingsDialog); 263 // KApplication::execDialog(settingsDialog);
259} 264}
260 265
261void OpieMail::slotEditAccounts() 266void OpieMail::slotEditAccounts()
262{ 267{
263 EditAccounts eaDialog( settings, this, 0, true ); 268 EditAccounts eaDialog( settings, this, 0, true );
264 eaDialog.slotAdjustColumns(); 269 eaDialog.slotAdjustColumns();
265#ifndef DESKTOP_VERSION 270#ifndef DESKTOP_VERSION
266 eaDialog.showMaximized(); 271 eaDialog.showMaximized();
267#endif 272#endif
268 eaDialog.exec(); 273 eaDialog.exec();
269 if ( settings ) delete settings; 274 if ( settings ) delete settings;
270 settings = new Settings(); 275 settings = new Settings();
271 276
272 folderView->populate( settings->getAccounts() ); 277 folderView->populate( settings->getAccounts() );
273} 278}
274void OpieMail::replyMail() 279void OpieMail::replyMail()
275{ 280{
276 281
277 QListViewItem*item = mailView->currentItem(); 282 QListViewItem*item = mailView->currentItem();
278 if (!item) return; 283 if (!item) return;
279 RecMailP mail = ((MailListViewItem*)item)->data(); 284 RecMailP mail = ((MailListViewItem*)item)->data();
280 RecBodyP body = folderView->fetchBody(mail); 285 RecBodyP body = folderView->fetchBody(mail);
281 286
282 QString rtext; 287 QString rtext;
283 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose 288 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose
284 .arg( mail->getFrom()) 289 .arg( mail->getFrom())
285 .arg( mail->getDate()); 290 .arg( mail->getDate());
286 291
287 QString text = body->Bodytext(); 292 QString text = body->Bodytext();
288 QStringList lines = QStringList::split(QRegExp("\\n"), text); 293 QStringList lines = QStringList::split(QRegExp("\\n"), text);
289 QStringList::Iterator it; 294 QStringList::Iterator it;
290 for (it = lines.begin(); it != lines.end(); it++) 295 for (it = lines.begin(); it != lines.end(); it++)
291 { 296 {
292 rtext += "> " + *it + "\n"; 297 rtext += "> " + *it + "\n";
293 } 298 }
294 rtext += "\n"; 299 rtext += "\n";
295 300
296 QString prefix; 301 QString prefix;
297 if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = ""; 302 if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = "";
298 else prefix = "Re: "; // no i18n on purpose 303 else prefix = "Re: "; // no i18n on purpose
299 304
300 Settings *settings = new Settings(); 305 Settings *settings = new Settings();
301 ComposeMail composer( settings ,this, 0, true); 306 ComposeMail composer( settings ,this, 0, true);
302 if (mail->Replyto().isEmpty()) { 307 if (mail->Replyto().isEmpty()) {
303 composer.setTo( mail->getFrom()); 308 composer.setTo( mail->getFrom());
304 } else { 309 } else {
305 composer.setTo( mail->Replyto()); 310 composer.setTo( mail->Replyto());
306 } 311 }
307 composer.setSubject( prefix + mail->getSubject()); 312 composer.setSubject( prefix + mail->getSubject());
308 composer.setMessage( rtext ); 313 composer.setMessage( rtext );
309 composer.setInReplyTo( mail->Msgid()); 314 composer.setInReplyTo( mail->Msgid());
310 composer.setCharset( body->getCharset() ); 315 composer.setCharset( body->getCharset() );
311 316
312 mCurrentComposer = &composer; 317 mCurrentComposer = &composer;
313 if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) 318 if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
314 { 319 {
315 mail->Wrapper()->answeredMail(mail); 320 mail->Wrapper()->answeredMail(mail);
316 } 321 }
317 mCurrentComposer = 0; 322 mCurrentComposer = 0;
318 folderView->refreshOutgoing(); 323 folderView->refreshOutgoing();
319 delete settings; 324 delete settings;
320 325
321} 326}
322void OpieMail::closeViewMail(ViewMail * vm) 327void OpieMail::closeViewMail(ViewMail * vm)
323{ 328{
324 vm->hide(); 329 vm->hide();
325} 330}
326 331
327void OpieMail::slotDownloadMail( ) 332void OpieMail::slotDownloadMail( )
328{ 333{
329 QListViewItem*item = mailView->currentItem(); 334 QListViewItem*item = mailView->currentItem();
330 if (!item ) { 335 if (!item ) {
331 Global::statusMessage("Error: No item slected!"); 336 Global::statusMessage("Error: No item slected!");
332 return; 337 return;
333 } 338 }
334 RecMailP mail = ((MailListViewItem*)item)->data(); 339 RecMailP mail = ((MailListViewItem*)item)->data();
335 Account * acc = mail->Wrapper()->getAccount(); 340 Account * acc = mail->Wrapper()->getAccount();
336 if ( !acc ) { 341 if ( !acc ) {
337 Global::statusMessage("Mail is already stored locally!"); 342 Global::statusMessage("Mail is already stored locally!");
338 return; 343 return;
339 } 344 }
340 QString lfName = acc->getLocalFolder(); 345 QString lfName = acc->getLocalFolder();
341 //qDebug("local folder " + lfName ); 346 //qDebug("local folder " + lfName );
342 if ( lfName.isEmpty() ) 347 if ( lfName.isEmpty() )
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 4f75b3f..48c5dda 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -1,66 +1,67 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#ifndef OPIEMAIL_H 2#ifndef OPIEMAIL_H
3#define OPIEMAIL_H 3#define OPIEMAIL_H
4 4
5#include "mainwindow.h" 5#include "mainwindow.h"
6#include <libmailwrapper/settings.h> 6#include <libmailwrapper/settings.h>
7 7
8#include <opie2/osmartpointer.h> 8#include <opie2/osmartpointer.h>
9#include <libmailwrapper/mailtypes.h> 9#include <libmailwrapper/mailtypes.h>
10#include <viewmail.h> 10#include <viewmail.h>
11#include <qstringlist.h> 11#include <qstringlist.h>
12 12
13class ComposeMail; 13class ComposeMail;
14 14
15class OpieMail : public MainWindow 15class OpieMail : public MainWindow
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 OpieMail( QWidget *parent = 0, const char *name = 0 ); 20 OpieMail( QWidget *parent = 0, const char *name = 0 );
21 virtual ~OpieMail(); 21 virtual ~OpieMail();
22 static QString appName() { return QString::fromLatin1("kopiemail"); } 22 static QString appName() { return QString::fromLatin1("kopiemail"); }
23 23
24public slots: 24public slots:
25 virtual void slotwriteMail(const QString&name,const QString&email); 25 virtual void slotwriteMail(const QString&name,const QString&email);
26 virtual void slotwriteMail2(const QString&nameemail); 26 virtual void slotwriteMail2(const QString&nameemail);
27 virtual void slotComposeMail(); 27 virtual void slotComposeMail();
28 virtual void slotExtAppHandler(); 28 virtual void slotExtAppHandler();
29 virtual void appMessage(const QCString &msg, const QByteArray &data); 29 virtual void appMessage(const QCString &msg, const QByteArray &data);
30 virtual void message(const QCString &msg, const QByteArray &data); 30 virtual void message(const QCString &msg, const QByteArray &data);
31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
32protected slots: 32protected slots:
33 virtual void deleteAndDisplayNextMail(ViewMail * vm); 33 virtual void deleteAndDisplayNextMail(ViewMail * vm);
34 virtual void displayNextMail(ViewMail * vm); 34 virtual void displayNextMail(ViewMail * vm);
35 virtual void slotSendQueued(); 35 virtual void slotSendQueued();
36 virtual void slotSearchMails(); 36 virtual void slotSearchMails();
37 virtual void slotEditSettings(); 37 virtual void slotEditSettings();
38 virtual void slotEditGlobalSettings();
38 virtual void slotEditAccounts(); 39 virtual void slotEditAccounts();
39 virtual void displayMail(); 40 virtual void displayMail();
40 virtual void replyMail(); 41 virtual void replyMail();
41 virtual void slotDeleteMail(); 42 virtual void slotDeleteMail();
42 virtual void slotGetMail(); 43 virtual void slotGetMail();
43 virtual void slotGetAllMail(); 44 virtual void slotGetAllMail();
44 virtual void slotDeleteAllMail(); 45 virtual void slotDeleteAllMail();
45 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 46 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
46 virtual void slotShowFolders( bool show ); 47 virtual void slotShowFolders( bool show );
47 virtual void refreshMailView(const QValueList<RecMailP>&); 48 virtual void refreshMailView(const QValueList<RecMailP>&);
48 virtual void mailLeftClicked( QListViewItem * ); 49 virtual void mailLeftClicked( QListViewItem * );
49 virtual void slotMoveCopyMail(); 50 virtual void slotMoveCopyMail();
50 virtual void slotMoveCopyAllMail(); 51 virtual void slotMoveCopyAllMail();
51 virtual void reEditMail(); 52 virtual void reEditMail();
52 void clearSelection(); 53 void clearSelection();
53 void slotDownloadMail(); 54 void slotDownloadMail();
54private: 55private:
55 ComposeMail* mCurrentComposer; 56 ComposeMail* mCurrentComposer;
56 void closeViewMail(ViewMail * vm); 57 void closeViewMail(ViewMail * vm);
57 QString mPendingEmail; 58 QString mPendingEmail;
58 QString mPendingName; 59 QString mPendingName;
59 QByteArray mPendingData; 60 QByteArray mPendingData;
60 QCString mPendingMessage; 61 QCString mPendingMessage;
61 Settings *settings; 62 Settings *settings;
62 QTextBrowser * tb; 63 QTextBrowser * tb;
63 64
64}; 65};
65 66
66#endif 67#endif
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index 11635e1..d5c7e61 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -193,104 +193,109 @@ void KDialogBase::enableButton( ButtonCode id, bool state )
193 } 193 }
194} 194}
195 195
196QPushButton *KDialogBase::findButton( ButtonCode id ) 196QPushButton *KDialogBase::findButton( ButtonCode id )
197{ 197{
198 QPushButton *button = 0; 198 QPushButton *button = 0;
199 switch ( id ) { 199 switch ( id ) {
200 case Ok: 200 case Ok:
201 button = mOkButton; 201 button = mOkButton;
202 break; 202 break;
203 case Apply: 203 case Apply:
204 button = mApplyButton; 204 button = mApplyButton;
205 break; 205 break;
206 case User1: 206 case User1:
207 button = mUser1Button; 207 button = mUser1Button;
208 break; 208 break;
209 case User2: 209 case User2:
210 button = mUser2Button; 210 button = mUser2Button;
211 break; 211 break;
212 case Cancel: 212 case Cancel:
213 button = mCancelButton; 213 button = mCancelButton;
214 break; 214 break;
215 case Default: 215 case Default:
216 button = mDefaultButton; 216 button = mDefaultButton;
217 break; 217 break;
218 case Close: 218 case Close:
219 button = mCloseButton; 219 button = mCloseButton;
220 break; 220 break;
221 default: 221 default:
222 break; 222 break;
223 } 223 }
224 return button; 224 return button;
225} 225}
226 226
227void KDialogBase::enableButtonOK( bool state ) 227void KDialogBase::enableButtonOK( bool state )
228{ 228{
229 enableButton( Ok, state ); 229 enableButton( Ok, state );
230} 230}
231 231
232void KDialogBase::enableButtonApply( bool state ) 232void KDialogBase::enableButtonApply( bool state )
233{ 233{
234 enableButton( Apply, state ); 234 enableButton( Apply, state );
235} 235}
236 236
237void KDialogBase::showButton( ButtonCode id, bool show ) 237void KDialogBase::showButton( ButtonCode id, bool show )
238{ 238{
239 QPushButton *button = findButton( id ); 239 QPushButton *button = findButton( id );
240 if ( button ) { 240 if ( button ) {
241 if ( show ) button->show(); 241 if ( show ) button->show();
242 else button->hide(); 242 else button->hide();
243 } 243 }
244} 244}
245 245
246int KDialogBase::pageIndex( QWidget *widget ) const 246int KDialogBase::pageIndex( QWidget *widget ) const
247{ 247{
248 return 0; 248 return 0;
249} 249}
250 250
251 251
252bool KDialogBase::showPage( int index ) 252bool KDialogBase::showPage( int index )
253{ 253{
254 tabWidget()->setCurrentPage( index );return false; 254 tabWidget()->setCurrentPage( index );return false;
255} 255}
256 256
257QFrame *KDialogBase::plainPage() 257QFrame *KDialogBase::plainPage()
258{ 258{
259 if ( !mPlainPage ) { 259 if ( !mPlainPage ) {
260 mPlainPage = new QFrame( this ); 260 mPlainPage = new QFrame( this );
261 setMainWidget( mPlainPage ); 261 setMainWidget( mPlainPage );
262 } 262 }
263 return mPlainPage; 263 return mPlainPage;
264} 264}
265 265
266void KDialogBase::slotOk() 266void KDialogBase::slotOk()
267{ 267{
268 emit okClicked(); 268 emit okClicked();
269 accept(); 269 accept();
270} 270}
271 271
272void KDialogBase::slotApply() 272void KDialogBase::slotApply()
273{ 273{
274 emit applyClicked(); 274 emit applyClicked();
275} 275}
276 276
277void KDialogBase::slotCancel() 277void KDialogBase::slotCancel()
278{ 278{
279 emit cancelClicked(); 279 emit cancelClicked();
280 reject(); 280 reject();
281} 281}
282 282
283void KDialogBase::slotClose() 283void KDialogBase::slotClose()
284{ 284{
285 emit closeClicked(); 285 emit closeClicked();
286 reject(); 286 reject();
287} 287}
288 288
289void KDialogBase::accept ()
290{
291 emit acceptClicked();
292 KDialog::accept();
293}
289void KDialogBase::slotUser1() 294void KDialogBase::slotUser1()
290{ 295{
291 emit user1Clicked(); 296 emit user1Clicked();
292} 297}
293void KDialogBase::slotUser2() 298void KDialogBase::slotUser2()
294{ 299{
295 emit user2Clicked(); 300 emit user2Clicked();
296} 301}
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index a2fc2dc..17c186b 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -14,128 +14,130 @@ class KDialogBase : public KDialog
14{ 14{
15 Q_OBJECT 15 Q_OBJECT
16 public: 16 public:
17 enum ButtonCode 17 enum ButtonCode
18 { 18 {
19 Help = 0x00000001, 19 Help = 0x00000001,
20 Default = 0x00000002, 20 Default = 0x00000002,
21 Ok = 0x00000004, 21 Ok = 0x00000004,
22 Apply = 0x00000008, 22 Apply = 0x00000008,
23 Try = 0x00000010, 23 Try = 0x00000010,
24 Cancel = 0x00000020, 24 Cancel = 0x00000020,
25 Close = 0x00000040, 25 Close = 0x00000040,
26 User1 = 0x00000080, 26 User1 = 0x00000080,
27 User2 = 0x00000100, 27 User2 = 0x00000100,
28 User3 = 0x00000200, 28 User3 = 0x00000200,
29 No = 0x00000080, 29 No = 0x00000080,
30 Yes = 0x00000100, 30 Yes = 0x00000100,
31 Details = 0x00000400, 31 Details = 0x00000400,
32 Filler = 0x40000000, 32 Filler = 0x40000000,
33 Stretch = 0x80000000 33 Stretch = 0x80000000
34 }; 34 };
35 35
36 enum DialogType 36 enum DialogType
37 { 37 {
38 TreeList, 38 TreeList,
39 Tabbed, 39 Tabbed,
40 Plain, 40 Plain,
41 Swallow, 41 Swallow,
42 IconList 42 IconList
43 }; 43 };
44 44
45 KDialogBase(); 45 KDialogBase();
46 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true, 46 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true,
47 const QString &caption=QString::null, 47 const QString &caption=QString::null,
48 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, 48 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
49 bool separator=false, 49 bool separator=false,
50 const QString &user1=QString::null, 50 const QString &user1=QString::null,
51 const QString &user2=QString::null, 51 const QString &user2=QString::null,
52 const QString &user3=QString::null); 52 const QString &user3=QString::null);
53 KDialogBase( int dialogFace, const QString &caption, 53 KDialogBase( int dialogFace, const QString &caption,
54 int buttonMask, ButtonCode defaultButton, 54 int buttonMask, ButtonCode defaultButton,
55 QWidget *parent=0, const char *name=0, bool modal=true, 55 QWidget *parent=0, const char *name=0, bool modal=true,
56 bool separator=false, 56 bool separator=false,
57 const QString &user1=QString::null, 57 const QString &user1=QString::null,
58 const QString &user2=QString::null, 58 const QString &user2=QString::null,
59 const QString &user3=QString::null); 59 const QString &user3=QString::null);
60 virtual ~KDialogBase(); 60 virtual ~KDialogBase();
61 61
62 QFrame *addPage( const QString & ); 62 QFrame *addPage( const QString & );
63 QFrame *addPage( const QString &, int, const QPixmap & ); 63 QFrame *addPage( const QString &, int, const QPixmap & );
64 64
65 void setMainWidget( QWidget *widget ); 65 void setMainWidget( QWidget *widget );
66 66
67 void setButtonText( ButtonCode id, const QString &text ); 67 void setButtonText( ButtonCode id, const QString &text );
68 68
69 void enableButton( ButtonCode id, bool state ); 69 void enableButton( ButtonCode id, bool state );
70 void enableButtonOK( bool state ); 70 void enableButtonOK( bool state );
71 void enableButtonApply( bool state ); 71 void enableButtonApply( bool state );
72 72
73 void showButton( ButtonCode, bool show ); 73 void showButton( ButtonCode, bool show );
74 74
75 int pageIndex( QWidget *widget ) const; 75 int pageIndex( QWidget *widget ) const;
76 76
77 bool showPage( int index ); 77 bool showPage( int index );
78 void hideButtons(); 78 void hideButtons();
79 79
80 QFrame *plainPage(); 80 QFrame *plainPage();
81 81
82 signals: 82 signals:
83 void user1Clicked(); 83 void user1Clicked();
84 void user2Clicked(); 84 void user2Clicked();
85 /** 85 /**
86 * The Apply button was pressed. This signal is only emitted if 86 * The Apply button was pressed. This signal is only emitted if
87 * @ref slotApply() is not replaced. 87 * @ref slotApply() is not replaced.
88 */ 88 */
89 void applyClicked(); 89 void applyClicked();
90 90
91 /** 91 /**
92 * The OK button was pressed. This signal is only emitted if 92 * The OK button was pressed. This signal is only emitted if
93 * @ref slotOk() is not replaced. 93 * @ref slotOk() is not replaced.
94 */ 94 */
95 void okClicked(); 95 void okClicked();
96 96
97 /** 97 /**
98 * The Cancel button was pressed. This signal is only emitted if 98 * The Cancel button was pressed. This signal is only emitted if
99 * @ref slotCancel() is not replaced. 99 * @ref slotCancel() is not replaced.
100 */ 100 */
101 void cancelClicked(); 101 void cancelClicked();
102 102
103 /** 103 /**
104 * The Close button was pressed. This signal is only emitted if 104 * The Close button was pressed. This signal is only emitted if
105 * @ref slotClose() is not replaced. 105 * @ref slotClose() is not replaced.
106 */ 106 */
107 void closeClicked(); 107 void closeClicked();
108 void defaultClicked(); 108 void defaultClicked();
109 109
110 void acceptClicked();
111
110 protected slots: 112 protected slots:
111 virtual void slotOk(); 113 virtual void slotOk();
112 virtual void slotApply(); 114 virtual void slotApply();
113 virtual void slotCancel(); 115 virtual void slotCancel();
114 virtual void slotClose(); 116 virtual void slotClose();
115 virtual void slotUser1(); 117 virtual void slotUser1();
116 virtual void slotUser2(); 118 virtual void slotUser2();
117 119 virtual void accept ();
118 protected: 120 protected:
119 QPushButton *findButton( ButtonCode ); 121 QPushButton *findButton( ButtonCode );
120 QTabWidget *tabWidget(); 122 QTabWidget *tabWidget();
121 123
122 private: 124 private:
123 void init( const QString &caption, int buttonMask, 125 void init( const QString &caption, int buttonMask,
124 const QString &user1=QString::null, const QString &user2=QString::null ); 126 const QString &user1=QString::null, const QString &user2=QString::null );
125 void initLayout(); 127 void initLayout();
126 128
127 QWidget *mMainWidget; 129 QWidget *mMainWidget;
128 QTabWidget *mTabWidget; 130 QTabWidget *mTabWidget;
129 QFrame *mPlainPage; 131 QFrame *mPlainPage;
130 QBoxLayout *mTopLayout; 132 QBoxLayout *mTopLayout;
131 133
132 QPushButton *mUser1Button; 134 QPushButton *mUser1Button;
133 QPushButton *mUser2Button; 135 QPushButton *mUser2Button;
134 QPushButton *mCloseButton; 136 QPushButton *mCloseButton;
135 QPushButton *mOkButton; 137 QPushButton *mOkButton;
136 QPushButton *mApplyButton; 138 QPushButton *mApplyButton;
137 QPushButton *mCancelButton; 139 QPushButton *mCancelButton;
138 QPushButton *mDefaultButton; 140 QPushButton *mDefaultButton;
139}; 141};
140 142
141#endif 143#endif
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
index b9ea6b8..2d19680 100644
--- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
+++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
@@ -1,47 +1,48 @@
1/* 1/*
2 This file is part of PwManager/Pi. 2 This file is part of PwManager/Pi.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifndef KCMPWMCONFIG_H 24#ifndef KCMPWMCONFIG_H
25#define KCMPWMCONFIG_H 25#define KCMPWMCONFIG_H
26 26
27#include <kcmodule.h> 27#include <kcmodule.h>
28 28
29class PWMConfigWidget; 29class PWMConfigWidget;
30class PWMPrefs; 30class PWMPrefs;
31 31
32class KCMPwmConfig : public KCModule 32class KCMPwmConfig : public KCModule
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36 public: 36 public:
37 KCMPwmConfig(QWidget *parent = 0, const char *name = 0 ); 37 KCMPwmConfig(QWidget *parent = 0, const char *name = 0 );
38 38
39 public slots:
39 virtual void load(); 40 virtual void load();
40 virtual void save(); 41 virtual void save();
41 virtual void defaults(); 42 virtual void defaults();
42 43
43 private: 44 private:
44 PWMConfigWidget *mConfigWidget; 45 PWMConfigWidget *mConfigWidget;
45}; 46};
46 47
47#endif 48#endif
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 9c8d12d..e12dc49 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -1,216 +1,217 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2003, 2004 by Michael Buesch * 3 * copyright (C) 2003, 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de * 4 * email: mbuesch@freenet.de *
5 * * 5 * *
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#include <klocale.h> 20#include <klocale.h>
21#include <klistview.h> 21#include <klistview.h>
22#include <ktoolbar.h> 22#include <ktoolbar.h>
23#include <kfiledialog.h> 23#include <kfiledialog.h>
24#include <kiconloader.h> 24#include <kiconloader.h>
25#include <kmessagebox.h> 25#include <kmessagebox.h>
26 26
27#include <qstatusbar.h> 27#include <qstatusbar.h>
28 28
29#ifndef PWM_EMBEDDED 29#ifndef PWM_EMBEDDED
30#include <kmenubar.h> 30#include <kmenubar.h>
31#include <kstatusbar.h> 31#include <kstatusbar.h>
32#include <dcopclient.h> 32#include <dcopclient.h>
33#include "configwndimpl.h" 33#include "configwndimpl.h"
34#include "configuration.h" 34#include "configuration.h"
35#else 35#else
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qmessagebox.h> 37#include <qmessagebox.h>
38#include <pwmprefs.h> 38#include <pwmprefs.h>
39#include <kpimglobalprefs.h> 39#include <kpimglobalprefs.h>
40#include <kprefsdialog.h>
40#include <kcmconfigs/kcmpwmconfig.h> 41#include <kcmconfigs/kcmpwmconfig.h>
41#include <kcmconfigs/kcmkdepimconfig.h> 42#include <kcmconfigs/kcmkdepimconfig.h>
42#include <kcmultidialog.h> 43#include <kcmultidialog.h>
43#include "editcategory.h" 44#include "editcategory.h"
44#endif 45#endif
45 46
46 47
47#ifndef DESKTOP_VERSION 48#ifndef DESKTOP_VERSION
48#include <qpe/global.h> 49#include <qpe/global.h>
49#endif 50#endif
50 51
51#include <qpixmap.h> 52#include <qpixmap.h>
52#include <qcheckbox.h> 53#include <qcheckbox.h>
53#include <qspinbox.h> 54#include <qspinbox.h>
54#include <qlineedit.h> 55#include <qlineedit.h>
55#include <qfileinfo.h> 56#include <qfileinfo.h>
56#include <qclipboard.h> 57#include <qclipboard.h>
57 58
58 59
59#include <stdio.h> 60#include <stdio.h>
60 61
61#include "pwm.h" 62#include "pwm.h"
62#include "pwminit.h" 63#include "pwminit.h"
63#include "pwmprint.h" 64#include "pwmprint.h"
64#include "addentrywndimpl.h" 65#include "addentrywndimpl.h"
65#include "globalstuff.h" 66#include "globalstuff.h"
66#include "findwndimpl.h" 67#include "findwndimpl.h"
67#include "csv.h" 68#include "csv.h"
68 69
69#ifdef CONFIG_KWALLETIF 70#ifdef CONFIG_KWALLETIF
70# include "kwalletif.h" 71# include "kwalletif.h"
71# include "kwalletemu.h" 72# include "kwalletemu.h"
72#endif 73#endif
73#ifdef CONFIG_KEYCARD 74#ifdef CONFIG_KEYCARD
74# include "pwmkeycard.h" 75# include "pwmkeycard.h"
75#endif 76#endif
76 77
77
78 #define DEFAULT_SIZE (QSize(700, 400)) 78 #define DEFAULT_SIZE (QSize(700, 400))
79 79
80// Button IDs for "file" popup menu 80// Button IDs for "file" popup menu
81enum { 81enum {
82 BUTTON_POPUP_FILE_NEW = 0, 82 BUTTON_POPUP_FILE_NEW = 0,
83 BUTTON_POPUP_FILE_OPEN, 83 BUTTON_POPUP_FILE_OPEN,
84 BUTTON_POPUP_FILE_CLOSE, 84 BUTTON_POPUP_FILE_CLOSE,
85 BUTTON_POPUP_FILE_SAVE, 85 BUTTON_POPUP_FILE_SAVE,
86 BUTTON_POPUP_FILE_SAVEAS, 86 BUTTON_POPUP_FILE_SAVEAS,
87 BUTTON_POPUP_FILE_EXPORT, 87 BUTTON_POPUP_FILE_EXPORT,
88 BUTTON_POPUP_FILE_IMPORT, 88 BUTTON_POPUP_FILE_IMPORT,
89 BUTTON_POPUP_FILE_PRINT, 89 BUTTON_POPUP_FILE_PRINT,
90 BUTTON_POPUP_FILE_QUIT 90 BUTTON_POPUP_FILE_QUIT
91}; 91};
92// Button IDs for "manage" popup menu 92// Button IDs for "manage" popup menu
93enum { 93enum {
94 BUTTON_POPUP_MANAGE_ADD = 0, 94 BUTTON_POPUP_MANAGE_ADD = 0,
95 BUTTON_POPUP_MANAGE_EDIT, 95 BUTTON_POPUP_MANAGE_EDIT,
96 BUTTON_POPUP_MANAGE_DEL, 96 BUTTON_POPUP_MANAGE_DEL,
97 BUTTON_POPUP_MANAGE_CHANGEMP 97 BUTTON_POPUP_MANAGE_CHANGEMP
98}; 98};
99// Button IDs for chipcard popup menu 99// Button IDs for chipcard popup menu
100enum { 100enum {
101#ifdef CONFIG_KEYCARD 101#ifdef CONFIG_KEYCARD
102 BUTTON_POPUP_CHIPCARD_GENNEW = 0, 102 BUTTON_POPUP_CHIPCARD_GENNEW = 0,
103 BUTTON_POPUP_CHIPCARD_DEL, 103 BUTTON_POPUP_CHIPCARD_DEL,
104 BUTTON_POPUP_CHIPCARD_READID, 104 BUTTON_POPUP_CHIPCARD_READID,
105 BUTTON_POPUP_CHIPCARD_SAVEBACKUP, 105 BUTTON_POPUP_CHIPCARD_SAVEBACKUP,
106 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP 106 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP
107#else // CONFIG_KEYCARD 107#else // CONFIG_KEYCARD
108 BUTTON_POPUP_CHIPCARD_NO = 0 108 BUTTON_POPUP_CHIPCARD_NO = 0
109#endif // CONFIG_KEYCARD 109#endif // CONFIG_KEYCARD
110}; 110};
111// Button IDs for "view" popup menu 111// Button IDs for "view" popup menu
112enum { 112enum {
113 BUTTON_POPUP_VIEW_FIND = 0, 113 BUTTON_POPUP_VIEW_FIND = 0,
114 BUTTON_POPUP_VIEW_LOCK, 114 BUTTON_POPUP_VIEW_LOCK,
115 BUTTON_POPUP_VIEW_DEEPLOCK, 115 BUTTON_POPUP_VIEW_DEEPLOCK,
116 BUTTON_POPUP_VIEW_UNLOCK 116 BUTTON_POPUP_VIEW_UNLOCK
117}; 117};
118// Button IDs for "options" popup menu 118// Button IDs for "options" popup menu
119enum { 119enum {
120 BUTTON_POPUP_OPTIONS_CONFIG = 0 120 BUTTON_POPUP_OPTIONS_CONFIG = 0,
121 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG
121#ifdef PWM_EMBEDDED 122#ifdef PWM_EMBEDDED
122 ,BUTTON_POPUP_OPTIONS_CATEGORY 123 ,BUTTON_POPUP_OPTIONS_CATEGORY
123#endif 124#endif
124}; 125};
125// Button IDs for "export" popup menu (in "file" popup menu) 126// Button IDs for "export" popup menu (in "file" popup menu)
126enum { 127enum {
127 BUTTON_POPUP_EXPORT_TEXT = 0, 128 BUTTON_POPUP_EXPORT_TEXT = 0,
128 BUTTON_POPUP_EXPORT_GPASMAN, 129 BUTTON_POPUP_EXPORT_GPASMAN,
129 BUTTON_POPUP_EXPORT_CSV 130 BUTTON_POPUP_EXPORT_CSV
130#ifdef CONFIG_KWALLETIF 131#ifdef CONFIG_KWALLETIF
131 ,BUTTON_POPUP_EXPORT_KWALLET 132 ,BUTTON_POPUP_EXPORT_KWALLET
132#endif 133#endif
133}; 134};
134// Button IDs for "import" popup menu (in "file" popup menu) 135// Button IDs for "import" popup menu (in "file" popup menu)
135enum { 136enum {
136 BUTTON_POPUP_IMPORT_TEXT = 0, 137 BUTTON_POPUP_IMPORT_TEXT = 0,
137 BUTTON_POPUP_IMPORT_GPASMAN, 138 BUTTON_POPUP_IMPORT_GPASMAN,
138 BUTTON_POPUP_IMPORT_CSV 139 BUTTON_POPUP_IMPORT_CSV
139#ifdef CONFIG_KWALLETIF 140#ifdef CONFIG_KWALLETIF
140 ,BUTTON_POPUP_IMPORT_KWALLET 141 ,BUTTON_POPUP_IMPORT_KWALLET
141#endif 142#endif
142}; 143};
143 144
144#ifdef PWM_EMBEDDED 145#ifdef PWM_EMBEDDED
145// Button IDs for "help" popup menu 146// Button IDs for "help" popup menu
146enum { 147enum {
147 BUTTON_POPUP_HELP_LICENSE = 0, 148 BUTTON_POPUP_HELP_LICENSE = 0,
148 BUTTON_POPUP_HELP_FAQ, 149 BUTTON_POPUP_HELP_FAQ,
149 BUTTON_POPUP_HELP_ABOUT, 150 BUTTON_POPUP_HELP_ABOUT,
150 BUTTON_POPUP_HELP_SYNC, 151 BUTTON_POPUP_HELP_SYNC,
151 BUTTON_POPUP_HELP_WHATSNEW 152 BUTTON_POPUP_HELP_WHATSNEW
152}; 153};
153#endif 154#endif
154 155
155// Button IDs for toolbar 156// Button IDs for toolbar
156enum { 157enum {
157 BUTTON_TOOL_NEW = 0, 158 BUTTON_TOOL_NEW = 0,
158 BUTTON_TOOL_OPEN, 159 BUTTON_TOOL_OPEN,
159 BUTTON_TOOL_SAVE, 160 BUTTON_TOOL_SAVE,
160 BUTTON_TOOL_SAVEAS, 161 BUTTON_TOOL_SAVEAS,
161 BUTTON_TOOL_PRINT, 162 BUTTON_TOOL_PRINT,
162 BUTTON_TOOL_ADD, 163 BUTTON_TOOL_ADD,
163 BUTTON_TOOL_EDIT, 164 BUTTON_TOOL_EDIT,
164 BUTTON_TOOL_DEL, 165 BUTTON_TOOL_DEL,
165 BUTTON_TOOL_FIND, 166 BUTTON_TOOL_FIND,
166 BUTTON_TOOL_LOCK, 167 BUTTON_TOOL_LOCK,
167 BUTTON_TOOL_DEEPLOCK, 168 BUTTON_TOOL_DEEPLOCK,
168 BUTTON_TOOL_UNLOCK 169 BUTTON_TOOL_UNLOCK
169}; 170};
170 171
171 172
172PwM::PwM(PwMInit *_init, PwMDoc *doc, 173PwM::PwM(PwMInit *_init, PwMDoc *doc,
173 bool virginity, 174 bool virginity,
174 QWidget *parent, const char *name) 175 QWidget *parent, const char *name)
175 : KMainWindow(parent, "HALLO") 176 : KMainWindow(parent, "HALLO")
176 , forceQuit (false) 177 , forceQuit (false)
177 , forceMinimizeToTray (false) 178 , forceMinimizeToTray (false)
178{ 179{
179 syncManager = 0; 180 syncManager = 0;
180 virgin = !virginity; 181 virgin = !virginity;
181 init = _init; 182 init = _init;
182 connect(doc, SIGNAL(docClosed(PwMDoc *)), 183 connect(doc, SIGNAL(docClosed(PwMDoc *)),
183 this, SLOT(docClosed(PwMDoc *))); 184 this, SLOT(docClosed(PwMDoc *)));
184 initMenubar(); 185 initMenubar();
185 initToolbar(); 186 initToolbar();
186 initMetrics(); 187 initMetrics();
187 setVirgin(virginity); 188 setVirgin(virginity);
188 setFocusPolicy(QWidget::WheelFocus); 189 setFocusPolicy(QWidget::WheelFocus);
189#ifndef PWM_EMBEDDED 190#ifndef PWM_EMBEDDED
190 statusBar()->show(); 191 statusBar()->show();
191#endif 192#endif
192 view = makeNewListView(doc); 193 view = makeNewListView(doc);
193 setCentralWidget(view); 194 setCentralWidget(view);
194 updateCaption(); 195 updateCaption();
195 showStatMsg(i18n("Ready.")); 196 showStatMsg(i18n("Ready."));
196} 197}
197 198
198PwM::~PwM() 199PwM::~PwM()
199{ 200{
200 //qDebug("PwM::~PwM() %x", this); 201 //qDebug("PwM::~PwM() %x", this);
201 disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), 202 disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)),
202 this, SLOT(docClosed(PwMDoc *))); 203 this, SLOT(docClosed(PwMDoc *)));
203 conf()->confWndMainWndSize(size()); 204 conf()->confWndMainWndSize(size());
204 //LR closing of windows changed 205 //LR closing of windows changed
205 //needed for fastload option on PDA 206 //needed for fastload option on PDA
206 //emit closed(this); 207 //emit closed(this);
207 //qDebug("PwM::~PwM() emited closed(this)"); 208 //qDebug("PwM::~PwM() emited closed(this)");
208 delete view; 209 delete view;
209 delete syncManager; 210 delete syncManager;
210} 211}
211 212
212void PwM::initMenubar() 213void PwM::initMenubar()
213{ 214{
214 KIconLoader* picons; 215 KIconLoader* picons;
215#ifndef PWM_EMBEDDED 216#ifndef PWM_EMBEDDED
216 KIconLoader icons; 217 KIconLoader icons;
@@ -266,195 +267,199 @@ void PwM::initMenubar()
266 SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV); 267 SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV);
267#ifdef CONFIG_KWALLETIF 268#ifdef CONFIG_KWALLETIF
268 exportPopup->insertItem(i18n("&KWallet..."), this, 269 exportPopup->insertItem(i18n("&KWallet..."), this,
269 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); 270 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
270#endif 271#endif
271 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), 272 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)),
272 i18n("E&xport"), exportPopup, 273 i18n("E&xport"), exportPopup,
273 BUTTON_POPUP_FILE_EXPORT); 274 BUTTON_POPUP_FILE_EXPORT);
274 // "file/import" popup menu 275 // "file/import" popup menu
275 importPopup->insertItem(i18n("&Text-file..."), this, 276 importPopup->insertItem(i18n("&Text-file..."), this,
276 SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT); 277 SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT);
277 importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, 278 importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
278 SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN); 279 SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN);
279 importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, 280 importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
280 SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV); 281 SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV);
281#ifdef CONFIG_KWALLETIF 282#ifdef CONFIG_KWALLETIF
282 importPopup->insertItem(i18n("&KWallet..."), this, 283 importPopup->insertItem(i18n("&KWallet..."), this,
283 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); 284 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
284#endif 285#endif
285 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), 286 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)),
286 i18n("I&mport"), importPopup, 287 i18n("I&mport"), importPopup,
287 BUTTON_POPUP_FILE_IMPORT); 288 BUTTON_POPUP_FILE_IMPORT);
288 filePopup->insertSeparator(); 289 filePopup->insertSeparator();
289#if 0 290#if 0
290 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), 291 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)),
291 i18n("&Print..."), this, 292 i18n("&Print..."), this,
292 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); 293 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
293 filePopup->insertSeparator(); 294 filePopup->insertSeparator();
294#endif 295#endif
295 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), 296 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)),
296 i18n("&Quit"), this, 297 i18n("&Quit"), this,
297 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); 298 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
298 menuBar()->insertItem(i18n("&File"), filePopup); 299 menuBar()->insertItem(i18n("&File"), filePopup);
299// "manage" popup menu 300// "manage" popup menu
300 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), 301 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)),
301 i18n("&Add password"), this, 302 i18n("&Add password"), this,
302 SLOT(addPwd_slot()), 0, 303 SLOT(addPwd_slot()), 0,
303 BUTTON_POPUP_MANAGE_ADD); 304 BUTTON_POPUP_MANAGE_ADD);
304 managePopup->insertSeparator(); 305 managePopup->insertSeparator();
305 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), 306 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)),
306 i18n("&Edit"), this, SLOT(editPwd_slot()), 0, 307 i18n("&Edit"), this, SLOT(editPwd_slot()), 0,
307 BUTTON_POPUP_MANAGE_EDIT); 308 BUTTON_POPUP_MANAGE_EDIT);
308 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 309 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
309 i18n("&Delete"), this, SLOT(deletePwd_slot()), 310 i18n("&Delete"), this, SLOT(deletePwd_slot()),
310 0, BUTTON_POPUP_MANAGE_DEL); 311 0, BUTTON_POPUP_MANAGE_DEL);
311 managePopup->insertSeparator(); 312 managePopup->insertSeparator();
312 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), 313 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)),
313 i18n("Change &Master Password"), this, 314 i18n("Change &Master Password"), this,
314 SLOT(changeMasterPwd_slot()), 0, 315 SLOT(changeMasterPwd_slot()), 0,
315 BUTTON_POPUP_MANAGE_CHANGEMP); 316 BUTTON_POPUP_MANAGE_CHANGEMP);
316 menuBar()->insertItem(i18n("&Manage"), managePopup); 317 menuBar()->insertItem(i18n("&Manage"), managePopup);
317// "chipcard" popup menu 318// "chipcard" popup menu
318#ifdef CONFIG_KEYCARD 319#ifdef CONFIG_KEYCARD
319 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), 320 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
320 i18n("&Generate new key-card"), this, 321 i18n("&Generate new key-card"), this,
321 SLOT(genNewCard_slot()), 0, 322 SLOT(genNewCard_slot()), 0,
322 BUTTON_POPUP_CHIPCARD_GENNEW); 323 BUTTON_POPUP_CHIPCARD_GENNEW);
323 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 324 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
324 i18n("&Erase key-card"), this, 325 i18n("&Erase key-card"), this,
325 SLOT(eraseCard_slot()), 0, 326 SLOT(eraseCard_slot()), 0,
326 BUTTON_POPUP_CHIPCARD_DEL); 327 BUTTON_POPUP_CHIPCARD_DEL);
327 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), 328 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)),
328 i18n("Read card-&ID"), this, 329 i18n("Read card-&ID"), this,
329 SLOT(readCardId_slot()), 0, 330 SLOT(readCardId_slot()), 0,
330 BUTTON_POPUP_CHIPCARD_READID); 331 BUTTON_POPUP_CHIPCARD_READID);
331 chipcardPopup->insertSeparator(); 332 chipcardPopup->insertSeparator();
332 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), 333 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)),
333 i18n("&Make card backup-image"), this, 334 i18n("&Make card backup-image"), this,
334 SLOT(makeCardBackup_slot()), 0, 335 SLOT(makeCardBackup_slot()), 0,
335 BUTTON_POPUP_CHIPCARD_SAVEBACKUP); 336 BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
336 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), 337 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)),
337 i18n("&Replay card backup-image"), this, 338 i18n("&Replay card backup-image"), this,
338 SLOT(replayCardBackup_slot()), 0, 339 SLOT(replayCardBackup_slot()), 0,
339 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); 340 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP);
340 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); 341 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup);
341#endif // CONFIG_KEYCARD 342#endif // CONFIG_KEYCARD
342// "view" popup menu 343// "view" popup menu
343 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), 344 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)),
344 i18n("&Find"), this, 345 i18n("&Find"), this,
345 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); 346 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
346 viewPopup->insertSeparator(); 347 viewPopup->insertSeparator();
347 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), 348 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)),
348 i18n("&Lock all entries"), this, 349 i18n("&Lock all entries"), this,
349 SLOT(lockWnd_slot()), 0, 350 SLOT(lockWnd_slot()), 0,
350 BUTTON_POPUP_VIEW_LOCK); 351 BUTTON_POPUP_VIEW_LOCK);
351 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), 352 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)),
352 i18n("&Deep-lock all entries"), this, 353 i18n("&Deep-lock all entries"), this,
353 SLOT(deepLockWnd_slot()), 0, 354 SLOT(deepLockWnd_slot()), 0,
354 BUTTON_POPUP_VIEW_DEEPLOCK); 355 BUTTON_POPUP_VIEW_DEEPLOCK);
355 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), 356 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)),
356 i18n("&Unlock all entries"), this, 357 i18n("&Unlock all entries"), this,
357 SLOT(unlockWnd_slot()), 0, 358 SLOT(unlockWnd_slot()), 0,
358 BUTTON_POPUP_VIEW_UNLOCK); 359 BUTTON_POPUP_VIEW_UNLOCK);
359 menuBar()->insertItem(i18n("&View"), viewPopup); 360 menuBar()->insertItem(i18n("&View"), viewPopup);
360// "options" popup menu 361// "options" popup menu
361 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 362 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
362 i18n("&Configure..."), this, 363 i18n("&Configure PwM/Pi..."), this,
363 SLOT(config_slot()),0, 364 SLOT(config_slot()),0,
364 BUTTON_POPUP_OPTIONS_CONFIG); 365 BUTTON_POPUP_OPTIONS_CONFIG);
366 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
367 i18n("Global Settings..."), this,
368 SLOT(config_global_slot()),0,
369 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
365 if ( QApplication::desktop()->width() <= 240 ) { 370 if ( QApplication::desktop()->width() <= 240 ) {
366 managePopup->insertSeparator(); 371 managePopup->insertSeparator();
367 managePopup->insertItem(i18n("&Options"), optionsPopup); 372 managePopup->insertItem(i18n("&Options"), optionsPopup);
368 } else 373 } else
369 menuBar()->insertItem(i18n("&Options"), optionsPopup); 374 menuBar()->insertItem(i18n("&Options"), optionsPopup);
370// "help" popup menu 375// "help" popup menu
371#ifndef PWM_EMBEDDED 376#ifndef PWM_EMBEDDED
372 helpPopup = helpMenu(QString::null, false); 377 helpPopup = helpMenu(QString::null, false);
373#else 378#else
374 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 379 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
375 i18n("C&ategories..."), this, 380 i18n("C&ategories..."), this,
376 SLOT(category_slot()),0, 381 SLOT(category_slot()),0,
377 BUTTON_POPUP_OPTIONS_CATEGORY); 382 BUTTON_POPUP_OPTIONS_CATEGORY);
378 383
379 384
380 menuBar()->insertItem(i18n("&Sync"), syncPopup); 385 menuBar()->insertItem(i18n("&Sync"), syncPopup);
381 386
382 387
383 388
384 389
385 390
386 helpPopup = new KPopupMenu(this); 391 helpPopup = new KPopupMenu(this);
387 392
388 393
389 helpPopup->insertItem(i18n("&License"), this, 394 helpPopup->insertItem(i18n("&License"), this,
390 SLOT(showLicense_slot()), 0, 395 SLOT(showLicense_slot()), 0,
391 BUTTON_POPUP_HELP_LICENSE); 396 BUTTON_POPUP_HELP_LICENSE);
392 397
393 helpPopup->insertItem(i18n("&Faq"), this, 398 helpPopup->insertItem(i18n("&Faq"), this,
394 SLOT(faq_slot()), 0, 399 SLOT(faq_slot()), 0,
395 BUTTON_POPUP_HELP_FAQ); 400 BUTTON_POPUP_HELP_FAQ);
396 401
397 helpPopup->insertItem(i18n("&About PwManager"), this, 402 helpPopup->insertItem(i18n("&About PwManager"), this,
398 SLOT(createAboutData_slot()), 0, 403 SLOT(createAboutData_slot()), 0,
399 BUTTON_POPUP_HELP_ABOUT); 404 BUTTON_POPUP_HELP_ABOUT);
400 405
401 helpPopup->insertItem(i18n("&Sync HowTo"), this, 406 helpPopup->insertItem(i18n("&Sync HowTo"), this,
402 SLOT(syncHowTo_slot()), 0, 407 SLOT(syncHowTo_slot()), 0,
403 BUTTON_POPUP_HELP_SYNC); 408 BUTTON_POPUP_HELP_SYNC);
404 409
405 helpPopup->insertItem(i18n("&What's New"), this, 410 helpPopup->insertItem(i18n("&What's New"), this,
406 SLOT(whatsnew_slot()), 0, 411 SLOT(whatsnew_slot()), 0,
407 BUTTON_POPUP_HELP_WHATSNEW); 412 BUTTON_POPUP_HELP_WHATSNEW);
408 413
409#endif 414#endif
410 menuBar()->insertItem(i18n("&Help"), helpPopup); 415 menuBar()->insertItem(i18n("&Help"), helpPopup);
411 416
412} 417}
413 418
414void PwM::initToolbar() 419void PwM::initToolbar()
415{ 420{
416 KIconLoader* picons; 421 KIconLoader* picons;
417#ifndef PWM_EMBEDDED 422#ifndef PWM_EMBEDDED
418 KIconLoader icons; 423 KIconLoader icons;
419 picons = &icons; 424 picons = &icons;
420#else 425#else
421 picons = KGlobal::iconLoader(); 426 picons = KGlobal::iconLoader();
422#endif 427#endif
423 428
424#if 0 429#if 0
425 toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), 430 toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar),
426 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, 431 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this,
427 SLOT(new_slot()), true, i18n("New")); 432 SLOT(new_slot()), true, i18n("New"));
428#endif 433#endif
429 toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), 434 toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar),
430 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, 435 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this,
431 SLOT(open_slot()), true, i18n("Open")); 436 SLOT(open_slot()), true, i18n("Open"));
432 toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), 437 toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar),
433 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, 438 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this,
434 SLOT(addPwd_slot()), true, 439 SLOT(addPwd_slot()), true,
435 i18n("Add password")); 440 i18n("Add password"));
436 toolBar()->insertSeparator(); 441 toolBar()->insertSeparator();
437 442
438 toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar), 443 toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar),
439 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this, 444 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this,
440 SLOT(find_slot()), true, i18n("Find entry")); 445 SLOT(find_slot()), true, i18n("Find entry"));
441 toolBar()->insertSeparator(); 446 toolBar()->insertSeparator();
442 toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), 447 toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar),
443 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, 448 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this,
444 SLOT(save_slot()), true, i18n("Save")); 449 SLOT(save_slot()), true, i18n("Save"));
445#if 0 450#if 0
446 toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), 451 toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar),
447 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, 452 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this,
448 SLOT(saveAs_slot()), true, i18n("Save as")); 453 SLOT(saveAs_slot()), true, i18n("Save as"));
449#endif 454#endif
450 455
451 456
452#if 0 457#if 0
453 toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), 458 toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar),
454 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, 459 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this,
455 SLOT(print_slot()), true, i18n("Print...")); 460 SLOT(print_slot()), true, i18n("Print..."));
456#endif 461#endif
457 toolBar()->insertSeparator(); 462 toolBar()->insertSeparator();
458 toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar), 463 toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar),
459 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this, 464 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this,
460 SLOT(editPwd_slot()), true, 465 SLOT(editPwd_slot()), true,
@@ -758,217 +763,237 @@ void PwM::editPwd_slot3(const QString *category, const int *index,
758 AddEntryWndImpl w(doc); 763 AddEntryWndImpl w(doc);
759 w.setCaption( i18n ("Edit password") ); 764 w.setCaption( i18n ("Edit password") );
760 vector<string> catList; 765 vector<string> catList;
761 doc->getCategoryList(&catList); 766 doc->getCategoryList(&catList);
762 unsigned i, size = catList.size(); 767 unsigned i, size = catList.size();
763 for (i = 0; i < size; ++i) { 768 for (i = 0; i < size; ++i) {
764 w.addCategory(catList[i].c_str()); 769 w.addCategory(catList[i].c_str());
765 } 770 }
766 w.setCurrCategory(curCategory); 771 w.setCurrCategory(curCategory);
767 w.setDescription(currItem.desc.c_str()); 772 w.setDescription(currItem.desc.c_str());
768 w.setUsername(currItem.name.c_str()); 773 w.setUsername(currItem.name.c_str());
769 w.setPassword(currItem.pw.c_str()); 774 w.setPassword(currItem.pw.c_str());
770 w.setUrl(currItem.url.c_str()); 775 w.setUrl(currItem.url.c_str());
771 w.setLauncher(currItem.launcher.c_str()); 776 w.setLauncher(currItem.launcher.c_str());
772 w.setComment(currItem.comment.c_str()); 777 w.setComment(currItem.comment.c_str());
773 w.descLineEdit->setFocus(); 778 w.descLineEdit->setFocus();
774 if (w.exec() == 1) { 779 if (w.exec() == 1) {
775 currItem.desc = w.getDescription().latin1(); 780 currItem.desc = w.getDescription().latin1();
776 currItem.name = w.getUsername().latin1(); 781 currItem.name = w.getUsername().latin1();
777 currItem.pw = w.getPassword().latin1(); 782 currItem.pw = w.getPassword().latin1();
778 currItem.comment = w.getComment().latin1(); 783 currItem.comment = w.getComment().latin1();
779 currItem.url = w.getUrl().latin1(); 784 currItem.url = w.getUrl().latin1();
780 currItem.launcher = w.getLauncher().latin1(); 785 currItem.launcher = w.getLauncher().latin1();
781 if (!doc->editEntry(curCategory, w.getCategory(), 786 if (!doc->editEntry(curCategory, w.getCategory(),
782 curEntryIndex, &currItem)) { 787 curEntryIndex, &currItem)) {
783 KMessageBox::error(this, 788 KMessageBox::error(this,
784 i18n("Couldn't edit the entry.\n" 789 i18n("Couldn't edit the entry.\n"
785 "Maybe you changed the category and\n" 790 "Maybe you changed the category and\n"
786 "this entry is already present\nin the new " 791 "this entry is already present\nin the new "
787 "category?"), 792 "category?"),
788 i18n("couldn't edit entry.")); 793 i18n("couldn't edit entry."));
789 doc->timer()->putLock(DocTimer::id_autoLockTimer); 794 doc->timer()->putLock(DocTimer::id_autoLockTimer);
790 return; 795 return;
791 } 796 }
792 } 797 }
793 doc->timer()->putLock(DocTimer::id_autoLockTimer); 798 doc->timer()->putLock(DocTimer::id_autoLockTimer);
794} 799}
795 800
796void PwM::deletePwd_slot() 801void PwM::deletePwd_slot()
797{ 802{
798 PWM_ASSERT(curDoc()); 803 PWM_ASSERT(curDoc());
799 if (curDoc()->isDocEmpty()) 804 if (curDoc()->isDocEmpty())
800 return; 805 return;
801 if (curDoc()->isDeepLocked()) 806 if (curDoc()->isDeepLocked())
802 return; 807 return;
803 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 808 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
804 unsigned int curEntryIndex = 0; 809 unsigned int curEntryIndex = 0;
805 if (!(view->getCurEntryIndex(&curEntryIndex))) { 810 if (!(view->getCurEntryIndex(&curEntryIndex))) {
806 printDebug("couldn't get index"); 811 printDebug("couldn't get index");
807 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 812 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
808 return; 813 return;
809 } 814 }
810 815
811 PwMDataItem currItem; 816 PwMDataItem currItem;
812 QString curCategory = view->getCurrentCategory(); 817 QString curCategory = view->getCurrentCategory();
813 if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) { 818 if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) {
814 printDebug("couldn't get entry"); 819 printDebug("couldn't get entry");
815 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 820 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
816 return; 821 return;
817 } 822 }
818 if (KMessageBox:: 823 if (KMessageBox::
819 questionYesNo(this, 824 questionYesNo(this,
820 i18n 825 i18n
821 ("Do you really want to delete\nthe selected entry") + 826 ("Do you really want to delete\nthe selected entry") +
822 " \n\"" + QString(currItem.desc.c_str()) 827 " \n\"" + QString(currItem.desc.c_str())
823 + "\" ?", i18n("delete?")) 828 + "\" ?", i18n("delete?"))
824 == KMessageBox::Yes) { 829 == KMessageBox::Yes) {
825 830
826 curDoc()->delEntry(curCategory, curEntryIndex); 831 curDoc()->delEntry(curCategory, curEntryIndex);
827 } 832 }
828 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 833 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
829} 834}
830 835
831void PwM::changeMasterPwd_slot() 836void PwM::changeMasterPwd_slot()
832{ 837{
833 PWM_ASSERT(curDoc()); 838 PWM_ASSERT(curDoc());
834 curDoc()->changeCurrentPw(); 839 curDoc()->changeCurrentPw();
835} 840}
836 841
837void PwM::lockWnd_slot() 842void PwM::lockWnd_slot()
838{ 843{
839 PWM_ASSERT(curDoc()); 844 PWM_ASSERT(curDoc());
840 curDoc()->lockAll(true); 845 curDoc()->lockAll(true);
841} 846}
842 847
843void PwM::deepLockWnd_slot() 848void PwM::deepLockWnd_slot()
844{ 849{
845 PWM_ASSERT(curDoc()); 850 PWM_ASSERT(curDoc());
846 curDoc()->deepLock(); 851 curDoc()->deepLock();
847} 852}
848 853
849void PwM::unlockWnd_slot() 854void PwM::unlockWnd_slot()
850{ 855{
851 PWM_ASSERT(curDoc()); 856 PWM_ASSERT(curDoc());
852 curDoc()->lockAll(false); 857 curDoc()->lockAll(false);
853} 858}
854 859void PwM::config_global_slot()
860{
861 KPimPrefsGlobalDialog gc ( this );
862 gc.exec();
863}
855void PwM::config_slot() 864void PwM::config_slot()
856{ 865{
857 int oldStyle = conf()->confWndMainViewStyle(); 866 int oldStyle = conf()->confWndMainViewStyle();
858#ifdef PWM_EMBEDDED 867
868#if 0
859 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); 869 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true );
860 870
861 KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); 871 KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" );
862 ConfigureDialog->addModule(pwmcfg ); 872 ConfigureDialog->addModule(pwmcfg );
863 873
864 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); 874 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
865 ConfigureDialog->addModule(kdelibcfg ); 875 ConfigureDialog->addModule(kdelibcfg );
876#endif
877
866 878
879
880 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
881
882 KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" );
883 ConfigureDialog->setMainWidget( kabcfg );
884 connect( ConfigureDialog, SIGNAL( applyClicked() ),
885 kabcfg, SLOT( save() ) );
886 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
887 kabcfg, SLOT( save() ) );
888 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
889 kabcfg, SLOT( defaults() ) );
890 //saveSettings();
891 kabcfg->load();
867#ifndef DESKTOP_VERSION 892#ifndef DESKTOP_VERSION
893 if ( QApplication::desktop()->height() <= 480 )
894 ;// ConfigureDialog->hideButtons();
868 ConfigureDialog->showMaximized(); 895 ConfigureDialog->showMaximized();
869#endif 896#endif
897
898
870 if ( ConfigureDialog->exec() ) 899 if ( ConfigureDialog->exec() )
871 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 900 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
872 delete ConfigureDialog; 901 delete ConfigureDialog;
873 902
874#else //PWM_EMBEDDED 903
875 // display the configuration window (modal mode)
876 if (!conf()->showConfWnd(this))
877 return;
878#endif
879 904
880 int newStyle = conf()->confWndMainViewStyle(); 905 int newStyle = conf()->confWndMainViewStyle();
881 // reinitialize tray 906 // reinitialize tray
882 init->initTray(); 907 init->initTray();
883 // reinitialize KWallet emulation 908 // reinitialize KWallet emulation
884 init->initKWalletEmu(); 909 init->initKWalletEmu();
885 910
886 PwMDocList *_dl = PwMDoc::getOpenDocList(); 911 PwMDocList *_dl = PwMDoc::getOpenDocList();
887 const vector<PwMDocList::listItem> *dl = _dl->getList(); 912 const vector<PwMDocList::listItem> *dl = _dl->getList();
888 vector<PwMDocList::listItem>::const_iterator i = dl->begin(), 913 vector<PwMDocList::listItem>::const_iterator i = dl->begin(),
889 end = dl->end(); 914 end = dl->end();
890 PwMDoc *doc; 915 PwMDoc *doc;
891 while (i != end) { 916 while (i != end) {
892 doc = (*i).doc; 917 doc = (*i).doc;
893 // unlock-without-mpw timeout 918 // unlock-without-mpw timeout
894 doc->timer()->start(DocTimer::id_mpwTimer); 919 doc->timer()->start(DocTimer::id_mpwTimer);
895 // auto-lock timeout 920 // auto-lock timeout
896 doc->timer()->start(DocTimer::id_autoLockTimer); 921 doc->timer()->start(DocTimer::id_autoLockTimer);
897 ++i; 922 ++i;
898 } 923 }
899 924
900 const QValueList<PwM *> *ml = init->mainWndList(); 925 const QValueList<PwM *> *ml = init->mainWndList();
901#ifndef PWM_EMBEDDED 926#ifndef PWM_EMBEDDED
902 QValueList<PwM *>::const_iterator i2 = ml->begin(), 927 QValueList<PwM *>::const_iterator i2 = ml->begin(),
903 end2 = ml->end(); 928 end2 = ml->end();
904#else 929#else
905 QValueList<PwM *>::ConstIterator i2 = ml->begin(), 930 QValueList<PwM *>::ConstIterator i2 = ml->begin(),
906 end2 = ml->end(); 931 end2 = ml->end();
907#endif 932#endif
908 PwM *pwm; 933 PwM *pwm;
909 while (i2 != end2) { 934 while (i2 != end2) {
910 pwm = *i2; 935 pwm = *i2;
911 // reinitialize the window style. 936 // reinitialize the window style.
912 if (oldStyle != newStyle) 937 if (oldStyle != newStyle)
913 pwm->curView()->initStyle(newStyle); 938 pwm->curView()->initStyle(newStyle);
914 // set the new font 939 // set the new font
915 pwm->curView()->setFont(conf()->confGlobEntryFont()); 940 pwm->curView()->setFont(conf()->confGlobEntryFont());
916 ++i2; 941 ++i2;
917 } 942 }
918} 943}
919 944
920void PwM::activateMpButton(bool activate) 945void PwM::activateMpButton(bool activate)
921{ 946{
922 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); 947 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate);
923} 948}
924 949
925void PwM::closeEvent(QCloseEvent *e) 950void PwM::closeEvent(QCloseEvent *e)
926{ 951{
927 //qDebug("PwM::closeEvent "); 952 //qDebug("PwM::closeEvent ");
928 emit closed( this ); 953 emit closed( this );
929 return; 954 return;
930 e->accept(); 955 e->accept();
931} 956}
932 957
933void PwM::docClosed(PwMDoc *doc) 958void PwM::docClosed(PwMDoc *doc)
934{ 959{
935 //qDebug("PwM::docClosed "); 960 //qDebug("PwM::docClosed ");
936 PARAM_UNUSED(doc); 961 PARAM_UNUSED(doc);
937 PWM_ASSERT(doc == curDoc()); 962 PWM_ASSERT(doc == curDoc());
938 close(); 963 close();
939} 964}
940 965
941void PwM::find_slot() 966void PwM::find_slot()
942{ 967{
943 PWM_ASSERT(curDoc()); 968 PWM_ASSERT(curDoc());
944 if (curDoc()->isDocEmpty()) 969 if (curDoc()->isDocEmpty())
945 return; 970 return;
946 if (curDoc()->isDeepLocked()) 971 if (curDoc()->isDeepLocked())
947 return; 972 return;
948 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 973 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
949 FindWndImpl findWnd(view); 974 FindWndImpl findWnd(view);
950 findWnd.exec(); 975 findWnd.exec();
951 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 976 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
952} 977}
953 978
954void PwM::exportToText() 979void PwM::exportToText()
955{ 980{
956 PWM_ASSERT(curDoc()); 981 PWM_ASSERT(curDoc());
957 if (curDoc()->isDocEmpty()) { 982 if (curDoc()->isDocEmpty()) {
958 KMessageBox::information(this, 983 KMessageBox::information(this,
959 i18n 984 i18n
960 ("Sorry, there's nothing to export.\n" 985 ("Sorry, there's nothing to export.\n"
961 "Please first add some passwords."), 986 "Please first add some passwords."),
962 i18n("nothing to do")); 987 i18n("nothing to do"));
963 return; 988 return;
964 } 989 }
965 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 990 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
966 QString fn(KFileDialog::getSaveFileName(QString::null, 991 QString fn(KFileDialog::getSaveFileName(QString::null,
967 i18n("*|plain-text file"), 992 i18n("*|plain-text file"),
968 this)); 993 this));
969 if (fn == "") { 994 if (fn == "") {
970 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 995 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
971 return; 996 return;
972 } 997 }
973 998
974 PwMerror ret = curDoc()->exportToText(&fn); 999 PwMerror ret = curDoc()->exportToText(&fn);
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 9fa9edc..2d1b854 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -72,192 +72,193 @@ public:
72 72
73 /** returns pointer to the view */ 73 /** returns pointer to the view */
74 PwMView * curView() 74 PwMView * curView()
75 { return view; } 75 { return view; }
76 /** returns pointer to the currently using document. */ 76 /** returns pointer to the currently using document. */
77 PwMDoc * curDoc() 77 PwMDoc * curDoc()
78 { return curView()->document(); } 78 { return curView()->document(); }
79 /** open a new doc with the given filename */ 79 /** open a new doc with the given filename */
80 PwMDoc * openDoc(QString filename, bool openDeepLocked = false); 80 PwMDoc * openDoc(QString filename, bool openDeepLocked = false);
81 /** show a message on the global status bar. 81 /** show a message on the global status bar.
82 * The message times out after some seconds. 82 * The message times out after some seconds.
83 */ 83 */
84 void showStatMsg(const QString &msg); 84 void showStatMsg(const QString &msg);
85 /** ask the user where to save the doc (if it has not been saved, yet) 85 /** ask the user where to save the doc (if it has not been saved, yet)
86 * and write the data to disk. 86 * and write the data to disk.
87 */ 87 */
88 bool save(); 88 bool save();
89 /** ask the user where to save the doc 89 /** ask the user where to save the doc
90 * and write the data to disk. 90 * and write the data to disk.
91 */ 91 */
92 bool saveAs(); 92 bool saveAs();
93 /** force quit. Quit this window, always! Don't minimize it */ 93 /** force quit. Quit this window, always! Don't minimize it */
94 bool isForceQuit() 94 bool isForceQuit()
95 { return forceQuit; } 95 { return forceQuit; }
96 /** set forceQuit */ 96 /** set forceQuit */
97 void setForceQuit(bool force) 97 void setForceQuit(bool force)
98 { forceQuit = force; } 98 { forceQuit = force; }
99 /** force minimize this window */ 99 /** force minimize this window */
100 bool isForceMinimizeToTray() 100 bool isForceMinimizeToTray()
101 { return forceMinimizeToTray; } 101 { return forceMinimizeToTray; }
102 /** set forceMinimizeToTray */ 102 /** set forceMinimizeToTray */
103 void setForceMinimizeToTray(bool force) 103 void setForceMinimizeToTray(bool force)
104 { forceMinimizeToTray = force; } 104 { forceMinimizeToTray = force; }
105 105
106public slots: 106public slots:
107 /** file/new triggered */ 107 /** file/new triggered */
108 void new_slot(); 108 void new_slot();
109 /** file/open triggered */ 109 /** file/open triggered */
110//US ENH 110//US ENH
111 void open_slot(); 111 void open_slot();
112 void open_slot(QString fn); 112 void open_slot(QString fn);
113 /** file/close triggered */ 113 /** file/close triggered */
114 void close_slot(); 114 void close_slot();
115 /** file/quit triggered */ 115 /** file/quit triggered */
116 void quitButton_slot(); 116 void quitButton_slot();
117 /** file/save triggered */ 117 /** file/save triggered */
118 void save_slot(); 118 void save_slot();
119 /** file/saveAs triggered */ 119 /** file/saveAs triggered */
120 void saveAs_slot(); 120 void saveAs_slot();
121 /** file/export/text triggered */ 121 /** file/export/text triggered */
122 void exportToText(); 122 void exportToText();
123 /** file/export/gpasman triggered */ 123 /** file/export/gpasman triggered */
124 void exportToGpasman(); 124 void exportToGpasman();
125 /** file/export/kwallet triggered */ 125 /** file/export/kwallet triggered */
126 void exportToKWallet(); 126 void exportToKWallet();
127 /** file/export/csv triggered */ 127 /** file/export/csv triggered */
128 void exportToCsv(); 128 void exportToCsv();
129 /** file/import/text triggered */ 129 /** file/import/text triggered */
130 bool importFromText(); 130 bool importFromText();
131 /** file/import/gpasman triggered */ 131 /** file/import/gpasman triggered */
132 bool importFromGpasman(); 132 bool importFromGpasman();
133 /** file/import/kwallet triggered */ 133 /** file/import/kwallet triggered */
134 bool importKWallet(); 134 bool importKWallet();
135 /** file/import/csv triggered */ 135 /** file/import/csv triggered */
136 bool importCsv(); 136 bool importCsv();
137 /** file/print triggered */ 137 /** file/print triggered */
138 void print_slot(); 138 void print_slot();
139 /** manage/add triggered */ 139 /** manage/add triggered */
140 //US ENH : changed code to run with older MOC 140 //US ENH : changed code to run with older MOC
141 141
142 void addPwd_slot(); 142 void addPwd_slot();
143 void addPwd_slot1(QString *pw, PwMDoc *_doc); 143 void addPwd_slot1(QString *pw, PwMDoc *_doc);
144 /** manage/edit triggered */ 144 /** manage/edit triggered */
145 //US ENH : changed code to run with older MOC 145 //US ENH : changed code to run with older MOC
146 void editPwd_slot(); 146 void editPwd_slot();
147 void editPwd_slot1(const QString *category); 147 void editPwd_slot1(const QString *category);
148 void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc ); 148 void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc );
149 149
150 /** manage/delete triggered */ 150 /** manage/delete triggered */
151 void deletePwd_slot(); 151 void deletePwd_slot();
152 /** execute the "Launcher" entry */ 152 /** execute the "Launcher" entry */
153 void execLauncher_slot(); 153 void execLauncher_slot();
154 /** open browser with URL entry */ 154 /** open browser with URL entry */
155 void goToURL_slot(); 155 void goToURL_slot();
156 /** manage/changeMasterPwd triggered */ 156 /** manage/changeMasterPwd triggered */
157 void changeMasterPwd_slot(); 157 void changeMasterPwd_slot();
158 /** lock current document */ 158 /** lock current document */
159 void lockWnd_slot(); 159 void lockWnd_slot();
160 /** deeplock current document */ 160 /** deeplock current document */
161 void deepLockWnd_slot(); 161 void deepLockWnd_slot();
162 /** window/unlock triggered */ 162 /** window/unlock triggered */
163 void unlockWnd_slot(); 163 void unlockWnd_slot();
164 /** find item */ 164 /** find item */
165 void find_slot(); 165 void find_slot();
166 /** configure clicked */ 166 /** configure clicked */
167 void config_slot(); 167 void config_slot();
168 void config_global_slot();
168 /** (de)activate the "change master pw" button in the menu-bar */ 169 /** (de)activate the "change master pw" button in the menu-bar */
169 void activateMpButton(bool activate = true); 170 void activateMpButton(bool activate = true);
170 /** generate a new chipcard */ 171 /** generate a new chipcard */
171 void genNewCard_slot(); 172 void genNewCard_slot();
172 /** completely erase the current card */ 173 /** completely erase the current card */
173 void eraseCard_slot(); 174 void eraseCard_slot();
174 /** returns the ID number of the current card */ 175 /** returns the ID number of the current card */
175 void readCardId_slot(); 176 void readCardId_slot();
176 /** make backup image of the current card */ 177 /** make backup image of the current card */
177 void makeCardBackup_slot(); 178 void makeCardBackup_slot();
178 /** write backup image to current card */ 179 /** write backup image to current card */
179 void replayCardBackup_slot(); 180 void replayCardBackup_slot();
180 181
181#ifdef PWM_EMBEDDED 182#ifdef PWM_EMBEDDED
182 void category_slot(); 183 void category_slot();
183 void whatsnew_slot(); 184 void whatsnew_slot();
184 void showLicense_slot(); 185 void showLicense_slot();
185 void faq_slot(); 186 void faq_slot();
186 void createAboutData_slot(); 187 void createAboutData_slot();
187 void syncHowTo_slot(); 188 void syncHowTo_slot();
188#endif 189#endif
189 190
190protected: 191protected:
191 /** is this window virgin? */ 192 /** is this window virgin? */
192 bool isVirgin() 193 bool isVirgin()
193 { return virgin; } 194 { return virgin; }
194 /** add/remove virginity */ 195 /** add/remove virginity */
195 void setVirgin(bool v); 196 void setVirgin(bool v);
196 /** initialize the menubar */ 197 /** initialize the menubar */
197 void initMenubar(); 198 void initMenubar();
198 /** initialize the toolbar */ 199 /** initialize the toolbar */
199 void initToolbar(); 200 void initToolbar();
200 /** initialize the window-metrics */ 201 /** initialize the window-metrics */
201 void initMetrics(); 202 void initMetrics();
202 /** close-event */ 203 /** close-event */
203 void closeEvent(QCloseEvent *e); 204 void closeEvent(QCloseEvent *e);
204 /** creates a new PwM-ListView and returns it */ 205 /** creates a new PwM-ListView and returns it */
205 PwMView * makeNewListView(PwMDoc *doc); 206 PwMView * makeNewListView(PwMDoc *doc);
206 /** Window hide-event */ 207 /** Window hide-event */
207 void hideEvent(QHideEvent *); 208 void hideEvent(QHideEvent *);
208 /** is this window minimized? */ 209 /** is this window minimized? */
209 bool isMinimized() 210 bool isMinimized()
210 { 211 {
211#ifndef PWM_EMBEDDED 212#ifndef PWM_EMBEDDED
212 #if KDE_VERSION >= KDE_MAKE_VERSION(3, 2, 0) 213 #if KDE_VERSION >= KDE_MAKE_VERSION(3, 2, 0)
213 return KWin::windowInfo(winId()).isMinimized(); 214 return KWin::windowInfo(winId()).isMinimized();
214 #else // KDE_VERSION 215 #else // KDE_VERSION
215 return KWin::info(winId()).isIconified(); 216 return KWin::info(winId()).isIconified();
216 #endif // KDE_VERSION 217 #endif // KDE_VERSION
217#else 218#else
218 return false; 219 return false;
219#endif 220#endif
220 } 221 }
221 /** window got the focus */ 222 /** window got the focus */
222 void focusInEvent(QFocusEvent *e); 223 void focusInEvent(QFocusEvent *e);
223 /** update the caption string */ 224 /** update the caption string */
224 void updateCaption(); 225 void updateCaption();
225#ifdef CONFIG_KWALLETIF 226#ifdef CONFIG_KWALLETIF
226 /** check if kwalletemu is enabled and ask the user what to do */ 227 /** check if kwalletemu is enabled and ask the user what to do */
227 bool checkAndAskForKWalletEmu(); 228 bool checkAndAskForKWalletEmu();
228#endif // CONFIG_KWALLETIF 229#endif // CONFIG_KWALLETIF
229 230
230protected slots: 231protected slots:
231 /** doc got closed */ 232 /** doc got closed */
232 void docClosed(PwMDoc *doc); 233 void docClosed(PwMDoc *doc);
233 234
234signals: 235signals:
235 /** window got closed (by user or someone else) */ 236 /** window got closed (by user or someone else) */
236 void closed(PwM *wnd); 237 void closed(PwM *wnd);
237 /** window got the focus (was brought to foreground) */ 238 /** window got the focus (was brought to foreground) */
238 void gotFocus(PwM *wnd); 239 void gotFocus(PwM *wnd);
239 /** window lost the focus */ 240 /** window lost the focus */
240 void lostFocus(PwM *wnd); 241 void lostFocus(PwM *wnd);
241 242
242protected: 243protected:
243 /** pointer to the view active in this KMainWindow */ 244 /** pointer to the view active in this KMainWindow */
244 PwMView *view; 245 PwMView *view;
245 /** pointer to the init class */ 246 /** pointer to the init class */
246 PwMInit *init; 247 PwMInit *init;
247 /** has this window already lost its virginity? 248 /** has this window already lost its virginity?
248 * Means is there an open working document 249 * Means is there an open working document
249 */ 250 */
250 bool virgin; 251 bool virgin;
251 /** "file" popup-menu */ 252 /** "file" popup-menu */
252 KPopupMenu *filePopup; 253 KPopupMenu *filePopup;
253 254
254 /** "manage" popup-menu */ 255 /** "manage" popup-menu */
255 KPopupMenu *managePopup; 256 KPopupMenu *managePopup;
256#ifdef CONFIG_KEYCARD 257#ifdef CONFIG_KEYCARD
257 /** "chipcard" popup-menu */ 258 /** "chipcard" popup-menu */
258 KPopupMenu *chipcardPopup; 259 KPopupMenu *chipcardPopup;
259#endif // CONFIG_KEYCARD 260#endif // CONFIG_KEYCARD
260 /** "view" popup-menu */ 261 /** "view" popup-menu */
261 KPopupMenu *viewPopup; 262 KPopupMenu *viewPopup;
262 /** "options" popup-menu */ 263 /** "options" popup-menu */
263 KPopupMenu *optionsPopup; 264 KPopupMenu *optionsPopup;