author | ulf69 <ulf69> | 2004-10-15 19:05:03 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-15 19:05:03 (UTC) |
commit | 3f4c05c0f72b269b70a508ac42d74fea3bfb20cc (patch) (side-by-side diff) | |
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 | 46 |
2 files changed, 49 insertions, 17 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 @@ -40,16 +40,18 @@ PWMPrefs::PWMPrefs() addItemString( "autoStart", &mAutoStart, "" ); addItemString( "browserCommand", &mBrowserCommand, "" ); addItemString( "xtermCommand", &mXTermCommand, CONF_DEFAULT_XTERMCOMMAND); addItemFont( "entryFont", &mEntryFont); addItemInt( "pwTimeout", &mPwTimeout, CONF_DEFAULT_PWTIMEOUT ); addItemInt( "lockTimeout", &mLockTimeout, CONF_DEFAULT_LOCKTIMEOUT ); addItemInt( "compression", &mCompression, CONF_DEFAULT_COMPRESSION ); + addItemInt("cryptAlgo", &mCryptAlgo, CONF_DEFAULT_CRYPTALGO); + addItemInt("hashAlgo", &mHashAlgo, CONF_DEFAULT_HASHALGO); addItemInt( "filePermissions", &mFilePermissions, CONF_DEFAULT_FILEPERMISSIONS ); addItemInt( "minimizeLock", &mMinimizeLock, CONF_DEFAULT_MINIMIZELOCK ); addItemBool( "unlockOnOpen", &mUnlockOnOpen, CONF_DEFAULT_UNLOCKONOPEN ); addItemBool( "tray", &mTray, CONF_DEFAULT_TRAY ); addItemBool( "makeFileBackup", &mMakeFileBackup, CONF_DEFAULT_MAKEFILEBACKUP ); addItemBool( "autostartDeepLocked", &mAutostartDeeplocked, CONF_DEFAULT_AUTOSTART_DEEPL ); addItemBool( "autoDeepLock", &mAutoDeeplock, CONF_DEFAULT_AUTODEEPLOCK ); addItemBool( "kwalletEmu", &mKWalletEmu, CONF_DEFAULT_KWALLETEMU ); @@ -189,16 +191,26 @@ bool PWMPrefs::confWndAutoMinimizeOnStart() return mAutoMinimizeOnStart; } bool PWMPrefs::confWndClose() { return mClose; } +int PWMPrefs::confGlobCryptAlgo() +{ + return mCryptAlgo + 1; +} + +int PWMPrefs::confGlobHashAlgo() +{ + return mHashAlgo + 1; +} + /******************************************************************* * functions for writing the configuration settings *******************************************************************/ void PWMPrefs::confGlobAutoStart(const QString &e) { mAutoStart = e; } @@ -293,9 +305,17 @@ void PWMPrefs::confWndAutoMinimizeOnStart(bool e) mAutoMinimizeOnStart = e; } void PWMPrefs::confWndClose(bool e) { mClose = e; } +void PWMPrefs::confGlobCryptAlgo(int e) +{ + mCryptAlgo = e - 1; +} +void PWMPrefs::confGlobHashAlgo(int e) +{ + mHashAlgo = e - 1; +} 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 @@ -31,33 +31,38 @@ #include <kpimprefs.h> class KConfig; #define conf() PWMPrefs::instance() -#define CONF_DEFAULT_PWTIMEOUT 10 /* 10 sec */ -#define CONF_DEFAULT_LOCKTIMEOUT 0 /* 0 == disable */ -#define CONF_DEFAULT_TRAY true -#define CONF_DEFAULT_UNLOCKONOPEN false -#define CONF_DEFAULT_MAINVIEWSTYLE 0 -#define CONF_DEFAULT_COMPRESSION 0x01 /* gzip */ -#define CONF_DEFAULT_AUTOMINIMIZE false -#define CONF_DEFAULT_BROWSERCOMMAND "" -#define CONF_DEFAULT_XTERMCOMMAND "konsole -e" -#define CONF_DEFAULT_FILEPERMISSIONS 0600 -#define CONF_DEFAULT_MAKEFILEBACKUP false -#define CONF_DEFAULT_AUTOSTART_DEEPL true -#define CONF_DEFAULT_AUTODEEPLOCK true -#define CONF_DEFAULT_KWALLETEMU true -#define CONF_DEFAULT_MINIMIZELOCK 2 /* deep-lock */ -#define CONF_DEFAULT_NEWENTRLOCKSTAT true /* locked */ -#define CONF_DEFAULT_WNDCLOSE true /* don't minimize to tray */ + + +#define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ +#define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ +#define CONF_DEFAULT_TRAY true +#define CONF_DEFAULT_UNLOCKONOPEN true +#define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */ +#define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ +#define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */ +#define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */ +#define CONF_DEFAULT_AUTOMINIMIZE false +#define CONF_DEFAULT_BROWSERCOMMAND "" +#define CONF_DEFAULT_XTERMCOMMAND "konsole -e" +#define CONF_DEFAULT_FILEPERMISSIONS 0600 +#define CONF_DEFAULT_MAKEFILEBACKUP false +#define CONF_DEFAULT_AUTOSTART_DEEPL true +#define CONF_DEFAULT_AUTODEEPLOCK true +#define CONF_DEFAULT_KWALLETEMU true +#define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ +#define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */ +#define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ + class PWMPrefs : public KPimPrefs { public: virtual ~PWMPrefs(); static PWMPrefs *instance(); @@ -66,16 +71,18 @@ public: /* GLOBAL */ QString confGlobAutoStart(); QString confGlobBrowserCommand(); QString confGlobXtermCommand(); QFont confGlobEntryFont(); int confGlobPwTimeout(); int confGlobLockTimeout(); int confGlobCompression(); + int confGlobCryptAlgo(); + int confGlobHashAlgo(); int confGlobFilePermissions(); int confGlobMinimizeLock(); bool confGlobUnlockOnOpen(); bool confGlobTray(); bool confGlobMakeFileBackup(); bool confGlobAutostartDeepLocked(); bool confGlobAutoDeepLock(); bool confGlobKwalletEmu(); @@ -91,16 +98,19 @@ public: /* GLOBAL */ void confGlobAutoStart(const QString &e); void confGlobBrowserCommand(const QString &e); void confGlobXtermCommand(const QString &e); void confGlobEntryFont(const QFont &e); void confGlobPwTimeout(int e); void confGlobLockTimeout(int e); void confGlobCompression(int e); + void confGlobCryptAlgo(int e); + void confGlobHashAlgo(int e); + void confGlobFilePermissions(int e); void confGlobMinimizeLock(int e); void confGlobUnlockOnOpen(bool e); void confGlobTray(bool e); void confGlobMakeFileBackup(bool e); void confGlobAutostartDeepLocked(bool e); void confGlobAutoDeepLock(bool e); void confGlobKwalletEmu(bool e); @@ -115,16 +125,18 @@ public: QString mAutoStart; QString mBrowserCommand; QString mXTermCommand; QFont mEntryFont; int mPwTimeout; int mLockTimeout; int mCompression; + int mCryptAlgo; + int mHashAlgo; int mFilePermissions; int mMinimizeLock; bool mUnlockOnOpen; bool mTray; bool mMakeFileBackup; bool mAutostartDeeplocked; bool mAutoDeeplock; bool mKWalletEmu; |