summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-07 07:28:54 (UTC)
committer zautrix <zautrix>2004-10-07 07:28:54 (UTC)
commit77280f6a176a15b60004f312e6cacdfbbd3909c1 (patch) (side-by-side diff)
treee074d4abedc2f4cc575e5655575e038b9d460106 /kaddressbook
parentf1eb5b74c962909851607c4b4cb05ee18a347d37 (diff)
downloadkdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.zip
kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.gz
kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.bz2
sync changes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp31
-rw-r--r--kaddressbook/kabcore.h7
2 files changed, 14 insertions, 24 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d9eb391..83fede4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1683,6 +1683,10 @@ void KABCore::initGUI()
syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
syncManager->setBlockSave(false);
+ connect(syncManager , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
+ syncManager->setDefaultFileName(locateLocal( "apps","kabc/std.vcf") );
+ //connect(syncManager , SIGNAL( ), this, SLOT( ) );
#endif //KAB_EMBEDDED
initActions();
@@ -2837,7 +2841,6 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice );
- qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? ");
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
@@ -2853,24 +2856,16 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
}
-//called by the syncmanager to indicate that the work has to marked as dirty.
-void KABCore::sync_setModified()
+void KABCore::getFile( bool success )
{
- setModified();
-}
-
-//called by the syncmanager to ask if the dirty flag is set.
-bool KABCore::sync_isModified()
-{
- return mModified;
-}
-
-
-//called by the syncmanager to indicate that the work has to be saved.
-void KABCore::sync_save()
-{
- save();
+ if ( ! success ) {
+ setCaption( i18n("Error receiving file. Nothing changed!") );
+ return;
+ }
+ //mView->watchSavedFile();
+ //mView->openCalendar( defaultFileName() );
+ // pending: reload received file!
+ setCaption( i18n("Pi-Sync successful!") );
}
-
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c9c0d38..355e828 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -342,6 +342,7 @@ class KABCore : public QWidget, public KSyncInterface
void contactSelected( const QString &name );
void contactSelected( const QPixmap &pixmap );
public slots:
+ void getFile( bool success );
void setDetailsVisible( bool visible );
void setDetailsToState();
// void slotSyncMenu( int );
@@ -461,12 +462,6 @@ class KABCore : public QWidget, public KSyncInterface
virtual bool sync(KSyncManager* manager, QString filename, int mode);
virtual bool syncExternal(KSyncManager* manager, QString resource);
- //called by the syncmanager to indicate that the work has to marked as dirty.
- virtual void sync_setModified();
- //called by the syncmanager to ask if the dirty flag is set.
- virtual bool sync_isModified();
- //called by the syncmanager to indicate that the work has to be saved.
- virtual void sync_save();
// LR *******************************
// sync stuff!