author | ulf69 <ulf69> | 2004-10-15 19:05:03 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-15 19:05:03 (UTC) |
commit | 3f4c05c0f72b269b70a508ac42d74fea3bfb20cc (patch) (unidiff) | |
tree | a3c3a14048afbba18c69a799870506af9d385e17 | |
parent | b7fbbfff6b939278cb7665d78b2615c77856ce7d (diff) | |
download | kdepimpi-3f4c05c0f72b269b70a508ac42d74fea3bfb20cc.zip kdepimpi-3f4c05c0f72b269b70a508ac42d74fea3bfb20cc.tar.gz kdepimpi-3f4c05c0f72b269b70a508ac42d74fea3bfb20cc.tar.bz2 |
added settings for crypto and hashalgorythm
-rw-r--r-- | pwmanager/pwmanager/pwmprefs.cpp | 20 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmprefs.h | 18 |
2 files changed, 35 insertions, 3 deletions
diff --git a/pwmanager/pwmanager/pwmprefs.cpp b/pwmanager/pwmanager/pwmprefs.cpp index 7fd347f..fdc34e0 100644 --- a/pwmanager/pwmanager/pwmprefs.cpp +++ b/pwmanager/pwmanager/pwmprefs.cpp | |||
@@ -45,6 +45,8 @@ PWMPrefs::PWMPrefs() | |||
45 | addItemInt( "pwTimeout", &mPwTimeout, CONF_DEFAULT_PWTIMEOUT ); | 45 | addItemInt( "pwTimeout", &mPwTimeout, CONF_DEFAULT_PWTIMEOUT ); |
46 | addItemInt( "lockTimeout", &mLockTimeout, CONF_DEFAULT_LOCKTIMEOUT ); | 46 | addItemInt( "lockTimeout", &mLockTimeout, CONF_DEFAULT_LOCKTIMEOUT ); |
47 | addItemInt( "compression", &mCompression, CONF_DEFAULT_COMPRESSION ); | 47 | addItemInt( "compression", &mCompression, CONF_DEFAULT_COMPRESSION ); |
48 | addItemInt("cryptAlgo", &mCryptAlgo, CONF_DEFAULT_CRYPTALGO); | ||
49 | addItemInt("hashAlgo", &mHashAlgo, CONF_DEFAULT_HASHALGO); | ||
48 | addItemInt( "filePermissions", &mFilePermissions, CONF_DEFAULT_FILEPERMISSIONS ); | 50 | addItemInt( "filePermissions", &mFilePermissions, CONF_DEFAULT_FILEPERMISSIONS ); |
49 | addItemInt( "minimizeLock", &mMinimizeLock, CONF_DEFAULT_MINIMIZELOCK ); | 51 | addItemInt( "minimizeLock", &mMinimizeLock, CONF_DEFAULT_MINIMIZELOCK ); |
50 | addItemBool( "unlockOnOpen", &mUnlockOnOpen, CONF_DEFAULT_UNLOCKONOPEN ); | 52 | addItemBool( "unlockOnOpen", &mUnlockOnOpen, CONF_DEFAULT_UNLOCKONOPEN ); |
@@ -194,6 +196,16 @@ bool PWMPrefs::confWndClose() | |||
194 | return mClose; | 196 | return mClose; |
195 | } | 197 | } |
196 | 198 | ||
199 | int PWMPrefs::confGlobCryptAlgo() | ||
200 | { | ||
201 | return mCryptAlgo + 1; | ||
202 | } | ||
203 | |||
204 | int PWMPrefs::confGlobHashAlgo() | ||
205 | { | ||
206 | return mHashAlgo + 1; | ||
207 | } | ||
208 | |||
197 | /******************************************************************* | 209 | /******************************************************************* |
198 | * functions for writing the configuration settings | 210 | * functions for writing the configuration settings |
199 | *******************************************************************/ | 211 | *******************************************************************/ |
@@ -298,4 +310,12 @@ void PWMPrefs::confWndClose(bool e) | |||
298 | mClose = e; | 310 | mClose = e; |
299 | } | 311 | } |
300 | 312 | ||
313 | void PWMPrefs::confGlobCryptAlgo(int e) | ||
314 | { | ||
315 | mCryptAlgo = e - 1; | ||
316 | } | ||
301 | 317 | ||
318 | void PWMPrefs::confGlobHashAlgo(int e) | ||
319 | { | ||
320 | mHashAlgo = e - 1; | ||
321 | } | ||
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h index 9fed7d2..1c8b982 100644 --- a/pwmanager/pwmanager/pwmprefs.h +++ b/pwmanager/pwmanager/pwmprefs.h | |||
@@ -36,12 +36,16 @@ class KConfig; | |||
36 | #define conf() PWMPrefs::instance() | 36 | #define conf() PWMPrefs::instance() |
37 | 37 | ||
38 | 38 | ||
39 | |||
40 | |||
39 | #define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ | 41 | #define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ |
40 | #define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ | 42 | #define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ |
41 | #define CONF_DEFAULT_TRAY true | 43 | #define CONF_DEFAULT_TRAY true |
42 | #define CONF_DEFAULT_UNLOCKONOPENfalse | 44 | #define CONF_DEFAULT_UNLOCKONOPEN true |
43 | #define CONF_DEFAULT_MAINVIEWSTYLE0 | 45 | #define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */ |
44 | #define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ | 46 | #define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ |
47 | #define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */ | ||
48 | #define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */ | ||
45 | #define CONF_DEFAULT_AUTOMINIMIZEfalse | 49 | #define CONF_DEFAULT_AUTOMINIMIZEfalse |
46 | #define CONF_DEFAULT_BROWSERCOMMAND"" | 50 | #define CONF_DEFAULT_BROWSERCOMMAND"" |
47 | #define CONF_DEFAULT_XTERMCOMMAND"konsole -e" | 51 | #define CONF_DEFAULT_XTERMCOMMAND"konsole -e" |
@@ -51,9 +55,10 @@ class KConfig; | |||
51 | #define CONF_DEFAULT_AUTODEEPLOCKtrue | 55 | #define CONF_DEFAULT_AUTODEEPLOCKtrue |
52 | #define CONF_DEFAULT_KWALLETEMU true | 56 | #define CONF_DEFAULT_KWALLETEMU true |
53 | #define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ | 57 | #define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ |
54 | #define CONF_DEFAULT_NEWENTRLOCKSTAT true/* locked */ | 58 | #define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */ |
55 | #define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ | 59 | #define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ |
56 | 60 | ||
61 | |||
57 | class PWMPrefs : public KPimPrefs | 62 | class PWMPrefs : public KPimPrefs |
58 | { | 63 | { |
59 | public: | 64 | public: |
@@ -71,6 +76,8 @@ public: | |||
71 | int confGlobPwTimeout(); | 76 | int confGlobPwTimeout(); |
72 | int confGlobLockTimeout(); | 77 | int confGlobLockTimeout(); |
73 | int confGlobCompression(); | 78 | int confGlobCompression(); |
79 | int confGlobCryptAlgo(); | ||
80 | int confGlobHashAlgo(); | ||
74 | int confGlobFilePermissions(); | 81 | int confGlobFilePermissions(); |
75 | int confGlobMinimizeLock(); | 82 | int confGlobMinimizeLock(); |
76 | bool confGlobUnlockOnOpen(); | 83 | bool confGlobUnlockOnOpen(); |
@@ -96,6 +103,9 @@ public: | |||
96 | void confGlobPwTimeout(int e); | 103 | void confGlobPwTimeout(int e); |
97 | void confGlobLockTimeout(int e); | 104 | void confGlobLockTimeout(int e); |
98 | void confGlobCompression(int e); | 105 | void confGlobCompression(int e); |
106 | void confGlobCryptAlgo(int e); | ||
107 | void confGlobHashAlgo(int e); | ||
108 | |||
99 | void confGlobFilePermissions(int e); | 109 | void confGlobFilePermissions(int e); |
100 | void confGlobMinimizeLock(int e); | 110 | void confGlobMinimizeLock(int e); |
101 | void confGlobUnlockOnOpen(bool e); | 111 | void confGlobUnlockOnOpen(bool e); |
@@ -120,6 +130,8 @@ public: | |||
120 | int mPwTimeout; | 130 | int mPwTimeout; |
121 | int mLockTimeout; | 131 | int mLockTimeout; |
122 | int mCompression; | 132 | int mCompression; |
133 | int mCryptAlgo; | ||
134 | int mHashAlgo; | ||
123 | int mFilePermissions; | 135 | int mFilePermissions; |
124 | int mMinimizeLock; | 136 | int mMinimizeLock; |
125 | bool mUnlockOnOpen; | 137 | bool mUnlockOnOpen; |