|
|
@ -112,6 +112,7 @@ AuthDialog::AuthDialog(const TQString &actionId, const TQString &message,
|
|
|
|
m_userData.append(identities[0].toString());
|
|
|
|
m_userData.append(identities[0].toString());
|
|
|
|
m_authWidget->userCB->setCurrentItem(0);
|
|
|
|
m_authWidget->userCB->setCurrentItem(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
on_userCB_currentIndexChanged(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AuthDialog::~AuthDialog()
|
|
|
|
AuthDialog::~AuthDialog()
|
|
|
@ -131,41 +132,41 @@ void AuthDialog::setRequest(const TQString &request, bool requiresAdmin)
|
|
|
|
Identity identity = adminUserSelected();
|
|
|
|
Identity identity = adminUserSelected();
|
|
|
|
if (request.startsWith("password:", false))
|
|
|
|
if (request.startsWith("password:", false))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (requiresAdmin)
|
|
|
|
if (!identity.isValid())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!identity.isValid())
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password for root:"));
|
|
|
|
{
|
|
|
|
}
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password for root:"));
|
|
|
|
else
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else
|
|
|
|
if (!m_authWidget->userCB->isVisible())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString username = identity.toString().remove("unix-user:");
|
|
|
|
TQString username = identity.toString().remove("unix-user:");
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password for %1:").arg(username));
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password for %1:").arg(username));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password:"));
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password:"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (request.startsWith("password or swipe finger:"), false)
|
|
|
|
else if (request.startsWith("password or swipe finger:"), false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (requiresAdmin)
|
|
|
|
if (!identity.isValid())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!identity.isValid())
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger for root:"));
|
|
|
|
{
|
|
|
|
}
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger for root:"));
|
|
|
|
else
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else
|
|
|
|
if (!m_authWidget->userCB->isVisible())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString username = identity.toString().remove("unix-user:");
|
|
|
|
TQString username = identity.toString().remove("unix-user:");
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger for %1:").arg(username));
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger for %1:").arg(username));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger:"));
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password or swipe finger:"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -261,6 +262,7 @@ void AuthDialog::on_userCB_currentIndexChanged(int /*index*/)
|
|
|
|
if (!identity.isValid())
|
|
|
|
if (!identity.isValid())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_authWidget->lePassword->setEnabled(false);
|
|
|
|
m_authWidget->lePassword->setEnabled(false);
|
|
|
|
|
|
|
|
m_authWidget->lblPassword->setText(i18n("Password:"));
|
|
|
|
m_authWidget->lblPassword->setEnabled(false);
|
|
|
|
m_authWidget->lblPassword->setEnabled(false);
|
|
|
|
enableButtonOK(false);
|
|
|
|
enableButtonOK(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -283,7 +285,6 @@ TQString AuthDialog::password() const
|
|
|
|
|
|
|
|
|
|
|
|
void AuthDialog::authenticationFailure()
|
|
|
|
void AuthDialog::authenticationFailure()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO errorMessageKTW->setText(i18n("Authentication failure, please try again."), KTitleWidget::ErrorMessage);
|
|
|
|
|
|
|
|
TQFont bold = font();
|
|
|
|
TQFont bold = font();
|
|
|
|
bold.setBold(true);
|
|
|
|
bold.setBold(true);
|
|
|
|
m_authWidget->errorMessageKTW->setText(i18n("Authentication failure, please try again."));
|
|
|
|
m_authWidget->errorMessageKTW->setText(i18n("Authentication failure, please try again."));
|
|
|
|