aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-04-11 10:58:49 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-04-11 10:58:49 +0000
commitb98b2b70a54c084bdc94b38f91270c9b67b4d813 (patch)
treec8ea2c0a60ed961bae3246d1e6413bf346ec5e01 /gpgwin.cpp
parenticon seetings are kept for key management instantly (diff)
downloadgpg4usb-b98b2b70a54c084bdc94b38f91270c9b67b4d813.tar.gz
gpg4usb-b98b2b70a54c084bdc94b38f91270c9b67b4d813.zip
key mgmt position and size is saved (if it is wished)
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@294 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to '')
-rw-r--r--gpgwin.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 6656fea..8f43d0b 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -65,6 +65,9 @@ void GpgWin::restoreSettings()
QSettings settings;
//restoreGeometry(settings.value("window/geometry").toByteArray());
+ // state sets pos & size of dock-widgets
+ this->restoreState(settings.value("window/windowState").toByteArray());
+
// Restore window size & location
Qt::CheckState windowSave = static_cast<Qt::CheckState>(settings.value("window/windowSave", Qt::Unchecked).toUInt());
if (windowSave == Qt::Checked) {
@@ -84,10 +87,6 @@ void GpgWin::restoreSettings()
// Iconstyle
Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt());
this->setToolButtonStyle(buttonStyle);
- // state sets pos & size of dock-widgets
- settings.sync();
- this->restoreState(settings.value("window/windowState").toByteArray());
-
}
void GpgWin::createActions()
@@ -291,7 +290,6 @@ void GpgWin::createDockWindows()
dock->setWidget(mAttachments);*/
}
-
void GpgWin::closeEvent(QCloseEvent *event)
{
if (maybeSave()) {
@@ -512,7 +510,7 @@ void GpgWin::openKeyManagement()
{
if (!keyMgmt) {
keyMgmt = new KeyMgmt(mCtx, iconPath);
- keyMgmt->resize(800, 400);
+// keyMgmt->resize(800, 400);
}
keyMgmt->show();
keyMgmt->raise();
@@ -577,6 +575,14 @@ void GpgWin::fileEncryption()
}
void GpgWin::openSettingsDialog()
{
+ QSettings settings;
new SettingsDialog();
- restoreSettings();
+// restoreSettings();
+ // Iconsize
+ QSize iconSize = settings.value("toolbar/iconsize", QSize(32, 32)).toSize();
+ this->setIconSize(iconSize);
+
+ // Iconstyle
+ Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt());
+ this->setToolButtonStyle(buttonStyle);
}