From e2b45d83f986ae19f9e78de7b13ae12772a4079c Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 20 Sep 2022 12:14:21 -0400 Subject: [PATCH] 2022-09-20 Fred Gleason * Tweaked the credentials section in the 'Edit Upload' and 'Edit Download' dialogs in rdcatch(1) to indicate whether a 'Password' or a 'Passphrase' is required. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ rdcatch/edit_download.cpp | 15 +++++++++++++++ rdcatch/edit_download.h | 1 + rdcatch/edit_upload.cpp | 15 +++++++++++++++ rdcatch/edit_upload.h | 1 + 5 files changed, 36 insertions(+) diff --git a/ChangeLog b/ChangeLog index 75f4179d..3946600f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23349,3 +23349,7 @@ * Changed the 'RECORDINGS.URL_PASSWORD' from 'varchar(64)' to 'text'. * Base64 encoded the contents of the 'RECORDINGS.URL_PASSWORD' field. * Incremented the database version to 358. +2022-09-20 Fred Gleason + * Tweaked the credentials section in the 'Edit Upload' and + 'Edit Download' dialogs in rdcatch(1) to indicate whether a + 'Password' or a 'Passphrase' is required. diff --git a/rdcatch/edit_download.cpp b/rdcatch/edit_download.cpp index 81780da3..1f236440 100644 --- a/rdcatch/edit_download.cpp +++ b/rdcatch/edit_download.cpp @@ -100,6 +100,8 @@ EditDownload::EditDownload(QString *filter,QWidget *parent) edit_use_id_file_label->setFont(labelFont()); edit_use_id_file_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_use_id_file_check=new QCheckBox(this); + connect(edit_use_id_file_check,SIGNAL(toggled(bool)), + this,SLOT(useIdFileData(bool))); // // Destination @@ -318,10 +320,23 @@ void EditDownload::urlChangedData(const QString &str) if((scheme=="sftp")&&(!rda->station()->sshIdentityFile().isEmpty())) { edit_use_id_file_check->setEnabled(true); edit_use_id_file_label->setEnabled(true); + useIdFileData(edit_use_id_file_check->isChecked()); } else { edit_use_id_file_check->setDisabled(true); edit_use_id_file_label->setDisabled(true); + useIdFileData(false); + } +} + + +void EditDownload::useIdFileData(bool state) +{ + if(state) { + edit_password_label->setText(tr("Passphrase")+":"); + } + else { + edit_password_label->setText(tr("Password")+":"); } } diff --git a/rdcatch/edit_download.h b/rdcatch/edit_download.h index 83eaa7bb..12324ae1 100644 --- a/rdcatch/edit_download.h +++ b/rdcatch/edit_download.h @@ -51,6 +51,7 @@ class EditDownload : public RDDialog private slots: void urlChangedData(const QString &str); + void useIdFileData(bool state); void selectCartData(); void autotrimToggledData(bool state); void normalizeToggledData(bool state); diff --git a/rdcatch/edit_upload.cpp b/rdcatch/edit_upload.cpp index e0e0b838..b6900ede 100644 --- a/rdcatch/edit_upload.cpp +++ b/rdcatch/edit_upload.cpp @@ -116,6 +116,8 @@ EditUpload::EditUpload(QString *filter,QWidget *parent) edit_use_id_file_label->setFont(labelFont()); edit_use_id_file_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_use_id_file_check=new QCheckBox(this); + connect(edit_use_id_file_check,SIGNAL(toggled(bool)), + this,SLOT(useIdFileData(bool))); // // Audio Format @@ -391,10 +393,23 @@ void EditUpload::urlChangedData(const QString &str) (edit_feed_box->currentIndex()==0)) { edit_use_id_file_check->setEnabled(true); edit_use_id_file_label->setEnabled(true); + useIdFileData(edit_use_id_file_check->isChecked()); } else { edit_use_id_file_check->setDisabled(true); edit_use_id_file_label->setDisabled(true); + useIdFileData(false); + } +} + + +void EditUpload::useIdFileData(bool state) +{ + if(state) { + edit_password_label->setText(tr("Passphrase")+":"); + } + else { + edit_password_label->setText(tr("Password")+":"); } } diff --git a/rdcatch/edit_upload.h b/rdcatch/edit_upload.h index 40d88a06..228839b0 100644 --- a/rdcatch/edit_upload.h +++ b/rdcatch/edit_upload.h @@ -52,6 +52,7 @@ class EditUpload : public RDDialog void stationChangedData(const QString &str); void feedChangedData(int index); void urlChangedData(const QString &str); + void useIdFileData(bool state); void selectCartData(); void setFormatData(); void normalizeCheckData(bool state);