aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-09-30 23:20:05 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-09-30 23:20:05 +0000
commit53a7973f51b7e6976c4719074e122bc909267377 (patch)
tree1bd02032a0a6853cac17eb5ad2eb550f531816a4
parentnearly added icon for attachments in statusbar (diff)
downloadgpg4usb-53a7973f51b7e6976c4719074e122bc909267377.tar.gz
gpg4usb-53a7973f51b7e6976c4719074e122bc909267377.zip
now checked keys in the mainwindow's keylist are also checked in the fileencryption dialog's keylist
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@380 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rwxr-xr-xfileencryptiondialog.cpp4
-rwxr-xr-xfileencryptiondialog.h2
-rw-r--r--gpgwin.cpp6
-rw-r--r--keylist.cpp3
4 files changed, 10 insertions, 5 deletions
diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp
index 25db7f0..138a8b4 100755
--- a/fileencryptiondialog.cpp
+++ b/fileencryptiondialog.cpp
@@ -34,7 +34,7 @@
#include "fileencryptiondialog.h"
-FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QWidget *parent)
+FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QStringList keyList, QWidget *parent)
: QDialog(parent)
{
@@ -76,7 +76,7 @@ FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath
mKeyList->hide();
mKeyList->setColumnWidth(2, 150);
mKeyList->setColumnWidth(3, 150);
-
+ mKeyList->setChecked(&keyList);
/* Setup Action */
radioEnc = new QRadioButton(tr("&Encrypt"));
connect(radioEnc, SIGNAL(clicked()), this, SLOT(showKeyList()));
diff --git a/fileencryptiondialog.h b/fileencryptiondialog.h
index 44ad9de..bba1280 100755
--- a/fileencryptiondialog.h
+++ b/fileencryptiondialog.h
@@ -34,7 +34,7 @@ class FileEncryptionDialog : public QDialog
Q_OBJECT
public:
- FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QWidget *parent = 0);
+ FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QStringList keyList , QWidget *parent = 0);
public slots:
void selectInputFile();
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 3619a37..1ab2c11 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -718,9 +718,11 @@ void GpgWin::appendSelectedKeys()
void GpgWin::fileEncryption()
{
- new FileEncryptionDialog(mCtx, iconPath, this);
-
+ QStringList *keyList;
+ keyList = mKeyList->getChecked();
+ new FileEncryptionDialog(mCtx, iconPath, *keyList, this);
}
+
void GpgWin::openSettingsDialog()
{
new SettingsDialog(this);
diff --git a/keylist.cpp b/keylist.cpp
index b26bd78..92481b8 100644
--- a/keylist.cpp
+++ b/keylist.cpp
@@ -63,6 +63,8 @@ KeyList::KeyList(GpgME::Context *ctx, QString iconpath, QWidget *parent)
void KeyList::refresh()
{
+ QStringList *keyList;
+ keyList = getChecked();
// while filling the table, sort enabled causes errors
mKeyList->setSortingEnabled(false);
mKeyList->clearContents();
@@ -95,6 +97,7 @@ void KeyList::refresh()
++row;
}
mKeyList->setSortingEnabled(true);
+ setChecked(keyList);
}