summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-03 10:31:59 (UTC)
committer zautrix <zautrix>2005-03-03 10:31:59 (UTC)
commit806a806422872b6f31183267c6b084d425458902 (patch) (side-by-side diff)
treef36f659d6b595f82c918329a0b07476a2300f6e2
parent9e0ceaa58a686fb64f8133ffa9e73866e985a464 (diff)
downloadkdepimpi-806a806422872b6f31183267c6b084d425458902.zip
kdepimpi-806a806422872b6f31183267c6b084d425458902.tar.gz
kdepimpi-806a806422872b6f31183267c6b084d425458902.tar.bz2
pwmpi fixes
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
@@ -230,66 +230,68 @@
{ "Deep-Lock all entries","Sperre total alle Einträge" },
{ "Unlock all entries","Entsperre alle Einträge" },
{ "Categories:","Kategorien:" },
{ "&Rename","&Umbenennen" },
{ "Username","Benutzername" },
{ "Password","Passwort" },
{ "Launcher","Launcher" },
{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
{ "copy url to clipboard","Kopiere URL ins Clipboard" },
{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
{ "Execute "Launcher"",""Launcher" ausführen" },
{ "Go to "URL"","Gehe zu "URL"" },
{ "Ready.","Fertig." },
{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
{ "File error","Datei Fehler" },
{ "Could not read file!","Kann Datei nicht lesen!" },
{ "Master-password","Master-Passwort" },
{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
{ "password error","Passwort Fehler" },
{ "Successfully opened file.","Datei erfolgreich geöffnet." },
{ "DEEP-LOCKED","TOTAL-GESPERRT" },
{ "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." },
{ "<LOCKED>","<GESPERRT>" },
{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." },
{ "PwManager","PwManager" },
{ "Window-style:","Window-Stil:" },
{ "Category on top","Kategorien oben" },
{ "Category-list left/top","Kategorien links oben" },
-{ "<b>Font for Password entries:</b>","<b>Schrift für Passwort Einträge:</b>" },
+{ "Font for Password entries:","Schrift für Passwort Einträge:" },
+{ "Font for Password summary:","Schrift für Passwort Übersicht:" },
{ "Font:","Schriftart:" },
+{ "Summary","Übersicht" },
{ "Compression:","Kompression:" },
{ "gzip","gzip" },
{ "Encryption:","Verschlüsselung:" },
{ "Blowfish (128 bit)","Blowfish (128 bit)" },
{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
{ "Twofish (256 bit)","Twofish (256 bit)" },
{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
{ "Hashing:","Hashing:" },
{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
{ "MD5 (128 bit)","MD5 (128 bit)" },
{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
{ "Tiger (192 bit)","Tiger (192 bit)" },
{ "Permissions:","Zugriffsrechte:" },
{ "Make backup before saving","Mache Backup vor dem Speichern" },
{ "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]:" },
{ "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]:" },
{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
{ "open deeplocked","Öffne total gesperrt" },
{ "Favourite browser:","Bevorzugter Browser:" },
{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
{ "Look && feel","Aussehen" },
{ "File","Datei" },
{ "Timeout","Timeout" },
{ "Autostart","Autostart" },
{ "External apps","Externe Applik." },
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
@@ -12,64 +12,65 @@
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "commentbox.h"
#include "pwmexception.h"
#include "htmlgen.h"
#include <klocale.h>
#ifndef PWM_EMBEDDED
#include <khtml_part.h>
#include <khtmlview.h>
#include <qtextedit.h>
#else
#include <qmultilineedit.h>
#endif
#ifndef PWM_EMBEDDED
CommentBox::CommentBox(QWidget *_parentWidget)
{
PWM_ASSERT(_parentWidget);
parentWidget = _parentWidget;
textDta = 0;
htmlDta = 0;
mode = mode_notSet;
+ setFont( prefs->mViewFont );
}
CommentBox::~CommentBox()
{
clearText();
clearHtml();
}
void CommentBox::clear()
{
clearText();
clearHtml();
mode = mode_notSet;
this->hide();
}
void CommentBox::clearText()
{
delete_ifnot_null(textDta);
}
void CommentBox::clearHtml()
{
delete_ifnot_null(htmlDta);
}
void CommentBox::setText(const QString &text)
{
switchTo(mode_text);
PWM_ASSERT(textDta);
textDta->setText( text);
if (!textDta->isVisible())
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
@@ -41,77 +41,86 @@
#include <klocale.h>
#include <kglobal.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kio/kfile/kurlrequester.h>
#include "pwmprefs.h"
#include "pwmconfigwidget.h"
#include "pwmexception.h"
PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
QTabWidget *tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
// windowsStyle page
//////////////////////////////////////////////////////
QWidget *windowStylePage = new QWidget( this );
QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3);
int i = 0;
KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage);
windowStyle->addRadio(i18n("Category on top"));
windowStyle->addRadio(i18n("Category-list left/top"));
windowStyleLayout->addMultiCellWidget( (QWidget*)windowStyle->groupBox(),i,i,0,2);
++i;
- QLabel* lab = new QLabel(i18n("<b>Font for Password entries:</b>"), windowStylePage);
+ QLabel* lab = new QLabel(i18n("Font for Password entries:"), windowStylePage);
windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
-
-
++i;
-
- KPrefsWidFont *selEntrFont =
+ KPrefsWidFont *selEntrFont =
addWidFont(i18n("Password"),i18n("Font:"),
&(prefs->mEntryFont),windowStylePage);
windowStyleLayout->addWidget(selEntrFont->label(),i,0);
windowStyleLayout->addWidget(selEntrFont->preview(),i,1);
windowStyleLayout->addWidget(selEntrFont->button(),i,2);
++i;
+
+ lab = new QLabel(i18n("Font for Password summary:"), windowStylePage);
+ windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
+ ++i;
+ selEntrFont =
+ addWidFont(i18n("Summary"),i18n("Font:"),
+ &(prefs->mViewFont),windowStylePage);
+ windowStyleLayout->addWidget(selEntrFont->label(),i,0);
+ windowStyleLayout->addWidget(selEntrFont->preview(),i,1);
+ windowStyleLayout->addWidget(selEntrFont->button(),i,2);
+ ++i;
+
lab = new QLabel(i18n(""), windowStylePage);
windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
// File page
//////////////////////////////////////////////////////
QWidget *filePage = new QWidget( this );
QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2);
i = 0;
QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage);
fileLayout->addWidget(kcfg_compression_label,i,0);
kcfg_compression = new QComboBox(filePage, "kcfg_compression");
kcfg_compression->insertItem(i18n("None"));
kcfg_compression->insertItem(i18n("gzip"));
//US not yet supported: kcfg_compression->insertItem(i18n("bzip2"));
fileLayout->addWidget( kcfg_compression,i,1);
++i;
QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage);
fileLayout->addWidget(kcfg_crypt_label,i,0);
kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo");
kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)"));
#ifdef CONFIG_PWMANAGER_GCRY
kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)"));
kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)"));
kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)"));
#endif // CONFIG_PWMANAGER_GCRY
fileLayout->addWidget( kcfg_cryptAlgo,i,1);
++i;
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
@@ -5,64 +5,65 @@
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 *
* as published by the Free Software Foundation. *
* *
***************************************************************************/
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "listviewpwm.h"
#include "pwmexception.h"
#include "pwmview.h"
#include <qpainter.h>
#include <qpixmap.h>
#include <kiconloader.h>
#ifdef PWM_EMBEDDED
#include <kglobal.h>
#endif
ListViewPwM::ListViewPwM(QWidget *parent, const char *name)
: KListView(parent, name)
{
// setResizeMode(QListView::AllColumns);
+ setAllColumnsShowFocus (true );
}
bool ListViewPwM::event(QEvent *e)
{
if (e->type() == QEvent::LayoutHint)
emit layoutChanged();
return KListView::event(e);
}
QPixmap * ListViewItemPwM::onPix = 0;
QPixmap * ListViewItemPwM::offPix = 0;
ListViewItemPwM::ListViewItemPwM(QListView *parent)
: QCheckListItem(parent, "", QCheckListItem::CheckBox)
{
if (!onPix) {
PWM_ASSERT(!offPix);
KIconLoader* picons;
#ifndef PWM_EMBEDDED
KIconLoader il;
picons = &il;
#else
picons = KGlobal::iconLoader();
#endif
KIconLoader il;
#ifndef PWM_EMBEDDED
static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small));
#else
static QPixmap onP(picons->loadIcon("decrypted", KIcon::Small));
#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
@@ -14,64 +14,65 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
$Id$
*/
#include <kconfig.h>
#include <klocale.h>
#include <kstaticdeleter.h>
#include <kglobalsettings.h>
#include "pwmprefs.h"
PWMPrefs *PWMPrefs::sInstance = 0;
static KStaticDeleter<PWMPrefs> staticDeleterPP;
PWMPrefs::PWMPrefs()
: KPimPrefs("pwmanagerrc")
{
KPrefs::setCurrentGroup( "Global" );
addItemString( "autoStart", &mAutoStart, "" );
addItemString( "browserCommand", &mBrowserCommand, "" );
addItemString( "xtermCommand", &mXTermCommand, CONF_DEFAULT_XTERMCOMMAND);
addItemFont( "entryFont", &mEntryFont,KGlobalSettings::generalFont());
+ addItemFont( "viewFont", &mViewFont,KGlobalSettings::generalFont());
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 );
addItemBool( "newEntrLockStat", &mNewEntrLockStat, CONF_DEFAULT_NEWENTRLOCKSTAT );
KPrefs::setCurrentGroup( "Wnd" );
addItemSize( "MainWndSize", &mMainWndSize);
addItemInt( "MainViewStyle", &mMainViewStyle, CONF_DEFAULT_MAINVIEWSTYLE );
addItemBool( "autoMinimizeOnStart", &mAutoMinimizeOnStart, CONF_DEFAULT_AUTOMINIMIZE );
addItemBool( "close", &mClose, CONF_DEFAULT_WNDCLOSE );
addItemIntList( "commentSplitter", &mCommentSplitter );
addItemIntList( "categorySplitter", &mCategorySplitter );
}
PWMPrefs::~PWMPrefs()
{
if (sInstance == this)
sInstance = staticDeleterPP.setObject(0);
else
qDebug("Whats this? Error in PWMPrefs::~PWMPrefs()?");
}
@@ -91,64 +92,68 @@ PWMPrefs *PWMPrefs::instance()
return sInstance;
}
// US introduce a nonconst way to return the config object.
KConfig* PWMPrefs::getConfig()
{
return config();
}
/*******************************************************************
* functions for reading the configuration settings
*******************************************************************/
QString PWMPrefs::confGlobAutoStart()
{
return mAutoStart;
}
QString PWMPrefs::confGlobBrowserCommand()
{
return mBrowserCommand;
}
QString PWMPrefs::confGlobXtermCommand()
{
return mXTermCommand;
}
QFont PWMPrefs::confGlobEntryFont()
{
return mEntryFont;
}
+QFont PWMPrefs::confGlobViewFont()
+{
+ return mViewFont;
+}
int PWMPrefs::confGlobPwTimeout()
{
return mPwTimeout;
}
int PWMPrefs::confGlobLockTimeout()
{
return mLockTimeout;
}
int PWMPrefs::confGlobCompression()
{
return mCompression;
}
int PWMPrefs::confGlobFilePermissions()
{
return mFilePermissions;
}
int PWMPrefs::confGlobMinimizeLock()
{
return mMinimizeLock;
}
bool PWMPrefs::confGlobUnlockOnOpen()
{
return mUnlockOnOpen;
}
bool PWMPrefs::confGlobTray()
@@ -205,64 +210,68 @@ 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;
}
void PWMPrefs::confGlobBrowserCommand(const QString &e)
{
mBrowserCommand = e;
}
void PWMPrefs::confGlobXtermCommand(const QString &e)
{
mXTermCommand = e;
}
void PWMPrefs::confGlobEntryFont(const QFont &e)
{
mEntryFont = e;
}
+void PWMPrefs::confGlobViewFont(const QFont &e)
+{
+ mViewFont = e;
+}
void PWMPrefs::confGlobPwTimeout(int e)
{
mPwTimeout = e;
}
void PWMPrefs::confGlobLockTimeout(int e)
{
mLockTimeout = e;
}
void PWMPrefs::confGlobCompression(int e)
{
mCompression = e;
}
void PWMPrefs::confGlobFilePermissions(int e)
{
mFilePermissions = e;
}
void PWMPrefs::confGlobMinimizeLock(int e)
{
mMinimizeLock = e;
}
void PWMPrefs::confGlobUnlockOnOpen(bool e)
{
mUnlockOnOpen = e;
}
void PWMPrefs::confGlobTray(bool 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
@@ -44,118 +44,121 @@ class KConfig;
#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 false
#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();
public:
/* functions for reading the configuration settings */
/* GLOBAL */
QString confGlobAutoStart();
QString confGlobBrowserCommand();
QString confGlobXtermCommand();
QFont confGlobEntryFont();
+ QFont confGlobViewFont();
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();
bool confGlobNewEntrLockStat();
/* WND */
QSize confWndMainWndSize();
int confWndMainViewStyle();
bool confWndAutoMinimizeOnStart();
bool confWndClose();
public:
/* functions for writing the configuration settings */
/* GLOBAL */
void confGlobAutoStart(const QString &e);
void confGlobBrowserCommand(const QString &e);
void confGlobXtermCommand(const QString &e);
void confGlobEntryFont(const QFont &e);
+ void confGlobViewFont(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);
void confGlobNewEntrLockStat(bool e);
/* WND */
void confWndMainWndSize(const QSize &e);
void confWndMainViewStyle(int e);
void confWndAutoMinimizeOnStart(bool e);
void confWndClose(bool e);
QString mAutoStart;
QString mBrowserCommand;
QString mXTermCommand;
QFont mEntryFont;
+ QFont mViewFont;
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;
bool mNewEntrLockStat;
QSize mMainWndSize;
int mMainViewStyle;
bool mAutoMinimizeOnStart;
bool mClose;
//US ENH
QValueList<int> mCommentSplitter;
QValueList<int> mCategorySplitter;
// US introduce a nonconst way to return the config object.
KConfig* getConfig();
private:
PWMPrefs();
static PWMPrefs *sInstance;
};
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
@@ -70,43 +70,43 @@ void PwMViewStyle_0::delCategory(const QString &cat)
PWM_ASSERT(categoriesCombo);
int i, count = categoriesCombo->count();
for (i = 0; i < count; ++i) {
if (categoriesCombo->text(i) == cat) {
categoriesCombo->removeItem(i);
return;
}
}
BUG();
}
void PwMViewStyle_0::selectCategory(const QString &cat)
{
PWM_ASSERT(categoriesCombo);
int i, count = categoriesCombo->count();
for (i = 0; i < count; ++i) {
if (categoriesCombo->text(i) == cat) {
categoriesCombo->setCurrentItem(i);
return;
}
}
// fall back to 0
categoriesCombo->setCurrentItem(0);
}
//US ENH: I need a place to load the view dependend settings. Eg. splittersize
void PwMViewStyle_0::restoreSettings(PWMPrefs* prefs)
{
//load and store the size of the listviewcolumns
lv->restoreLayout(prefs->getConfig(), "listview");
splitter1->setSizes( prefs->mCommentSplitter );
-
+ commentBox->setFont( prefs->mViewFont );
}
//US ENH: I need a place to load the view dependend settings. Eg. splittersize
void PwMViewStyle_0::saveSettings(PWMPrefs* prefs)
{
//store the size of the listviewcolumns
lv->saveLayout(prefs->getConfig(), "listview");
prefs->mCommentSplitter = splitter1->sizes();
}
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
@@ -124,49 +124,50 @@ void PwMViewStyle_1::delCategory(const QString &cat)
PWM_ASSERT(categoriesList);
int i, count = categoriesList->count();
for (i = 0; i < count; ++i) {
if (categoriesList->text(i) == cat) {
categoriesList->removeItem(i);
return;
}
}
BUG();
}
void PwMViewStyle_1::selectCategory(const QString &cat)
{
PWM_ASSERT(categoriesList);
int i, count = categoriesList->count();
for (i = 0; i < count; ++i) {
if (categoriesList->text(i) == cat) {
categoriesList->setCurrentItem(i);
return;
}
}
// fall back to 0
categoriesList->setCurrentItem(0);
}
//US ENH: I need a place to load the view dependend settings. Eg. splittersize
void PwMViewStyle_1::restoreSettings(PWMPrefs* prefs)
{
//load and store the size of the listviewcolumns
lv->restoreLayout(prefs->getConfig(), "listview");
splitter->setSizes( prefs->mCategorySplitter );
splitter2->setSizes( prefs->mCommentSplitter );
+ commentBox->setFont( prefs->mViewFont );
}
//US ENH: I need a place to load the view dependend settings. Eg. splittersize
void PwMViewStyle_1::saveSettings(PWMPrefs* prefs)
{
//store the size of the listviewcolumns
lv->saveLayout(prefs->getConfig(), "listview");
prefs->mCategorySplitter = splitter->sizes();
prefs->mCommentSplitter = splitter2->sizes();
}
#ifndef PWM_EMBEDDED
#include "pwmviewstyle_1.moc"
#endif