-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 014e809..57b4432 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -134,3 +134,4 @@ enum { | |||
134 | BUTTON_POPUP_HELP_FAQ, | 134 | BUTTON_POPUP_HELP_FAQ, |
135 | BUTTON_POPUP_HELP_ABOUT | 135 | BUTTON_POPUP_HELP_ABOUT, |
136 | BUTTON_POPUP_HELP_SYNC | ||
136 | }; | 137 | }; |
@@ -158,3 +159,3 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, | |||
158 | QWidget *parent, const char *name) | 159 | QWidget *parent, const char *name) |
159 | : KMainWindow(parent, name) | 160 | : KMainWindow(parent, "HALLO") |
160 | , forceQuit (false) | 161 | , forceQuit (false) |
@@ -360,2 +361,6 @@ void PwM::initMenubar() | |||
360 | 361 | ||
362 | helpPopup->insertItem(i18n("&Sync HowTo"), this, | ||
363 | SLOT(syncHowTo_slot()), 0, | ||
364 | BUTTON_POPUP_HELP_SYNC); | ||
365 | |||
361 | #endif | 366 | #endif |
@@ -611,2 +616,8 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) | |||
611 | PwMDataItem d; | 616 | PwMDataItem d; |
617 | |||
618 | //US BUG: to initialize all values of curEntr with meaningfulldata, | ||
619 | // we call clear on it. Reason: Metadata will be uninitialized otherwise. | ||
620 | // another option would be to create a constructor for PwMDataItem | ||
621 | d.clear(true); | ||
622 | |||
612 | d.desc = w.getDescription().latin1(); | 623 | d.desc = w.getDescription().latin1(); |
@@ -621,3 +632,3 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) | |||
621 | i18n | 632 | i18n |
622 | ("An entry with this \"Description\", " | 633 | ("An entry with this \"Description\",\n" |
623 | "does already exist.\n" | 634 | "does already exist.\n" |
@@ -627,4 +638,4 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) | |||
627 | } else if (ret == e_maxAllowedEntr) { | 638 | } else if (ret == e_maxAllowedEntr) { |
628 | KMessageBox::error(this, i18n("The maximum possible number of entries " | 639 | KMessageBox::error(this, i18n("The maximum possible number of\nentries" |
629 | "has been reached. You can't add more entries."), | 640 | "has been reached.\nYou can't add more entries."), |
630 | i18n("maximum number of entries")); | 641 | i18n("maximum number of entries")); |
@@ -1289,2 +1300,9 @@ void PwM::faq_slot() | |||
1289 | 1300 | ||
1301 | void PwM::syncHowTo_slot() | ||
1302 | { | ||
1303 | qDebug("PwM::syncHowTo_slot"); | ||
1304 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | ||
1305 | } | ||
1306 | |||
1307 | |||
1290 | void PwM::createAboutData_slot() | 1308 | void PwM::createAboutData_slot() |
@@ -1328,2 +1346,4 @@ bool PwM::sync(KSyncManager* manager, QString filename, int mode) | |||
1328 | 1346 | ||
1347 | qDebug("PwM::sync save now: ret=%i", ret); | ||
1348 | |||
1329 | if (ret == true) { | 1349 | if (ret == true) { |
@@ -1331,2 +1351,5 @@ bool PwM::sync(KSyncManager* manager, QString filename, int mode) | |||
1331 | //mViewManager->refreshView(); | 1351 | //mViewManager->refreshView(); |
1352 | |||
1353 | //US curDoc()->sync sets the dirtyFlag in case the sync was successfull. | ||
1354 | save(); | ||
1332 | } | 1355 | } |
@@ -1335,26 +1358,2 @@ bool PwM::sync(KSyncManager* manager, QString filename, int mode) | |||
1335 | } | 1358 | } |
1336 | |||
1337 | //called by the syncmanager to indicate that the work has to be marked as dirty. | ||
1338 | void PwM::sync_setModified() | ||
1339 | { | ||
1340 | PWM_ASSERT(curDoc()); | ||
1341 | curDoc()->sync_setModified(); | ||
1342 | } | ||
1343 | |||
1344 | //called by the syncmanager to ask if the dirty flag is set. | ||
1345 | bool PwM::sync_isModified() | ||
1346 | { | ||
1347 | PWM_ASSERT(curDoc()); | ||
1348 | return curDoc()->sync_isModified(); | ||
1349 | } | ||
1350 | |||
1351 | //called by the syncmanager to indicate that the work has to be saved. | ||
1352 | void PwM::sync_save() | ||
1353 | { | ||
1354 | PWM_ASSERT(curDoc()); | ||
1355 | return curDoc()->sync_save(); | ||
1356 | } | ||
1357 | |||
1358 | |||
1359 | |||
1360 | #endif | 1359 | #endif |