author | zautrix <zautrix> | 2004-09-18 19:07:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-18 19:07:00 (UTC) |
commit | 28f894fd2a0dfbd5f09f9e530f359981efe0198c (patch) (unidiff) | |
tree | 426565d2716916f48b0c3e68b41e963fd10a3463 /kabc | |
parent | ec8099bf369e5b8327ca6cfd78b34366353e3abf (diff) | |
download | kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.zip kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.gz kdepimpi-28f894fd2a0dfbd5f09f9e530f359981efe0198c.tar.bz2 |
more AB sync
-rw-r--r-- | kabc/addresseeview.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 487e8a5..2dda968 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -399,69 +399,66 @@ void AddresseeView::addTag(const QString & tag,const QString & text) | |||
399 | mText.append(tmpStr); | 399 | mText.append(tmpStr); |
400 | } | 400 | } |
401 | else | 401 | else |
402 | { | 402 | { |
403 | str += text + "</" + tag + ">"; | 403 | str += text + "</" + tag + ">"; |
404 | mText.append(str); | 404 | mText.append(str); |
405 | } | 405 | } |
406 | } | 406 | } |
407 | 407 | ||
408 | AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name, | 408 | AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name, |
409 | true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false) | 409 | true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false) |
410 | { | 410 | { |
411 | findButton( Close )->setText( i18n("Cancel Sync")); | 411 | findButton( Close )->setText( i18n("Cancel Sync")); |
412 | findButton( Ok )->setText( i18n("Remote")); | 412 | findButton( Ok )->setText( i18n("Remote")); |
413 | findButton( User1 )->setText( i18n("Local")); | 413 | findButton( User1 )->setText( i18n("Local")); |
414 | QWidget* topframe = new QWidget( this ); | 414 | QWidget* topframe = new QWidget( this ); |
415 | //QVBox* topframe = new QVBox( this ); | ||
416 | setMainWidget( topframe ); | 415 | setMainWidget( topframe ); |
417 | QBoxLayout* bl; | 416 | QBoxLayout* bl; |
418 | if ( QApplication::desktop()->width() < 640 ) { | 417 | if ( QApplication::desktop()->width() < 640 ) { |
419 | bl = new QVBoxLayout( topframe ); | 418 | bl = new QVBoxLayout( topframe ); |
420 | |||
421 | } else { | 419 | } else { |
422 | bl = new QHBoxLayout( topframe ); | 420 | bl = new QHBoxLayout( topframe ); |
423 | |||
424 | } | 421 | } |
425 | QVBox* subframe = new QVBox( topframe ); | 422 | QVBox* subframe = new QVBox( topframe ); |
426 | bl->addWidget(subframe ); | 423 | bl->addWidget(subframe ); |
427 | QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); | 424 | QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); |
425 | if ( takeloc ) | ||
426 | lab->setBackgroundColor(Qt::green.light() ); | ||
428 | AddresseeView * av = new AddresseeView( subframe ); | 427 | AddresseeView * av = new AddresseeView( subframe ); |
429 | av->setAddressee( loc ); | 428 | av->setAddressee( loc ); |
430 | subframe = new QVBox( topframe ); | 429 | subframe = new QVBox( topframe ); |
431 | bl->addWidget(subframe ); | 430 | bl->addWidget(subframe ); |
432 | lab = new QLabel( i18n("Remote Addressee"), subframe ); | 431 | lab = new QLabel( i18n("Remote Addressee"), subframe ); |
432 | if ( !takeloc ) | ||
433 | lab->setBackgroundColor(Qt::green.light() ); | ||
433 | av = new AddresseeView( subframe ); | 434 | av = new AddresseeView( subframe ); |
434 | av->setAddressee( rem ); | 435 | av->setAddressee( rem ); |
435 | 436 | QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote())); | |
436 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 437 | QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local())); |
437 | SLOT(slot_remote())); | ||
438 | QObject::connect(this,SIGNAL(user1Clicked()), | ||
439 | SLOT(slot_local())); | ||
440 | #ifndef DESKTOP_VERSION | 438 | #ifndef DESKTOP_VERSION |
441 | showMaximized(); | 439 | showMaximized(); |
442 | #else | 440 | #else |
443 | resize ( 640, 400 ); | 441 | resize ( 640, 400 ); |
444 | #endif | 442 | #endif |
445 | } | 443 | } |
446 | 444 | ||
447 | int AddresseeChooser::executeD( bool local ) | 445 | int AddresseeChooser::executeD( bool local ) |
448 | { | 446 | { |
449 | mSyncResult = 3; | 447 | mSyncResult = 3; |
450 | if ( local ) | 448 | if ( local ) |
451 | findButton( User1 )->setFocus(); | 449 | findButton( User1 )->setFocus(); |
452 | else | 450 | else |
453 | findButton( Ok )->setFocus(); | 451 | findButton( Ok )->setFocus(); |
454 | exec(); | 452 | exec(); |
455 | qDebug("returning %d ",mSyncResult ); | ||
456 | return mSyncResult; | 453 | return mSyncResult; |
457 | } | 454 | } |
458 | void AddresseeChooser::slot_remote() | 455 | void AddresseeChooser::slot_remote() |
459 | { | 456 | { |
460 | mSyncResult = 2; | 457 | mSyncResult = 2; |
461 | accept(); | 458 | accept(); |
462 | } | 459 | } |
463 | void AddresseeChooser::slot_local() | 460 | void AddresseeChooser::slot_local() |
464 | { | 461 | { |
465 | mSyncResult = 1; | 462 | mSyncResult = 1; |
466 | accept(); | 463 | accept(); |
467 | } | 464 | } |