author | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
commit | 77aa480c9891a90c9b492618ebfd2b20f2d0727a (patch) (unidiff) | |
tree | 4f2c278d016fe21f280f8ee6abbca34685aada96 /kaddressbook | |
parent | e0fa858c284dddf0d47146e666c4ece7158487be (diff) | |
download | kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.zip kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.gz kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.bz2 |
many sync fixes
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index bd32859..5334a0e 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -656,13 +656,13 @@ void AddresseeEditorWidget::setupTab2() | |||
656 | layout->addWidget( mChildEdit, iii, 2 ); | 656 | layout->addWidget( mChildEdit, iii, 2 ); |
657 | ++iii; | 657 | ++iii; |
658 | if ( QApplication::desktop()->width() == 640 ) { | 658 | if ( QApplication::desktop()->width() == 640 ) { |
659 | QHBox * nbox = new QHBox ( tab2 ); | 659 | QHBox * nbox = new QHBox ( tab2 ); |
660 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); | 660 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); |
661 | mBirthdayPicker = new KDateEdit( nbox ); | 661 | mBirthdayPicker = new KDateEdit( nbox ); |
662 | mBirthdayPicker->toggleDateFormat(); | 662 | //mBirthdayPicker->toggleDateFormat(); |
663 | mBirthdayPicker->setHandleInvalid( true ); | 663 | mBirthdayPicker->setHandleInvalid( true ); |
664 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), | 664 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), |
665 | SLOT( dateChanged( QDate ) ) ); | 665 | SLOT( dateChanged( QDate ) ) ); |
666 | 666 | ||
667 | label->setBuddy( mBirthdayPicker ); | 667 | label->setBuddy( mBirthdayPicker ); |
668 | 668 | ||
@@ -678,13 +678,13 @@ void AddresseeEditorWidget::setupTab2() | |||
678 | 678 | ||
679 | } else { | 679 | } else { |
680 | 680 | ||
681 | label = new QLabel( i18n( "Birthday:" ), tab2 ); | 681 | label = new QLabel( i18n( "Birthday:" ), tab2 ); |
682 | layout->addWidget( label, iii, 1 ); | 682 | layout->addWidget( label, iii, 1 ); |
683 | mBirthdayPicker = new KDateEdit( tab2 ); | 683 | mBirthdayPicker = new KDateEdit( tab2 ); |
684 | mBirthdayPicker->toggleDateFormat(); | 684 | //mBirthdayPicker->toggleDateFormat(); |
685 | mBirthdayPicker->setHandleInvalid( true ); | 685 | mBirthdayPicker->setHandleInvalid( true ); |
686 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), | 686 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), |
687 | SLOT( dateChanged( QDate ) ) ); | 687 | SLOT( dateChanged( QDate ) ) ); |
688 | 688 | ||
689 | label->setBuddy( mBirthdayPicker ); | 689 | label->setBuddy( mBirthdayPicker ); |
690 | layout->addWidget( mBirthdayPicker, iii, 2 ); | 690 | layout->addWidget( mBirthdayPicker, iii, 2 ); |
@@ -1076,14 +1076,12 @@ void AddresseeEditorWidget::save() | |||
1076 | mAddressee.setRole( mRoleEdit->text() ); | 1076 | mAddressee.setRole( mRoleEdit->text() ); |
1077 | mAddressee.setOrganization( mOrgEdit->text() ); | 1077 | mAddressee.setOrganization( mOrgEdit->text() ); |
1078 | mAddressee.setUrl( KURL( mURLEdit->text() ) ); | 1078 | mAddressee.setUrl( KURL( mURLEdit->text() ) ); |
1079 | mAddressee.setNote( mNoteEdit->text() ); | 1079 | mAddressee.setNote( mNoteEdit->text() ); |
1080 | if ( mBirthdayPicker->inputIsValid() ) { | 1080 | if ( mBirthdayPicker->inputIsValid() ) { |
1081 | QDate da = mBirthdayPicker->date(); | 1081 | QDate da = mBirthdayPicker->date(); |
1082 | if ( da > QDate::currentDate() ) | ||
1083 | da.setYMD(da.year()-100, da.month(), da.day() ); | ||
1084 | mAddressee.setBirthday( QDateTime( da ) ); | 1082 | mAddressee.setBirthday( QDateTime( da ) ); |
1085 | //qDebug("bday %s ",da.toString().latin1()); | 1083 | //qDebug("bday %s ",da.toString().latin1()); |
1086 | } | 1084 | } |
1087 | else { | 1085 | else { |
1088 | mAddressee.setBirthday( QDateTime() ); | 1086 | mAddressee.setBirthday( QDateTime() ); |
1089 | mBirthdayPicker->clear(); | 1087 | mBirthdayPicker->clear(); |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 3715786..046cb63 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -372,12 +372,13 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
372 | 372 | ||
373 | 373 | ||
374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
376 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 376 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
377 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); | 377 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); |
378 | connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync())); | ||
378 | connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); | 379 | connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); |
379 | 380 | ||
380 | 381 | ||
381 | #ifndef KAB_EMBEDDED | 382 | #ifndef KAB_EMBEDDED |
382 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 383 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
383 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 384 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
@@ -2577,12 +2578,16 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt | |||
2577 | void KABCore::resizeAndCallContactdialog() | 2578 | void KABCore::resizeAndCallContactdialog() |
2578 | { | 2579 | { |
2579 | updateMainWindow(); | 2580 | updateMainWindow(); |
2580 | QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); | 2581 | QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); |
2581 | } | 2582 | } |
2582 | 2583 | ||
2584 | void KABCore::doRingSync() | ||
2585 | { | ||
2586 | syncManager->multiSync( false ); | ||
2587 | } | ||
2583 | void KABCore::callContactdialog() | 2588 | void KABCore::callContactdialog() |
2584 | { | 2589 | { |
2585 | static bool running = false; | 2590 | static bool running = false; |
2586 | if (running) return; | 2591 | if (running) return; |
2587 | running = true; | 2592 | running = true; |
2588 | QStringList nameList; | 2593 | QStringList nameList; |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 6479a58..ceeeda7 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -370,12 +370,13 @@ class KABCore : public QWidget, public KSyncInterface | |||
370 | void disableBR(bool); | 370 | void disableBR(bool); |
371 | void setJumpButtonBarVisible( bool visible ); | 371 | void setJumpButtonBarVisible( bool visible ); |
372 | void setJumpButtonBar( bool visible ); | 372 | void setJumpButtonBar( bool visible ); |
373 | void setCaptionBack(); | 373 | void setCaptionBack(); |
374 | void resizeAndCallContactdialog(); | 374 | void resizeAndCallContactdialog(); |
375 | void callContactdialog(); | 375 | void callContactdialog(); |
376 | void doRingSync(); | ||
376 | 377 | ||
377 | void importFromOL(); | 378 | void importFromOL(); |
378 | void extensionModified( const KABC::Addressee::List &list ); | 379 | void extensionModified( const KABC::Addressee::List &list ); |
379 | void extensionChanged( int id ); | 380 | void extensionChanged( int id ); |
380 | void clipboardDataChanged(); | 381 | void clipboardDataChanged(); |
381 | void updateActionMenu(); | 382 | void updateActionMenu(); |