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
@@ -238,50 +238,52 @@
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" },
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
@@ -20,48 +20,49 @@
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);
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
@@ -49,61 +49,70 @@
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)"));
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
@@ -13,48 +13,49 @@
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();
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
@@ -22,48 +22,49 @@
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}
@@ -99,48 +100,52 @@ KConfig* PWMPrefs::getConfig()
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;
@@ -213,48 +218,52 @@ int PWMPrefs::confGlobHashAlgo()
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;
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
@@ -52,102 +52,105 @@ class KConfig;
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
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
@@ -78,35 +78,35 @@ void PwMViewStyle_0::delCategory(const QString &cat)
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
@@ -132,41 +132,42 @@ void PwMViewStyle_1::delCategory(const QString &cat)
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