summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwm.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp52
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
@@ -185,37 +185,45 @@ PwM::~PwM()
emit closed(this);
delete view;
}
void PwM::initMenubar()
{
KIconLoader* picons;
#ifndef PWM_EMBEDDED
KIconLoader icons;
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);
exportPopup = new KPopupMenu(filePopup);
managePopup = new KPopupMenu(this);
#ifdef CONFIG_KEYCARD
chipcardPopup = new KPopupMenu(this);
#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,
SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
i18n("&Open"), this,
SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
i18n("&Close"), this,
SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
filePopup->insertSeparator();
filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
@@ -320,32 +328,25 @@ void PwM::initMenubar()
BUTTON_POPUP_VIEW_UNLOCK);
menuBar()->insertItem(i18n("&View"), viewPopup);
// "options" popup menu
optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
i18n("&Configure..."), this,
SLOT(config_slot()),
BUTTON_POPUP_OPTIONS_CONFIG);
menuBar()->insertItem(i18n("&Options"), optionsPopup);
// "help" popup menu
#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);
helpPopup = new KPopupMenu(this);
helpPopup->insertItem(i18n("&License"), this,
SLOT(showLicense_slot()), 0,
BUTTON_POPUP_HELP_LICENSE);
@@ -1308,18 +1309,47 @@ void PwM::createAboutData_slot()
"Matt Scifo - mscifo@o1.com\n"
"Elias Probst - elias.probst@gmx.de\n"
"George Staikos - staikos@kde.org\n"
"Matthew Palmer - mjp16@uow.edu.au\n"
"Olivier Sessink - gpasman@nl.linux.org\n"
"The libgcrypt developers -\nBlowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n"
"Troy Engel - tengel@sonic.net\n"
"Wickey - wickey@gmx.at\n"
"Ian MacGregor - original documentation author.\n"
);
}
+
+//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
#ifndef PWM_EMBEDDED
#include "pwm.moc"
#endif