author | ulf69 <ulf69> | 2004-10-02 01:07:49 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-02 01:07:49 (UTC) |
commit | a5abf6c989a29e7f3a348786c7b0890740835497 (patch) (side-by-side diff) | |
tree | b3bcff83db4a35dc089abcdc28d839cdbd746ab3 /pwmanager/pwmanager/pwm.cpp | |
parent | ba1176743a536e19bb8b9d68b1c0c0023a0f3101 (diff) | |
download | kdepimpi-a5abf6c989a29e7f3a348786c7b0890740835497.zip kdepimpi-a5abf6c989a29e7f3a348786c7b0890740835497.tar.gz kdepimpi-a5abf6c989a29e7f3a348786c7b0890740835497.tar.bz2 |
checked in ksyncmanager handling (not complete yet)
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index cd56399..ac2e66e 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp @@ -194,6 +194,16 @@ void PwM::initMenubar() picons = &icons; #else picons = KGlobal::iconLoader(); + + + syncPopup = new KPopupMenu(this); + + syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); + syncManager->setBlockSave(false); + + connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); + syncManager->fillSyncMenu(); + #endif filePopup = new KPopupMenu(this); importPopup = new KPopupMenu(filePopup); @@ -204,9 +214,7 @@ void PwM::initMenubar() #endif // CONFIG_KEYCARD viewPopup = new KPopupMenu(this); optionsPopup = new KPopupMenu(this); -#ifdef PWM_EMBEDDED - syncPopup = new KPopupMenu(this); -#endif + // "file" popup menu filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), i18n("&New"), this, @@ -329,14 +337,7 @@ void PwM::initMenubar() #ifndef PWM_EMBEDDED helpPopup = helpMenu(QString::null, false); #else - Popup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), - i18n("&Configure..."), this, - SLOT(config_slot()), - BUTTON_POPUP_OPTIONS_CONFIG); - connect ( syncMenu, SIGNAL( activated ( int ) ), this, SLOT (slotSyncMenu( int ) ) ); - fillSyncMenu(); - - menuBar()->insertItem(i18n("&Syncronize"), syncPopup); + menuBar()->insertItem(i18n("&Sync"), syncPopup); @@ -1317,6 +1318,35 @@ void PwM::createAboutData_slot() ); } + +//this are the overwritten callbackmethods from the syncinterface +bool PwM::sync(KSyncManager* manager, QString filename, int mode) +{ + return true; +} + +bool PwM::syncExternal(KSyncManager* manager, QString resource) +{ + return true; +} + +//called by the syncmanager to indicate that the work has to marked as dirty. +void PwM::sync_setModified() +{ +} + +//called by the syncmanager to ask if the dirty flag is set. +bool PwM::sync_isModified() +{ +} + +//called by the syncmanager to indicate that the work has to be saved. +void PwM::sync_save() +{ +} + + + #endif |