-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 | |||
@@ -193,8 +193,18 @@ void PwM::initMenubar() | |||
193 | KIconLoader icons; | 193 | KIconLoader icons; |
194 | picons = &icons; | 194 | picons = &icons; |
195 | #else | 195 | #else |
196 | picons = KGlobal::iconLoader(); | 196 | picons = KGlobal::iconLoader(); |
197 | |||
198 | |||
199 | syncPopup = new KPopupMenu(this); | ||
200 | |||
201 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); | ||
202 | syncManager->setBlockSave(false); | ||
203 | |||
204 | connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | ||
205 | syncManager->fillSyncMenu(); | ||
206 | |||
197 | #endif | 207 | #endif |
198 | filePopup = new KPopupMenu(this); | 208 | filePopup = new KPopupMenu(this); |
199 | importPopup = new KPopupMenu(filePopup); | 209 | importPopup = new KPopupMenu(filePopup); |
200 | exportPopup = new KPopupMenu(filePopup); | 210 | exportPopup = new KPopupMenu(filePopup); |
@@ -203,11 +213,9 @@ void PwM::initMenubar() | |||
203 | chipcardPopup = new KPopupMenu(this); | 213 | chipcardPopup = new KPopupMenu(this); |
204 | #endif // CONFIG_KEYCARD | 214 | #endif // CONFIG_KEYCARD |
205 | viewPopup = new KPopupMenu(this); | 215 | viewPopup = new KPopupMenu(this); |
206 | optionsPopup = new KPopupMenu(this); | 216 | optionsPopup = new KPopupMenu(this); |
207 | #ifdef PWM_EMBEDDED | 217 | |
208 | syncPopup = new KPopupMenu(this); | ||
209 | #endif | ||
210 | // "file" popup menu | 218 | // "file" popup menu |
211 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 219 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), |
212 | i18n("&New"), this, | 220 | i18n("&New"), this, |
213 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); | 221 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); |
@@ -328,16 +336,9 @@ void PwM::initMenubar() | |||
328 | // "help" popup menu | 336 | // "help" popup menu |
329 | #ifndef PWM_EMBEDDED | 337 | #ifndef PWM_EMBEDDED |
330 | helpPopup = helpMenu(QString::null, false); | 338 | helpPopup = helpMenu(QString::null, false); |
331 | #else | 339 | #else |
332 | Popup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 340 | menuBar()->insertItem(i18n("&Sync"), syncPopup); |
333 | i18n("&Configure..."), this, | ||
334 | SLOT(config_slot()), | ||
335 | BUTTON_POPUP_OPTIONS_CONFIG); | ||
336 | connect ( syncMenu, SIGNAL( activated ( int ) ), this, SLOT (slotSyncMenu( int ) ) ); | ||
337 | fillSyncMenu(); | ||
338 | |||
339 | menuBar()->insertItem(i18n("&Syncronize"), syncPopup); | ||
340 | 341 | ||
341 | 342 | ||
342 | 343 | ||
343 | 344 | ||
@@ -1316,8 +1317,37 @@ void PwM::createAboutData_slot() | |||
1316 | "Ian MacGregor - original documentation author.\n" | 1317 | "Ian MacGregor - original documentation author.\n" |
1317 | ); | 1318 | ); |
1318 | } | 1319 | } |
1319 | 1320 | ||
1321 | |||
1322 | //this are the overwritten callbackmethods from the syncinterface | ||
1323 | bool PwM::sync(KSyncManager* manager, QString filename, int mode) | ||
1324 | { | ||
1325 | return true; | ||
1326 | } | ||
1327 | |||
1328 | bool PwM::syncExternal(KSyncManager* manager, QString resource) | ||
1329 | { | ||
1330 | return true; | ||
1331 | } | ||
1332 | |||
1333 | //called by the syncmanager to indicate that the work has to marked as dirty. | ||
1334 | void PwM::sync_setModified() | ||
1335 | { | ||
1336 | } | ||
1337 | |||
1338 | //called by the syncmanager to ask if the dirty flag is set. | ||
1339 | bool PwM::sync_isModified() | ||
1340 | { | ||
1341 | } | ||
1342 | |||
1343 | //called by the syncmanager to indicate that the work has to be saved. | ||
1344 | void PwM::sync_save() | ||
1345 | { | ||
1346 | } | ||
1347 | |||
1348 | |||
1349 | |||
1320 | #endif | 1350 | #endif |
1321 | 1351 | ||
1322 | 1352 | ||
1323 | #ifndef PWM_EMBEDDED | 1353 | #ifndef PWM_EMBEDDED |