summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/configure.cpp
diff options
context:
space:
mode:
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)
111 connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool))); 111 connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool)));
112 connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString))); 112 connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString)));
113 connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int))); 113 connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int)));
114 connect(ui.checkShowProxyPassword, SIGNAL(toggled(bool)), this, SLOT(showProxyPassword(bool)));
114 // delete this dialog after it finished automatically. 115 // delete this dialog after it finished automatically.
115 connect(this, SIGNAL(finished(int)), this, SLOT(deleteLater())); 116 connect(this, SIGNAL(finished(int)), this, SLOT(deleteLater()));
116 117
@@ -309,6 +310,15 @@ void Config::updateCacheInfo(QString path)
309} 310}
310 311
311 312
313void Config::showProxyPassword(bool show)
314{
315 if(show)
316 ui.proxyPass->setEchoMode(QLineEdit::Normal);
317 else
318 ui.proxyPass->setEchoMode(QLineEdit::Password);
319}
320
321
312void Config::showDisabled(bool show) 322void Config::showDisabled(bool show)
313{ 323{
314 qDebug() << "[Config] disabled targets shown:" << show; 324 qDebug() << "[Config] disabled targets shown:" << show;
@@ -471,20 +481,19 @@ void Config::updateEncState()
471 481
472void Config::setNoProxy(bool checked) 482void Config::setNoProxy(bool checked)
473{ 483{
474 bool i = !checked; 484 ui.proxyPort->setEnabled(!checked);
475 ui.proxyPort->setEnabled(i); 485 ui.proxyHost->setEnabled(!checked);
476 ui.proxyHost->setEnabled(i); 486 ui.proxyUser->setEnabled(!checked);
477 ui.proxyUser->setEnabled(i); 487 ui.proxyPass->setEnabled(!checked);
478 ui.proxyPass->setEnabled(i); 488 ui.checkShowProxyPassword->setEnabled(!checked);
489 ui.checkShowProxyPassword->setChecked(false);
490 showProxyPassword(false);
479} 491}
480 492
481 493
482void Config::setSystemProxy(bool checked) 494void Config::setSystemProxy(bool checked)
483{ 495{
484 ui.proxyPort->setEnabled(!checked); 496 setNoProxy(checked);
485 ui.proxyHost->setEnabled(!checked);
486 ui.proxyUser->setEnabled(!checked);
487 ui.proxyPass->setEnabled(!checked);
488 if(checked) { 497 if(checked) {
489 // save values in input box 498 // save values in input box
490 proxy.setScheme("http"); 499 proxy.setScheme("http");