forked from len0rd/rockbox
Add option to temporarily show proxy password.
Change-Id: I9c4394dbe679584a0b0f9b6105714176354adfe6
This commit is contained in:
parent
0d5883d07a
commit
9965849765
3 changed files with 39 additions and 22 deletions
|
|
@ -111,6 +111,7 @@ Config::Config(QWidget *parent,int index) : QDialog(parent)
|
||||||
connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool)));
|
connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool)));
|
||||||
connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString)));
|
connect(ui.mountPoint, SIGNAL(editTextChanged(QString)), this, SLOT(updateMountpoint(QString)));
|
||||||
connect(ui.mountPoint, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMountpoint(int)));
|
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.
|
// delete this dialog after it finished automatically.
|
||||||
connect(this, SIGNAL(finished(int)), this, SLOT(deleteLater()));
|
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)
|
void Config::showDisabled(bool show)
|
||||||
{
|
{
|
||||||
qDebug() << "[Config] disabled targets shown:" << show;
|
qDebug() << "[Config] disabled targets shown:" << show;
|
||||||
|
|
@ -471,20 +481,19 @@ void Config::updateEncState()
|
||||||
|
|
||||||
void Config::setNoProxy(bool checked)
|
void Config::setNoProxy(bool checked)
|
||||||
{
|
{
|
||||||
bool i = !checked;
|
ui.proxyPort->setEnabled(!checked);
|
||||||
ui.proxyPort->setEnabled(i);
|
ui.proxyHost->setEnabled(!checked);
|
||||||
ui.proxyHost->setEnabled(i);
|
ui.proxyUser->setEnabled(!checked);
|
||||||
ui.proxyUser->setEnabled(i);
|
ui.proxyPass->setEnabled(!checked);
|
||||||
ui.proxyPass->setEnabled(i);
|
ui.checkShowProxyPassword->setEnabled(!checked);
|
||||||
|
ui.checkShowProxyPassword->setChecked(false);
|
||||||
|
showProxyPassword(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Config::setSystemProxy(bool checked)
|
void Config::setSystemProxy(bool checked)
|
||||||
{
|
{
|
||||||
ui.proxyPort->setEnabled(!checked);
|
setNoProxy(checked);
|
||||||
ui.proxyHost->setEnabled(!checked);
|
|
||||||
ui.proxyUser->setEnabled(!checked);
|
|
||||||
ui.proxyPass->setEnabled(!checked);
|
|
||||||
if(checked) {
|
if(checked) {
|
||||||
// save values in input box
|
// save values in input box
|
||||||
proxy.setScheme("http");
|
proxy.setScheme("http");
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ class Config : public QDialog
|
||||||
void changeEvent(QEvent *event);
|
void changeEvent(QEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void showProxyPassword(bool show);
|
||||||
void setNoProxy(bool);
|
void setNoProxy(bool);
|
||||||
void setSystemProxy(bool);
|
void setSystemProxy(bool);
|
||||||
void updateLanguage(void);
|
void updateLanguage(void);
|
||||||
|
|
|
||||||
|
|
@ -176,13 +176,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="proxyHost">
|
|
||||||
<property name="frame">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -193,12 +186,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="proxyPort"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="proxyUser"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="proxyPass">
|
<widget class="QLineEdit" name="proxyPass">
|
||||||
<property name="echoMode">
|
<property name="echoMode">
|
||||||
|
|
@ -226,6 +213,26 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QCheckBox" name="checkShowProxyPassword">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="proxyUser"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="proxyPort"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="proxyHost">
|
||||||
|
<property name="frame">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue