diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-03-19 22:01:36 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-03-19 22:47:50 +0100 |
commit | 9965849765bb113801d2d4c93e07fc259d307f3e (patch) | |
tree | 2e84fe6fde62d1fcb4aa08c16fd913a1307701d1 /rbutil | |
parent | 0d5883d07a5da22b058cd8deaa054a9afd7210e3 (diff) | |
download | rockbox-9965849765bb113801d2d4c93e07fc259d307f3e.tar.gz rockbox-9965849765bb113801d2d4c93e07fc259d307f3e.zip |
Add option to temporarily show proxy password.
Change-Id: I9c4394dbe679584a0b0f9b6105714176354adfe6
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/configure.cpp | 27 | ||||
-rw-r--r-- | rbutil/rbutilqt/configure.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/configurefrm.ui | 33 |
3 files changed, 39 insertions, 22 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 | ||
313 | void 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 | |||
312 | void Config::showDisabled(bool show) | 322 | void 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 | ||
472 | void Config::setNoProxy(bool checked) | 482 | void 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 | ||
482 | void Config::setSystemProxy(bool checked) | 494 | void 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"); |
diff --git a/rbutil/rbutilqt/configure.h b/rbutil/rbutilqt/configure.h index ec9aebfa00..dd80f65b31 100644 --- a/rbutil/rbutilqt/configure.h +++ b/rbutil/rbutilqt/configure.h | |||
@@ -56,6 +56,7 @@ class Config : public QDialog | |||
56 | void changeEvent(QEvent *event); | 56 | void changeEvent(QEvent *event); |
57 | 57 | ||
58 | private slots: | 58 | private slots: |
59 | void showProxyPassword(bool show); | ||
59 | void setNoProxy(bool); | 60 | void setNoProxy(bool); |
60 | void setSystemProxy(bool); | 61 | void setSystemProxy(bool); |
61 | void updateLanguage(void); | 62 | void updateLanguage(void); |
diff --git a/rbutil/rbutilqt/configurefrm.ui b/rbutil/rbutilqt/configurefrm.ui index 491c896907..b0111ac940 100644 --- a/rbutil/rbutilqt/configurefrm.ui +++ b/rbutil/rbutilqt/configurefrm.ui | |||
@@ -176,13 +176,6 @@ | |||
176 | </property> | 176 | </property> |
177 | </widget> | 177 | </widget> |
178 | </item> | 178 | </item> |
179 | <item row="0" column="1"> | ||
180 | <widget class="QLineEdit" name="proxyHost"> | ||
181 | <property name="frame"> | ||
182 | <bool>true</bool> | ||
183 | </property> | ||
184 | </widget> | ||
185 | </item> | ||
186 | <item row="1" column="0"> | 179 | <item row="1" column="0"> |
187 | <widget class="QLabel" name="label_2"> | 180 | <widget class="QLabel" name="label_2"> |
188 | <property name="text"> | 181 | <property name="text"> |
@@ -193,12 +186,6 @@ | |||
193 | </property> | 186 | </property> |
194 | </widget> | 187 | </widget> |
195 | </item> | 188 | </item> |
196 | <item row="1" column="1"> | ||
197 | <widget class="QLineEdit" name="proxyPort"/> | ||
198 | </item> | ||
199 | <item row="2" column="1"> | ||
200 | <widget class="QLineEdit" name="proxyUser"/> | ||
201 | </item> | ||
202 | <item row="3" column="1"> | 189 | <item row="3" column="1"> |
203 | <widget class="QLineEdit" name="proxyPass"> | 190 | <widget class="QLineEdit" name="proxyPass"> |
204 | <property name="echoMode"> | 191 | <property name="echoMode"> |
@@ -226,6 +213,26 @@ | |||
226 | </property> | 213 | </property> |
227 | </widget> | 214 | </widget> |
228 | </item> | 215 | </item> |
216 | <item row="3" column="2"> | ||
217 | <widget class="QCheckBox" name="checkShowProxyPassword"> | ||
218 | <property name="text"> | ||
219 | <string>Show</string> | ||
220 | </property> | ||
221 | </widget> | ||
222 | </item> | ||
223 | <item row="2" column="1" colspan="2"> | ||
224 | <widget class="QLineEdit" name="proxyUser"/> | ||
225 | </item> | ||
226 | <item row="1" column="1" colspan="2"> | ||
227 | <widget class="QLineEdit" name="proxyPort"/> | ||
228 | </item> | ||
229 | <item row="0" column="1" colspan="2"> | ||
230 | <widget class="QLineEdit" name="proxyHost"> | ||
231 | <property name="frame"> | ||
232 | <bool>true</bool> | ||
233 | </property> | ||
234 | </widget> | ||
235 | </item> | ||
229 | </layout> | 236 | </layout> |
230 | </widget> | 237 | </widget> |
231 | </item> | 238 | </item> |