Commit 4f368e2b authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

clean up KgpgSelectPublicKeyDlg to have only actually used stuff in interface

svn path=/branches/work/kgpg2/; revision=764197
parent 8d53109a
......@@ -153,7 +153,7 @@ void MyView::clipEncrypt()
KPassivePopup::message(i18n("Clipboard is empty."), QString(), Images::kgpg(), trayIcon);
else
{
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, 0, false, goDefaultKey);
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, 0, goDefaultKey);
if (dialog->exec() == KDialog::Accepted)
{
QStringList options;
......@@ -231,7 +231,7 @@ void MyView::encryptDroppedFolder()
return;
/*
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, 0, false, true, goDefaultKey);
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, 0, true, goDefaultKey);
if (dialog->exec() == KDialog::Accepted)
{
QStringList options;
......@@ -250,7 +250,7 @@ void MyView::encryptDroppedFolder()
// TODO !!! CHANGE dialog, remove connect
dialog = new KgpgSelectPublicKeyDlg(0, droppedUrls.first().fileName(), true, goDefaultKey);
dialog = new KgpgSelectPublicKeyDlg(0, droppedUrls.first().fileName(), goDefaultKey);
KHBox *bGroup = new KHBox(dialog->optionsbox);
......
......@@ -62,7 +62,7 @@ void KgpgLibrary::slotFileEnc(const KUrl::List &urls, const QStringList &opts, c
if (urls.count() > 1)
fileNames += ",...";
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, fileNames, true, goDefaultKey);
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(0, fileNames, goDefaultKey);
if (dialog->exec() == KDialog::Accepted)
{
QStringList options;
......
......@@ -105,7 +105,7 @@ void KgpgTextEdit::slotDroppedFile(const KUrl &url)
void KgpgTextEdit::slotEncode()
{
// TODO : goDefaultKey shortcut
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(this, 0, false, KShortcut(QKeySequence(Qt::CTRL + Qt::Key_Home)), true);
KgpgSelectPublicKeyDlg *dialog = new KgpgSelectPublicKeyDlg(this, 0, KShortcut(QKeySequence(Qt::CTRL + Qt::Key_Home)), true);
if (dialog->exec() == KDialog::Accepted)
{
QStringList options;
......
......@@ -80,17 +80,7 @@ private:
class KgpgListViewSearchLine : public K3ListViewSearchLine
{
public:
KgpgListViewSearchLine (QWidget *parent = 0, KgpgSelectPublicKeyDlg *dialog = 0, K3ListView *listView = 0) : K3ListViewSearchLine(parent, listView)
{
setDialog(dialog);
}
KgpgListViewSearchLine (QWidget *parent, const QList<K3ListView*> &listViews, KgpgSelectPublicKeyDlg *dialog = 0) : K3ListViewSearchLine(parent, listViews)
{
setDialog(dialog);
}
void setDialog(KgpgSelectPublicKeyDlg *dialog)
KgpgListViewSearchLine (QWidget *parent = 0, KgpgSelectPublicKeyDlg *dialog = 0) : K3ListViewSearchLine(parent, 0)
{
m_dialog = dialog;
}
......@@ -117,7 +107,7 @@ private:
KgpgSelectPublicKeyDlg *m_dialog;
};
KgpgSelectPublicKeyDlg::KgpgSelectPublicKeyDlg(QWidget *parent, const QString &sfile, const bool &filemode, const KShortcut &goDefaultKey, const bool &hideasciioption)
KgpgSelectPublicKeyDlg::KgpgSelectPublicKeyDlg(QWidget *parent, const QString &sfile, const KShortcut &goDefaultKey, const bool &hideasciioption)
: KDialog(parent)
{
setCaption(i18n("Select Public Key"));
......@@ -125,7 +115,7 @@ KgpgSelectPublicKeyDlg::KgpgSelectPublicKeyDlg(QWidget *parent, const QString &s
setDefaultButton(Ok);
setButtonText(Details, i18n("O&ptions"));
m_fmode = filemode;
m_fmode = (sfile != NULL);
if (m_fmode)
setCaption(i18n("Select Public Key for %1", sfile));
......
......@@ -43,7 +43,7 @@ public:
/* TODO: the goDefaultKey shortcut should be stored in a way it can be accessed from everywhere. So we don't have to pass it as an argument.
*/
explicit KgpgSelectPublicKeyDlg(QWidget *parent = 0, const QString &sfile = "", const bool &filemode = false, const KShortcut &goDefaultKey = KShortcut(QKeySequence(Qt::CTRL + Qt::Key_Home)), const bool &hideasciioption = false);
explicit KgpgSelectPublicKeyDlg(QWidget *parent = 0, const QString &sfile = "", const KShortcut &goDefaultKey = KShortcut(QKeySequence(Qt::CTRL + Qt::Key_Home)), const bool &hideasciioption = false);
QStringList selectedKeys() const;
QString getCustomOptions() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment