aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xinclude/ui/SettingsDialog.h1
-rw-r--r--include/ui/widgets/InfoBoardWidget.h4
-rw-r--r--include/ui/widgets/KeyList.h2
-rw-r--r--resource/ts/gpg_frontend_fr.ts51
-rw-r--r--resource/ts/gpg_frontend_ru.ts51
-rw-r--r--resource/ts/gpgfrontend_en_us.ts51
-rw-r--r--resource/ts/gpgfrontend_zh_chs.ts51
-rw-r--r--resource/ts/gpgfrontend_zh_cht.ts51
-rw-r--r--src/MainWindow.cpp3
-rw-r--r--src/ui/KeyUploadDialog.cpp4
-rwxr-xr-xsrc/ui/SettingsDialog.cpp1057
-rw-r--r--src/ui/WaitingDialog.cpp1
-rw-r--r--src/ui/Wizard.cpp38
-rw-r--r--src/ui/keypair_details/KeyPairDetailTab.cpp5
-rw-r--r--src/ui/keypair_details/KeyPairSubkeyTab.cpp2
-rw-r--r--src/ui/keypair_details/KeyPairUIDTab.cpp3
-rw-r--r--src/ui/main_window/MainWindowUI.cpp5
-rw-r--r--src/ui/widgets/InfoBoardWidget.cpp14
-rw-r--r--src/ui/widgets/KeyList.cpp5
19 files changed, 798 insertions, 601 deletions
diff --git a/include/ui/SettingsDialog.h b/include/ui/SettingsDialog.h
index f1a2863c..39bd917f 100755
--- a/include/ui/SettingsDialog.h
+++ b/include/ui/SettingsDialog.h
@@ -115,6 +115,7 @@ private:
QRadioButton *iconTextButton;
QRadioButton *iconIconsButton;
QRadioButton *iconAllButton;
+ QSpinBox *infoBoardFontSizeSpin;
QCheckBox *windowSizeCheckBox;
signals:
diff --git a/include/ui/widgets/InfoBoardWidget.h b/include/ui/widgets/InfoBoardWidget.h
index f487b72c..2e5f9034 100644
--- a/include/ui/widgets/InfoBoardWidget.h
+++ b/include/ui/widgets/InfoBoardWidget.h
@@ -95,6 +95,10 @@ public slots:
void slotRefresh(const QString &text, InfoBoardStatus status);
private:
+
+ QString appPath;
+ QSettings settings;
+
QMenu *detailMenu; /** Menu for te Button in verfiyNotification */
QAction *importFromKeyserverAct; /** Action for importing keys from keyserver which are notin keylist */
QTextEdit *infoBoard;
diff --git a/include/ui/widgets/KeyList.h b/include/ui/widgets/KeyList.h
index 413d0969..231255b6 100644
--- a/include/ui/widgets/KeyList.h
+++ b/include/ui/widgets/KeyList.h
@@ -73,6 +73,8 @@ public:
void addMenuAction(QAction *act);
+ void addSeparator();
+
QStringList *getChecked();
void getCheckedKeys(QVector<GpgKey> &keys);
diff --git a/resource/ts/gpg_frontend_fr.ts b/resource/ts/gpg_frontend_fr.ts
index 26d37952..a60001c2 100644
--- a/resource/ts/gpg_frontend_fr.ts
+++ b/resource/ts/gpg_frontend_fr.ts
@@ -22,12 +22,12 @@
<context>
<name>AdvancedTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="580"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="595"/>
<source>Show Steganography Options [Advanced]</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="582"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="597"/>
<source>Show Steganographic Options.</source>
<translation type="unfinished"></translation>
</message>
@@ -84,6 +84,11 @@
<source>Save window size and position on exit.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="419"/>
+ <source>Information Board</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AttachmentTableModel</name>
@@ -267,23 +272,45 @@
</message>
<message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="194"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="222"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
<source>Couldn&apos;t open file</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="213"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="224"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="235"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="214"/>
+ <source>Error Occurred During Encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="225"/>
+ <source>Error Occurred During Decryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="236"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
+ <source>Error Occurred During Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="259"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="268"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="237"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="260"/>
<source>File exists! Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="246"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="269"/>
<source>Cannot write file %1:
%2.</source>
<translation type="unfinished"></translation>
@@ -444,22 +471,22 @@
<context>
<name>GpgPathsTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="612"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="627"/>
<source>Relative path to keydb</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="625"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="640"/>
<source>Current keydb path: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="630"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="645"/>
<source>&lt;b&gt;NOTE: &lt;/b&gt; Gpg4usb will restart automatically if you change the keydb path!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="659"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="674"/>
<source>Choose keydb directory</source>
<translation type="unfinished"></translation>
</message>
@@ -1911,12 +1938,12 @@ This is NOT your Public Key, so DON&apos;T give it away.&lt;br /&gt;Do you REALL
<context>
<name>KeyserverTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="508"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="523"/>
<source>Default Keyserver for import:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="525"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="540"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resource/ts/gpg_frontend_ru.ts b/resource/ts/gpg_frontend_ru.ts
index 9b7bd957..fac52dc1 100644
--- a/resource/ts/gpg_frontend_ru.ts
+++ b/resource/ts/gpg_frontend_ru.ts
@@ -22,12 +22,12 @@
<context>
<name>AdvancedTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="580"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="595"/>
<source>Show Steganography Options [Advanced]</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="582"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="597"/>
<source>Show Steganographic Options.</source>
<translation type="unfinished"></translation>
</message>
@@ -84,6 +84,11 @@
<source>Save window size and position on exit.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="419"/>
+ <source>Information Board</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AttachmentTableModel</name>
@@ -267,23 +272,45 @@
</message>
<message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="194"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="222"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
<source>Couldn&apos;t open file</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="213"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="224"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="235"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="214"/>
+ <source>Error Occurred During Encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="225"/>
+ <source>Error Occurred During Decryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="236"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
+ <source>Error Occurred During Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="259"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="268"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="237"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="260"/>
<source>File exists! Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="246"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="269"/>
<source>Cannot write file %1:
%2.</source>
<translation type="unfinished"></translation>
@@ -444,22 +471,22 @@
<context>
<name>GpgPathsTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="612"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="627"/>
<source>Relative path to keydb</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="625"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="640"/>
<source>Current keydb path: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="630"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="645"/>
<source>&lt;b&gt;NOTE: &lt;/b&gt; Gpg4usb will restart automatically if you change the keydb path!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="659"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="674"/>
<source>Choose keydb directory</source>
<translation type="unfinished"></translation>
</message>
@@ -1911,12 +1938,12 @@ This is NOT your Public Key, so DON&apos;T give it away.&lt;br /&gt;Do you REALL
<context>
<name>KeyserverTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="508"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="523"/>
<source>Default Keyserver for import:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="525"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="540"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resource/ts/gpgfrontend_en_us.ts b/resource/ts/gpgfrontend_en_us.ts
index 85668d11..9f76a615 100644
--- a/resource/ts/gpgfrontend_en_us.ts
+++ b/resource/ts/gpgfrontend_en_us.ts
@@ -22,12 +22,12 @@
<context>
<name>AdvancedTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="580"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="595"/>
<source>Show Steganography Options [Advanced]</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="582"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="597"/>
<source>Show Steganographic Options.</source>
<translation type="unfinished"></translation>
</message>
@@ -84,6 +84,11 @@
<source>Save window size and position on exit.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="419"/>
+ <source>Information Board</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AttachmentTableModel</name>
@@ -267,23 +272,45 @@
</message>
<message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="194"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="222"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
<source>Couldn&apos;t open file</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="213"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="224"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="235"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="214"/>
+ <source>Error Occurred During Encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="225"/>
+ <source>Error Occurred During Decryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="236"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
+ <source>Error Occurred During Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="259"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="268"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="237"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="260"/>
<source>File exists! Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="246"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="269"/>
<source>Cannot write file %1:
%2.</source>
<translation type="unfinished"></translation>
@@ -444,22 +471,22 @@
<context>
<name>GpgPathsTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="612"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="627"/>
<source>Relative path to keydb</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="625"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="640"/>
<source>Current keydb path: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="630"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="645"/>
<source>&lt;b&gt;NOTE: &lt;/b&gt; Gpg4usb will restart automatically if you change the keydb path!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="659"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="674"/>
<source>Choose keydb directory</source>
<translation type="unfinished"></translation>
</message>
@@ -1911,12 +1938,12 @@ This is NOT your Public Key, so DON&apos;T give it away.&lt;br /&gt;Do you REALL
<context>
<name>KeyserverTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="508"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="523"/>
<source>Default Keyserver for import:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="525"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="540"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resource/ts/gpgfrontend_zh_chs.ts b/resource/ts/gpgfrontend_zh_chs.ts
index 8e1012b7..1c012f64 100644
--- a/resource/ts/gpgfrontend_zh_chs.ts
+++ b/resource/ts/gpgfrontend_zh_chs.ts
@@ -22,12 +22,12 @@
<context>
<name>AdvancedTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="580"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="595"/>
<source>Show Steganography Options [Advanced]</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="582"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="597"/>
<source>Show Steganographic Options.</source>
<translation type="unfinished"></translation>
</message>
@@ -84,6 +84,11 @@
<source>Save window size and position on exit.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="419"/>
+ <source>Information Board</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AttachmentTableModel</name>
@@ -267,23 +272,45 @@
</message>
<message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="194"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="222"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
<source>Couldn&apos;t open file</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="213"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="224"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="235"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="214"/>
+ <source>Error Occurred During Encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="225"/>
+ <source>Error Occurred During Decryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="236"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
+ <source>Error Occurred During Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="259"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="268"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="237"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="260"/>
<source>File exists! Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="246"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="269"/>
<source>Cannot write file %1:
%2.</source>
<translation type="unfinished"></translation>
@@ -444,22 +471,22 @@
<context>
<name>GpgPathsTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="612"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="627"/>
<source>Relative path to keydb</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="625"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="640"/>
<source>Current keydb path: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="630"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="645"/>
<source>&lt;b&gt;NOTE: &lt;/b&gt; Gpg4usb will restart automatically if you change the keydb path!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="659"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="674"/>
<source>Choose keydb directory</source>
<translation type="unfinished"></translation>
</message>
@@ -1911,12 +1938,12 @@ This is NOT your Public Key, so DON&apos;T give it away.&lt;br /&gt;Do you REALL
<context>
<name>KeyserverTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="508"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="523"/>
<source>Default Keyserver for import:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="525"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="540"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
diff --git a/resource/ts/gpgfrontend_zh_cht.ts b/resource/ts/gpgfrontend_zh_cht.ts
index 8e1012b7..1c012f64 100644
--- a/resource/ts/gpgfrontend_zh_cht.ts
+++ b/resource/ts/gpgfrontend_zh_cht.ts
@@ -22,12 +22,12 @@
<context>
<name>AdvancedTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="580"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="595"/>
<source>Show Steganography Options [Advanced]</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="582"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="597"/>
<source>Show Steganographic Options.</source>
<translation type="unfinished"></translation>
</message>
@@ -84,6 +84,11 @@
<source>Save window size and position on exit.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="419"/>
+ <source>Information Board</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AttachmentTableModel</name>
@@ -267,23 +272,45 @@
</message>
<message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="194"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="222"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
<source>Couldn&apos;t open file</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="213"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="224"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="235"/>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="214"/>
+ <source>Error Occurred During Encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="225"/>
+ <source>Error Occurred During Decryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../src/ui/FileEncryptionDialog.cpp" line="236"/>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="245"/>
+ <source>Error Occurred During Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="259"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="268"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="237"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="260"/>
<source>File exists! Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/FileEncryptionDialog.cpp" line="246"/>
+ <location filename="../../src/ui/FileEncryptionDialog.cpp" line="269"/>
<source>Cannot write file %1:
%2.</source>
<translation type="unfinished"></translation>
@@ -444,22 +471,22 @@
<context>
<name>GpgPathsTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="612"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="627"/>
<source>Relative path to keydb</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="625"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="640"/>
<source>Current keydb path: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="630"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="645"/>
<source>&lt;b&gt;NOTE: &lt;/b&gt; Gpg4usb will restart automatically if you change the keydb path!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="659"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="674"/>
<source>Choose keydb directory</source>
<translation type="unfinished"></translation>
</message>
@@ -1911,12 +1938,12 @@ This is NOT your Public Key, so DON&apos;T give it away.&lt;br /&gt;Do you REALL
<context>
<name>KeyserverTab</name>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="508"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="523"/>
<source>Default Keyserver for import:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/ui/SettingsDialog.cpp" line="525"/>
+ <location filename="../../src/ui/SettingsDialog.cpp" line="540"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 35890a47..eeedad7c 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -29,7 +29,7 @@ MainWindow::MainWindow()
settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
QSettings::IniFormat) {
- auto waitingDialog = new WaitingDialog("Loading", this);
+ auto waitingDialog = new WaitingDialog("Loading Gnupg", this);
auto ctx_thread = QThread::create([&]() { mCtx = new GpgME::GpgContext(); });
@@ -100,6 +100,7 @@ MainWindow::MainWindow()
mKeyList->addMenuAction(appendSelectedKeysAct);
mKeyList->addMenuAction(copyMailAddressToClipboardAct);
mKeyList->addMenuAction(showKeyDetailsAct);
+ mKeyList->addSeparator();
mKeyList->addMenuAction(refreshKeysFromKeyserverAct);
mKeyList->addMenuAction(uploadKeyToServerAct);
diff --git a/src/ui/KeyUploadDialog.cpp b/src/ui/KeyUploadDialog.cpp
index e28b4230..faf892f0 100644
--- a/src/ui/KeyUploadDialog.cpp
+++ b/src/ui/KeyUploadDialog.cpp
@@ -36,9 +36,13 @@ KeyUploadDialog::KeyUploadDialog(GpgME::GpgContext *ctx, const QVector<GpgKey> &
auto *pb = new QProgressBar();
pb->setRange(0, 0);
+ pb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ pb->setTextVisible(false);
auto *layout = new QVBoxLayout();
layout->addWidget(pb);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
this->setLayout(layout);
this->setModal(true);
diff --git a/src/ui/SettingsDialog.cpp b/src/ui/SettingsDialog.cpp
index 74c507e4..6bcdc971 100755
--- a/src/ui/SettingsDialog.cpp
+++ b/src/ui/SettingsDialog.cpp
@@ -25,201 +25,201 @@
#include "ui/SettingsDialog.h"
SettingsDialog::SettingsDialog(GpgME::GpgContext *ctx, QWidget *parent)
- : QDialog(parent) {
- mCtx = ctx;
- tabWidget = new QTabWidget;
- generalTab = new GeneralTab(mCtx);
- appearanceTab = new AppearanceTab;
- mimeTab = new MimeTab;
- keyserverTab = new KeyserverTab;
- advancedTab = new AdvancedTab;
- gpgPathsTab = new GpgPathsTab;
-
- tabWidget->addTab(generalTab, tr("General"));
- tabWidget->addTab(appearanceTab, tr("Appearance"));
- tabWidget->addTab(mimeTab, tr("PGP/Mime"));
- tabWidget->addTab(keyserverTab, tr("Key Server"));
- // tabWidget->addTab(gpgPathsTab, tr("Gpg paths"));
- tabWidget->addTab(advancedTab, tr("Advanced"));
-
- buttonBox =
- new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
-
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotAccept()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
-
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(tabWidget);
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-
- setWindowTitle(tr("Settings"));
-
- // slots for handling the restartneeded member
- this->slotSetRestartNeeded(false);
- connect(generalTab, SIGNAL(signalRestartNeeded(bool)), this,
- SLOT(slotSetRestartNeeded(bool)));
- connect(appearanceTab, SIGNAL(signalRestartNeeded(bool)), this,
- SLOT(slotSetRestartNeeded(bool)));
- connect(mimeTab, SIGNAL(signalRestartNeeded(bool)), this,
- SLOT(slotSetRestartNeeded(bool)));
- connect(keyserverTab, SIGNAL(signalRestartNeeded(bool)), this,
- SLOT(slotSetRestartNeeded(bool)));
- connect(advancedTab, SIGNAL(signalRestartNeeded(bool)), this,
- SLOT(slotSetRestartNeeded(bool)));
-
- connect(this, SIGNAL(signalRestartNeeded(bool)), parent,
- SLOT(slotSetRestartNeeded(bool)));
-
- this->show();
+ : QDialog(parent) {
+ mCtx = ctx;
+ tabWidget = new QTabWidget;
+ generalTab = new GeneralTab(mCtx);
+ appearanceTab = new AppearanceTab;
+ mimeTab = new MimeTab;
+ keyserverTab = new KeyserverTab;
+ advancedTab = new AdvancedTab;
+ gpgPathsTab = new GpgPathsTab;
+
+ tabWidget->addTab(generalTab, tr("General"));
+ tabWidget->addTab(appearanceTab, tr("Appearance"));
+ tabWidget->addTab(mimeTab, tr("PGP/Mime"));
+ tabWidget->addTab(keyserverTab, tr("Key Server"));
+ // tabWidget->addTab(gpgPathsTab, tr("Gpg paths"));
+ tabWidget->addTab(advancedTab, tr("Advanced"));
+
+ buttonBox =
+ new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotAccept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Settings"));
+
+ // slots for handling the restartneeded member
+ this->slotSetRestartNeeded(false);
+ connect(generalTab, SIGNAL(signalRestartNeeded(bool)), this,
+ SLOT(slotSetRestartNeeded(bool)));
+ connect(appearanceTab, SIGNAL(signalRestartNeeded(bool)), this,
+ SLOT(slotSetRestartNeeded(bool)));
+ connect(mimeTab, SIGNAL(signalRestartNeeded(bool)), this,
+ SLOT(slotSetRestartNeeded(bool)));
+ connect(keyserverTab, SIGNAL(signalRestartNeeded(bool)), this,
+ SLOT(slotSetRestartNeeded(bool)));
+ connect(advancedTab, SIGNAL(signalRestartNeeded(bool)), this,
+ SLOT(slotSetRestartNeeded(bool)));
+
+ connect(this, SIGNAL(signalRestartNeeded(bool)), parent,
+ SLOT(slotSetRestartNeeded(bool)));
+
+ this->show();
}
bool SettingsDialog::getRestartNeeded() const { return this->restartNeeded; }
void SettingsDialog::slotSetRestartNeeded(bool needed) {
- this->restartNeeded = needed;
+ this->restartNeeded = needed;
}
void SettingsDialog::slotAccept() {
- generalTab->applySettings();
- mimeTab->applySettings();
- appearanceTab->applySettings();
- keyserverTab->applySettings();
- advancedTab->applySettings();
- gpgPathsTab->applySettings();
- if (getRestartNeeded()) {
- emit signalRestartNeeded(true);
- }
- close();
+ generalTab->applySettings();
+ mimeTab->applySettings();
+ appearanceTab->applySettings();
+ keyserverTab->applySettings();
+ advancedTab->applySettings();
+ gpgPathsTab->applySettings();
+ if (getRestartNeeded()) {
+ emit signalRestartNeeded(true);
+ }
+ close();
}
// http://www.informit.com/articles/article.aspx?p=1405555&seqNum=3
// http://developer.qt.nokia.com/wiki/How_to_create_a_multi_language_application
QHash<QString, QString> SettingsDialog::listLanguages() {
- QHash<QString, QString> languages;
+ QHash<QString, QString> languages;
- languages.insert("", tr("System Default"));
+ languages.insert("", tr("System Default"));
- QString appPath = qApp->applicationDirPath();
- QDir qmDir = QDir(RESOURCE_DIR(appPath) + "/ts/");
- QStringList fileNames = qmDir.entryList(QStringList("gpgfrontend_*.qm"));
+ QString appPath = qApp->applicationDirPath();
+ QDir qmDir = QDir(RESOURCE_DIR(appPath) + "/ts/");
+ QStringList fileNames = qmDir.entryList(QStringList("gpgfrontend_*.qm"));
- for (int i = 0; i < fileNames.size(); ++i) {
- QString locale = fileNames[i];
- locale.truncate(locale.lastIndexOf('.'));
- locale.remove(0, locale.indexOf('_') + 1);
+ for (int i = 0; i < fileNames.size(); ++i) {
+ QString locale = fileNames[i];
+ locale.truncate(locale.lastIndexOf('.'));
+ locale.remove(0, locale.indexOf('_') + 1);
- // this works in qt 4.8
- QLocale qloc(locale);
+ // this works in qt 4.8
+ QLocale qloc(locale);
#if QT_VERSION < 0x040800
- QString language =
- QLocale::languageToString(qloc.language()) + " (" + locale +
- ")"; //+ " (" + QLocale::languageToString(qloc.language()) + ")";
+ QString language =
+ QLocale::languageToString(qloc.language()) + " (" + locale +
+ ")"; //+ " (" + QLocale::languageToString(qloc.language()) + ")";
#else
- QString language = qloc.nativeLanguageName() + " (" + locale + ")";
+ QString language = qloc.nativeLanguageName() + " (" + locale + ")";
#endif
- languages.insert(locale, language);
- }
- return languages;
+ languages.insert(locale, language);
+ }
+ return languages;
}
GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
- mCtx = ctx;
-
- /*****************************************
- * remember Password-Box
- *****************************************/
- auto *rememberPasswordBox = new QGroupBox(tr("Remember Password"));
- auto *rememberPasswordBoxLayout = new QHBoxLayout();
- rememberPasswordCheckBox =
- new QCheckBox(tr("Remember password until closing gpg4usb"), this);
- rememberPasswordBoxLayout->addWidget(rememberPasswordCheckBox);
- rememberPasswordBox->setLayout(rememberPasswordBoxLayout);
-
- /*****************************************
- * Save-Checked-Keys-Box
- *****************************************/
- auto *saveCheckedKeysBox = new QGroupBox(tr("Save Checked Keys"));
- auto *saveCheckedKeysBoxLayout = new QHBoxLayout();
- saveCheckedKeysCheckBox = new QCheckBox(
- tr("Save checked private keys on exit and restore them on next start."),
- this);
- saveCheckedKeysBoxLayout->addWidget(saveCheckedKeysCheckBox);
- saveCheckedKeysBox->setLayout(saveCheckedKeysBoxLayout);
-
- /*****************************************
- * Key-Impport-Confirmation Box
- *****************************************/
- auto *importConfirmationBox =
- new QGroupBox(tr("Confirm drag'n'drop key import"));
- auto *importConfirmationBoxLayout = new QHBoxLayout();
- importConfirmationCheckBox = new QCheckBox(
- tr("Import files dropped on the keylist without confirmation."), this);
- importConfirmationBoxLayout->addWidget(importConfirmationCheckBox);
- importConfirmationBox->setLayout(importConfirmationBoxLayout);
-
- /*****************************************
- * Language Select Box
- *****************************************/
- auto *langBox = new QGroupBox(tr("Language"));
- auto *langBoxLayout = new QVBoxLayout();
- langSelectBox = new QComboBox;
- lang = SettingsDialog::listLanguages();
-
- foreach (QString l, lang) { langSelectBox->addItem(l); }
-
- langBoxLayout->addWidget(langSelectBox);
- langBoxLayout->addWidget(
- new QLabel(tr("<b>NOTE: </b> GpgFrontend will restart automatically if "
- "you change the language!")));
- langBox->setLayout(langBoxLayout);
- connect(langSelectBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(slotLanguageChanged()));
-
- /*****************************************
- * Own Key Select Box
- *****************************************/
- auto *ownKeyBox = new QGroupBox(tr("Own key"));
- auto *ownKeyBoxLayout = new QVBoxLayout();
- ownKeySelectBox = new QComboBox;
-
- ownKeyBox->setLayout(ownKeyBoxLayout);
- mKeyList = new KeyList(mCtx);
-
- // Fill the keyid hashmap
- keyIds.insert("", tr("<none>"));
-
- for (const auto &keyid : *mKeyList->getAllPrivateKeys()) {
- auto &key = mCtx->getKeyById(keyid);
- keyIds.insert(key.id, key.uids.first().uid);
- }
- for (const auto &k : keyIds.keys()) {
- ownKeySelectBox->addItem(keyIds.find(k).value());
- keyIdsList.append(k);
- }
- connect(ownKeySelectBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(slotOwnKeyIdChanged()));
-
- ownKeyBoxLayout->addWidget(new QLabel(
- tr("Key pair for synchronization and identity authentication")));
- ownKeyBoxLayout->addWidget(ownKeySelectBox);
-
- /*****************************************
- * Mainlayout
- *****************************************/
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(rememberPasswordBox);
- mainLayout->addWidget(saveCheckedKeysBox);
- mainLayout->addWidget(importConfirmationBox);
- mainLayout->addWidget(langBox);
- mainLayout->addWidget(ownKeyBox);
-
- setSettings();
- mainLayout->addStretch(1);
- setLayout(mainLayout);
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+ mCtx = ctx;
+
+ /*****************************************
+ * remember Password-Box
+ *****************************************/
+ auto *rememberPasswordBox = new QGroupBox(tr("Remember Password"));
+ auto *rememberPasswordBoxLayout = new QHBoxLayout();
+ rememberPasswordCheckBox =
+ new QCheckBox(tr("Remember password until closing gpg4usb"), this);
+ rememberPasswordBoxLayout->addWidget(rememberPasswordCheckBox);
+ rememberPasswordBox->setLayout(rememberPasswordBoxLayout);
+
+ /*****************************************
+ * Save-Checked-Keys-Box
+ *****************************************/
+ auto *saveCheckedKeysBox = new QGroupBox(tr("Save Checked Keys"));
+ auto *saveCheckedKeysBoxLayout = new QHBoxLayout();
+ saveCheckedKeysCheckBox = new QCheckBox(
+ tr("Save checked private keys on exit and restore them on next start."),
+ this);
+ saveCheckedKeysBoxLayout->addWidget(saveCheckedKeysCheckBox);
+ saveCheckedKeysBox->setLayout(saveCheckedKeysBoxLayout);
+
+ /*****************************************
+ * Key-Impport-Confirmation Box
+ *****************************************/
+ auto *importConfirmationBox =
+ new QGroupBox(tr("Confirm drag'n'drop key import"));
+ auto *importConfirmationBoxLayout = new QHBoxLayout();
+ importConfirmationCheckBox = new QCheckBox(
+ tr("Import files dropped on the keylist without confirmation."), this);
+ importConfirmationBoxLayout->addWidget(importConfirmationCheckBox);
+ importConfirmationBox->setLayout(importConfirmationBoxLayout);
+
+ /*****************************************
+ * Language Select Box
+ *****************************************/
+ auto *langBox = new QGroupBox(tr("Language"));
+ auto *langBoxLayout = new QVBoxLayout();
+ langSelectBox = new QComboBox;
+ lang = SettingsDialog::listLanguages();
+
+ foreach (QString l, lang) { langSelectBox->addItem(l); }
+
+ langBoxLayout->addWidget(langSelectBox);
+ langBoxLayout->addWidget(
+ new QLabel(tr("<b>NOTE: </b> GpgFrontend will restart automatically if "
+ "you change the language!")));
+ langBox->setLayout(langBoxLayout);
+ connect(langSelectBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(slotLanguageChanged()));
+
+ /*****************************************
+ * Own Key Select Box
+ *****************************************/
+ auto *ownKeyBox = new QGroupBox(tr("Own key"));
+ auto *ownKeyBoxLayout = new QVBoxLayout();
+ ownKeySelectBox = new QComboBox;
+
+ ownKeyBox->setLayout(ownKeyBoxLayout);
+ mKeyList = new KeyList(mCtx);
+
+ // Fill the keyid hashmap
+ keyIds.insert("", tr("<none>"));
+
+ for (const auto &keyid : *mKeyList->getAllPrivateKeys()) {
+ auto &key = mCtx->getKeyById(keyid);
+ keyIds.insert(key.id, key.uids.first().uid);
+ }
+ for (const auto &k : keyIds.keys()) {
+ ownKeySelectBox->addItem(keyIds.find(k).value());
+ keyIdsList.append(k);
+ }
+ connect(ownKeySelectBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(slotOwnKeyIdChanged()));
+
+ ownKeyBoxLayout->addWidget(new QLabel(
+ tr("Key pair for synchronization and identity authentication")));
+ ownKeyBoxLayout->addWidget(ownKeySelectBox);
+
+ /*****************************************
+ * Mainlayout
+ *****************************************/
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(rememberPasswordBox);
+ mainLayout->addWidget(saveCheckedKeysBox);
+ mainLayout->addWidget(importConfirmationBox);
+ mainLayout->addWidget(langBox);
+ mainLayout->addWidget(ownKeyBox);
+
+ setSettings();
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
}
/**********************************
@@ -228,32 +228,32 @@ GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent)
* appropriately
**********************************/
void GeneralTab::setSettings() {
- // Keysaving
- if (settings.value("keys/saveKeyChecked").toBool()) {
- saveCheckedKeysCheckBox->setCheckState(Qt::Checked);
- }
-
- // Language setting
- QString langKey = settings.value("int/lang").toString();
- QString langValue = lang.value(langKey);
- if (langKey != "") {
- langSelectBox->setCurrentIndex(langSelectBox->findText(langValue));
- }
-
- QString ownKeyId = settings.value("general/ownKeyId").toString();
- qDebug() << "OwnKeyId" << ownKeyId;
- if (ownKeyId.isEmpty()) {
- ownKeySelectBox->setCurrentText("<none>");
- } else {
- const auto text = keyIds.find(ownKeyId).value();
- qDebug() << "OwnKey" << ownKeyId << text;
- ownKeySelectBox->setCurrentText(text);
- }
-
- // Get own key information from keydb/gpg.conf (if contained)
- if (settings.value("general/confirmImportKeys", Qt::Checked).toBool()) {
- importConfirmationCheckBox->setCheckState(Qt::Checked);
- }
+ // Keysaving
+ if (settings.value("keys/saveKeyChecked").toBool()) {
+ saveCheckedKeysCheckBox->setCheckState(Qt::Checked);
+ }
+
+ // Language setting
+ QString langKey = settings.value("int/lang").toString();
+ QString langValue = lang.value(langKey);
+ if (langKey != "") {
+ langSelectBox->setCurrentIndex(langSelectBox->findText(langValue));
+ }
+
+ QString ownKeyId = settings.value("general/ownKeyId").toString();
+ qDebug() << "OwnKeyId" << ownKeyId;
+ if (ownKeyId.isEmpty()) {
+ ownKeySelectBox->setCurrentText("<none>");
+ } else {
+ const auto text = keyIds.find(ownKeyId).value();
+ qDebug() << "OwnKey" << ownKeyId << text;
+ ownKeySelectBox->setCurrentText(text);
+ }
+
+ // Get own key information from keydb/gpg.conf (if contained)
+ if (settings.value("general/confirmImportKeys", Qt::Checked).toBool()) {
+ importConfirmationCheckBox->setCheckState(Qt::Checked);
+ }
}
/***********************************
@@ -261,70 +261,70 @@ void GeneralTab::setSettings() {
* write them to settings-file
*************************************/
void GeneralTab::applySettings() {
- settings.setValue("keys/saveKeyChecked",
- saveCheckedKeysCheckBox->isChecked());
- // TODO: clear passwordCache instantly on unset rememberPassword
- settings.setValue("general/rememberPassword",
- rememberPasswordCheckBox->isChecked());
- settings.setValue("int/lang", lang.key(langSelectBox->currentText()));
- settings.setValue("general/ownKeyId",
- keyIdsList[ownKeySelectBox->currentIndex()]);
- settings.setValue("general/confirmImportKeys",
- importConfirmationCheckBox->isChecked());
+ settings.setValue("keys/saveKeyChecked",
+ saveCheckedKeysCheckBox->isChecked());
+ // TODO: clear passwordCache instantly on unset rememberPassword
+ settings.setValue("general/rememberPassword",
+ rememberPasswordCheckBox->isChecked());
+ settings.setValue("int/lang", lang.key(langSelectBox->currentText()));
+ settings.setValue("general/ownKeyId",
+ keyIdsList[ownKeySelectBox->currentIndex()]);
+ settings.setValue("general/confirmImportKeys",
+ importConfirmationCheckBox->isChecked());
}
void GeneralTab::slotLanguageChanged() { emit signalRestartNeeded(true); }
void GeneralTab::slotOwnKeyIdChanged() {
- // Set ownKeyId to currently selected
+ // Set ownKeyId to currently selected
}
MimeTab::MimeTab(QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
- /*****************************************
- * MIME-Parsing-Box
- *****************************************/
- auto *mimeQPBox = new QGroupBox(tr("Decode quoted printable"));
- auto *mimeQPBoxLayout = new QVBoxLayout();
- mimeQPCheckBox =
- new QCheckBox(tr("Try to recognize quoted printable."), this);
- mimeQPBoxLayout->addWidget(mimeQPCheckBox);
- mimeQPBox->setLayout(mimeQPBoxLayout);
-
- auto *mimeParseBox = new QGroupBox(tr("Parse PGP/MIME (Experimental)"));
- auto *mimeParseBoxLayout = new QVBoxLayout();
- mimeParseCheckBox = new QCheckBox(
- tr("Try to split attachments from PGP-MIME ecrypted messages."), this);
- mimeParseBoxLayout->addWidget(mimeParseCheckBox);
- mimeParseBox->setLayout(mimeParseBoxLayout);
-
- auto *mimeOpenAttachmentBox =
- new QGroupBox(tr("Open with external application (Experimental)"));
- auto *mimeOpenAttachmentBoxLayout = new QVBoxLayout();
- auto *mimeOpenAttachmentText = new QLabel(tr(
- "Open attachments with default application for the filetype.<br> "
- "There are at least two possible problems with this behaviour:"
- "<ol><li>File needs to be saved unencrypted to attachments folder.<br> "
- "Its your job to clean this folder.</li>"
- "<li>The external application may have its own temp files.</li></ol>"));
-
- // mimeOpenAttachmentBox->setDisabled(true);
- mimeOpenAttachmentCheckBox =
- new QCheckBox(tr("Enable opening with external applications."), this);
-
- mimeOpenAttachmentBoxLayout->addWidget(mimeOpenAttachmentText);
- mimeOpenAttachmentBoxLayout->addWidget(mimeOpenAttachmentCheckBox);
- mimeOpenAttachmentBox->setLayout(mimeOpenAttachmentBoxLayout);
-
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(mimeParseBox);
- mainLayout->addWidget(mimeOpenAttachmentBox);
- mainLayout->addWidget(mimeQPBox);
- mainLayout->addStretch(1);
- setLayout(mainLayout);
- setSettings();
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+ /*****************************************
+ * MIME-Parsing-Box
+ *****************************************/
+ auto *mimeQPBox = new QGroupBox(tr("Decode quoted printable"));
+ auto *mimeQPBoxLayout = new QVBoxLayout();
+ mimeQPCheckBox =
+ new QCheckBox(tr("Try to recognize quoted printable."), this);
+ mimeQPBoxLayout->addWidget(mimeQPCheckBox);
+ mimeQPBox->setLayout(mimeQPBoxLayout);
+
+ auto *mimeParseBox = new QGroupBox(tr("Parse PGP/MIME (Experimental)"));
+ auto *mimeParseBoxLayout = new QVBoxLayout();
+ mimeParseCheckBox = new QCheckBox(
+ tr("Try to split attachments from PGP-MIME ecrypted messages."), this);
+ mimeParseBoxLayout->addWidget(mimeParseCheckBox);
+ mimeParseBox->setLayout(mimeParseBoxLayout);
+
+ auto *mimeOpenAttachmentBox =
+ new QGroupBox(tr("Open with external application (Experimental)"));
+ auto *mimeOpenAttachmentBoxLayout = new QVBoxLayout();
+ auto *mimeOpenAttachmentText = new QLabel(tr(
+ "Open attachments with default application for the filetype.<br> "
+ "There are at least two possible problems with this behaviour:"
+ "<ol><li>File needs to be saved unencrypted to attachments folder.<br> "
+ "Its your job to clean this folder.</li>"
+ "<li>The external application may have its own temp files.</li></ol>"));
+
+ // mimeOpenAttachmentBox->setDisabled(true);
+ mimeOpenAttachmentCheckBox =
+ new QCheckBox(tr("Enable opening with external applications."), this);
+
+ mimeOpenAttachmentBoxLayout->addWidget(mimeOpenAttachmentText);
+ mimeOpenAttachmentBoxLayout->addWidget(mimeOpenAttachmentCheckBox);
+ mimeOpenAttachmentBox->setLayout(mimeOpenAttachmentBoxLayout);
+
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(mimeParseBox);
+ mainLayout->addWidget(mimeOpenAttachmentBox);
+ mainLayout->addWidget(mimeQPBox);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+ setSettings();
}
/**********************************
@@ -334,17 +334,17 @@ MimeTab::MimeTab(QWidget *parent)
**********************************/
void MimeTab::setSettings() {
- // MIME-Parsing
- if (settings.value("mime/parsemime").toBool())
- mimeParseCheckBox->setCheckState(Qt::Checked);
+ // MIME-Parsing
+ if (settings.value("mime/parsemime").toBool())
+ mimeParseCheckBox->setCheckState(Qt::Checked);
- // Qouted Printable
- if (settings.value("mime/parseQP", true).toBool())
- mimeQPCheckBox->setCheckState(Qt::Checked);
+ // Qouted Printable
+ if (settings.value("mime/parseQP", true).toBool())
+ mimeQPCheckBox->setCheckState(Qt::Checked);
- // Open Attachments with external app
- if (settings.value("mime/openAttachment").toBool())
- mimeOpenAttachmentCheckBox->setCheckState(Qt::Checked);
+ // Open Attachments with external app
+ if (settings.value("mime/openAttachment").toBool())
+ mimeOpenAttachmentCheckBox->setCheckState(Qt::Checked);
}
/***********************************
@@ -352,73 +352,88 @@ void MimeTab::setSettings() {
* write them to settings-file
*************************************/
void MimeTab::applySettings() {
- settings.setValue("mime/parsemime", mimeParseCheckBox->isChecked());
- settings.setValue("mime/parseQP", mimeQPCheckBox->isChecked());
- settings.setValue("mime/openAttachment",
- mimeOpenAttachmentCheckBox->isChecked());
+ settings.setValue("mime/parsemime", mimeParseCheckBox->isChecked());
+ settings.setValue("mime/parseQP", mimeQPCheckBox->isChecked());
+ settings.setValue("mime/openAttachment",
+ mimeOpenAttachmentCheckBox->isChecked());
}
AppearanceTab::AppearanceTab(QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
- /*****************************************
- * Icon-Size-Box
- *****************************************/
- auto *iconSizeBox = new QGroupBox(tr("Iconsize"));
- iconSizeGroup = new QButtonGroup();
- iconSizeSmall = new QRadioButton(tr("small"));
- iconSizeMedium = new QRadioButton(tr("medium"));
- iconSizeLarge = new QRadioButton(tr("large"));
-
- iconSizeGroup->addButton(iconSizeSmall, 1);
- iconSizeGroup->addButton(iconSizeMedium, 2);
- iconSizeGroup->addButton(iconSizeLarge, 3);
-
- auto *iconSizeBoxLayout = new QHBoxLayout();
- iconSizeBoxLayout->addWidget(iconSizeSmall);
- iconSizeBoxLayout->addWidget(iconSizeMedium);
- iconSizeBoxLayout->addWidget(iconSizeLarge);
-
- iconSizeBox->setLayout(iconSizeBoxLayout);
-
- /*****************************************
- * Icon-Style-Box
- *****************************************/
- auto *iconStyleBox = new QGroupBox(tr("Iconstyle"));
- iconStyleGroup = new QButtonGroup();
- iconTextButton = new QRadioButton(tr("just text"));
- iconIconsButton = new QRadioButton(tr("just icons"));
- iconAllButton = new QRadioButton(tr("text and icons"));
-
- iconStyleGroup->addButton(iconTextButton, 1);
- iconStyleGroup->addButton(iconIconsButton, 2);
- iconStyleGroup->addButton(iconAllButton, 3);
-
- auto *iconStyleBoxLayout = new QHBoxLayout();
- iconStyleBoxLayout->addWidget(iconTextButton);
- iconStyleBoxLayout->addWidget(iconIconsButton);
- iconStyleBoxLayout->addWidget(iconAllButton);
-
- iconStyleBox->setLayout(iconStyleBoxLayout);
-
- /*****************************************
- * Window-Size-Box
- *****************************************/
- auto *windowSizeBox = new QGroupBox(tr("Windowstate"));
- auto *windowSizeBoxLayout = new QHBoxLayout();
- windowSizeCheckBox =
- new QCheckBox(tr("Save window size and position on exit."), this);
- windowSizeBoxLayout->addWidget(windowSizeCheckBox);
- windowSizeBox->setLayout(windowSizeBoxLayout);
-
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(iconSizeBox);
- mainLayout->addWidget(iconStyleBox);
- mainLayout->addWidget(windowSizeBox);
- mainLayout->addStretch(1);
- setSettings();
- setLayout(mainLayout);
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+ /*****************************************
+ * Icon-Size-Box
+ *****************************************/
+ auto *iconSizeBox = new QGroupBox(tr("Iconsize"));
+ iconSizeGroup = new QButtonGroup();
+ iconSizeSmall = new QRadioButton(tr("small"));
+ iconSizeMedium = new QRadioButton(tr("medium"));
+ iconSizeLarge = new QRadioButton(tr("large"));
+
+ iconSizeGroup->addButton(iconSizeSmall, 1);
+ iconSizeGroup->addButton(iconSizeMedium, 2);
+ iconSizeGroup->addButton(iconSizeLarge, 3);
+
+ auto *iconSizeBoxLayout = new QHBoxLayout();
+ iconSizeBoxLayout->addWidget(iconSizeSmall);
+ iconSizeBoxLayout->addWidget(iconSizeMedium);
+ iconSizeBoxLayout->addWidget(iconSizeLarge);
+
+ iconSizeBox->setLayout(iconSizeBoxLayout);
+
+ /*****************************************
+ * Icon-Style-Box
+ *****************************************/
+ auto *iconStyleBox = new QGroupBox(tr("Iconstyle"));
+ iconStyleGroup = new QButtonGroup();
+ iconTextButton = new QRadioButton(tr("just text"));
+ iconIconsButton = new QRadioButton(tr("just icons"));
+ iconAllButton = new QRadioButton(tr("text and icons"));
+
+ iconStyleGroup->addButton(iconTextButton, 1);
+ iconStyleGroup->addButton(iconIconsButton, 2);
+ iconStyleGroup->addButton(iconAllButton, 3);
+
+ auto *iconStyleBoxLayout = new QHBoxLayout();
+ iconStyleBoxLayout->addWidget(iconTextButton);
+ iconStyleBoxLayout->addWidget(iconIconsButton);
+ iconStyleBoxLayout->addWidget(iconAllButton);
+
+ iconStyleBox->setLayout(iconStyleBoxLayout);
+
+ /*****************************************
+ * Window-Size-Box
+ *****************************************/
+ auto *windowSizeBox = new QGroupBox(tr("Windowstate"));
+ auto *windowSizeBoxLayout = new QHBoxLayout();
+ windowSizeCheckBox =
+ new QCheckBox(tr("Save window size and position on exit."), this);
+ windowSizeBoxLayout->addWidget(windowSizeCheckBox);
+ windowSizeBox->setLayout(windowSizeBoxLayout);
+
+ /*****************************************
+ * Info-Board-Font-Size-Box
+ *****************************************/
+
+ auto *infoBoardBox = new QGroupBox(tr("Information Board"));
+ auto *infoBoardLayout = new QHBoxLayout();
+ infoBoardFontSizeSpin = new QSpinBox();
+ infoBoardFontSizeSpin->setRange(9, 18);
+ infoBoardFontSizeSpin->setValue(10);
+ infoBoardFontSizeSpin->setSingleStep(1);
+ infoBoardLayout->addWidget(new QLabel(" Front Size"));
+ infoBoardLayout->addWidget(infoBoardFontSizeSpin);
+ infoBoardBox->setLayout(infoBoardLayout);
+
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(iconSizeBox);
+ mainLayout->addWidget(iconStyleBox);
+ mainLayout->addWidget(windowSizeBox);
+ mainLayout->addWidget(infoBoardBox);
+ mainLayout->addStretch(1);
+ setSettings();
+ setLayout(mainLayout);
}
/**********************************
@@ -428,40 +443,46 @@ AppearanceTab::AppearanceTab(QWidget *parent)
**********************************/
void AppearanceTab::setSettings() {
- // Iconsize
- QSize iconSize = settings.value("toolbar/iconsize", QSize(24, 24)).toSize();
- switch (iconSize.height()) {
- case 12:
- iconSizeSmall->setChecked(true);
- break;
- case 24:
- iconSizeMedium->setChecked(true);
- break;
- case 32:
- iconSizeLarge->setChecked(true);
- break;
- }
- // Iconstyle
- Qt::ToolButtonStyle iconStyle = static_cast<Qt::ToolButtonStyle>(
- settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon)
- .toUInt());
- switch (iconStyle) {
- case Qt::ToolButtonTextOnly:
- iconTextButton->setChecked(true);
- break;
- case Qt::ToolButtonIconOnly:
- iconIconsButton->setChecked(true);
- break;
- case Qt::ToolButtonTextUnderIcon:
- iconAllButton->setChecked(true);
- break;
- default:
- break;
- }
-
- // Window Save and Position
- if (settings.value("window/windowSave").toBool())
- windowSizeCheckBox->setCheckState(Qt::Checked);
+ // Iconsize
+ QSize iconSize = settings.value("toolbar/iconsize", QSize(24, 24)).toSize();
+ switch (iconSize.height()) {
+ case 12:
+ iconSizeSmall->setChecked(true);
+ break;
+ case 24:
+ iconSizeMedium->setChecked(true);
+ break;
+ case 32:
+ iconSizeLarge->setChecked(true);
+ break;
+ }
+ // Iconstyle
+ Qt::ToolButtonStyle iconStyle = static_cast<Qt::ToolButtonStyle>(
+ settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon)
+ .toUInt());
+ switch (iconStyle) {
+ case Qt::ToolButtonTextOnly:
+ iconTextButton->setChecked(true);
+ break;
+ case Qt::ToolButtonIconOnly:
+ iconIconsButton->setChecked(true);
+ break;
+ case Qt::ToolButtonTextUnderIcon:
+ iconAllButton->setChecked(true);
+ break;
+ default:
+ break;
+ }
+
+ // Window Save and Position
+ if (settings.value("window/windowSave").toBool())
+ windowSizeCheckBox->setCheckState(Qt::Checked);
+
+ // infoBoardFontSize
+ auto infoBoardFontSize = settings.value("informationBoard/fontSize", 10).toInt();
+ if(infoBoardFontSize < 9 || infoBoardFontSize > 18)
+ infoBoardFontSize = 10;
+ infoBoardFontSizeSpin->setValue(infoBoardFontSize);
}
/***********************************
@@ -469,72 +490,74 @@ void AppearanceTab::setSettings() {
* write them to settings-file
*************************************/
void AppearanceTab::applySettings() {
- switch (iconSizeGroup->checkedId()) {
- case 1:
- settings.setValue("toolbar/iconsize", QSize(12, 12));
- break;
- case 2:
- settings.setValue("toolbar/iconsize", QSize(24, 24));
- break;
- case 3:
- settings.setValue("toolbar/iconsize", QSize(32, 32));
- break;
- }
-
- switch (iconStyleGroup->checkedId()) {
- case 1:
- settings.setValue("toolbar/iconstyle", Qt::ToolButtonTextOnly);
- break;
- case 2:
- settings.setValue("toolbar/iconstyle", Qt::ToolButtonIconOnly);
- break;
- case 3:
- settings.setValue("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon);
- break;
- }
-
- settings.setValue("window/windowSave", windowSizeCheckBox->isChecked());
+ switch (iconSizeGroup->checkedId()) {
+ case 1:
+ settings.setValue("toolbar/iconsize", QSize(12, 12));
+ break;
+ case 2:
+ settings.setValue("toolbar/iconsize", QSize(24, 24));
+ break;
+ case 3:
+ settings.setValue("toolbar/iconsize", QSize(32, 32));
+ break;
+ }
+
+ switch (iconStyleGroup->checkedId()) {
+ case 1:
+ settings.setValue("toolbar/iconstyle", Qt::ToolButtonTextOnly);
+ break;
+ case 2:
+ settings.setValue("toolbar/iconstyle", Qt::ToolButtonIconOnly);
+ break;
+ case 3:
+ settings.setValue("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon);
+ break;
+ }
+
+ settings.setValue("window/windowSave", windowSizeCheckBox->isChecked());
+
+ settings.setValue("informationBoard/fontSize", infoBoardFontSizeSpin->value());
}
KeyserverTab::KeyserverTab(QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
-
- auto keyServerList = settings.value("keyserver/keyServerList").toStringList();
-
- auto *mainLayout = new QVBoxLayout(this);
-
- auto *label = new QLabel(tr("Default Keyserver for import:"));
- comboBox = new QComboBox;
- comboBox->setEditable(false);
- comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-
- for (const auto &keyServer : keyServerList) {
- comboBox->addItem(keyServer);
- qDebug() << "KeyserverTab Get ListItemText" << keyServer;
- }
-
- comboBox->setCurrentText(
- settings.value("keyserver/defaultKeyServer").toString());
-
- auto *addKeyServerBox = new QWidget(this);
- auto *addKeyServerLayout = new QHBoxLayout(addKeyServerBox);
- auto *http = new QLabel("URL: ");
- newKeyServerEdit = new QLineEdit(this);
- auto *newKeyServerButton = new QPushButton(tr("Add"), this);
- connect(newKeyServerButton, SIGNAL(clicked()), this, SLOT(addKeyServer()));
- addKeyServerLayout->addWidget(http);
- addKeyServerLayout->addWidget(newKeyServerEdit);
- addKeyServerLayout->addWidget(newKeyServerButton);
-
- mainLayout->addWidget(label);
- mainLayout->addWidget(comboBox);
- mainLayout->addWidget(addKeyServerBox);
- mainLayout->addStretch(1);
-
- // Read keylist from ini-file and fill it into combobox
- setSettings();
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+
+ auto keyServerList = settings.value("keyserver/keyServerList").toStringList();
+
+ auto *mainLayout = new QVBoxLayout(this);
+
+ auto *label = new QLabel(tr("Default Keyserver for import:"));
+ comboBox = new QComboBox;
+ comboBox->setEditable(false);
+ comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+
+ for (const auto &keyServer : keyServerList) {
+ comboBox->addItem(keyServer);
+ qDebug() << "KeyserverTab Get ListItemText" << keyServer;
+ }
+
+ comboBox->setCurrentText(
+ settings.value("keyserver/defaultKeyServer").toString());
+
+ auto *addKeyServerBox = new QWidget(this);
+ auto *addKeyServerLayout = new QHBoxLayout(addKeyServerBox);
+ auto *http = new QLabel("URL: ");
+ newKeyServerEdit = new QLineEdit(this);
+ auto *newKeyServerButton = new QPushButton(tr("Add"), this);
+ connect(newKeyServerButton, SIGNAL(clicked()), this, SLOT(addKeyServer()));
+ addKeyServerLayout->addWidget(http);
+ addKeyServerLayout->addWidget(newKeyServerEdit);
+ addKeyServerLayout->addWidget(newKeyServerButton);
+
+ mainLayout->addWidget(label);
+ mainLayout->addWidget(comboBox);
+ mainLayout->addWidget(addKeyServerBox);
+ mainLayout->addStretch(1);
+
+ // Read keylist from ini-file and fill it into combobox
+ setSettings();
}
/**********************************
@@ -543,23 +566,23 @@ KeyserverTab::KeyserverTab(QWidget *parent)
* appropriately
**********************************/
void KeyserverTab::setSettings() {
- auto *keyServerList = new QStringList();
- for (int i = 0; i < comboBox->count(); i++) {
- keyServerList->append(comboBox->itemText(i));
- qDebug() << "KeyserverTab ListItemText" << comboBox->itemText(i);
- }
- settings.setValue("keyserver/keyServerList", *keyServerList);
- settings.setValue("keyserver/defaultKeyServer", comboBox->currentText());
+ auto *keyServerList = new QStringList();
+ for (int i = 0; i < comboBox->count(); i++) {
+ keyServerList->append(comboBox->itemText(i));
+ qDebug() << "KeyserverTab ListItemText" << comboBox->itemText(i);
+ }
+ settings.setValue("keyserver/keyServerList", *keyServerList);
+ settings.setValue("keyserver/defaultKeyServer", comboBox->currentText());
}
void KeyserverTab::addKeyServer() {
- if (newKeyServerEdit->text().startsWith("http://") ||
- newKeyServerEdit->text().startsWith("https://")) {
- comboBox->addItem(newKeyServerEdit->text());
- } else {
- comboBox->addItem("http://" + newKeyServerEdit->text());
- }
- comboBox->setCurrentIndex(comboBox->count() - 1);
+ if (newKeyServerEdit->text().startsWith("http://") ||
+ newKeyServerEdit->text().startsWith("https://")) {
+ comboBox->addItem(newKeyServerEdit->text());
+ } else {
+ comboBox->addItem("http://" + newKeyServerEdit->text());
+ }
+ comboBox->setCurrentIndex(comboBox->count() - 1);
}
/***********************************
@@ -567,112 +590,112 @@ void KeyserverTab::addKeyServer() {
* write them to settings-file
*************************************/
void KeyserverTab::applySettings() {
- settings.setValue("keyserver/defaultKeyServer", comboBox->currentText());
+ settings.setValue("keyserver/defaultKeyServer", comboBox->currentText());
}
AdvancedTab::AdvancedTab(QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
- /*****************************************
- * Steganography Box
- *****************************************/
- auto *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
- auto *steganoBoxLayout = new QHBoxLayout();
- steganoCheckBox = new QCheckBox(tr("Show Steganographic Options."), this);
- steganoBoxLayout->addWidget(steganoCheckBox);
- steganoBox->setLayout(steganoBoxLayout);
-
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(steganoBox);
- setSettings();
- mainLayout->addStretch(1);
- setLayout(mainLayout);
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+ /*****************************************
+ * Steganography Box
+ *****************************************/
+ auto *steganoBox = new QGroupBox(tr("Show Steganography Options [Advanced]"));
+ auto *steganoBoxLayout = new QHBoxLayout();
+ steganoCheckBox = new QCheckBox(tr("Show Steganographic Options."), this);
+ steganoBoxLayout->addWidget(steganoCheckBox);
+ steganoBox->setLayout(steganoBoxLayout);
+
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(steganoBox);
+ setSettings();
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
}
void AdvancedTab::setSettings() {
- if (settings.value("advanced/steganography").toBool()) {
- steganoCheckBox->setCheckState(Qt::Checked);
- }
+ if (settings.value("advanced/steganography").toBool()) {
+ steganoCheckBox->setCheckState(Qt::Checked);
+ }
}
void AdvancedTab::applySettings() {
- settings.setValue("advanced/steganography", steganoCheckBox->isChecked());
+ settings.setValue("advanced/steganography", steganoCheckBox->isChecked());
}
GpgPathsTab::GpgPathsTab(QWidget *parent)
- : QWidget(parent), appPath(qApp->applicationDirPath()),
- settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
- QSettings::IniFormat) {
- setSettings();
-
- /*****************************************
- * Keydb Box
- *****************************************/
- auto *keydbBox = new QGroupBox(tr("Relative path to keydb"));
- auto *keydbBoxLayout = new QGridLayout();
-
- // Label containing the current keydbpath relative to default keydb path
- keydbLabel = new QLabel(accKeydbPath, this);
-
- auto *keydbButton = new QPushButton("Change keydb path", this);
- connect(keydbButton, SIGNAL(clicked()), this, SLOT(chooseKeydbDir()));
- auto *keydbDefaultButton = new QPushButton("Set keydb to default path", this);
- connect(keydbDefaultButton, SIGNAL(clicked()), this,
- SLOT(setKeydbPathToDefault()));
-
- keydbBox->setLayout(keydbBoxLayout);
- keydbBoxLayout->addWidget(new QLabel(tr("Current keydb path: ")), 1, 1);
- keydbBoxLayout->addWidget(keydbLabel, 1, 2);
- keydbBoxLayout->addWidget(keydbButton, 1, 3);
- keydbBoxLayout->addWidget(keydbDefaultButton, 2, 3);
- keydbBoxLayout->addWidget(
- new QLabel(tr("<b>NOTE: </b> Gpg4usb will restart automatically if you "
- "change the keydb path!")),
- 3, 1, 1, 3);
-
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(keydbBox);
- mainLayout->addStretch(1);
- setLayout(mainLayout);
+ : QWidget(parent), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
+ setSettings();
+
+ /*****************************************
+ * Keydb Box
+ *****************************************/
+ auto *keydbBox = new QGroupBox(tr("Relative path to keydb"));
+ auto *keydbBoxLayout = new QGridLayout();
+
+ // Label containing the current keydbpath relative to default keydb path
+ keydbLabel = new QLabel(accKeydbPath, this);
+
+ auto *keydbButton = new QPushButton("Change keydb path", this);
+ connect(keydbButton, SIGNAL(clicked()), this, SLOT(chooseKeydbDir()));
+ auto *keydbDefaultButton = new QPushButton("Set keydb to default path", this);
+ connect(keydbDefaultButton, SIGNAL(clicked()), this,
+ SLOT(setKeydbPathToDefault()));
+
+ keydbBox->setLayout(keydbBoxLayout);
+ keydbBoxLayout->addWidget(new QLabel(tr("Current keydb path: ")), 1, 1);
+ keydbBoxLayout->addWidget(keydbLabel, 1, 2);
+ keydbBoxLayout->addWidget(keydbButton, 1, 3);
+ keydbBoxLayout->addWidget(keydbDefaultButton, 2, 3);
+ keydbBoxLayout->addWidget(
+ new QLabel(tr("<b>NOTE: </b> Gpg4usb will restart automatically if you "
+ "change the keydb path!")),
+ 3, 1, 1, 3);
+
+ auto *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(keydbBox);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
}
QString GpgPathsTab::getRelativePath(const QString &dir1, const QString &dir2) {
- QDir dir(dir1);
- QString s;
-
- s = dir.relativeFilePath(dir2);
- qDebug() << "relative path: " << s;
- if (s.isEmpty()) {
- s = ".";
- }
- return s;
+ QDir dir(dir1);
+ QString s;
+
+ s = dir.relativeFilePath(dir2);
+ qDebug() << "relative path: " << s;
+ if (s.isEmpty()) {
+ s = ".";
+ }
+ return s;
}
void GpgPathsTab::setKeydbPathToDefault() {
- accKeydbPath = ".";
- keydbLabel->setText(".");
+ accKeydbPath = ".";
+ keydbLabel->setText(".");
}
QString GpgPathsTab::chooseKeydbDir() {
- QString dir = QFileDialog::getExistingDirectory(
- this, tr("Choose keydb directory"), accKeydbPath,
- QFileDialog::ShowDirsOnly);
+ QString dir = QFileDialog::getExistingDirectory(
+ this, tr("Choose keydb directory"), accKeydbPath,
+ QFileDialog::ShowDirsOnly);
- accKeydbPath = getRelativePath(defKeydbPath, dir);
- keydbLabel->setText(accKeydbPath);
- return "";
+ accKeydbPath = getRelativePath(defKeydbPath, dir);
+ keydbLabel->setText(accKeydbPath);
+ return "";
}
void GpgPathsTab::setSettings() {
- defKeydbPath = qApp->applicationDirPath() + "/keydb";
+ defKeydbPath = qApp->applicationDirPath() + "/keydb";
- accKeydbPath = settings.value("gpgpaths/keydbpath").toString();
- if (accKeydbPath.isEmpty()) {
- accKeydbPath = ".";
- }
+ accKeydbPath = settings.value("gpgpaths/keydbpath").toString();
+ if (accKeydbPath.isEmpty()) {
+ accKeydbPath = ".";
+ }
}
void GpgPathsTab::applySettings() {
- settings.setValue("gpgpaths/keydbpath", accKeydbPath);
+ settings.setValue("gpgpaths/keydbpath", accKeydbPath);
}
diff --git a/src/ui/WaitingDialog.cpp b/src/ui/WaitingDialog.cpp
index bc21a17d..daccc3ca 100644
--- a/src/ui/WaitingDialog.cpp
+++ b/src/ui/WaitingDialog.cpp
@@ -4,6 +4,7 @@ WaitingDialog::WaitingDialog(const QString &title, QWidget *parent) : QDialog(pa
auto *pb = new QProgressBar();
pb->setRange(0, 0);
pb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ pb->setTextVisible(false);
auto *layout = new QVBoxLayout();
layout->setContentsMargins(0, 0, 0, 0);
diff --git a/src/ui/Wizard.cpp b/src/ui/Wizard.cpp
index 456e8c52..ff6e296c 100644
--- a/src/ui/Wizard.cpp
+++ b/src/ui/Wizard.cpp
@@ -108,16 +108,20 @@ bool Wizard::importPubAndSecKeysFromDir(const QString &dir, KeyMgmt *keyMgmt) {
IntroPage::IntroPage(QWidget *parent)
: QWizardPage(parent), appPath(qApp->applicationDirPath()),
settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) {
- setTitle(tr("Getting started..."));
+ setTitle(tr("Getting Started..."));
setSubTitle(tr("... with GPGFrontend"));
- auto *topLabel = new QLabel(tr("To use GPGFrontend for decrypting and signing messages, you need a "
- "private key. The next page will help you with "
- "key generation or import.<br><br>"
- "For more information have a look at the <a href='docu_concepts.html'>concepts</a> "
- "(by clicking the link, the page will open in the main window). <br>"));
+ auto *topLabel = new QLabel(tr("Welcome to use GPGFrontend for decrypting and signing text or file!")+
+ " <br><br><a href='https://github.com/saturneric/GpgFrontend'>GpgFrontend</a> " +
+ tr("is a Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP Crypto Tool.") +
+ tr("For brief information have a look at the") + "<a href='https://saturneric.github.io/GpgFrontend/index.html#/overview'>"+
+ tr("Overview") +"</a> (" +
+ tr("by clicking the link, the page will open in the web browser") +
+ "). <br>");
+ topLabel->setTextFormat(Qt::RichText);
+ topLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
+ topLabel->setOpenExternalLinks(true);
topLabel->setWordWrap(true);
- // connect(topLabel, SIGNAL(linkActivated(QString)), parentWidget()->parentWidget(), SLOT(openHelp(QString)));
// QComboBox for language selection
auto *langLabel = new QLabel(tr("Choose a Language"));
@@ -162,25 +166,31 @@ ChoosePage::ChoosePage(QWidget *parent)
setSubTitle(tr("...by clicking on the appropriate link."));
auto *keygenLabel = new QLabel(tr("If you have never used GPGFrontend before and also don't own a gpg key yet you "
- "may possibly want to read how to") + "<a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/generate-key\">"
- + tr("create a new keypair") + "</a><hr>");
+ "may possibly want to read how to") + " <a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/generate-key\">"
+ + tr("Generate Key") + "</a><hr>");
keygenLabel->setTextFormat(Qt::RichText);
keygenLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
keygenLabel->setOpenExternalLinks(true);
keygenLabel->setWordWrap(true);
- auto *encrDecyTextLabel = new QLabel(tr("If you want to learn how to encrypt and decrypt text, you can read ")
+ auto *encrDecyTextLabel = new QLabel(tr("If you want to learn how to encrypt, decrypt, sign and verify text, you can read ")
+ "<a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/encrypt-decrypt-text\">"
- + tr("this document") + "</a><hr>");
+ + tr("Encrypt & Decrypt Text") + "</a> " + tr("or")
+ + " <a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/sign-verify-text\">"
+ + tr("Sign & Verify Text")
+ +"</a><hr>");
encrDecyTextLabel->setTextFormat(Qt::RichText);
encrDecyTextLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
encrDecyTextLabel->setOpenExternalLinks(true);
encrDecyTextLabel->setWordWrap(true);
- auto *signVerifyTextLabel = new QLabel(tr("If you want to sign and verify text, you can read ")
- + "<a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/sign-verify-text\">"
- + tr("this document") + "</a>");
+ auto *signVerifyTextLabel = new QLabel(tr("If you want to operate file, you can read ")
+ + "<a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/encrypt-decrypt-file\">"
+ + tr("Encrypt & Sign File") + "</a> " + tr("or")
+ + " <a href=\"https://saturneric.github.io/GpgFrontend/index.html#/manual/sign-verify-file\">"
+ + tr("Sign & Verify File")
+ +"</a><hr>");
signVerifyTextLabel->setTextFormat(Qt::RichText);
signVerifyTextLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
signVerifyTextLabel->setOpenExternalLinks(true);
diff --git a/src/ui/keypair_details/KeyPairDetailTab.cpp b/src/ui/keypair_details/KeyPairDetailTab.cpp
index 013d8e11..f2a3e613 100644
--- a/src/ui/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/keypair_details/KeyPairDetailTab.cpp
@@ -152,8 +152,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &mKey, Q
privKeyBox->setLayout(vboxPK);
mvbox->addWidget(privKeyBox);
-
-
}
if ((mKey.expired) || (mKey.revoked)) {
@@ -179,10 +177,11 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &mKey, Q
mvbox->addLayout(expBox);
}
+ mvbox->setContentsMargins(0, 0, 0, 0);
+
connect(mCtx, SIGNAL(signalKeyInfoChanged()), this, SLOT(slotRefreshKeyInfo()));
slotRefreshKeyInfo();
-
setAttribute(Qt::WA_DeleteOnClose, true);
setLayout(mvbox);
}
diff --git a/src/ui/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
index 70c7e4b8..e909b59d 100644
--- a/src/ui/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
@@ -89,6 +89,8 @@ KeyPairSubkeyTab::KeyPairSubkeyTab(GpgME::GpgContext *ctx, const GpgKey &key, QW
connect(mCtx, SIGNAL(signalKeyInfoChanged()), this, SLOT(slotRefreshSubkeyList()));
connect(subkeyList, SIGNAL(itemSelectionChanged()), this, SLOT(slotRefreshSubkeyDetail()));
+ baseLayout->setContentsMargins(0, 0, 0, 0);
+
setLayout(baseLayout);
setAttribute(Qt::WA_DeleteOnClose, true);
diff --git a/src/ui/keypair_details/KeyPairUIDTab.cpp b/src/ui/keypair_details/KeyPairUIDTab.cpp
index 51f188bd..e9db9eee 100644
--- a/src/ui/keypair_details/KeyPairUIDTab.cpp
+++ b/src/ui/keypair_details/KeyPairUIDTab.cpp
@@ -52,6 +52,7 @@ KeyPairUIDTab::KeyPairUIDTab(GpgME::GpgContext *ctx, const GpgKey &key, QWidget
gridLayout->addWidget(uidList, 0, 0);
gridLayout->addLayout(uidButtonsLayout, 1, 0);
+// gridLayout->setContentsMargins(0, 0, 0, 0);
auto uidGroupBox = new QGroupBox();
uidGroupBox->setLayout(gridLayout);
@@ -59,6 +60,7 @@ KeyPairUIDTab::KeyPairUIDTab(GpgME::GpgContext *ctx, const GpgKey &key, QWidget
auto signGridLayout = new QGridLayout();
signGridLayout->addWidget(sigList, 0, 0);
+// signGridLayout->setContentsMargins(0, 0, 0, 0);
auto signGroupBox = new QGroupBox();
signGroupBox->setLayout(signGridLayout);
@@ -67,6 +69,7 @@ KeyPairUIDTab::KeyPairUIDTab(GpgME::GpgContext *ctx, const GpgKey &key, QWidget
auto vboxLayout = new QVBoxLayout();
vboxLayout->addWidget(uidGroupBox);
vboxLayout->addWidget(signGroupBox);
+ vboxLayout->setContentsMargins(0, 0, 0, 0);
connect(addUIDButton, SIGNAL(clicked(bool)), this, SLOT(slotAddUID()));
connect(mCtx, SIGNAL(signalKeyInfoChanged()), this, SLOT(slotRefreshUIDList()));
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp
index 233a0927..01c9fdde 100644
--- a/src/ui/main_window/MainWindowUI.cpp
+++ b/src/ui/main_window/MainWindowUI.cpp
@@ -231,8 +231,8 @@ void MainWindow::createActions() {
appendSelectedKeysAct->setToolTip(tr("Append The Selected Keys To Text in Editor"));
connect(appendSelectedKeysAct, SIGNAL(triggered()), this, SLOT(slotAppendSelectedKeys()));
- copyMailAddressToClipboardAct = new QAction(tr("Copy EMail-address"), this);
- copyMailAddressToClipboardAct->setToolTip(tr("Copy selected EMailaddress to clipboard"));
+ copyMailAddressToClipboardAct = new QAction(tr("Copy Email"), this);
+ copyMailAddressToClipboardAct->setToolTip(tr("Copy selected Email to clipboard"));
connect(copyMailAddressToClipboardAct, SIGNAL(triggered()), this, SLOT(slotCopyMailAddressToClipboard()));
// TODO: find central place for shared actions, to avoid code-duplication with keymgmt.cpp
@@ -247,6 +247,7 @@ void MainWindow::createActions() {
uploadKeyToServerAct = new QAction(tr("Upload Public Key(s) To Server"), this);
uploadKeyToServerAct->setToolTip(tr("Upload The Selected Public Keys To Server"));
connect(uploadKeyToServerAct, SIGNAL(triggered()), this, SLOT(uploadKeyToServer()));
+
/* Key-Shortcuts for Tab-Switchung-Action
*/
switchTabUpAct = new QAction(this);
diff --git a/src/ui/widgets/InfoBoardWidget.cpp b/src/ui/widgets/InfoBoardWidget.cpp
index 33517a8e..fb1e55d5 100644
--- a/src/ui/widgets/InfoBoardWidget.cpp
+++ b/src/ui/widgets/InfoBoardWidget.cpp
@@ -25,7 +25,9 @@
#include "ui/widgets/InfoBoardWidget.h"
InfoBoardWidget::InfoBoardWidget(QWidget *parent, GpgME::GpgContext *ctx, KeyList *keyList) :
- QWidget(parent), mCtx(ctx), mKeyList(keyList) {
+ QWidget(parent), mCtx(ctx), mKeyList(keyList), appPath(qApp->applicationDirPath()),
+ settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini",
+ QSettings::IniFormat) {
infoBoard = new QTextEdit(this);
infoBoard->setReadOnly(true);
@@ -42,7 +44,7 @@ InfoBoardWidget::InfoBoardWidget(QWidget *parent, GpgME::GpgContext *ctx, KeyLis
detailMenu->addAction(importFromKeyserverAct);
importFromKeyserverAct->setVisible(false);
- QWidget *actionButtonMenu = new QWidget();
+ auto *actionButtonMenu = new QWidget();
actionButtonMenu->setContentsMargins(0, 0, 0, 0);
actionButtonMenu->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
actionButtonMenu->setFixedHeight(36);
@@ -107,7 +109,8 @@ void InfoBoardWidget::setInfoBoard(const QString &text, InfoBoardStatus verifyLa
QPalette status = infoBoard->palette();
status.setColor(QPalette::Text, color);
infoBoard->setPalette(status);
- infoBoard->setFont(QFont("Times", 10));
+ auto infoBoardFontSize = settings.value("informationBoard/fontSize", 10).toInt();
+ infoBoard->setFont(QFont("Times", infoBoardFontSize));
}
void InfoBoardWidget::slotRefresh(const QString &text, InfoBoardStatus status) {
@@ -135,13 +138,16 @@ void InfoBoardWidget::associateTabWidget(QTabWidget *tab) {
disconnect(mTextPage, SIGNAL(textChanged()), this, SLOT(slotReset()));
// if (mFileTreeView != nullptr)
// disconnect(mFileTreeView, &FilePage::pathChanged, this, &InfoBoardWidget::slotReset);
- if (mTabWidget != nullptr)
+ if (mTabWidget != nullptr) {
disconnect(mTabWidget, SIGNAL(tabBarClicked(int)), this, SLOT(slotReset()));
+ connect(mTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(slotReset()));
+ }
mTextPage = nullptr;
mFileTreeView = nullptr;
mTabWidget = tab;
connect(tab, SIGNAL(tabBarClicked(int)), this, SLOT(slotReset()));
+ connect(tab, SIGNAL(tabCloseRequested(int)), this, SLOT(slotReset()));
}
void InfoBoardWidget::addOptionalAction(const QString &name, const std::function<void()> &action) {
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp
index b044020a..3929868e 100644
--- a/src/ui/widgets/KeyList.cpp
+++ b/src/ui/widgets/KeyList.cpp
@@ -297,6 +297,11 @@ void KeyList::contextMenuEvent(QContextMenuEvent *event)
}
+void KeyList::addSeparator()
+{
+ popupMenu->addSeparator();
+}
+
void KeyList::addMenuAction(QAction *act)
{
popupMenu->addAction(act);