summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-12-02 09:10:14 (UTC)
committer zautrix <zautrix>2005-12-02 09:10:14 (UTC)
commit64be8d64fc26d1025a24150d065197ba5d608f3d (patch) (unidiff)
tree4f7b0c82641ac591af04f6fdd541b662d4727850 /kaddressbook
parent2bd8aff44e90b6d58e2037771db8b38846addb3e (diff)
downloadkdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.zip
kdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.tar.gz
kdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.tar.bz2
more sync
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp11
-rw-r--r--kaddressbook/kabcore.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2dea619..5d377bf 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1927,25 +1927,25 @@ void KABCore::initGUI()
1927 1927
1928 mDetails = new ViewContainer( this ); 1928 mDetails = new ViewContainer( this );
1929 1929
1930 topLayout->addWidget( viewSpace ); 1930 topLayout->addWidget( viewSpace );
1931// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1931// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1932 topLayout->addWidget( mDetails ); 1932 topLayout->addWidget( mDetails );
1933#endif //KAB_NOSPLITTER 1933#endif //KAB_NOSPLITTER
1934*/ 1934*/
1935 1935
1936 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1936 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1937 syncManager->setBlockSave(false); 1937 syncManager->setBlockSave(false);
1938 1938
1939 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1939 connect(syncManager , SIGNAL( request_file(const QString &) ), this, SLOT( syncFileRequest(const QString &) ) );
1940 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1940 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1941 QString sync_file = sentSyncFile(); 1941 QString sync_file = sentSyncFile();
1942 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1942 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1943 syncManager->setDefaultFileName( sync_file ); 1943 syncManager->setDefaultFileName( sync_file );
1944 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1944 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1945 1945
1946#endif //KAB_EMBEDDED 1946#endif //KAB_EMBEDDED
1947 initActions(); 1947 initActions();
1948 1948
1949#ifdef KAB_EMBEDDED 1949#ifdef KAB_EMBEDDED
1950 addActionsManually(); 1950 addActionsManually();
1951 //US make sure the export and import menues are initialized before creating the xxPortManager. 1951 //US make sure the export and import menues are initialized before creating the xxPortManager.
@@ -3463,30 +3463,35 @@ bool KABCore::syncPhone()
3463void KABCore::getFile( bool success ) 3463void KABCore::getFile( bool success )
3464{ 3464{
3465 if ( ! success ) { 3465 if ( ! success ) {
3466 message( i18n("Error receiving file. Nothing changed!") ); 3466 message( i18n("Error receiving file. Nothing changed!") );
3467 return; 3467 return;
3468 } 3468 }
3469 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3469 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3470 if ( count ) 3470 if ( count )
3471 setModified( true ); 3471 setModified( true );
3472 message( i18n("Pi-Sync successful!") ); 3472 message( i18n("Pi-Sync successful!") );
3473 mViewManager->refreshView(); 3473 mViewManager->refreshView();
3474} 3474}
3475void KABCore::syncFileRequest() 3475void KABCore::syncFileRequest(const QString & resource)
3476{ 3476{
3477 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3477 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3478 syncManager->slotSyncMenu( 999 ); 3478 syncManager->slotSyncMenu( 999 );
3479 } 3479 }
3480 mAddressBook->export2File( sentSyncFile() ); 3480
3481 if ( resource == "ALL" ) {
3482 mAddressBook->export2File( sentSyncFile() );
3483 }
3484 else
3485 mAddressBook->export2File( sentSyncFile(), resource);
3481} 3486}
3482QString KABCore::sentSyncFile() 3487QString KABCore::sentSyncFile()
3483{ 3488{
3484#ifdef DESKTOP_VERSION 3489#ifdef DESKTOP_VERSION
3485 return locateLocal( "tmp", "copysyncab.vcf" ); 3490 return locateLocal( "tmp", "copysyncab.vcf" );
3486#else 3491#else
3487 return QString( "/tmp/copysyncab.vcf" ); 3492 return QString( "/tmp/copysyncab.vcf" );
3488#endif 3493#endif
3489} 3494}
3490 3495
3491void KABCore::setCaptionBack() 3496void KABCore::setCaptionBack()
3492{ 3497{
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c4a0b3b..2d1505f 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -348,25 +348,25 @@ class KABCore : public QWidget, public KSyncInterface
348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); 348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); 350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
351 351
352 352
353 signals: 353 signals:
354 void contactSelected( const QString &name ); 354 void contactSelected( const QString &name );
355 void contactSelected( const QPixmap &pixmap ); 355 void contactSelected( const QPixmap &pixmap );
356 public slots: 356 public slots:
357 void loadDataAfterStart(); 357 void loadDataAfterStart();
358 void recieve(QString cmsg ); 358 void recieve(QString cmsg );
359 void getFile( bool success ); 359 void getFile( bool success );
360 void syncFileRequest(); 360 void syncFileRequest(const QString &);
361 void setDetailsVisible( bool visible ); 361 void setDetailsVisible( bool visible );
362 void setDetailsToState(); 362 void setDetailsToState();
363 363
364 void saveSettings(); 364 void saveSettings();
365 365
366 private slots: 366 private slots:
367 void updateToolBar(); 367 void updateToolBar();
368 void updateMainWindow(); 368 void updateMainWindow();
369 void receive( const QCString& cmsg, const QByteArray& data ); 369 void receive( const QCString& cmsg, const QByteArray& data );
370 void receiveStart( const QCString& cmsg, const QByteArray& data ); 370 void receiveStart( const QCString& cmsg, const QByteArray& data );
371 void toggleBeamReceive( ); 371 void toggleBeamReceive( );
372 void disableBR(bool); 372 void disableBR(bool);