summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager/passworddlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/hwmanager/passworddlg.cpp')
-rw-r--r--kcontrol/hwmanager/passworddlg.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/kcontrol/hwmanager/passworddlg.cpp b/kcontrol/hwmanager/passworddlg.cpp
index d9f1f54a6..07b6027ae 100644
--- a/kcontrol/hwmanager/passworddlg.cpp
+++ b/kcontrol/hwmanager/passworddlg.cpp
@@ -22,20 +22,14 @@
#include "passworddlg.h"
-PasswordDlg::PasswordDlg(TQString url, TQString iconName) :
- KDialogBase(NULL, "PasswordDlg", true, i18n("Unlock Storage Device"), (Cancel|User1), User1, false, KGuiItem(i18n("Unlock"), "unlocked" ))
+PasswordDlg::PasswordDlg() :
+ KDialogBase(NULL, "PasswordDlg", true, i18n("Unlock Storage Device"), (Cancel|User1),
+ User1, false, KGuiItem(i18n("Unlock"), "unlocked" ))
{
unlockDialog = new UnlockDialog(this);
-
- unlockDialog->descLabel->setText(unlockDialog->descLabel->text().arg(url));
- unlockDialog->descLabel->adjustSize();
- unlockDialog->adjustSize();
-
enableButton( User1, false );
-
- TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon(iconName, TDEIcon::NoGroup, TDEIcon::SizeLarge);
- unlockDialog->encryptedIcon->setPixmap( pixmap );
-
+ unlockDialog->encryptedIcon->setPixmap(TDEGlobal::iconLoader()->loadIcon("drive-harddisk-locked",
+ TDEIcon::NoGroup, TDEIcon::SizeLarge));
connect(unlockDialog->passwordEdit, TQT_SIGNAL (textChanged(const TQString &)), this, TQT_SLOT (slotPasswordChanged(const TQString &)));
setMainWidget(unlockDialog);
@@ -46,6 +40,19 @@ PasswordDlg::~PasswordDlg()
delete unlockDialog;
}
+void PasswordDlg::setDevice(TQString deviceName)
+{
+ unlockDialog->descLabel->setText("<p><b>" + deviceName + "</b> is an encrypted storage device.</p>"
+ "<p>Please enter the password to unlock the storage device.</p>");
+ unlockDialog->descLabel->adjustSize();
+ unlockDialog->adjustSize();
+}
+
+void PasswordDlg::clearPassword()
+{
+ unlockDialog->passwordEdit->setText(TQString::null);
+}
+
TQString PasswordDlg::getPassword()
{
return unlockDialog->passwordEdit->text();