aboutsummaryrefslogtreecommitdiffstats
path: root/fileencryptiondialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xfileencryptiondialog.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp
index 8d5e702..93faad1 100755
--- a/fileencryptiondialog.cpp
+++ b/fileencryptiondialog.cpp
@@ -1,3 +1,23 @@
+/*
+ * fileencryptiondialog.cpp
+ *
+ * Copyright 2008 gpg4usb-team <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
#include <QWidget>
#include <QDialogButtonBox>
@@ -84,6 +104,19 @@ void FileEncryptionDialog::selectInputFile()
{
QString infileName = QFileDialog::getOpenFileName(this, tr("Open File"), "", tr("Files") + "All Files (*)");
inputFileEdit->insert(infileName);
+ if(infileName > 0 && outputFileEdit->text().size()==0) {
+ if(radioEnc->isChecked()) {
+ outputFileEdit->setText(infileName+".asc");
+ } else {
+ if (infileName.endsWith(".asc", Qt::CaseInsensitive)) {
+ QString ofn = infileName;
+ ofn.chop(4);
+ outputFileEdit->setText(ofn);
+ } else {
+ outputFileEdit->setText(infileName+".out");
+ }
+ }
+ }
}
void FileEncryptionDialog::selectOutputFile()