summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-07 11:44:35 (UTC)
committer zautrix <zautrix>2004-10-07 11:44:35 (UTC)
commit43c82cc5393522d2c34f34a4339cb6a1d1c6c555 (patch) (side-by-side diff)
tree49916cfb6f12c846fa52f9697f9b0285c2902772 /kaddressbook
parentf0e8b8f36bccda952fa662e4faf2d58fcee67262 (diff)
downloadkdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.zip
kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.gz
kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.bz2
sync fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp12
-rw-r--r--kaddressbook/kabcore.h1
2 files changed, 10 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 6404410..fa80f5c 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2837,45 +2837,51 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
AddressBook abLocal( resource,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice );
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
abLocal.saveAB();
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
}
}
setModified();
}
if ( syncOK )
mViewManager->refreshView();
return syncOK;
}
void KABCore::getFile( bool success )
{
+ qDebug("KABCore::getFile ");
+ QTimer::singleShot( 15000, this , SLOT ( setCaptionBack()));
if ( ! success ) {
setCaption( i18n("Error receiving file. Nothing changed!") );
return;
}
mAddressBook->importFromFile( sentSyncFile() );
- setCaption( i18n("Pi-Sync successful!") );
+ topLevelWidget()->setCaption( i18n("Pi-Sync successful!") );
}
void KABCore::syncFileRequest()
{
mAddressBook->export2File( sentSyncFile() );
}
QString KABCore::sentSyncFile()
{
#ifdef _WIN32_
- return locateLocal( "tmp", "syncab.ics" );
+ return locateLocal( "tmp", "copysyncab.vcf" );
#else
- return QString( "/tmp/kapitempfile.vcf" );
+ return QString( "/tmp/copysyncab.vcf" );
#endif
}
+void KABCore::setCaptionBack()
+{
+ topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
+}
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 987369d..c628399 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -328,48 +328,49 @@ class KABCore : public QWidget, public KSyncInterface
*/
void print();
/**
Registers a new GUI client, so plugins can register its actions.
*/
void addGUIClient( KXMLGUIClient *client );
void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
signals:
void contactSelected( const QString &name );
void contactSelected( const QPixmap &pixmap );
public slots:
void getFile( bool success );
void syncFileRequest();
void setDetailsVisible( bool visible );
void setDetailsToState();
// void slotSyncMenu( int );
private slots:
void setJumpButtonBarVisible( bool visible );
+ void setCaptionBack();
void importFromOL();
void extensionModified( const KABC::Addressee::List &list );
void extensionChanged( int id );
void clipboardDataChanged();
void updateActionMenu();
void configureKeyBindings();
void removeVoice();
#ifdef KAB_EMBEDDED
void configureResources();
#endif //KAB_EMBEDDED
void slotEditorDestroyed( const QString &uid );
void configurationChanged();
void addressBookChanged();
private:
void initGUI();
void initActions();
AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
const char *name = 0 );
KXMLGUIClient *mGUIClient;