summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt4
-rw-r--r--pwmanager/pwmanager/commentbox.cpp1
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp19
-rw-r--r--pwmanager/pwmanager/listviewpwm.cpp1
-rw-r--r--pwmanager/pwmanager/pwmprefs.cpp9
-rw-r--r--pwmanager/pwmanager/pwmprefs.h3
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.cpp2
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.cpp1
8 files changed, 33 insertions, 7 deletions
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index adf288b..a63be31 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -70,285 +70,287 @@
70{ "Help...","Hilfe..." }, 70{ "Help...","Hilfe..." },
71{ "Connection: ","Connection: " }, 71{ "Connection: ","Connection: " },
72{ "Model(opt.): ","Model(opt.): " }, 72{ "Model(opt.): ","Model(opt.): " },
73{ "Local file Cal:","Lokale Datei Kal:" }, 73{ "Local file Cal:","Lokale Datei Kal:" },
74{ "Local file ABook:","Lokale Datei ABuch:" }, 74{ "Local file ABook:","Lokale Datei ABuch:" },
75{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 75{ "Local file PWMgr:","Lokale Datei PWMgr:" },
76{ "Choose...","Wähle..." }, 76{ "Choose...","Wähle..." },
77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
78{ "Calendar:","Kalender:" }, 78{ "Calendar:","Kalender:" },
79{ "AddressBook:","AdressBuch:" }, 79{ "AddressBook:","AdressBuch:" },
80{ "PWManager:","PWManager:" }, 80{ "PWManager:","PWManager:" },
81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
82{ "Local temp file:","Lokale temp Datei:" }, 82{ "Local temp file:","Lokale temp Datei:" },
83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
85{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 85{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
86{ "ssh/scp","ssh/scp" }, 86{ "ssh/scp","ssh/scp" },
87{ "ftp","ftp" }, 87{ "ftp","ftp" },
88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
94{ "No Filter","Kein Filter" }, 94{ "No Filter","Kein Filter" },
95{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 95{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
98{ "Configure","Konfiguriere" }, 98{ "Configure","Konfiguriere" },
99{ "Apply","Anwenden" }, 99{ "Apply","Anwenden" },
100{ "None","Kein" }, 100{ "None","Kein" },
101{ "Global","Allgemein" }, 101{ "Global","Allgemein" },
102{ "Email","E-Mail" }, 102{ "Email","E-Mail" },
103{ "Phone","Telefon" }, 103{ "Phone","Telefon" },
104{ "SMS","SMS" }, 104{ "SMS","SMS" },
105{ "Fax","Fax" }, 105{ "Fax","Fax" },
106{ "Pager","Pager" }, 106{ "Pager","Pager" },
107{ "SIP","SIP" }, 107{ "SIP","SIP" },
108{ "Language:(needs restart)","Sprache:(Neustart)" }, 108{ "Language:(needs restart)","Sprache:(Neustart)" },
109{ "English","English" }, 109{ "English","English" },
110{ "German","Deutsch" }, 110{ "German","Deutsch" },
111{ "French","Französisch" }, 111{ "French","Französisch" },
112{ "Italian","Italienisch" }, 112{ "Italian","Italienisch" },
113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
114{ "Language","Sprache" }, 114{ "Language","Sprache" },
115{ "Time Format(nr):","Zeit Format(nr):" }, 115{ "Time Format(nr):","Zeit Format(nr):" },
116{ "24:00","24:00" }, 116{ "24:00","24:00" },
117{ "12:00am","12:00am" }, 117{ "12:00am","12:00am" },
118{ "Week starts on Sunday","Woche beginnt Sonntags" }, 118{ "Week starts on Sunday","Woche beginnt Sonntags" },
119{ "Time Format","Zeit Format" }, 119{ "Time Format","Zeit Format" },
120{ "Date Format:","Datums Format:" }, 120{ "Date Format:","Datums Format:" },
121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
124{ "User defined","Benutzerdefiniert" }, 124{ "User defined","Benutzerdefiniert" },
125{ "User long date:","Format langes Datum:" }, 125{ "User long date:","Format langes Datum:" },
126{ "User short date:","Format kurzes Datum:" }, 126{ "User short date:","Format kurzes Datum:" },
127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
130{ "Date Format","Datums Format" }, 130{ "Date Format","Datums Format" },
131{ "Timezone:","Zeitzone:" }, 131{ "Timezone:","Zeitzone:" },
132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
136{ "Daylight start:","Sommerzeit Beginn:" }, 136{ "Daylight start:","Sommerzeit Beginn:" },
137{ "Mon","Mo" }, 137{ "Mon","Mo" },
138{ "Tue","Di" }, 138{ "Tue","Di" },
139{ "Wed","Mi" }, 139{ "Wed","Mi" },
140{ "Thu","Do" }, 140{ "Thu","Do" },
141{ "Fri","Fr" }, 141{ "Fri","Fr" },
142{ "Sat","Sa" }, 142{ "Sat","Sa" },
143{ "Sun","So" }, 143{ "Sun","So" },
144{ "January","Januar" }, 144{ "January","Januar" },
145{ "February","Februar" }, 145{ "February","Februar" },
146{ "March","März" }, 146{ "March","März" },
147{ "April","April" }, 147{ "April","April" },
148{ "May","Mai" }, 148{ "May","Mai" },
149{ "June","Juni" }, 149{ "June","Juni" },
150{ "July","July" }, 150{ "July","July" },
151{ "August","August" }, 151{ "August","August" },
152{ "September","September" }, 152{ "September","September" },
153{ "October","October" }, 153{ "October","October" },
154{ "November","November" }, 154{ "November","November" },
155{ "December","Dezember" }, 155{ "December","Dezember" },
156{ "tomorrow","Morgen" }, 156{ "tomorrow","Morgen" },
157{ "today","Heute" }, 157{ "today","Heute" },
158{ "yesterday","Gestern" }, 158{ "yesterday","Gestern" },
159{ "Monday","Montag" }, 159{ "Monday","Montag" },
160{ "Tuesday","Dienstag" }, 160{ "Tuesday","Dienstag" },
161{ "Wednesday","Mittwoch" }, 161{ "Wednesday","Mittwoch" },
162{ "Thursday","Donnerstag" }, 162{ "Thursday","Donnerstag" },
163{ "Friday","Freitag" }, 163{ "Friday","Freitag" },
164{ "Saturday","Samstag" }, 164{ "Saturday","Samstag" },
165{ "Sunday","Sonntag" }, 165{ "Sunday","Sonntag" },
166{ "Daylight end:","Sommerzeit Ende:" }, 166{ "Daylight end:","Sommerzeit Ende:" },
167{ "Time Zone","Zeit Zone" }, 167{ "Time Zone","Zeit Zone" },
168{ "Used Mail Client","Benutzter Mail Client" }, 168{ "Used Mail Client","Benutzter Mail Client" },
169{ "Channel:","Channel:" }, 169{ "Channel:","Channel:" },
170{ "Message:","Message:" }, 170{ "Message:","Message:" },
171{ "Parameters:","Parameter:" }, 171{ "Parameters:","Parameter:" },
172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
173{ "extra Message:","extra Message:" }, 173{ "extra Message:","extra Message:" },
174{ "extra Parameters:","extra Parameter:" }, 174{ "extra Parameters:","extra Parameter:" },
175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
176{ "External Apps.","Externe Appl." }, 176{ "External Apps.","Externe Appl." },
177{ "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" }, 177{ "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" },
178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
180{ "Save settings","Speichere Einstellungen" }, 180{ "Save settings","Speichere Einstellungen" },
181{ "Save standard","Speichere Standard" }, 181{ "Save standard","Speichere Standard" },
182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
184{ "Data storage path","Daten Speicherpfad" }, 184{ "Data storage path","Daten Speicherpfad" },
185{ "Used %1 Client","Benutzer %1 Client" }, 185{ "Used %1 Client","Benutzer %1 Client" },
186{ "No email client installed","Keine Email Client installiert" }, 186{ "No email client installed","Keine Email Client installiert" },
187{ "Userdefined email client","Benutzerdef. Email Client" }, 187{ "Userdefined email client","Benutzerdef. Email Client" },
188{ "OM/Pi email client","OM/Pi Email Client" }, 188{ "OM/Pi email client","OM/Pi Email Client" },
189{ "URL:","URL:" }, 189{ "URL:","URL:" },
190{ "No","Nein" }, 190{ "No","Nein" },
191{ "Yes","Ja" }, 191{ "Yes","Ja" },
192{ "Untitled","Unbenannt" }, 192{ "Untitled","Unbenannt" },
193{ "&New","&Neu" }, 193{ "&New","&Neu" },
194{ "&Open","&Öffne" }, 194{ "&Open","&Öffne" },
195{ "&Close","Schließen" }, 195{ "&Close","Schließen" },
196{ "Save &as...","Speichere &als..." }, 196{ "Save &as...","Speichere &als..." },
197{ "&Text-file...","&Text-Datei..." }, 197{ "&Text-file...","&Text-Datei..." },
198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." }, 198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." },
199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." }, 199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." },
200{ "E&xport","E&xport" }, 200{ "E&xport","E&xport" },
201{ "I&mport","I&mport" }, 201{ "I&mport","I&mport" },
202{ "&Quit","Beenden" }, 202{ "&Quit","Beenden" },
203{ "&Add password","&Passwort hinzufügen" }, 203{ "&Add password","&Passwort hinzufügen" },
204{ "&Delete","Lösche" }, 204{ "&Delete","Lösche" },
205{ "Change &Master Password","Ändere &Master Passwort" }, 205{ "Change &Master Password","Ändere &Master Passwort" },
206{ "&Manage","Verwalte" }, 206{ "&Manage","Verwalte" },
207{ "&Find","&Finde" }, 207{ "&Find","&Finde" },
208{ "&Lock all entries","Sperre alle Einträge" }, 208{ "&Lock all entries","Sperre alle Einträge" },
209{ "&Deep-lock all entries","Sperre total alle Einträge" }, 209{ "&Deep-lock all entries","Sperre total alle Einträge" },
210{ "&Unlock all entries","Entsperre alle Einträge" }, 210{ "&Unlock all entries","Entsperre alle Einträge" },
211{ "&Configure...","Konfiguriere..." }, 211{ "&Configure...","Konfiguriere..." },
212{ "&Options","Konfig" }, 212{ "&Options","Konfig" },
213{ "C&ategories...","K&ategorien..." }, 213{ "C&ategories...","K&ategorien..." },
214{ "&Sync","&Sync" }, 214{ "&Sync","&Sync" },
215{ "&License","&Lizenz" }, 215{ "&License","&Lizenz" },
216{ "&Faq","&Faq" }, 216{ "&Faq","&Faq" },
217{ "&About PwManager","Über PwManager" }, 217{ "&About PwManager","Über PwManager" },
218{ "&Sync HowTo","&Sync HowTo" }, 218{ "&Sync HowTo","&Sync HowTo" },
219{ "&What's New","Was ist neu?" }, 219{ "&What's New","Was ist neu?" },
220{ "New","Neu" }, 220{ "New","Neu" },
221{ "Open","Öffnen" }, 221{ "Open","Öffnen" },
222{ "Save","Speichern" }, 222{ "Save","Speichern" },
223{ "Save as","Speichern als" }, 223{ "Save as","Speichern als" },
224{ "Print...","Drucke..." }, 224{ "Print...","Drucke..." },
225{ "Add password","Passwort hinzufügen" }, 225{ "Add password","Passwort hinzufügen" },
226{ "Edit password","Passwort ändern" }, 226{ "Edit password","Passwort ändern" },
227{ "Delete password","Passwort löschen" }, 227{ "Delete password","Passwort löschen" },
228{ "Find entry","Finde Eintrag" }, 228{ "Find entry","Finde Eintrag" },
229{ "Lock all entries","Sperre alle Einträge" }, 229{ "Lock all entries","Sperre alle Einträge" },
230{ "Deep-Lock all entries","Sperre total alle Einträge" }, 230{ "Deep-Lock all entries","Sperre total alle Einträge" },
231{ "Unlock all entries","Entsperre alle Einträge" }, 231{ "Unlock all entries","Entsperre alle Einträge" },
232{ "Categories:","Kategorien:" }, 232{ "Categories:","Kategorien:" },
233{ "&Rename","&Umbenennen" }, 233{ "&Rename","&Umbenennen" },
234{ "Username","Benutzername" }, 234{ "Username","Benutzername" },
235{ "Password","Passwort" }, 235{ "Password","Passwort" },
236{ "Launcher","Launcher" }, 236{ "Launcher","Launcher" },
237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" }, 237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" }, 238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" }, 239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
240{ "copy url to clipboard","Kopiere URL ins Clipboard" }, 240{ "copy url to clipboard","Kopiere URL ins Clipboard" },
241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" }, 241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" }, 242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
243{ "Execute "Launcher"",""Launcher" ausführen" }, 243{ "Execute "Launcher"",""Launcher" ausführen" },
244{ "Go to "URL"","Gehe zu "URL"" }, 244{ "Go to "URL"","Gehe zu "URL"" },
245{ "Ready.","Fertig." }, 245{ "Ready.","Fertig." },
246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" }, 246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
247{ "File error","Datei Fehler" }, 247{ "File error","Datei Fehler" },
248{ "Could not read file!","Kann Datei nicht lesen!" }, 248{ "Could not read file!","Kann Datei nicht lesen!" },
249{ "Master-password","Master-Passwort" }, 249{ "Master-password","Master-Passwort" },
250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" }, 250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." }, 251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
252{ "password error","Passwort Fehler" }, 252{ "password error","Passwort Fehler" },
253{ "Successfully opened file.","Datei erfolgreich geöffnet." }, 253{ "Successfully opened file.","Datei erfolgreich geöffnet." },
254{ "DEEP-LOCKED","TOTAL-GESPERRT" }, 254{ "DEEP-LOCKED","TOTAL-GESPERRT" },
255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." }, 255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." },
256{ "<LOCKED>","<GESPERRT>" }, 256{ "<LOCKED>","<GESPERRT>" },
257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." }, 257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." },
258{ "PwManager","PwManager" }, 258{ "PwManager","PwManager" },
259{ "Window-style:","Window-Stil:" }, 259{ "Window-style:","Window-Stil:" },
260{ "Category on top","Kategorien oben" }, 260{ "Category on top","Kategorien oben" },
261{ "Category-list left/top","Kategorien links oben" }, 261{ "Category-list left/top","Kategorien links oben" },
262{ "<b>Font for Password entries:</b>","<b>Schrift für Passwort Einträge:</b>" }, 262{ "Font for Password entries:","Schrift für Passwort Einträge:" },
263{ "Font for Password summary:","Schrift für Passwort Übersicht:" },
263{ "Font:","Schriftart:" }, 264{ "Font:","Schriftart:" },
265{ "Summary","Übersicht" },
264{ "Compression:","Kompression:" }, 266{ "Compression:","Kompression:" },
265{ "gzip","gzip" }, 267{ "gzip","gzip" },
266{ "Encryption:","Verschlüsselung:" }, 268{ "Encryption:","Verschlüsselung:" },
267{ "Blowfish (128 bit)","Blowfish (128 bit)" }, 269{ "Blowfish (128 bit)","Blowfish (128 bit)" },
268{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" }, 270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
269{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" }, 271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
270{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" }, 272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
271{ "Triple-DES (168 bit)","Triple-DES (168 bit)" }, 273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
272{ "Twofish (256 bit)","Twofish (256 bit)" }, 274{ "Twofish (256 bit)","Twofish (256 bit)" },
273{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" }, 275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
274{ "Hashing:","Hashing:" }, 276{ "Hashing:","Hashing:" },
275{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" }, 277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
276{ "SHA-256 (256 bit)","SHA-256 (256 bit)" }, 278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
277{ "SHA-384 (384 bit)","SHA-384 (384 bit)" }, 279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
278{ "SHA-512 (512 bit)","SHA-512 (512 bit)" }, 280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
279{ "MD5 (128 bit)","MD5 (128 bit)" }, 281{ "MD5 (128 bit)","MD5 (128 bit)" },
280{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" }, 282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
281{ "Tiger (192 bit)","Tiger (192 bit)" }, 283{ "Tiger (192 bit)","Tiger (192 bit)" },
282{ "Permissions:","Zugriffsrechte:" }, 284{ "Permissions:","Zugriffsrechte:" },
283{ "Make backup before saving","Mache Backup vor dem Speichern" }, 285{ "Make backup before saving","Mache Backup vor dem Speichern" },
284{ "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]:" },
285{ "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]:" },
286{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" }, 288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
287{ "open deeplocked","Öffne total gesperrt" }, 289{ "open deeplocked","Öffne total gesperrt" },
288{ "Favourite browser:","Bevorzugter Browser:" }, 290{ "Favourite browser:","Bevorzugter Browser:" },
289{ "Favourite x-terminal:","Bevorzugtes x-terminal:" }, 291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
290{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" }, 292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
291{ "Look && feel","Aussehen" }, 293{ "Look && feel","Aussehen" },
292{ "File","Datei" }, 294{ "File","Datei" },
293{ "Timeout","Timeout" }, 295{ "Timeout","Timeout" },
294{ "Autostart","Autostart" }, 296{ "Autostart","Autostart" },
295{ "External apps","Externe Applik." }, 297{ "External apps","Externe Applik." },
296{ "Miscellaneous","Verschiedenes" }, 298{ "Miscellaneous","Verschiedenes" },
297{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
298{ "edit category descriptions","Ändere Label für Kategorie" }, 300{ "edit category descriptions","Ändere Label für Kategorie" },
299{ "Close","Schließen" }, 301{ "Close","Schließen" },
300{ "Category:","Category:" }, 302{ "Category:","Category:" },
301{ "Text1 (Description):","Text1 (Beschreibung):" }, 303{ "Text1 (Description):","Text1 (Beschreibung):" },
302{ "Text2 (Username):","Text2 (Benutzername):" }, 304{ "Text2 (Username):","Text2 (Benutzername):" },
303{ "Text3 (Password):","Text3 (Passwort):" }, 305{ "Text3 (Password):","Text3 (Passwort):" },
304{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" }, 306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
305{ "Description:","Beschreibung:" }, 307{ "Description:","Beschreibung:" },
306{ "Username:","Benutzername:" }, 308{ "Username:","Benutzername:" },
307{ "Password:","Passwort:" }, 309{ "Password:","Passwort:" },
308{ "&Reveal","&Offen zeigen" }, 310{ "&Reveal","&Offen zeigen" },
309{ "&Generate","&Generiere" }, 311{ "&Generate","&Generiere" },
310{ "&Password","&Passwort" }, 312{ "&Password","&Passwort" },
311{ "&Comments","Kommentar" }, 313{ "&Comments","Kommentar" },
312{ "Launcher:","Launcher:" }, 314{ "Launcher:","Launcher:" },
313{ "$d = Description","$d = Beschreibung" }, 315{ "$d = Description","$d = Beschreibung" },
314{ "$n = Username","$n = Benutzername" }, 316{ "$n = Username","$n = Benutzername" },
315{ "$c = Comment","$c = Kommentar" }, 317{ "$c = Comment","$c = Kommentar" },
316{ "$u = URL","$u = URL" }, 318{ "$u = URL","$u = URL" },
317{ "$p = Password","$p = Passwort" }, 319{ "$p = Password","$p = Passwort" },
318{ "&Launcher","&Launcher" }, 320{ "&Launcher","&Launcher" },
319{ "Password generator","Passwort Generator" }, 321{ "Password generator","Passwort Generator" },
320{ "Character set:","Buchstaben Set:" }, 322{ "Character set:","Buchstaben Set:" },
321{ "Lowercase (abc)","Klein (abc)" }, 323{ "Lowercase (abc)","Klein (abc)" },
322{ "Uppercase (ABC)","Groß (ABC)" }, 324{ "Uppercase (ABC)","Groß (ABC)" },
323{ "Numbers (123)","Nummmern (123)" }, 325{ "Numbers (123)","Nummmern (123)" },
324{ "Special characters:","Spezielle Buchstaben:" }, 326{ "Special characters:","Spezielle Buchstaben:" },
325{ "Spaces (blank characters)","Leerzeichen" }, 327{ "Spaces (blank characters)","Leerzeichen" },
326{ "User defined:","Benutzer definiert:" }, 328{ "User defined:","Benutzer definiert:" },
327{ "Password Length:","Passwort Länge:" }, 329{ "Password Length:","Passwort Länge:" },
328{ "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" },
329{ "no password","Kein Passwort" }, 331{ "no password","Kein Passwort" },
330{ "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." },
331{ "not saved, yet","not saved, yet" }, 333{ "not saved, yet","not saved, yet" },
332{ "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." },
333{ "Find","Finde" }, 335{ "Find","Finde" },
334{ "&Exact match","Genaue Übereinstimmung" }, 336{ "&Exact match","Genaue Übereinstimmung" },
335{ "&Case sensitive","Großschrift abhängig" }, 337{ "&Case sensitive","Großschrift abhängig" },
336{ "Search in Column","Suche in Spalten" }, 338{ "Search in Column","Suche in Spalten" },
337{ "&Description","Beschreibung" }, 339{ "&Description","Beschreibung" },
338{ "C&omment","Kommentar" }, 340{ "C&omment","Kommentar" },
339{ "&Username","Benutzername" }, 341{ "&Username","Benutzername" },
340{ "U&RL","URL" }, 342{ "U&RL","URL" },
341{ "delete?","Löschen?" }, 343{ "delete?","Löschen?" },
342{ "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:" },
343{ "Save?","Speichern?" }, 345{ "Save?","Speichern?" },
344{ ""\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?" },
345{ "The list\n "","Die Liste\n "" }, 347{ "The list\n "","Die Liste\n "" },
346{ "nothing to do","Nichts zu tun" }, 348{ "nothing to do","Nichts zu tun" },
347{ "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." },
348{ "Add new password","Passwort hinzufügen" }, 350{ "Add new password","Passwort hinzufügen" },
349{ "Successfully saved data.","Datei gespeichert." }, 351{ "Successfully saved data.","Datei gespeichert." },
350{ "","" }, 352{ "","" },
351{ "","" }, 353{ "","" },
352{ "","" }, 354{ "","" },
353{ "","" }, 355{ "","" },
354 356
diff --git a/pwmanager/pwmanager/commentbox.cpp b/pwmanager/pwmanager/commentbox.cpp
index 0f32561..51f88b2 100644
--- a/pwmanager/pwmanager/commentbox.cpp
+++ b/pwmanager/pwmanager/commentbox.cpp
@@ -1,235 +1,236 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2004 by Michael Buesch * 3 * copyright (C) 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 "commentbox.h" 20#include "commentbox.h"
21#include "pwmexception.h" 21#include "pwmexception.h"
22#include "htmlgen.h" 22#include "htmlgen.h"
23 23
24#include <klocale.h> 24#include <klocale.h>
25 25
26#ifndef PWM_EMBEDDED 26#ifndef PWM_EMBEDDED
27#include <khtml_part.h> 27#include <khtml_part.h>
28#include <khtmlview.h> 28#include <khtmlview.h>
29#include <qtextedit.h> 29#include <qtextedit.h>
30#else 30#else
31#include <qmultilineedit.h> 31#include <qmultilineedit.h>
32#endif 32#endif
33 33
34 34
35 35
36#ifndef PWM_EMBEDDED 36#ifndef PWM_EMBEDDED
37CommentBox::CommentBox(QWidget *_parentWidget) 37CommentBox::CommentBox(QWidget *_parentWidget)
38{ 38{
39 PWM_ASSERT(_parentWidget); 39 PWM_ASSERT(_parentWidget);
40 parentWidget = _parentWidget; 40 parentWidget = _parentWidget;
41 textDta = 0; 41 textDta = 0;
42 htmlDta = 0; 42 htmlDta = 0;
43 mode = mode_notSet; 43 mode = mode_notSet;
44 setFont( prefs->mViewFont );
44} 45}
45 46
46CommentBox::~CommentBox() 47CommentBox::~CommentBox()
47{ 48{
48 clearText(); 49 clearText();
49 clearHtml(); 50 clearHtml();
50} 51}
51 52
52void CommentBox::clear() 53void CommentBox::clear()
53{ 54{
54 clearText(); 55 clearText();
55 clearHtml(); 56 clearHtml();
56 mode = mode_notSet; 57 mode = mode_notSet;
57 this->hide(); 58 this->hide();
58} 59}
59 60
60void CommentBox::clearText() 61void CommentBox::clearText()
61{ 62{
62 delete_ifnot_null(textDta); 63 delete_ifnot_null(textDta);
63} 64}
64 65
65void CommentBox::clearHtml() 66void CommentBox::clearHtml()
66{ 67{
67 delete_ifnot_null(htmlDta); 68 delete_ifnot_null(htmlDta);
68} 69}
69 70
70void CommentBox::setText(const QString &text) 71void CommentBox::setText(const QString &text)
71{ 72{
72 switchTo(mode_text); 73 switchTo(mode_text);
73 PWM_ASSERT(textDta); 74 PWM_ASSERT(textDta);
74 textDta->setText( text); 75 textDta->setText( text);
75 if (!textDta->isVisible()) 76 if (!textDta->isVisible())
76 textDta->show(); 77 textDta->show();
77} 78}
78 79
79bool CommentBox::getText(QString *text) 80bool CommentBox::getText(QString *text)
80{ 81{
81 if (mode != mode_text) 82 if (mode != mode_text)
82 return false; 83 return false;
83 PWM_ASSERT(text); 84 PWM_ASSERT(text);
84 if (!textDta) { 85 if (!textDta) {
85 *text = ""; 86 *text = "";
86 return true; 87 return true;
87 } 88 }
88 *text = textDta->text(); 89 *text = textDta->text();
89 return true; 90 return true;
90} 91}
91 92
92void CommentBox::setHtml(QString code) 93void CommentBox::setHtml(QString code)
93{ 94{
94 switchTo(mode_html); 95 switchTo(mode_html);
95 PWM_ASSERT(htmlDta); 96 PWM_ASSERT(htmlDta);
96 if (!HtmlGen::replaceSSDummy(&code)) 97 if (!HtmlGen::replaceSSDummy(&code))
97 printWarn("CommentBox::setHtml(): replaceSSDummy() failed!"); 98 printWarn("CommentBox::setHtml(): replaceSSDummy() failed!");
98 htmlDta->begin(); 99 htmlDta->begin();
99 htmlDta->write(code); 100 htmlDta->write(code);
100 htmlDta->end(); 101 htmlDta->end();
101 htmlDta->show(); 102 htmlDta->show();
102} 103}
103 104
104void CommentBox::setContent(const QString &dta) 105void CommentBox::setContent(const QString &dta)
105{ 106{
106 // if there's no data, hide the comment-box 107 // if there's no data, hide the comment-box
107 if (dta.isEmpty()) { 108 if (dta.isEmpty()) {
108 clear(); 109 clear();
109 return; 110 return;
110 } 111 }
111 if (HtmlGen::isHtml(dta)) { 112 if (HtmlGen::isHtml(dta)) {
112 setHtml(dta); 113 setHtml(dta);
113 return; 114 return;
114 } 115 }
115 // we assume it's plain text 116 // we assume it's plain text
116 setText(dta); 117 setText(dta);
117} 118}
118 119
119void CommentBox::switchTo(commentBoxMode newMode) 120void CommentBox::switchTo(commentBoxMode newMode)
120{ 121{
121 if (newMode == mode) 122 if (newMode == mode)
122 return; 123 return;
123 124
124 // cleanup old mode 125 // cleanup old mode
125 switch (mode) { 126 switch (mode) {
126 case mode_text: 127 case mode_text:
127 clearText(); 128 clearText();
128 break; 129 break;
129 case mode_html: 130 case mode_html:
130 clearHtml(); 131 clearHtml();
131 break; 132 break;
132 default: 133 default:
133 break; 134 break;
134 } 135 }
135 136
136 // setup new mode 137 // setup new mode
137 switch (newMode) { 138 switch (newMode) {
138 case mode_text: 139 case mode_text:
139 textDta = new QTextEdit(parentWidget); 140 textDta = new QTextEdit(parentWidget);
140 textDta->setTextFormat(Qt::PlainText); 141 textDta->setTextFormat(Qt::PlainText);
141 textDta->setReadOnly(true); 142 textDta->setReadOnly(true);
142 textDta->show(); 143 textDta->show();
143 break; 144 break;
144 case mode_html: 145 case mode_html:
145 htmlDta = new KHTMLPart(parentWidget, 0, 146 htmlDta = new KHTMLPart(parentWidget, 0,
146 parentWidget); 147 parentWidget);
147 htmlDta->show(); 148 htmlDta->show();
148 break; 149 break;
149 default: 150 default:
150 BUG(); 151 BUG();
151 break; 152 break;
152 } 153 }
153 154
154 mode = newMode; 155 mode = newMode;
155} 156}
156 157
157void CommentBox::show() 158void CommentBox::show()
158{ 159{
159 switch (mode) { 160 switch (mode) {
160 case mode_text: 161 case mode_text:
161 PWM_ASSERT(textDta); 162 PWM_ASSERT(textDta);
162 textDta->show(); 163 textDta->show();
163 break; 164 break;
164 case mode_html: 165 case mode_html:
165 PWM_ASSERT(htmlDta); 166 PWM_ASSERT(htmlDta);
166 htmlDta->show(); 167 htmlDta->show();
167 break; 168 break;
168 default: 169 default:
169 break; 170 break;
170 } 171 }
171 172
172} 173}
173 174
174void CommentBox::hide() 175void CommentBox::hide()
175{ 176{
176 switch (mode) { 177 switch (mode) {
177 case mode_text: 178 case mode_text:
178 PWM_ASSERT(textDta); 179 PWM_ASSERT(textDta);
179 textDta->hide(); 180 textDta->hide();
180 break; 181 break;
181 case mode_html: 182 case mode_html:
182 PWM_ASSERT(htmlDta); 183 PWM_ASSERT(htmlDta);
183 htmlDta->hide(); 184 htmlDta->hide();
184 break; 185 break;
185 default: 186 default:
186 break; 187 break;
187 } 188 }
188} 189}
189 190
190void CommentBox::resize(const QSize &size) 191void CommentBox::resize(const QSize &size)
191{ 192{
192 switch (mode) { 193 switch (mode) {
193 case mode_text: 194 case mode_text:
194 PWM_ASSERT(textDta); 195 PWM_ASSERT(textDta);
195 textDta->resize(size); 196 textDta->resize(size);
196 break; 197 break;
197 case mode_html: 198 case mode_html:
198 PWM_ASSERT(htmlDta); 199 PWM_ASSERT(htmlDta);
199 htmlDta->view()->resize(size); 200 htmlDta->view()->resize(size);
200 break; 201 break;
201 default: 202 default:
202 break; 203 break;
203 } 204 }
204 205
205} 206}
206 207
207QSize CommentBox::size() 208QSize CommentBox::size()
208{ 209{
209 switch (mode) { 210 switch (mode) {
210 case mode_text: 211 case mode_text:
211 PWM_ASSERT(textDta); 212 PWM_ASSERT(textDta);
212 return textDta->size(); 213 return textDta->size();
213 break; 214 break;
214 case mode_html: 215 case mode_html:
215 PWM_ASSERT(htmlDta); 216 PWM_ASSERT(htmlDta);
216 return htmlDta->view()->size(); 217 return htmlDta->view()->size();
217 break; 218 break;
218 default: 219 default:
219 break; 220 break;
220 } 221 }
221 222
222 return QSize(); 223 return QSize();
223} 224}
224 225
225 226
226//////////////////////////////////////////////////////////////////////// 227////////////////////////////////////////////////////////////////////////
227 228
228#else 229#else
229 230
230CommentBox::CommentBox(QWidget *_parentWidget) 231CommentBox::CommentBox(QWidget *_parentWidget)
231 : QMultiLineEdit(_parentWidget) 232 : QMultiLineEdit(_parentWidget)
232 233
233{ 234{
234 this->setReadOnly(true); 235 this->setReadOnly(true);
235 setFocusPolicy( QWidget::ClickFocus ); 236 setFocusPolicy( QWidget::ClickFocus );
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index a8696ea..c1ca536 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -1,277 +1,286 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qframe.h> 25#include <qframe.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qtabwidget.h> 29#include <qtabwidget.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qspinbox.h> 32#include <qspinbox.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qvbox.h> 35#include <qvbox.h>
36 36
37#include <kconfig.h> 37#include <kconfig.h>
38#include <kdebug.h> 38#include <kdebug.h>
39#include <kdialog.h> 39#include <kdialog.h>
40#include <klistview.h> 40#include <klistview.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kglobal.h> 42#include <kglobal.h>
43#include <kmessagebox.h> 43#include <kmessagebox.h>
44#include <kstandarddirs.h> 44#include <kstandarddirs.h>
45#include <kio/kfile/kurlrequester.h> 45#include <kio/kfile/kurlrequester.h>
46 46
47#include "pwmprefs.h" 47#include "pwmprefs.h"
48 48
49#include "pwmconfigwidget.h" 49#include "pwmconfigwidget.h"
50#include "pwmexception.h" 50#include "pwmexception.h"
51 51
52PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name ) 52PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name )
53 : KPrefsWidget(prefs, parent, name ) 53 : KPrefsWidget(prefs, parent, name )
54{ 54{
55 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 55 QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
56 KDialog::spacingHint() ); 56 KDialog::spacingHint() );
57 57
58 QTabWidget *tabWidget = new QTabWidget( this ); 58 QTabWidget *tabWidget = new QTabWidget( this );
59 topLayout->addWidget( tabWidget ); 59 topLayout->addWidget( tabWidget );
60 60
61 // windowsStyle page 61 // windowsStyle page
62 ////////////////////////////////////////////////////// 62 //////////////////////////////////////////////////////
63 QWidget *windowStylePage = new QWidget( this ); 63 QWidget *windowStylePage = new QWidget( this );
64 QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3); 64 QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3);
65 65
66 int i = 0; 66 int i = 0;
67 KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage); 67 KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage);
68 windowStyle->addRadio(i18n("Category on top")); 68 windowStyle->addRadio(i18n("Category on top"));
69 windowStyle->addRadio(i18n("Category-list left/top")); 69 windowStyle->addRadio(i18n("Category-list left/top"));
70 windowStyleLayout->addMultiCellWidget( (QWidget*)windowStyle->groupBox(),i,i,0,2); 70 windowStyleLayout->addMultiCellWidget( (QWidget*)windowStyle->groupBox(),i,i,0,2);
71 ++i; 71 ++i;
72 72
73 QLabel* lab = new QLabel(i18n("<b>Font for Password entries:</b>"), windowStylePage); 73 QLabel* lab = new QLabel(i18n("Font for Password entries:"), windowStylePage);
74 windowStyleLayout->addMultiCellWidget( lab,i,i,0,2); 74 windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
75
76
77 ++i; 75 ++i;
78 76 KPrefsWidFont *selEntrFont =
79 KPrefsWidFont *selEntrFont =
80 addWidFont(i18n("Password"),i18n("Font:"), 77 addWidFont(i18n("Password"),i18n("Font:"),
81 &(prefs->mEntryFont),windowStylePage); 78 &(prefs->mEntryFont),windowStylePage);
82 windowStyleLayout->addWidget(selEntrFont->label(),i,0); 79 windowStyleLayout->addWidget(selEntrFont->label(),i,0);
83 windowStyleLayout->addWidget(selEntrFont->preview(),i,1); 80 windowStyleLayout->addWidget(selEntrFont->preview(),i,1);
84 windowStyleLayout->addWidget(selEntrFont->button(),i,2); 81 windowStyleLayout->addWidget(selEntrFont->button(),i,2);
85 ++i; 82 ++i;
83
84 lab = new QLabel(i18n("Font for Password summary:"), windowStylePage);
85 windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
86 ++i;
87 selEntrFont =
88 addWidFont(i18n("Summary"),i18n("Font:"),
89 &(prefs->mViewFont),windowStylePage);
90 windowStyleLayout->addWidget(selEntrFont->label(),i,0);
91 windowStyleLayout->addWidget(selEntrFont->preview(),i,1);
92 windowStyleLayout->addWidget(selEntrFont->button(),i,2);
93 ++i;
94
86 lab = new QLabel(i18n(""), windowStylePage); 95 lab = new QLabel(i18n(""), windowStylePage);
87 windowStyleLayout->addMultiCellWidget( lab,i,i,0,2); 96 windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
88 97
89 // File page 98 // File page
90 ////////////////////////////////////////////////////// 99 //////////////////////////////////////////////////////
91 QWidget *filePage = new QWidget( this ); 100 QWidget *filePage = new QWidget( this );
92 QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2); 101 QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2);
93 102
94 i = 0; 103 i = 0;
95 QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage); 104 QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage);
96 fileLayout->addWidget(kcfg_compression_label,i,0); 105 fileLayout->addWidget(kcfg_compression_label,i,0);
97 kcfg_compression = new QComboBox(filePage, "kcfg_compression"); 106 kcfg_compression = new QComboBox(filePage, "kcfg_compression");
98 kcfg_compression->insertItem(i18n("None")); 107 kcfg_compression->insertItem(i18n("None"));
99 kcfg_compression->insertItem(i18n("gzip")); 108 kcfg_compression->insertItem(i18n("gzip"));
100 //US not yet supported: kcfg_compression->insertItem(i18n("bzip2")); 109 //US not yet supported: kcfg_compression->insertItem(i18n("bzip2"));
101 fileLayout->addWidget( kcfg_compression,i,1); 110 fileLayout->addWidget( kcfg_compression,i,1);
102 ++i; 111 ++i;
103 112
104 QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage); 113 QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage);
105 fileLayout->addWidget(kcfg_crypt_label,i,0); 114 fileLayout->addWidget(kcfg_crypt_label,i,0);
106 kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo"); 115 kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo");
107 kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)")); 116 kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)"));
108#ifdef CONFIG_PWMANAGER_GCRY 117#ifdef CONFIG_PWMANAGER_GCRY
109 kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)")); 118 kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)"));
110 kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)")); 119 kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)"));
111 kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)")); 120 kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)"));
112 kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)")); 121 kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)"));
113 kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)")); 122 kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)"));
114 kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)")); 123 kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)"));
115#endif // CONFIG_PWMANAGER_GCRY 124#endif // CONFIG_PWMANAGER_GCRY
116 fileLayout->addWidget( kcfg_cryptAlgo,i,1); 125 fileLayout->addWidget( kcfg_cryptAlgo,i,1);
117 ++i; 126 ++i;
118 127
119 QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage); 128 QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage);
120 fileLayout->addWidget(kcfg_hash_label,i,0); 129 fileLayout->addWidget(kcfg_hash_label,i,0);
121 kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo"); 130 kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo");
122 kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)")); 131 kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)"));
123#ifdef CONFIG_PWMANAGER_GCRY 132#ifdef CONFIG_PWMANAGER_GCRY
124 kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)")); 133 kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)"));
125 kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)")); 134 kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)"));
126 kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)")); 135 kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)"));
127 kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)")); 136 kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)"));
128 kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)")); 137 kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)"));
129 kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)")); 138 kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)"));
130#endif // CONFIG_PWMANAGER_GCRY 139#endif // CONFIG_PWMANAGER_GCRY
131 fileLayout->addWidget( kcfg_hashAlgo,i,1); 140 fileLayout->addWidget( kcfg_hashAlgo,i,1);
132 ++i; 141 ++i;
133 142
134 permissionLineEdit = new QLineEdit(filePage); 143 permissionLineEdit = new QLineEdit(filePage);
135 QLabel* permissionLineLabel = new QLabel(permissionLineEdit, i18n("Permissions:"), filePage); 144 QLabel* permissionLineLabel = new QLabel(permissionLineEdit, i18n("Permissions:"), filePage);
136 fileLayout->addWidget(permissionLineLabel,i,0); 145 fileLayout->addWidget(permissionLineLabel,i,0);
137 fileLayout->addWidget(permissionLineEdit,i,1); 146 fileLayout->addWidget(permissionLineEdit,i,1);
138 ++i; 147 ++i;
139 148
140 KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"), 149 KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"),
141 &(prefs->mMakeFileBackup),filePage); 150 &(prefs->mMakeFileBackup),filePage);
142 fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 151 fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
143 ++i; 152 ++i;
144 153
145 // Timeout page 154 // Timeout page
146 ////////////////////////////////////////////////////// 155 //////////////////////////////////////////////////////
147 QWidget *timeoutPage = new QWidget( this ); 156 QWidget *timeoutPage = new QWidget( this );
148 QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2); 157 QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2);
149 158
150 i = 0; 159 i = 0;
151 pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" ); 160 pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" );
152 QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("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]:"), timeoutPage); 161 QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("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]:"), timeoutPage);
153 timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0); 162 timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0);
154 timeoutLayout->addWidget(pwTimeoutSpinBox,i,1); 163 timeoutLayout->addWidget(pwTimeoutSpinBox,i,1);
155 ++i; 164 ++i;
156 165
157 lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" ); 166 lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" );
158 QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage); 167 QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage);
159 timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0); 168 timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0);
160 timeoutLayout->addWidget(lockTimeoutSpinBox,i,1); 169 timeoutLayout->addWidget(lockTimeoutSpinBox,i,1);
161 ++i; 170 ++i;
162 171
163 sb = addWidBool(i18n("deep-lock on autolock"), 172 sb = addWidBool(i18n("deep-lock on autolock"),
164 &(prefs->mAutoDeeplock),timeoutPage); 173 &(prefs->mAutoDeeplock),timeoutPage);
165 timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 174 timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
166 ++i; 175 ++i;
167 176
168 177
169 // Autostart page 178 // Autostart page
170 ////////////////////////////////////////////////////// 179 //////////////////////////////////////////////////////
171 QWidget *autostartPage = new QWidget( this ); 180 QWidget *autostartPage = new QWidget( this );
172 QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2); 181 QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2);
173 182
174 i = 0; 183 i = 0;
175 184
176 autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit"); 185 autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit");
177 QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage); 186 QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage);
178 autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1); 187 autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1);
179 ++i; 188 ++i;
180 autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1); 189 autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1);
181 ++i; 190 ++i;
182 191
183 sb = addWidBool(i18n("open deeplocked"), 192 sb = addWidBool(i18n("open deeplocked"),
184 &(prefs->mAutostartDeeplocked),autostartPage); 193 &(prefs->mAutostartDeeplocked),autostartPage);
185 autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 194 autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
186 ++i; 195 ++i;
187 196
188 197
189 // external app page 198 // external app page
190 ////////////////////////////////////////////////////// 199 //////////////////////////////////////////////////////
191 QWidget *externalappPage = new QWidget( this ); 200 QWidget *externalappPage = new QWidget( this );
192 QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); 201 QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2);
193 202
194 i = 0; 203 i = 0;
195 204
196 browserLineEdit = new QLineEdit(externalappPage); 205 browserLineEdit = new QLineEdit(externalappPage);
197 QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage); 206 QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage);
198 externalappLayout->addWidget(browserLineLabel,i,0); 207 externalappLayout->addWidget(browserLineLabel,i,0);
199 externalappLayout->addWidget(browserLineEdit,i,1); 208 externalappLayout->addWidget(browserLineEdit,i,1);
200 ++i; 209 ++i;
201 210
202 xtermLineEdit = new QLineEdit(externalappPage); 211 xtermLineEdit = new QLineEdit(externalappPage);
203 QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage); 212 QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage);
204 externalappLayout->addWidget(xtermLineLabel,i,0); 213 externalappLayout->addWidget(xtermLineLabel,i,0);
205 externalappLayout->addWidget(xtermLineEdit,i,1); 214 externalappLayout->addWidget(xtermLineEdit,i,1);
206 ++i; 215 ++i;
207 216
208 217
209 // miscelaneous page 218 // miscelaneous page
210 ////////////////////////////////////////////////////// 219 //////////////////////////////////////////////////////
211 QWidget *miscPage = new QWidget( this ); 220 QWidget *miscPage = new QWidget( this );
212 QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2); 221 QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2);
213 222
214 i = 0; 223 i = 0;
215 224
216 /*US ENH: PWM/Pi has no tray and con be minimized 225 /*US ENH: PWM/Pi has no tray and con be minimized
217 sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage); 226 sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage);
218 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 227 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
219 ++i; 228 ++i;
220 */ 229 */
221 230
222 sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage); 231 sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage);
223 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 232 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
224 ++i; 233 ++i;
225 234
226 /*US ENH: PWM/Pi has no tray and con be minimized 235 /*US ENH: PWM/Pi has no tray and con be minimized
227 sb = addWidBool(i18n("auto-minimize to tray on startup"),&(prefs->mAutoMinimizeOnStart),miscPage); 236 sb = addWidBool(i18n("auto-minimize to tray on startup"),&(prefs->mAutoMinimizeOnStart),miscPage);
228 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 237 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
229 ++i; 238 ++i;
230 239
231 KPrefsWidRadios * minimizeRadio = addWidRadios(i18n("auto-lock on minimize:") ,&(prefs->mMinimizeLock), miscPage); 240 KPrefsWidRadios * minimizeRadio = addWidRadios(i18n("auto-lock on minimize:") ,&(prefs->mMinimizeLock), miscPage);
232 minimizeRadio->addRadio(i18n("don't lock")); 241 minimizeRadio->addRadio(i18n("don't lock"));
233 minimizeRadio->addRadio(i18n("normal lock")); 242 minimizeRadio->addRadio(i18n("normal lock"));
234 minimizeRadio->addRadio(i18n("deep-lock")); 243 minimizeRadio->addRadio(i18n("deep-lock"));
235 miscLayout->addMultiCellWidget( (QWidget*)minimizeRadio->groupBox(),i,i,0,2); 244 miscLayout->addMultiCellWidget( (QWidget*)minimizeRadio->groupBox(),i,i,0,2);
236 ++i; 245 ++i;
237 246
238 sb = addWidBool(i18n("KWallet emulation"),&(prefs->mKWalletEmu),miscPage); 247 sb = addWidBool(i18n("KWallet emulation"),&(prefs->mKWalletEmu),miscPage);
239 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 248 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
240 ++i; 249 ++i;
241 250
242 sb = addWidBool(i18n("Close instead Minimize into tray"),&(prefs->mClose),miscPage); 251 sb = addWidBool(i18n("Close instead Minimize into tray"),&(prefs->mClose),miscPage);
243 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); 252 miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
244 ++i; 253 ++i;
245 */ 254 */
246 255
247 256
248 tabWidget->addTab( windowStylePage, i18n( "Look && feel" ) ); 257 tabWidget->addTab( windowStylePage, i18n( "Look && feel" ) );
249 tabWidget->addTab( filePage, i18n( "File" ) ); 258 tabWidget->addTab( filePage, i18n( "File" ) );
250 tabWidget->addTab( timeoutPage, i18n( "Timeout" ) ); 259 tabWidget->addTab( timeoutPage, i18n( "Timeout" ) );
251 tabWidget->addTab( autostartPage, i18n( "Autostart" ) ); 260 tabWidget->addTab( autostartPage, i18n( "Autostart" ) );
252 tabWidget->addTab( externalappPage, i18n( "External apps" ) ); 261 tabWidget->addTab( externalappPage, i18n( "External apps" ) );
253 tabWidget->addTab( miscPage, i18n( "Miscellaneous" ) ); 262 tabWidget->addTab( miscPage, i18n( "Miscellaneous" ) );
254 263
255 264
256 connect( permissionLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); 265 connect( permissionLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
257 connect( pwTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); 266 connect( pwTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) );
258 connect( lockTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); 267 connect( lockTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) );
259 connect( autostartLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); 268 connect( autostartLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
260 connect( browserLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); 269 connect( browserLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
261 connect( xtermLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); 270 connect( xtermLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
262 271
263} 272}
264 273
265 274
266void PWMConfigWidget::usrReadConfig() 275void PWMConfigWidget::usrReadConfig()
267{ 276{
268 PWMPrefs* prefs = PWMPrefs::instance(); 277 PWMPrefs* prefs = PWMPrefs::instance();
269 278
270 279
271 setFilePermissions(prefs->mFilePermissions); 280 setFilePermissions(prefs->mFilePermissions);
272 281
273 pwTimeoutSpinBox->setValue(prefs->mPwTimeout); 282 pwTimeoutSpinBox->setValue(prefs->mPwTimeout);
274 lockTimeoutSpinBox->setValue(prefs->mLockTimeout); 283 lockTimeoutSpinBox->setValue(prefs->mLockTimeout);
275 autostartLineEdit->setURL(prefs->mAutoStart); 284 autostartLineEdit->setURL(prefs->mAutoStart);
276 browserLineEdit->setText(prefs->mBrowserCommand); 285 browserLineEdit->setText(prefs->mBrowserCommand);
277 xtermLineEdit->setText(prefs->mXTermCommand); 286 xtermLineEdit->setText(prefs->mXTermCommand);
diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp
index 9f351d6..85e788c 100644
--- a/pwmanager/pwmanager/listviewpwm.cpp
+++ b/pwmanager/pwmanager/listviewpwm.cpp
@@ -1,112 +1,113 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2004 by Michael Buesch * 3 * copyright (C) 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 "listviewpwm.h" 20#include "listviewpwm.h"
21#include "pwmexception.h" 21#include "pwmexception.h"
22#include "pwmview.h" 22#include "pwmview.h"
23 23
24#include <qpainter.h> 24#include <qpainter.h>
25#include <qpixmap.h> 25#include <qpixmap.h>
26 26
27#include <kiconloader.h> 27#include <kiconloader.h>
28 28
29#ifdef PWM_EMBEDDED 29#ifdef PWM_EMBEDDED
30#include <kglobal.h> 30#include <kglobal.h>
31#endif 31#endif
32 32
33ListViewPwM::ListViewPwM(QWidget *parent, const char *name) 33ListViewPwM::ListViewPwM(QWidget *parent, const char *name)
34 : KListView(parent, name) 34 : KListView(parent, name)
35{ 35{
36 //setResizeMode(QListView::AllColumns); 36 //setResizeMode(QListView::AllColumns);
37 setAllColumnsShowFocus (true );
37} 38}
38 39
39bool ListViewPwM::event(QEvent *e) 40bool ListViewPwM::event(QEvent *e)
40{ 41{
41 if (e->type() == QEvent::LayoutHint) 42 if (e->type() == QEvent::LayoutHint)
42 emit layoutChanged(); 43 emit layoutChanged();
43 return KListView::event(e); 44 return KListView::event(e);
44} 45}
45 46
46 47
47QPixmap * ListViewItemPwM::onPix = 0; 48QPixmap * ListViewItemPwM::onPix = 0;
48QPixmap * ListViewItemPwM::offPix = 0; 49QPixmap * ListViewItemPwM::offPix = 0;
49 50
50ListViewItemPwM::ListViewItemPwM(QListView *parent) 51ListViewItemPwM::ListViewItemPwM(QListView *parent)
51 : QCheckListItem(parent, "", QCheckListItem::CheckBox) 52 : QCheckListItem(parent, "", QCheckListItem::CheckBox)
52{ 53{
53 if (!onPix) { 54 if (!onPix) {
54 PWM_ASSERT(!offPix); 55 PWM_ASSERT(!offPix);
55 KIconLoader* picons; 56 KIconLoader* picons;
56#ifndef PWM_EMBEDDED 57#ifndef PWM_EMBEDDED
57 KIconLoader il; 58 KIconLoader il;
58 picons = &il; 59 picons = &il;
59#else 60#else
60 picons = KGlobal::iconLoader(); 61 picons = KGlobal::iconLoader();
61#endif 62#endif
62 63
63 KIconLoader il; 64 KIconLoader il;
64#ifndef PWM_EMBEDDED 65#ifndef PWM_EMBEDDED
65 static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small)); 66 static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small));
66#else 67#else
67 static QPixmap onP(picons->loadIcon("decrypted", KIcon::Small)); 68 static QPixmap onP(picons->loadIcon("decrypted", KIcon::Small));
68#endif 69#endif
69 onPix = &onP; 70 onPix = &onP;
70 static QPixmap offP(picons->loadIcon("encrypted", KIcon::Small)); 71 static QPixmap offP(picons->loadIcon("encrypted", KIcon::Small));
71 offPix = &offP; 72 offPix = &offP;
72 } 73 }
73} 74}
74 75
75void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, 76void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg,
76 int column, int width, int align) 77 int column, int width, int align)
77{ 78{
78 // qDebug("ListViewItemPwM::paintCell column=%i", column); 79 // qDebug("ListViewItemPwM::paintCell column=%i", column);
79 if (!p) 80 if (!p)
80 return; 81 return;
81 //US BUG: 82 //US BUG:
82 if (column != COLUMN_DESC) { 83 if (column != COLUMN_DESC) {
83 QCheckListItem::paintCell(p, cg, column, width, align); 84 QCheckListItem::paintCell(p, cg, column, width, align);
84 return; 85 return;
85 } 86 }
86 QPixmap *curPix = isOn() ? onPix : offPix; 87 QPixmap *curPix = isOn() ? onPix : offPix;
87 int pixSpace = curPix->width(); 88 int pixSpace = curPix->width();
88 pixSpace += 4; 89 pixSpace += 4;
89#ifndef PWM_EMBEDDED 90#ifndef PWM_EMBEDDED
90 QRect window(p->viewport()); 91 QRect window(p->viewport());
91 // clear the rectangle (we have to clear it first. see QT doc) 92 // clear the rectangle (we have to clear it first. see QT doc)
92 p->eraseRect(0, 0, pixSpace, window.height()); 93 p->eraseRect(0, 0, pixSpace, window.height());
93 // now draw the pixmap 94 // now draw the pixmap
94 int y = (height() - curPix->height()) / 2; 95 int y = (height() - curPix->height()) / 2;
95 p->drawPixmap(1, y, *curPix); 96 p->drawPixmap(1, y, *curPix);
96 window.moveLeft(pixSpace); 97 window.moveLeft(pixSpace);
97 p->setViewport(window); 98 p->setViewport(window);
98#else 99#else
99 p->eraseRect(0, 0, pixSpace, height()); 100 p->eraseRect(0, 0, pixSpace, height());
100 // now draw the pixmap 101 // now draw the pixmap
101 int y = (height() - curPix->height()) / 2; 102 int y = (height() - curPix->height()) / 2;
102 p->drawPixmap(1, y, *curPix); 103 p->drawPixmap(1, y, *curPix);
103 p->translate( pixSpace, 0 ); 104 p->translate( pixSpace, 0 );
104 105
105#endif 106#endif
106 QListViewItem::paintCell(p, cg, column, width - pixSpace, align); 107 QListViewItem::paintCell(p, cg, column, width - pixSpace, align);
107 108
108} 109}
109 110
110#ifndef PWM_EMBEDDED 111#ifndef PWM_EMBEDDED
111#include "listviewpwm.moc" 112#include "listviewpwm.moc"
112#endif 113#endif
diff --git a/pwmanager/pwmanager/pwmprefs.cpp b/pwmanager/pwmanager/pwmprefs.cpp
index 31fb2e0..444186c 100644
--- a/pwmanager/pwmanager/pwmprefs.cpp
+++ b/pwmanager/pwmanager/pwmprefs.cpp
@@ -1,326 +1,335 @@
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 $Id$ 23 $Id$
24*/ 24*/
25 25
26 26
27#include <kconfig.h> 27#include <kconfig.h>
28#include <klocale.h> 28#include <klocale.h>
29#include <kstaticdeleter.h> 29#include <kstaticdeleter.h>
30#include <kglobalsettings.h> 30#include <kglobalsettings.h>
31 31
32#include "pwmprefs.h" 32#include "pwmprefs.h"
33 33
34PWMPrefs *PWMPrefs::sInstance = 0; 34PWMPrefs *PWMPrefs::sInstance = 0;
35static KStaticDeleter<PWMPrefs> staticDeleterPP; 35static KStaticDeleter<PWMPrefs> staticDeleterPP;
36 36
37PWMPrefs::PWMPrefs() 37PWMPrefs::PWMPrefs()
38 : KPimPrefs("pwmanagerrc") 38 : KPimPrefs("pwmanagerrc")
39{ 39{
40 KPrefs::setCurrentGroup( "Global" ); 40 KPrefs::setCurrentGroup( "Global" );
41 41
42 addItemString( "autoStart", &mAutoStart, "" ); 42 addItemString( "autoStart", &mAutoStart, "" );
43 addItemString( "browserCommand", &mBrowserCommand, "" ); 43 addItemString( "browserCommand", &mBrowserCommand, "" );
44 addItemString( "xtermCommand", &mXTermCommand, CONF_DEFAULT_XTERMCOMMAND); 44 addItemString( "xtermCommand", &mXTermCommand, CONF_DEFAULT_XTERMCOMMAND);
45 addItemFont( "entryFont", &mEntryFont,KGlobalSettings::generalFont()); 45 addItemFont( "entryFont", &mEntryFont,KGlobalSettings::generalFont());
46 addItemFont( "viewFont", &mViewFont,KGlobalSettings::generalFont());
46 addItemInt( "pwTimeout", &mPwTimeout, CONF_DEFAULT_PWTIMEOUT ); 47 addItemInt( "pwTimeout", &mPwTimeout, CONF_DEFAULT_PWTIMEOUT );
47 addItemInt( "lockTimeout", &mLockTimeout, CONF_DEFAULT_LOCKTIMEOUT ); 48 addItemInt( "lockTimeout", &mLockTimeout, CONF_DEFAULT_LOCKTIMEOUT );
48 addItemInt( "compression", &mCompression, CONF_DEFAULT_COMPRESSION ); 49 addItemInt( "compression", &mCompression, CONF_DEFAULT_COMPRESSION );
49 addItemInt("cryptAlgo", &mCryptAlgo, CONF_DEFAULT_CRYPTALGO); 50 addItemInt("cryptAlgo", &mCryptAlgo, CONF_DEFAULT_CRYPTALGO);
50 addItemInt("hashAlgo", &mHashAlgo, CONF_DEFAULT_HASHALGO); 51 addItemInt("hashAlgo", &mHashAlgo, CONF_DEFAULT_HASHALGO);
51 addItemInt( "filePermissions", &mFilePermissions, CONF_DEFAULT_FILEPERMISSIONS ); 52 addItemInt( "filePermissions", &mFilePermissions, CONF_DEFAULT_FILEPERMISSIONS );
52 addItemInt( "minimizeLock", &mMinimizeLock, CONF_DEFAULT_MINIMIZELOCK ); 53 addItemInt( "minimizeLock", &mMinimizeLock, CONF_DEFAULT_MINIMIZELOCK );
53 addItemBool( "unlockOnOpen", &mUnlockOnOpen, CONF_DEFAULT_UNLOCKONOPEN ); 54 addItemBool( "unlockOnOpen", &mUnlockOnOpen, CONF_DEFAULT_UNLOCKONOPEN );
54 addItemBool( "tray", &mTray, CONF_DEFAULT_TRAY ); 55 addItemBool( "tray", &mTray, CONF_DEFAULT_TRAY );
55 addItemBool( "makeFileBackup", &mMakeFileBackup, CONF_DEFAULT_MAKEFILEBACKUP ); 56 addItemBool( "makeFileBackup", &mMakeFileBackup, CONF_DEFAULT_MAKEFILEBACKUP );
56 addItemBool( "autostartDeepLocked", &mAutostartDeeplocked, CONF_DEFAULT_AUTOSTART_DEEPL ); 57 addItemBool( "autostartDeepLocked", &mAutostartDeeplocked, CONF_DEFAULT_AUTOSTART_DEEPL );
57 addItemBool( "autoDeepLock", &mAutoDeeplock, CONF_DEFAULT_AUTODEEPLOCK ); 58 addItemBool( "autoDeepLock", &mAutoDeeplock, CONF_DEFAULT_AUTODEEPLOCK );
58 addItemBool( "kwalletEmu", &mKWalletEmu, CONF_DEFAULT_KWALLETEMU ); 59 addItemBool( "kwalletEmu", &mKWalletEmu, CONF_DEFAULT_KWALLETEMU );
59 addItemBool( "newEntrLockStat", &mNewEntrLockStat, CONF_DEFAULT_NEWENTRLOCKSTAT ); 60 addItemBool( "newEntrLockStat", &mNewEntrLockStat, CONF_DEFAULT_NEWENTRLOCKSTAT );
60 61
61 KPrefs::setCurrentGroup( "Wnd" ); 62 KPrefs::setCurrentGroup( "Wnd" );
62 63
63 addItemSize( "MainWndSize", &mMainWndSize); 64 addItemSize( "MainWndSize", &mMainWndSize);
64 addItemInt( "MainViewStyle", &mMainViewStyle, CONF_DEFAULT_MAINVIEWSTYLE ); 65 addItemInt( "MainViewStyle", &mMainViewStyle, CONF_DEFAULT_MAINVIEWSTYLE );
65 addItemBool( "autoMinimizeOnStart", &mAutoMinimizeOnStart, CONF_DEFAULT_AUTOMINIMIZE ); 66 addItemBool( "autoMinimizeOnStart", &mAutoMinimizeOnStart, CONF_DEFAULT_AUTOMINIMIZE );
66 addItemBool( "close", &mClose, CONF_DEFAULT_WNDCLOSE ); 67 addItemBool( "close", &mClose, CONF_DEFAULT_WNDCLOSE );
67 addItemIntList( "commentSplitter", &mCommentSplitter ); 68 addItemIntList( "commentSplitter", &mCommentSplitter );
68 addItemIntList( "categorySplitter", &mCategorySplitter ); 69 addItemIntList( "categorySplitter", &mCategorySplitter );
69} 70}
70 71
71PWMPrefs::~PWMPrefs() 72PWMPrefs::~PWMPrefs()
72{ 73{
73 if (sInstance == this) 74 if (sInstance == this)
74 sInstance = staticDeleterPP.setObject(0); 75 sInstance = staticDeleterPP.setObject(0);
75 else 76 else
76 qDebug("Whats this? Error in PWMPrefs::~PWMPrefs()?"); 77 qDebug("Whats this? Error in PWMPrefs::~PWMPrefs()?");
77} 78}
78 79
79PWMPrefs *PWMPrefs::instance() 80PWMPrefs *PWMPrefs::instance()
80{ 81{
81 if ( !sInstance ) { 82 if ( !sInstance ) {
82#ifdef PWM_EMBEDDED 83#ifdef PWM_EMBEDDED
83 sInstance = staticDeleterPP.setObject( new PWMPrefs() ); 84 sInstance = staticDeleterPP.setObject( new PWMPrefs() );
84#else //PWM_EMBEDDED 85#else //PWM_EMBEDDED
85 //US the following line has changed ???. Why 86 //US the following line has changed ???. Why
86 staticDeleterPP.setObject( sInstance, new PWMPrefs() ); 87 staticDeleterPP.setObject( sInstance, new PWMPrefs() );
87#endif //KAB_EMBEDDED 88#endif //KAB_EMBEDDED
88 sInstance->readConfig(); 89 sInstance->readConfig();
89 } 90 }
90 91
91 return sInstance; 92 return sInstance;
92} 93}
93 94
94 // US introduce a nonconst way to return the config object. 95 // US introduce a nonconst way to return the config object.
95KConfig* PWMPrefs::getConfig() 96KConfig* PWMPrefs::getConfig()
96{ 97{
97 return config(); 98 return config();
98} 99}
99 100
100/******************************************************************* 101/*******************************************************************
101 * functions for reading the configuration settings 102 * functions for reading the configuration settings
102 *******************************************************************/ 103 *******************************************************************/
103 104
104QString PWMPrefs::confGlobAutoStart() 105QString PWMPrefs::confGlobAutoStart()
105{ 106{
106 return mAutoStart; 107 return mAutoStart;
107} 108}
108 109
109QString PWMPrefs::confGlobBrowserCommand() 110QString PWMPrefs::confGlobBrowserCommand()
110{ 111{
111 return mBrowserCommand; 112 return mBrowserCommand;
112} 113}
113 114
114QString PWMPrefs::confGlobXtermCommand() 115QString PWMPrefs::confGlobXtermCommand()
115{ 116{
116 return mXTermCommand; 117 return mXTermCommand;
117} 118}
118 119
119QFont PWMPrefs::confGlobEntryFont() 120QFont PWMPrefs::confGlobEntryFont()
120{ 121{
121 return mEntryFont; 122 return mEntryFont;
122} 123}
124QFont PWMPrefs::confGlobViewFont()
125{
126 return mViewFont;
127}
123 128
124int PWMPrefs::confGlobPwTimeout() 129int PWMPrefs::confGlobPwTimeout()
125{ 130{
126 return mPwTimeout; 131 return mPwTimeout;
127} 132}
128 133
129int PWMPrefs::confGlobLockTimeout() 134int PWMPrefs::confGlobLockTimeout()
130{ 135{
131 return mLockTimeout; 136 return mLockTimeout;
132} 137}
133 138
134int PWMPrefs::confGlobCompression() 139int PWMPrefs::confGlobCompression()
135{ 140{
136 return mCompression; 141 return mCompression;
137} 142}
138 143
139int PWMPrefs::confGlobFilePermissions() 144int PWMPrefs::confGlobFilePermissions()
140{ 145{
141 return mFilePermissions; 146 return mFilePermissions;
142} 147}
143 148
144int PWMPrefs::confGlobMinimizeLock() 149int PWMPrefs::confGlobMinimizeLock()
145{ 150{
146 return mMinimizeLock; 151 return mMinimizeLock;
147} 152}
148 153
149bool PWMPrefs::confGlobUnlockOnOpen() 154bool PWMPrefs::confGlobUnlockOnOpen()
150{ 155{
151 return mUnlockOnOpen; 156 return mUnlockOnOpen;
152} 157}
153 158
154bool PWMPrefs::confGlobTray() 159bool PWMPrefs::confGlobTray()
155{ 160{
156 return mTray; 161 return mTray;
157} 162}
158 163
159bool PWMPrefs::confGlobMakeFileBackup() 164bool PWMPrefs::confGlobMakeFileBackup()
160{ 165{
161 return mMakeFileBackup; 166 return mMakeFileBackup;
162} 167}
163 168
164bool PWMPrefs::confGlobAutostartDeepLocked() 169bool PWMPrefs::confGlobAutostartDeepLocked()
165{ 170{
166 return mAutostartDeeplocked; 171 return mAutostartDeeplocked;
167} 172}
168 173
169bool PWMPrefs::confGlobAutoDeepLock() 174bool PWMPrefs::confGlobAutoDeepLock()
170{ 175{
171 return mAutoDeeplock; 176 return mAutoDeeplock;
172} 177}
173 178
174bool PWMPrefs::confGlobKwalletEmu() 179bool PWMPrefs::confGlobKwalletEmu()
175{ 180{
176 return mKWalletEmu; 181 return mKWalletEmu;
177} 182}
178 183
179bool PWMPrefs::confGlobNewEntrLockStat() 184bool PWMPrefs::confGlobNewEntrLockStat()
180{ 185{
181 return mNewEntrLockStat; 186 return mNewEntrLockStat;
182} 187}
183 188
184QSize PWMPrefs::confWndMainWndSize() 189QSize PWMPrefs::confWndMainWndSize()
185{ 190{
186 return mMainWndSize; 191 return mMainWndSize;
187} 192}
188 193
189int PWMPrefs::confWndMainViewStyle() 194int PWMPrefs::confWndMainViewStyle()
190{ 195{
191 return mMainViewStyle; 196 return mMainViewStyle;
192} 197}
193 198
194bool PWMPrefs::confWndAutoMinimizeOnStart() 199bool PWMPrefs::confWndAutoMinimizeOnStart()
195{ 200{
196 return mAutoMinimizeOnStart; 201 return mAutoMinimizeOnStart;
197} 202}
198 203
199bool PWMPrefs::confWndClose() 204bool PWMPrefs::confWndClose()
200{ 205{
201 return mClose; 206 return mClose;
202} 207}
203 208
204int PWMPrefs::confGlobCryptAlgo() 209int PWMPrefs::confGlobCryptAlgo()
205{ 210{
206 return mCryptAlgo + 1; 211 return mCryptAlgo + 1;
207} 212}
208 213
209int PWMPrefs::confGlobHashAlgo() 214int PWMPrefs::confGlobHashAlgo()
210{ 215{
211 return mHashAlgo + 1; 216 return mHashAlgo + 1;
212} 217}
213 218
214/******************************************************************* 219/*******************************************************************
215 * functions for writing the configuration settings 220 * functions for writing the configuration settings
216 *******************************************************************/ 221 *******************************************************************/
217 222
218void PWMPrefs::confGlobAutoStart(const QString &e) 223void PWMPrefs::confGlobAutoStart(const QString &e)
219{ 224{
220 mAutoStart = e; 225 mAutoStart = e;
221} 226}
222 227
223void PWMPrefs::confGlobBrowserCommand(const QString &e) 228void PWMPrefs::confGlobBrowserCommand(const QString &e)
224{ 229{
225 mBrowserCommand = e; 230 mBrowserCommand = e;
226} 231}
227 232
228void PWMPrefs::confGlobXtermCommand(const QString &e) 233void PWMPrefs::confGlobXtermCommand(const QString &e)
229{ 234{
230 mXTermCommand = e; 235 mXTermCommand = e;
231} 236}
232 237
233void PWMPrefs::confGlobEntryFont(const QFont &e) 238void PWMPrefs::confGlobEntryFont(const QFont &e)
234{ 239{
235 mEntryFont = e; 240 mEntryFont = e;
236} 241}
242void PWMPrefs::confGlobViewFont(const QFont &e)
243{
244 mViewFont = e;
245}
237 246
238void PWMPrefs::confGlobPwTimeout(int e) 247void PWMPrefs::confGlobPwTimeout(int e)
239{ 248{
240 mPwTimeout = e; 249 mPwTimeout = e;
241} 250}
242 251
243void PWMPrefs::confGlobLockTimeout(int e) 252void PWMPrefs::confGlobLockTimeout(int e)
244{ 253{
245 mLockTimeout = e; 254 mLockTimeout = e;
246} 255}
247 256
248void PWMPrefs::confGlobCompression(int e) 257void PWMPrefs::confGlobCompression(int e)
249{ 258{
250 mCompression = e; 259 mCompression = e;
251} 260}
252 261
253void PWMPrefs::confGlobFilePermissions(int e) 262void PWMPrefs::confGlobFilePermissions(int e)
254{ 263{
255 mFilePermissions = e; 264 mFilePermissions = e;
256} 265}
257 266
258void PWMPrefs::confGlobMinimizeLock(int e) 267void PWMPrefs::confGlobMinimizeLock(int e)
259{ 268{
260 mMinimizeLock = e; 269 mMinimizeLock = e;
261} 270}
262 271
263void PWMPrefs::confGlobUnlockOnOpen(bool e) 272void PWMPrefs::confGlobUnlockOnOpen(bool e)
264{ 273{
265 mUnlockOnOpen = e; 274 mUnlockOnOpen = e;
266} 275}
267 276
268void PWMPrefs::confGlobTray(bool e) 277void PWMPrefs::confGlobTray(bool e)
269{ 278{
270 mTray = e; 279 mTray = e;
271} 280}
272 281
273void PWMPrefs::confGlobMakeFileBackup(bool e) 282void PWMPrefs::confGlobMakeFileBackup(bool e)
274{ 283{
275 mMakeFileBackup = e; 284 mMakeFileBackup = e;
276} 285}
277 286
278void PWMPrefs::confGlobAutostartDeepLocked(bool e) 287void PWMPrefs::confGlobAutostartDeepLocked(bool e)
279{ 288{
280 mAutostartDeeplocked = e; 289 mAutostartDeeplocked = e;
281} 290}
282 291
283void PWMPrefs::confGlobAutoDeepLock(bool e) 292void PWMPrefs::confGlobAutoDeepLock(bool e)
284{ 293{
285 mAutoDeeplock = e; 294 mAutoDeeplock = e;
286} 295}
287 296
288void PWMPrefs::confGlobKwalletEmu(bool e) 297void PWMPrefs::confGlobKwalletEmu(bool e)
289{ 298{
290 mKWalletEmu = e; 299 mKWalletEmu = e;
291} 300}
292 301
293void PWMPrefs::confGlobNewEntrLockStat(bool e) 302void PWMPrefs::confGlobNewEntrLockStat(bool e)
294{ 303{
295 mNewEntrLockStat = e; 304 mNewEntrLockStat = e;
296} 305}
297 306
298void PWMPrefs::confWndMainWndSize(const QSize &e) 307void PWMPrefs::confWndMainWndSize(const QSize &e)
299{ 308{
300 mMainWndSize = e; 309 mMainWndSize = e;
301} 310}
302 311
303void PWMPrefs::confWndMainViewStyle(int e) 312void PWMPrefs::confWndMainViewStyle(int e)
304{ 313{
305 mMainViewStyle = e; 314 mMainViewStyle = e;
306} 315}
307 316
308void PWMPrefs::confWndAutoMinimizeOnStart(bool e) 317void PWMPrefs::confWndAutoMinimizeOnStart(bool e)
309{ 318{
310 mAutoMinimizeOnStart = e; 319 mAutoMinimizeOnStart = e;
311} 320}
312 321
313void PWMPrefs::confWndClose(bool e) 322void PWMPrefs::confWndClose(bool e)
314{ 323{
315 mClose = e; 324 mClose = e;
316} 325}
317 326
318void PWMPrefs::confGlobCryptAlgo(int e) 327void PWMPrefs::confGlobCryptAlgo(int e)
319{ 328{
320 mCryptAlgo = e - 1; 329 mCryptAlgo = e - 1;
321} 330}
322 331
323void PWMPrefs::confGlobHashAlgo(int e) 332void PWMPrefs::confGlobHashAlgo(int e)
324{ 333{
325 mHashAlgo = e - 1; 334 mHashAlgo = e - 1;
326} 335}
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h
index 5b8f9d8..1f6a35c 100644
--- a/pwmanager/pwmanager/pwmprefs.h
+++ b/pwmanager/pwmanager/pwmprefs.h
@@ -1,163 +1,166 @@
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 $Id$ 23 $Id$
24*/ 24*/
25 25
26#ifndef PWMPREFS_H 26#ifndef PWMPREFS_H
27#define PWMPREFS_H 27#define PWMPREFS_H
28 28
29#include <qstringlist.h> 29#include <qstringlist.h>
30#include <qsize.h> 30#include <qsize.h>
31 31
32#include <kpimprefs.h> 32#include <kpimprefs.h>
33 33
34class KConfig; 34class KConfig;
35 35
36#define conf() PWMPrefs::instance() 36#define conf() PWMPrefs::instance()
37 37
38 38
39 39
40 40
41#define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ 41#define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */
42#define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ 42#define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */
43#define CONF_DEFAULT_TRAY false 43#define CONF_DEFAULT_TRAY false
44#define CONF_DEFAULT_UNLOCKONOPEN true 44#define CONF_DEFAULT_UNLOCKONOPEN true
45#define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */ 45#define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */
46#define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ 46#define CONF_DEFAULT_COMPRESSION 0x01/* gzip */
47#define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */ 47#define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */
48#define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */ 48#define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */
49#define CONF_DEFAULT_AUTOMINIMIZE false 49#define CONF_DEFAULT_AUTOMINIMIZE false
50#define CONF_DEFAULT_BROWSERCOMMAND "" 50#define CONF_DEFAULT_BROWSERCOMMAND ""
51#define CONF_DEFAULT_XTERMCOMMAND "konsole -e" 51#define CONF_DEFAULT_XTERMCOMMAND "konsole -e"
52#define CONF_DEFAULT_FILEPERMISSIONS 0600 52#define CONF_DEFAULT_FILEPERMISSIONS 0600
53#define CONF_DEFAULT_MAKEFILEBACKUP false 53#define CONF_DEFAULT_MAKEFILEBACKUP false
54#define CONF_DEFAULT_AUTOSTART_DEEPL true 54#define CONF_DEFAULT_AUTOSTART_DEEPL true
55#define CONF_DEFAULT_AUTODEEPLOCK true 55#define CONF_DEFAULT_AUTODEEPLOCK true
56#define CONF_DEFAULT_KWALLETEMU false 56#define CONF_DEFAULT_KWALLETEMU false
57#define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ 57#define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */
58#define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */ 58#define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */
59#define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ 59#define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */
60 60
61 61
62class PWMPrefs : public KPimPrefs 62class PWMPrefs : public KPimPrefs
63{ 63{
64 public: 64 public:
65 virtual ~PWMPrefs(); 65 virtual ~PWMPrefs();
66 66
67 static PWMPrefs *instance(); 67 static PWMPrefs *instance();
68 68
69public: 69public:
70 /* functions for reading the configuration settings */ 70 /* functions for reading the configuration settings */
71 /* GLOBAL */ 71 /* GLOBAL */
72 QString confGlobAutoStart(); 72 QString confGlobAutoStart();
73 QString confGlobBrowserCommand(); 73 QString confGlobBrowserCommand();
74 QString confGlobXtermCommand(); 74 QString confGlobXtermCommand();
75 QFont confGlobEntryFont(); 75 QFont confGlobEntryFont();
76 QFont confGlobViewFont();
76 int confGlobPwTimeout(); 77 int confGlobPwTimeout();
77 int confGlobLockTimeout(); 78 int confGlobLockTimeout();
78 int confGlobCompression(); 79 int confGlobCompression();
79 int confGlobCryptAlgo(); 80 int confGlobCryptAlgo();
80 int confGlobHashAlgo(); 81 int confGlobHashAlgo();
81 int confGlobFilePermissions(); 82 int confGlobFilePermissions();
82 int confGlobMinimizeLock(); 83 int confGlobMinimizeLock();
83 bool confGlobUnlockOnOpen(); 84 bool confGlobUnlockOnOpen();
84 bool confGlobTray(); 85 bool confGlobTray();
85 bool confGlobMakeFileBackup(); 86 bool confGlobMakeFileBackup();
86 bool confGlobAutostartDeepLocked(); 87 bool confGlobAutostartDeepLocked();
87 bool confGlobAutoDeepLock(); 88 bool confGlobAutoDeepLock();
88 bool confGlobKwalletEmu(); 89 bool confGlobKwalletEmu();
89 bool confGlobNewEntrLockStat(); 90 bool confGlobNewEntrLockStat();
90 /* WND */ 91 /* WND */
91 QSize confWndMainWndSize(); 92 QSize confWndMainWndSize();
92 int confWndMainViewStyle(); 93 int confWndMainViewStyle();
93 bool confWndAutoMinimizeOnStart(); 94 bool confWndAutoMinimizeOnStart();
94 bool confWndClose(); 95 bool confWndClose();
95 96
96public: 97public:
97 /* functions for writing the configuration settings */ 98 /* functions for writing the configuration settings */
98 /* GLOBAL */ 99 /* GLOBAL */
99 void confGlobAutoStart(const QString &e); 100 void confGlobAutoStart(const QString &e);
100 void confGlobBrowserCommand(const QString &e); 101 void confGlobBrowserCommand(const QString &e);
101 void confGlobXtermCommand(const QString &e); 102 void confGlobXtermCommand(const QString &e);
102 void confGlobEntryFont(const QFont &e); 103 void confGlobEntryFont(const QFont &e);
104 void confGlobViewFont(const QFont &e);
103 void confGlobPwTimeout(int e); 105 void confGlobPwTimeout(int e);
104 void confGlobLockTimeout(int e); 106 void confGlobLockTimeout(int e);
105 void confGlobCompression(int e); 107 void confGlobCompression(int e);
106 void confGlobCryptAlgo(int e); 108 void confGlobCryptAlgo(int e);
107 void confGlobHashAlgo(int e); 109 void confGlobHashAlgo(int e);
108 110
109 void confGlobFilePermissions(int e); 111 void confGlobFilePermissions(int e);
110 void confGlobMinimizeLock(int e); 112 void confGlobMinimizeLock(int e);
111 void confGlobUnlockOnOpen(bool e); 113 void confGlobUnlockOnOpen(bool e);
112 void confGlobTray(bool e); 114 void confGlobTray(bool e);
113 void confGlobMakeFileBackup(bool e); 115 void confGlobMakeFileBackup(bool e);
114 void confGlobAutostartDeepLocked(bool e); 116 void confGlobAutostartDeepLocked(bool e);
115 void confGlobAutoDeepLock(bool e); 117 void confGlobAutoDeepLock(bool e);
116 void confGlobKwalletEmu(bool e); 118 void confGlobKwalletEmu(bool e);
117 void confGlobNewEntrLockStat(bool e); 119 void confGlobNewEntrLockStat(bool e);
118 /* WND */ 120 /* WND */
119 void confWndMainWndSize(const QSize &e); 121 void confWndMainWndSize(const QSize &e);
120 void confWndMainViewStyle(int e); 122 void confWndMainViewStyle(int e);
121 void confWndAutoMinimizeOnStart(bool e); 123 void confWndAutoMinimizeOnStart(bool e);
122 void confWndClose(bool e); 124 void confWndClose(bool e);
123 125
124 126
125 127
126 QString mAutoStart; 128 QString mAutoStart;
127 QString mBrowserCommand; 129 QString mBrowserCommand;
128 QString mXTermCommand; 130 QString mXTermCommand;
129 QFont mEntryFont; 131 QFont mEntryFont;
132 QFont mViewFont;
130 int mPwTimeout; 133 int mPwTimeout;
131 int mLockTimeout; 134 int mLockTimeout;
132 int mCompression; 135 int mCompression;
133 int mCryptAlgo; 136 int mCryptAlgo;
134 int mHashAlgo; 137 int mHashAlgo;
135 int mFilePermissions; 138 int mFilePermissions;
136 int mMinimizeLock; 139 int mMinimizeLock;
137 bool mUnlockOnOpen; 140 bool mUnlockOnOpen;
138 bool mTray; 141 bool mTray;
139 bool mMakeFileBackup; 142 bool mMakeFileBackup;
140 bool mAutostartDeeplocked; 143 bool mAutostartDeeplocked;
141 bool mAutoDeeplock; 144 bool mAutoDeeplock;
142 bool mKWalletEmu; 145 bool mKWalletEmu;
143 bool mNewEntrLockStat; 146 bool mNewEntrLockStat;
144 QSize mMainWndSize; 147 QSize mMainWndSize;
145 int mMainViewStyle; 148 int mMainViewStyle;
146 bool mAutoMinimizeOnStart; 149 bool mAutoMinimizeOnStart;
147 bool mClose; 150 bool mClose;
148 151
149 //US ENH 152 //US ENH
150 QValueList<int> mCommentSplitter; 153 QValueList<int> mCommentSplitter;
151 QValueList<int> mCategorySplitter; 154 QValueList<int> mCategorySplitter;
152 155
153 156
154 // US introduce a nonconst way to return the config object. 157 // US introduce a nonconst way to return the config object.
155 KConfig* getConfig(); 158 KConfig* getConfig();
156 159
157 private: 160 private:
158 PWMPrefs(); 161 PWMPrefs();
159 162
160 static PWMPrefs *sInstance; 163 static PWMPrefs *sInstance;
161}; 164};
162 165
163#endif 166#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.cpp b/pwmanager/pwmanager/pwmviewstyle_0.cpp
index 1453d03..1fc8a34 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_0.cpp
@@ -1,112 +1,112 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2004 by Michael Buesch * 3 * copyright (C) 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 "pwmviewstyle_0.h" 20#include "pwmviewstyle_0.h"
21#include "pwmview.h" 21#include "pwmview.h"
22#include "listviewpwm.h" 22#include "listviewpwm.h"
23#include "commentbox.h" 23#include "commentbox.h"
24 24
25#include <klocale.h> 25#include <klocale.h>
26#include "pwmprefs.h" 26#include "pwmprefs.h"
27 27
28PwMViewStyle_0::PwMViewStyle_0(PwMView *view) 28PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
29 : QObject() 29 : QObject()
30{ 30{
31 vbox1 = new QVBox(view); 31 vbox1 = new QVBox(view);
32 vbox1->setSpacing(3); 32 vbox1->setSpacing(3);
33 hbox1 = new QHBox(vbox1); 33 hbox1 = new QHBox(vbox1);
34 hbox1->setSpacing(3); 34 hbox1->setSpacing(3);
35 categoriesTitle = new QLabel(hbox1); 35 categoriesTitle = new QLabel(hbox1);
36 categoriesTitle->setText(i18n("Categories:")); 36 categoriesTitle->setText(i18n("Categories:"));
37 categoriesCombo = new QComboBox(hbox1); 37 categoriesCombo = new QComboBox(hbox1);
38 renCatButton = new QPushButton(i18n("&Rename"), hbox1); 38 renCatButton = new QPushButton(i18n("&Rename"), hbox1);
39 delCatButton = new QPushButton(i18n("&Delete"), hbox1); 39 delCatButton = new QPushButton(i18n("&Delete"), hbox1);
40#ifndef PWM_EMBEDDED 40#ifndef PWM_EMBEDDED
41 splitter1 = new QSplitter(vbox1); 41 splitter1 = new QSplitter(vbox1);
42 splitter1->setOrientation(Qt::Vertical); 42 splitter1->setOrientation(Qt::Vertical);
43#else 43#else
44 splitter1 = new KDGanttMinimizeSplitter( Qt::Vertical, vbox1); 44 splitter1 = new KDGanttMinimizeSplitter( Qt::Vertical, vbox1);
45 splitter1->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 45 splitter1->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
46 46
47 //US topLayout->addWidget(mMiniSplitter ); 47 //US topLayout->addWidget(mMiniSplitter );
48#endif 48#endif
49 lv = new ListViewPwM(splitter1); 49 lv = new ListViewPwM(splitter1);
50 commentBox = new CommentBox(splitter1); 50 commentBox = new CommentBox(splitter1);
51 // set sizes and styles 51 // set sizes and styles
52 commentBox->resize(commentBox->size().width(), 60); 52 commentBox->resize(commentBox->size().width(), 60);
53 categoriesTitle->setAlignment(Qt::AlignVCenter | Qt::AlignRight); 53 categoriesTitle->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
54 // connections 54 // connections
55 connect(categoriesCombo, SIGNAL(activated(int)), 55 connect(categoriesCombo, SIGNAL(activated(int)),
56 view, SLOT(shiftToView())); 56 view, SLOT(shiftToView()));
57 connect(renCatButton, SIGNAL(clicked()), 57 connect(renCatButton, SIGNAL(clicked()),
58 view, SLOT(renCatButton_slot())); 58 view, SLOT(renCatButton_slot()));
59 connect(delCatButton, SIGNAL(clicked()), 59 connect(delCatButton, SIGNAL(clicked()),
60 view, SLOT(delCatButton_slot())); 60 view, SLOT(delCatButton_slot()));
61} 61}
62 62
63PwMViewStyle_0::~PwMViewStyle_0() 63PwMViewStyle_0::~PwMViewStyle_0()
64{ 64{
65 delete vbox1; 65 delete vbox1;
66} 66}
67 67
68void PwMViewStyle_0::delCategory(const QString &cat) 68void PwMViewStyle_0::delCategory(const QString &cat)
69{ 69{
70 PWM_ASSERT(categoriesCombo); 70 PWM_ASSERT(categoriesCombo);
71 int i, count = categoriesCombo->count(); 71 int i, count = categoriesCombo->count();
72 for (i = 0; i < count; ++i) { 72 for (i = 0; i < count; ++i) {
73 if (categoriesCombo->text(i) == cat) { 73 if (categoriesCombo->text(i) == cat) {
74 categoriesCombo->removeItem(i); 74 categoriesCombo->removeItem(i);
75 return; 75 return;
76 } 76 }
77 } 77 }
78 BUG(); 78 BUG();
79} 79}
80 80
81void PwMViewStyle_0::selectCategory(const QString &cat) 81void PwMViewStyle_0::selectCategory(const QString &cat)
82{ 82{
83 PWM_ASSERT(categoriesCombo); 83 PWM_ASSERT(categoriesCombo);
84 int i, count = categoriesCombo->count(); 84 int i, count = categoriesCombo->count();
85 for (i = 0; i < count; ++i) { 85 for (i = 0; i < count; ++i) {
86 if (categoriesCombo->text(i) == cat) { 86 if (categoriesCombo->text(i) == cat) {
87 categoriesCombo->setCurrentItem(i); 87 categoriesCombo->setCurrentItem(i);
88 return; 88 return;
89 } 89 }
90 } 90 }
91 // fall back to 0 91 // fall back to 0
92 categoriesCombo->setCurrentItem(0); 92 categoriesCombo->setCurrentItem(0);
93} 93}
94 94
95 95
96//US ENH: I need a place to load the view dependend settings. Eg. splittersize 96//US ENH: I need a place to load the view dependend settings. Eg. splittersize
97void PwMViewStyle_0::restoreSettings(PWMPrefs* prefs) 97void PwMViewStyle_0::restoreSettings(PWMPrefs* prefs)
98{ 98{
99 //load and store the size of the listviewcolumns 99 //load and store the size of the listviewcolumns
100 lv->restoreLayout(prefs->getConfig(), "listview"); 100 lv->restoreLayout(prefs->getConfig(), "listview");
101 splitter1->setSizes( prefs->mCommentSplitter ); 101 splitter1->setSizes( prefs->mCommentSplitter );
102 102 commentBox->setFont( prefs->mViewFont );
103} 103}
104 104
105//US ENH: I need a place to load the view dependend settings. Eg. splittersize 105//US ENH: I need a place to load the view dependend settings. Eg. splittersize
106void PwMViewStyle_0::saveSettings(PWMPrefs* prefs) 106void PwMViewStyle_0::saveSettings(PWMPrefs* prefs)
107{ 107{
108 //store the size of the listviewcolumns 108 //store the size of the listviewcolumns
109 lv->saveLayout(prefs->getConfig(), "listview"); 109 lv->saveLayout(prefs->getConfig(), "listview");
110 prefs->mCommentSplitter = splitter1->sizes(); 110 prefs->mCommentSplitter = splitter1->sizes();
111 111
112} 112}
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.cpp b/pwmanager/pwmanager/pwmviewstyle_1.cpp
index 27ad40e..4a7ffd7 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_1.cpp
@@ -1,172 +1,173 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2004 by Michael Buesch * 3 * copyright (C) 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 "pwmviewstyle_1.h" 20#include "pwmviewstyle_1.h"
21#include "pwmview.h" 21#include "pwmview.h"
22#include "listviewpwm.h" 22#include "listviewpwm.h"
23#include "commentbox.h" 23#include "commentbox.h"
24 24
25#include <klocale.h> 25#include <klocale.h>
26#include "pwmprefs.h" 26#include "pwmprefs.h"
27 27
28#ifndef DESKTOP_VERSION 28#ifndef DESKTOP_VERSION
29#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30#else 30#else
31#include <qapplication.h> 31#include <qapplication.h>
32#endif 32#endif
33 #define INITIAL_CATEGORIES_WIDTH100 33 #define INITIAL_CATEGORIES_WIDTH100
34 34
35PwMViewStyle_1::PwMViewStyle_1(PwMView *view) 35PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
36 : QObject() 36 : QObject()
37{ 37{
38#ifndef PWM_EMBEDDED 38#ifndef PWM_EMBEDDED
39 splitter = new QSplitter(view); 39 splitter = new QSplitter(view);
40#else 40#else
41 if ( QApplication::desktop()->width() > 240 ) { 41 if ( QApplication::desktop()->width() > 240 ) {
42 splitter = new KDGanttMinimizeSplitter( Qt::Horizontal, view); 42 splitter = new KDGanttMinimizeSplitter( Qt::Horizontal, view);
43 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left ); 43 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
44 // topLayout = new QHBoxLayout( this ); 44 // topLayout = new QHBoxLayout( this );
45 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 45 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
46 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 46 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
47 } else { 47 } else {
48 splitter = new KDGanttMinimizeSplitter( Qt::Vertical, view); 48 splitter = new KDGanttMinimizeSplitter( Qt::Vertical, view);
49 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 49 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
50 // topLayout = new QHBoxLayout( this ); 50 // topLayout = new QHBoxLayout( this );
51 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 51 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
52 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 52 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
53 } 53 }
54 //US topLayout->addWidget(mMiniSplitter ); 54 //US topLayout->addWidget(mMiniSplitter );
55#endif 55#endif
56 56
57 vbox1 = new QVBox(splitter); 57 vbox1 = new QVBox(splitter);
58 categoriesTitle = new QLabel(vbox1); 58 categoriesTitle = new QLabel(vbox1);
59 categoriesList = new QListBox(vbox1); 59 categoriesList = new QListBox(vbox1);
60#ifndef PWM_EMBEDDED 60#ifndef PWM_EMBEDDED
61 splitter2 = new QSplitter(splitter); 61 splitter2 = new QSplitter(splitter);
62 splitter2->setOrientation(Qt::Vertical); 62 splitter2->setOrientation(Qt::Vertical);
63#else 63#else
64 splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter); 64 splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter);
65 splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 65 splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
66 66
67 //US topLayout->addWidget(mMiniSplitter ); 67 //US topLayout->addWidget(mMiniSplitter );
68#endif 68#endif
69 lv = new ListViewPwM(splitter2); 69 lv = new ListViewPwM(splitter2);
70 commentBox = new CommentBox(splitter2); 70 commentBox = new CommentBox(splitter2);
71 // set sizes and styles 71 // set sizes and styles
72 //UScommentBox->resize(commentBox->size().width(), 60); 72 //UScommentBox->resize(commentBox->size().width(), 60);
73 QValueList<int> sizes; 73 QValueList<int> sizes;
74#ifndef PWM_EMBEDDED 74#ifndef PWM_EMBEDDED
75 sizes.push_back(INITIAL_CATEGORIES_WIDTH); 75 sizes.push_back(INITIAL_CATEGORIES_WIDTH);
76 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH); 76 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH);
77#else 77#else
78 sizes.append(INITIAL_CATEGORIES_WIDTH); 78 sizes.append(INITIAL_CATEGORIES_WIDTH);
79 sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH); 79 sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH);
80#endif 80#endif
81 //USsplitter->setSizes(sizes); 81 //USsplitter->setSizes(sizes);
82 categoriesTitle->setAlignment(Qt::AlignHCenter); 82 categoriesTitle->setAlignment(Qt::AlignHCenter);
83#ifndef PWM_EMBEDDED 83#ifndef PWM_EMBEDDED
84 categoriesTitle->setFrameShape(QFrame::MenuBarPanel); 84 categoriesTitle->setFrameShape(QFrame::MenuBarPanel);
85#else 85#else
86 categoriesTitle->setFrameShape(QFrame::StyledPanel); 86 categoriesTitle->setFrameShape(QFrame::StyledPanel);
87#endif 87#endif
88 categoriesTitle->setText(i18n("Categories:")); 88 categoriesTitle->setText(i18n("Categories:"));
89 catCtxMenu = new QPopupMenu(view); 89 catCtxMenu = new QPopupMenu(view);
90 catCtxMenu->insertItem(i18n("&Rename"), 90 catCtxMenu->insertItem(i18n("&Rename"),
91 view, SLOT(renCatButton_slot())); 91 view, SLOT(renCatButton_slot()));
92 catCtxMenu->insertItem(i18n("&Delete"), 92 catCtxMenu->insertItem(i18n("&Delete"),
93 view, SLOT(delCatButton_slot())); 93 view, SLOT(delCatButton_slot()));
94 94
95#ifndef DESKTOP_VERSION 95#ifndef DESKTOP_VERSION
96 QPEApplication::setStylusOperation( categoriesList->viewport(), QPEApplication::RightOnHold ); 96 QPEApplication::setStylusOperation( categoriesList->viewport(), QPEApplication::RightOnHold );
97#endif 97#endif
98 98
99 // connections 99 // connections
100 connect(categoriesList, SIGNAL(highlighted(int)), 100 connect(categoriesList, SIGNAL(highlighted(int)),
101 view, SLOT(shiftToView())); 101 view, SLOT(shiftToView()));
102 connect(categoriesList, 102 connect(categoriesList,
103 SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), 103 SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
104 this, 104 this,
105 SLOT(catRightClick(QListBoxItem *, const QPoint &))); 105 SLOT(catRightClick(QListBoxItem *, const QPoint &)));
106} 106}
107 107
108PwMViewStyle_1::~PwMViewStyle_1() 108PwMViewStyle_1::~PwMViewStyle_1()
109{ 109{
110 delete catCtxMenu; 110 delete catCtxMenu;
111 delete splitter; 111 delete splitter;
112} 112}
113 113
114void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point) 114void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point)
115{ 115{
116 if (!item) 116 if (!item)
117 return; 117 return;
118 catCtxMenu->move(point); 118 catCtxMenu->move(point);
119 catCtxMenu->show(); 119 catCtxMenu->show();
120} 120}
121 121
122void PwMViewStyle_1::delCategory(const QString &cat) 122void PwMViewStyle_1::delCategory(const QString &cat)
123{ 123{
124 PWM_ASSERT(categoriesList); 124 PWM_ASSERT(categoriesList);
125 int i, count = categoriesList->count(); 125 int i, count = categoriesList->count();
126 for (i = 0; i < count; ++i) { 126 for (i = 0; i < count; ++i) {
127 if (categoriesList->text(i) == cat) { 127 if (categoriesList->text(i) == cat) {
128 categoriesList->removeItem(i); 128 categoriesList->removeItem(i);
129 return; 129 return;
130 } 130 }
131 } 131 }
132 BUG(); 132 BUG();
133} 133}
134 134
135void PwMViewStyle_1::selectCategory(const QString &cat) 135void PwMViewStyle_1::selectCategory(const QString &cat)
136{ 136{
137 PWM_ASSERT(categoriesList); 137 PWM_ASSERT(categoriesList);
138 int i, count = categoriesList->count(); 138 int i, count = categoriesList->count();
139 for (i = 0; i < count; ++i) { 139 for (i = 0; i < count; ++i) {
140 if (categoriesList->text(i) == cat) { 140 if (categoriesList->text(i) == cat) {
141 categoriesList->setCurrentItem(i); 141 categoriesList->setCurrentItem(i);
142 return; 142 return;
143 } 143 }
144 } 144 }
145 // fall back to 0 145 // fall back to 0
146 categoriesList->setCurrentItem(0); 146 categoriesList->setCurrentItem(0);
147} 147}
148 148
149//US ENH: I need a place to load the view dependend settings. Eg. splittersize 149//US ENH: I need a place to load the view dependend settings. Eg. splittersize
150void PwMViewStyle_1::restoreSettings(PWMPrefs* prefs) 150void PwMViewStyle_1::restoreSettings(PWMPrefs* prefs)
151{ 151{
152 //load and store the size of the listviewcolumns 152 //load and store the size of the listviewcolumns
153 lv->restoreLayout(prefs->getConfig(), "listview"); 153 lv->restoreLayout(prefs->getConfig(), "listview");
154 splitter->setSizes( prefs->mCategorySplitter ); 154 splitter->setSizes( prefs->mCategorySplitter );
155 splitter2->setSizes( prefs->mCommentSplitter ); 155 splitter2->setSizes( prefs->mCommentSplitter );
156 commentBox->setFont( prefs->mViewFont );
156 157
157} 158}
158 159
159//US ENH: I need a place to load the view dependend settings. Eg. splittersize 160//US ENH: I need a place to load the view dependend settings. Eg. splittersize
160void PwMViewStyle_1::saveSettings(PWMPrefs* prefs) 161void PwMViewStyle_1::saveSettings(PWMPrefs* prefs)
161{ 162{
162 //store the size of the listviewcolumns 163 //store the size of the listviewcolumns
163 lv->saveLayout(prefs->getConfig(), "listview"); 164 lv->saveLayout(prefs->getConfig(), "listview");
164 prefs->mCategorySplitter = splitter->sizes(); 165 prefs->mCategorySplitter = splitter->sizes();
165 prefs->mCommentSplitter = splitter2->sizes(); 166 prefs->mCommentSplitter = splitter2->sizes();
166 167
167} 168}
168 169
169 170
170#ifndef PWM_EMBEDDED 171#ifndef PWM_EMBEDDED
171#include "pwmviewstyle_1.moc" 172#include "pwmviewstyle_1.moc"
172#endif 173#endif