summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/configure.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-03-19 22:01:36 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-03-19 22:47:50 +0100
commit9965849765bb113801d2d4c93e07fc259d307f3e (patch)
tree2e84fe6fde62d1fcb4aa08c16fd913a1307701d1 /rbutil/rbutilqt/configure.cpp
parent0d5883d07a5da22b058cd8deaa054a9afd7210e3 (diff)
downloadrockbox-9965849765bb113801d2d4c93e07fc259d307f3e.tar.gz
rockbox-9965849765bb113801d2d4c93e07fc259d307f3e.tar.bz2
rockbox-9965849765bb113801d2d4c93e07fc259d307f3e.zip
Add option to temporarily show proxy password.
Change-Id: I9c4394dbe679584a0b0f9b6105714176354adfe6
Diffstat (limited to 'rbutil/rbutilqt/configure.cpp')
-rw-r--r--rbutil/rbutilqt/configure.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 075a4876b9..3175ba4430 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -111,6 +111,7 @@ Config::Config(QWidget *parent,int index) : QDialog(parent)
connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool)));
connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString)));
connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int)));
+ connect(ui.checkShowProxyPassword, SIGNAL(toggled(bool)), this, SLOT(showProxyPassword(bool)));
// delete this dialog after it finished automatically.
connect(this, SIGNAL(finished(int)), this, SLOT(deleteLater()));
@@ -309,6 +310,15 @@ void Config::updateCacheInfo(QString path)
}
+void Config::showProxyPassword(bool show)
+{
+ if(show)
+ ui.proxyPass->setEchoMode(QLineEdit::Normal);
+ else
+ ui.proxyPass->setEchoMode(QLineEdit::Password);
+}
+
+
void Config::showDisabled(bool show)
{
qDebug() << "[Config] disabled targets shown:" << show;
@@ -471,20 +481,19 @@ void Config::updateEncState()
void Config::setNoProxy(bool checked)
{
- bool i = !checked;
- ui.proxyPort->setEnabled(i);
- ui.proxyHost->setEnabled(i);
- ui.proxyUser->setEnabled(i);
- ui.proxyPass->setEnabled(i);
+ ui.proxyPort->setEnabled(!checked);
+ ui.proxyHost->setEnabled(!checked);
+ ui.proxyUser->setEnabled(!checked);
+ ui.proxyPass->setEnabled(!checked);
+ ui.checkShowProxyPassword->setEnabled(!checked);
+ ui.checkShowProxyPassword->setChecked(false);
+ showProxyPassword(false);
}
void Config::setSystemProxy(bool checked)
{
- ui.proxyPort->setEnabled(!checked);
- ui.proxyHost->setEnabled(!checked);
- ui.proxyUser->setEnabled(!checked);
- ui.proxyPass->setEnabled(!checked);
+ setNoProxy(checked);
if(checked) {
// save values in input box
proxy.setScheme("http");