aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-12 22:21:54 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-12 22:21:54 +0000
commit4bacdcf43d14193cdc864e03ac21317e1405c2c5 (patch)
treef9e08481796f49a2fbc0fcf7f62fbe441795aab3
parentminor beautifying in keyimportdetails (diff)
downloadgpg4usb-4bacdcf43d14193cdc864e03ac21317e1405c2c5.tar.gz
gpg4usb-4bacdcf43d14193cdc864e03ac21317e1405c2c5.zip
added advamced settings tab with steganography and disable steganography per default
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@700 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO4
-rw-r--r--mainwindow.cpp2
-rwxr-xr-xsettingsdialog.cpp54
-rwxr-xr-xsettingsdialog.h16
4 files changed, 56 insertions, 20 deletions
diff --git a/TODO b/TODO
index c0b3b4c..248abf6 100644
--- a/TODO
+++ b/TODO
@@ -12,7 +12,7 @@ Release 0.3.2
- Wizard on first start (Create Key, Import from keys older gpg4usb, import from gnupg) [DONE]
- import conf from old gpg4usb
- remember GNUPGHOME in main.cpp
-- emit keydbchanged from GPGcontext::importKey (?)
+- emit keydbchanged from GPGcontext::importKey (for the moment not possible, because importinformation is lost after this)
- show import details at all places
- option in settingsdialog for enabling steganographic operations [DONE]
- minimal steganography option: remove or add pgp-headers on demand [DONE]
@@ -46,7 +46,7 @@ Release 0.3.2
BUGS:
- import key toolbar dropdown shows text, even if only icon should be shown
- investigate special characters in passphrase in windows
-
+- no importdetails are shown for new keys
Release 0.3.3
- create revocation file on key generation
- optionally open new tab after encryption/decrytion
diff --git a/mainwindow.cpp b/mainwindow.cpp
index c1eb521..7dbfbc5 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -414,7 +414,7 @@ void MainWindow::createMenus()
importKeyMenu->addAction(keyMgmt->importKeyFromKeyServerAct);
keyMenu->addAction(openKeyManagementAct);
- if(settings.value("general/steganography").toBool()) {
+ if(settings.value("advanced/steganography").toBool()) {
steganoMenu = menuBar()->addMenu(tr("&Steganography"));
QAction* cutPgpHeaderAct = new QAction(tr("Remove PGP Header"), this);
connect(cutPgpHeaderAct, SIGNAL(triggered()), this, SLOT(cutPgpHeader()));
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index 34501fe..fdead2b 100755
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -29,11 +29,14 @@ SettingsDialog::SettingsDialog(QWidget *parent)
appearanceTab = new AppearanceTab;
mimeTab = new MimeTab;
keyserverTab = new KeyserverTab;
+ advancedTab = new AdvancedTab;
tabWidget->addTab(generalTab, tr("General"));
tabWidget->addTab(appearanceTab, tr("Appearance"));
tabWidget->addTab(mimeTab, tr("PGP/Mime"));
tabWidget->addTab(keyserverTab, tr("Keyserver"));
+ tabWidget->addTab(advancedTab, tr("Advanced"));
+
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
@@ -56,6 +59,7 @@ void SettingsDialog::accept()
mimeTab->applySettings();
appearanceTab->applySettings();
keyserverTab->applySettings();
+ advancedTab->applySettings();
close();
}
@@ -92,15 +96,6 @@ GeneralTab::GeneralTab(QWidget *parent)
importConfirmationBox->setLayout(importConfirmationBoxLayout);
/*****************************************
- * Steganography Box
- *****************************************/
- QGroupBox *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
- QHBoxLayout *steganoBoxLayout = new QHBoxLayout();
- steganoCheckBox= new QCheckBox(tr("Show Steganographic Options."), this);
- steganoBoxLayout->addWidget(steganoCheckBox);
- steganoBox->setLayout(steganoBoxLayout);
-
- /*****************************************
* Language Select Box
*****************************************/
QGroupBox *langBox = new QGroupBox(tr("Language"));
@@ -121,7 +116,6 @@ GeneralTab::GeneralTab(QWidget *parent)
mainLayout->addWidget(rememberPasswordBox);
mainLayout->addWidget(saveCheckedKeysBox);
mainLayout->addWidget(importConfirmationBox);
- mainLayout->addWidget(steganoBox);
mainLayout->addWidget(langBox);
setSettings();
mainLayout->addStretch(1);
@@ -156,10 +150,6 @@ void GeneralTab::setSettings()
if (settings.value("general/confirmImportKeys",Qt::Checked).toBool()){
importConfirmationCheckBox->setCheckState(Qt::Checked);
}
-
- if (settings.value("general/steganography",Qt::Checked).toBool()){
- steganoCheckBox->setCheckState(Qt::Checked);
- }
}
/***********************************
@@ -174,8 +164,6 @@ void GeneralTab::applySettings()
settings.setValue("general/rememberPassword", rememberPasswordCheckBox->isChecked());
settings.setValue("int/lang", lang.key(langSelectBox->currentText()));
settings.setValue("general/confirmImportKeys", importConfirmationCheckBox->isChecked());
- settings.setValue("general/steganography", steganoCheckBox->isChecked());
-
}
// http://www.informit.com/articles/article.aspx?p=1405555&seqNum=3
@@ -449,3 +437,37 @@ void KeyserverTab::applySettings()
QSettings settings;
settings.setValue("keyserver/defaultKeyServer",comboBox->currentText());
}
+
+AdvancedTab::AdvancedTab(QWidget *parent)
+ : QWidget(parent)
+{
+ /*****************************************
+ * Steganography Box
+ *****************************************/
+ QGroupBox *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
+ QHBoxLayout *steganoBoxLayout = new QHBoxLayout();
+ steganoCheckBox= new QCheckBox(tr("Show Steganographic Options."), this);
+ steganoBoxLayout->addWidget(steganoCheckBox);
+ steganoBox->setLayout(steganoBoxLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(steganoBox);
+ setSettings();
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+
+}
+
+void AdvancedTab::setSettings()
+{
+ QSettings settings;
+ if (settings.value("advanced/steganography").toBool()){
+ steganoCheckBox->setCheckState(Qt::Checked);
+ }
+}
+
+void AdvancedTab::applySettings()
+{
+ QSettings settings;
+ settings.setValue("advanced/steganography", steganoCheckBox->isChecked());
+}
diff --git a/settingsdialog.h b/settingsdialog.h
index 37aae65..db83f33 100755
--- a/settingsdialog.h
+++ b/settingsdialog.h
@@ -59,7 +59,6 @@ class GeneralTab : public QWidget
private:
QCheckBox *rememberPasswordCheckBox;
QCheckBox *importConfirmationcheckBox;
- QCheckBox *steganoCheckBox;
QCheckBox *saveCheckedKeysCheckBox;
QCheckBox *importConfirmationCheckBox;
QComboBox *langSelectBox;
@@ -120,6 +119,19 @@ private slots:
QLabel *label;
};
+ class AdvancedTab : public QWidget
+ {
+ Q_OBJECT
+ public:
+ AdvancedTab(QWidget *parent = 0);
+ void setSettings();
+ void applySettings();
+
+ private:
+ QCheckBox *steganoCheckBox;
+
+ };
+
class SettingsDialog : public QDialog
{
Q_OBJECT
@@ -130,6 +142,7 @@ public:
MimeTab *mimeTab;
AppearanceTab *appearanceTab;
KeyserverTab *keyserverTab;
+ AdvancedTab *advancedTab;
public slots:
void accept();
@@ -139,4 +152,5 @@ private:
QDialogButtonBox *buttonBox;
QVBoxLayout *vbox;
};
+
#endif // __SETTINGSDIALOG_H__