mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
knetattach: update the create button icon and tooltip on page change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
18fb5088d0
commit
92f81d4843
1 changed files with 9 additions and 8 deletions
|
@ -75,7 +75,7 @@ KNetAttach::KNetAttach( QWidget* parent )
|
|||
|
||||
void KNetAttach::slotPageChanged(int)
|
||||
{
|
||||
updateFinishButtonText(true);
|
||||
_createIcon->setChecked(true);
|
||||
}
|
||||
|
||||
void KNetAttach::slotHelpClicked()
|
||||
|
@ -103,13 +103,7 @@ void KNetAttach::updateParametersPageStatus()
|
|||
!_path->text().trimmed().isEmpty() &&
|
||||
!_connectionName->text().trimmed().isEmpty()
|
||||
);
|
||||
if (_createIcon->isChecked() && !_pass->text().trimmed().isEmpty()) {
|
||||
_createIcon->setIcon(KIcon("dialog-warning"));
|
||||
_createIcon->setToolTip(i18n("The plain password will be stored"));
|
||||
} else {
|
||||
_createIcon->setIcon(QIcon());
|
||||
_createIcon->setToolTip(QString());
|
||||
}
|
||||
updateFinishButtonText(_createIcon->isChecked());
|
||||
}
|
||||
|
||||
bool KNetAttach::validateCurrentPage()
|
||||
|
@ -297,6 +291,13 @@ void KNetAttach::updateFinishButtonText(bool save)
|
|||
} else {
|
||||
button(FinishButton)->setText(i18n("C&onnect"));
|
||||
}
|
||||
if (save && !_pass->text().trimmed().isEmpty()) {
|
||||
_createIcon->setIcon(KIcon("dialog-warning"));
|
||||
_createIcon->setToolTip(i18n("The plain password will be stored"));
|
||||
} else {
|
||||
_createIcon->setIcon(QIcon());
|
||||
_createIcon->setToolTip(QString());
|
||||
}
|
||||
}
|
||||
|
||||
// vim: ts=8 sw=4 noet
|
||||
|
|
Loading…
Add table
Reference in a new issue