summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/setmasterpwwndimpl.cpp
authorulf69 <ulf69>2004-09-24 19:51:43 (UTC)
committer ulf69 <ulf69>2004-09-24 19:51:43 (UTC)
commita884dac6f756b3702a10ae97aa8782e4d2a84b20 (patch) (side-by-side diff)
tree08e50146a3176848455db29e0c0ff0309c6f7b4c /pwmanager/pwmanager/setmasterpwwndimpl.cpp
parentae069aa892b29a96a923e49254cc89e65d0393eb (diff)
downloadkdepimpi-a884dac6f756b3702a10ae97aa8782e4d2a84b20.zip
kdepimpi-a884dac6f756b3702a10ae97aa8782e4d2a84b20.tar.gz
kdepimpi-a884dac6f756b3702a10ae97aa8782e4d2a84b20.tar.bz2
*** empty log message ***
Diffstat (limited to 'pwmanager/pwmanager/setmasterpwwndimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/setmasterpwwndimpl.cpp43
1 files changed, 42 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.cpp b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
index aac0408..3482643 100644
--- a/pwmanager/pwmanager/setmasterpwwndimpl.cpp
+++ b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
@@ -46,8 +46,9 @@ SetMasterPwWndImpl::SetMasterPwWndImpl(QWidget * parent, const char *name)
#ifndef PWM_EMBEDDED
mainTab->removePage(mainTab->page(1));
#else
- qDebug("SetMasterPwWndImpl::SetMasterPwWndImpl has to be fixed");
+ mainTab->removePage(tab_2);
#endif
+
#endif // CONFIG_KEYCARD
keyCard = 0;
}
@@ -58,6 +59,7 @@ SetMasterPwWndImpl::~SetMasterPwWndImpl()
void SetMasterPwWndImpl::okButton_slot()
{
+#ifndef PWM_EMBEDDED
int index = mainTab->currentPageIndex();
if (index == 0) {
// normal password
@@ -88,13 +90,52 @@ void SetMasterPwWndImpl::okButton_slot()
}
}
done(1);
+#endif
}
void SetMasterPwWndImpl::cancelButton_slot()
{
+#ifndef PWM_EMBEDDED
done(2);
+#endif
+}
+
+void SetMasterPwWndImpl::slotOk()
+{
+ int index = mainTab->currentPageIndex();
+ if (index == 0) {
+ // normal password
+ if (pwEdit_1->text() != pwEdit_2->text()) {
+ KMessageBox::error(this,
+ i18n
+ ("The two passwords you have entered\ndon't match.\n"
+ "Please try entering them again."),
+ i18n("Different passwords"));
+ return;
+ }
+ if (pwEdit_1->text() == "") {
+ KMessageBox::error(this,
+ i18n("No password entered.\n"
+ "Please type in a password,\nthat "
+ "you want to use for\nthe encryption."),
+ i18n("no password"));
+ return;
+ }
+ } else {
+ // key-card
+ if (curCardIdLabel->text() == STRING_CARD_NONE) {
+ KMessageBox::error(this,
+ i18n("You didn't select a card as\n"
+ "PwM-key-card."),
+ i18n("no card"));
+ return;
+ }
+ }
+
+ setMasterPwWnd::slotOk();
}
+
void SetMasterPwWndImpl::genCardButton_slot()
{
#ifdef CONFIG_KEYCARD