summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager/passworddlg.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-11-21 17:49:23 +0800
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-11-21 17:49:23 +0800
commitd39c407bf49fab58fa53c20bb3d301ee6e709c32 (patch)
tree9bc93b5ecaf45943c3db3304f444a79eb1c780ed /kcontrol/hwmanager/passworddlg.cpp
parent1b6c123de102f0152d296fba8771d348329ba95c (diff)
downloadtdebase-d39c407bf49fab58fa53c20bb3d301ee6e709c32.tar.gz
tdebase-d39c407bf49fab58fa53c20bb3d301ee6e709c32.zip
1) tdehwdevicetray: added support for unmount/unlock/lock operations.
2) minor changes and improvements to user messages. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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();