summaryrefslogtreecommitdiff
authortux_mike <tux_mike>2002-04-02 02:16:45 (UTC)
committer tux_mike <tux_mike>2002-04-02 02:16:45 (UTC)
commit44bfa84cc6d9bcd828f0b08c7bf59dde58dd5288 (patch) (unidiff)
tree75ff5b49b30c27d927f5d170c2d9e60e56af5e5b
parentf830e73250189b0c9ca06df437c04d1c29e81359 (diff)
downloadopie-44bfa84cc6d9bcd828f0b08c7bf59dde58dd5288.zip
opie-44bfa84cc6d9bcd828f0b08c7bf59dde58dd5288.tar.gz
opie-44bfa84cc6d9bcd828f0b08c7bf59dde58dd5288.tar.bz2
Fixed annoying bug with the City field always being the home city... sorry :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 6d92ac3..0e752ca 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -516,146 +516,114 @@ void ContactEditor::slotChooser2Change( const QString &textChanged ) {
516 int index = cmbChooserField2->currentItem(); 516 int index = cmbChooserField2->currentItem();
517 517
518 (*slChooserValues)[index] = textChanged; 518 (*slChooserValues)[index] = textChanged;
519 519
520} 520}
521 521
522void ContactEditor::slotChooser3Change( const QString &textChanged ) { 522void ContactEditor::slotChooser3Change( const QString &textChanged ) {
523 523
524 int index = cmbChooserField3->currentItem(); 524 int index = cmbChooserField3->currentItem();
525 525
526 (*slChooserValues)[index] = textChanged; 526 (*slChooserValues)[index] = textChanged;
527 527
528} 528}
529 529
530void ContactEditor::slotAddressChange( const QString &textChanged ) { 530void ContactEditor::slotAddressChange( const QString &textChanged ) {
531 531
532 qDebug((*slBusinessAddress)[0]);
533 qDebug((*slHomeAddress)[0]);
534 qDebug(textChanged);
535 if ( cmbAddress->currentItem() == 0 ) { 532 if ( cmbAddress->currentItem() == 0 ) {
536 (*slBusinessAddress)[0] = textChanged; 533 (*slBusinessAddress)[0] = textChanged;
537 } else { 534 } else {
538 (*slHomeAddress)[0] = textChanged; 535 (*slHomeAddress)[0] = textChanged;
539 } 536 }
540} 537}
541 538
542void ContactEditor::slotAddress2Change( const QString &textChanged ) { 539void ContactEditor::slotAddress2Change( const QString &textChanged ) {
543 540
544 qDebug((*slBusinessAddress)[1]);
545 qDebug((*slHomeAddress)[1]);
546 qDebug(textChanged);
547
548 if ( cmbAddress->currentItem() == 0 ) { 541 if ( cmbAddress->currentItem() == 0 ) {
549 (*slBusinessAddress)[1] = textChanged; 542 (*slBusinessAddress)[1] = textChanged;
550 } else { 543 } else {
551 (*slHomeAddress)[1] = textChanged; 544 (*slHomeAddress)[1] = textChanged;
552 } 545 }
553} 546}
554 547
555void ContactEditor::slotPOBoxChange( const QString &textChanged ) { 548void ContactEditor::slotPOBoxChange( const QString &textChanged ) {
556 549
557 qDebug((*slBusinessAddress)[2]);
558 qDebug((*slHomeAddress)[2]);
559 qDebug(textChanged);
560 if ( cmbAddress->currentItem() == 0 ) { 550 if ( cmbAddress->currentItem() == 0 ) {
561 (*slBusinessAddress)[2] = textChanged; 551 (*slBusinessAddress)[2] = textChanged;
562 } else { 552 } else {
563 (*slHomeAddress)[2] = textChanged; 553 (*slHomeAddress)[2] = textChanged;
564 } 554 }
565} 555}
566 556
567void ContactEditor::slotCityChange( const QString &textChanged ) { 557void ContactEditor::slotCityChange( const QString &textChanged ) {
568 558
569 qDebug((*slBusinessAddress)[3]);
570 qDebug((*slHomeAddress)[3]);
571 qDebug(textChanged);
572 if ( cmbAddress->currentItem() == 0 ) { 559 if ( cmbAddress->currentItem() == 0 ) {
573 (*slBusinessAddress)[3] = textChanged; 560 (*slBusinessAddress)[3] = textChanged;
574 } else { 561 } else {
575 (*slHomeAddress)[3] = textChanged; 562 (*slHomeAddress)[3] = textChanged;
576 } 563 }
577} 564}
578 565
579void ContactEditor::slotStateChange( const QString &textChanged ) { 566void ContactEditor::slotStateChange( const QString &textChanged ) {
580 567
581 568
582 qDebug((*slBusinessAddress)[4]);
583 qDebug((*slHomeAddress)[4]);
584 qDebug(textChanged);
585 if ( cmbAddress->currentItem() == 0 ) { 569 if ( cmbAddress->currentItem() == 0 ) {
586 (*slBusinessAddress)[4] = textChanged; 570 (*slBusinessAddress)[4] = textChanged;
587 } else { 571 } else {
588 (*slHomeAddress)[4] = textChanged; 572 (*slHomeAddress)[4] = textChanged;
589 } 573 }
590} 574}
591 575
592void ContactEditor::slotZipChange( const QString &textChanged ) { 576void ContactEditor::slotZipChange( const QString &textChanged ) {
593 577
594 qDebug((*slBusinessAddress)[5]);
595 qDebug((*slHomeAddress)[5]);
596 qDebug(textChanged);
597 if ( cmbAddress->currentItem() == 0 ) { 578 if ( cmbAddress->currentItem() == 0 ) {
598 (*slBusinessAddress)[5] = textChanged; 579 (*slBusinessAddress)[5] = textChanged;
599 } else { 580 } else {
600 (*slHomeAddress)[5] = textChanged; 581 (*slHomeAddress)[5] = textChanged;
601 } 582 }
602} 583}
603 584
604void ContactEditor::slotCountryChange( const QString &textChanged ) { 585void ContactEditor::slotCountryChange( const QString &textChanged ) {
605 586
606 qDebug((*slBusinessAddress)[6]);
607 qDebug((*slHomeAddress)[6]);
608 qDebug(textChanged);
609 if ( cmbAddress->currentItem() == 0 ) { 587 if ( cmbAddress->currentItem() == 0 ) {
610 (*slBusinessAddress)[6] = textChanged; 588 (*slBusinessAddress)[6] = textChanged;
611 } else { 589 } else {
612 (*slHomeAddress)[6] = textChanged; 590 (*slHomeAddress)[6] = textChanged;
613 } 591 }
614} 592}
615 593
616void ContactEditor::slotCmbChooser1Change( int index ) { 594void ContactEditor::slotCmbChooser1Change( int index ) {
617 595
618 txtChooserField1->setText( (*slChooserValues)[index] ); 596 txtChooserField1->setText( (*slChooserValues)[index] );
619 597
620} 598}
621 599
622void ContactEditor::slotCmbChooser2Change( int index ) { 600void ContactEditor::slotCmbChooser2Change( int index ) {
623 601
624 txtChooserField2->setText( (*slChooserValues)[index] ); 602 txtChooserField2->setText( (*slChooserValues)[index] );
625 603
626} 604}
627 605
628void ContactEditor::slotCmbChooser3Change( int index ) { 606void ContactEditor::slotCmbChooser3Change( int index ) {
629 607
630 txtChooserField3->setText( (*slChooserValues)[index] ); 608 txtChooserField3->setText( (*slChooserValues)[index] );
631 609
632} 610}
633 611
634void ContactEditor::slotAddressTypeChange( int index ) { 612void ContactEditor::slotAddressTypeChange( int index ) {
635 613
636 qDebug((*slBusinessAddress)[0]);
637 qDebug((*slBusinessAddress)[1]);
638 qDebug((*slBusinessAddress)[2]);
639qDebug((*slBusinessAddress)[3]);
640qDebug((*slBusinessAddress)[4]);
641qDebug((*slBusinessAddress)[5]);
642qDebug((*slBusinessAddress)[6]);
643
644
645
646 if ( index == 0 ) { 614 if ( index == 0 ) {
647 615
648 txtAddress->setText( (*slBusinessAddress)[0] ); 616 txtAddress->setText( (*slBusinessAddress)[0] );
649 //txtAddress2->setText( (*slBusinessAddress)[1] ); 617 //txtAddress2->setText( (*slBusinessAddress)[1] );
650 //txtPOBox->setText( (*slBusinessAddress)[2] ); 618 //txtPOBox->setText( (*slBusinessAddress)[2] );
651 txtCity->setText( (*slBusinessAddress)[3] ); 619 txtCity->setText( (*slBusinessAddress)[3] );
652 txtState->setText( (*slBusinessAddress)[4] ); 620 txtState->setText( (*slBusinessAddress)[4] );
653 txtZip->setText( (*slBusinessAddress)[5] ); 621 txtZip->setText( (*slBusinessAddress)[5] );
654 QLineEdit *txtTmp = cmbCountry->lineEdit(); 622 QLineEdit *txtTmp = cmbCountry->lineEdit();
655 txtTmp->setText( (*slBusinessAddress)[6] ); 623 txtTmp->setText( (*slBusinessAddress)[6] );
656 624
657 } else { 625 } else {
658 626
659 txtAddress->setText( (*slHomeAddress)[0] ); 627 txtAddress->setText( (*slHomeAddress)[0] );
660 //txtAddress2->setText( (*slHomeAddress)[1] ); 628 //txtAddress2->setText( (*slHomeAddress)[1] );
661 //txtPOBox->setText( (*slHomeAddress)[2] ); 629 //txtPOBox->setText( (*slHomeAddress)[2] );
@@ -989,33 +957,33 @@ void ContactEditor::setEntry( const Contact &entry ) {
989 (*slHomeAddress)[0] = ent.homeStreet(); 957 (*slHomeAddress)[0] = ent.homeStreet();
990 (*slBusinessAddress)[0] = ent.businessStreet(); 958 (*slBusinessAddress)[0] = ent.businessStreet();
991 } 959 }
992/* 960/*
993 if (hasStreet2) { 961 if (hasStreet2) {
994 (*slHomeAddress)[1] = ent.homeStreet2(); 962 (*slHomeAddress)[1] = ent.homeStreet2();
995 (*slBusinessAddress)[1] = ent.businessStreet2(); 963 (*slBusinessAddress)[1] = ent.businessStreet2();
996 } 964 }
997 965
998 if (hasPOBox) { 966 if (hasPOBox) {
999 (*slHomeAddress)[2] = ent.homePOBox(); 967 (*slHomeAddress)[2] = ent.homePOBox();
1000 (*slBusinessAddress)[2] = ent.businessPOBox(); 968 (*slBusinessAddress)[2] = ent.businessPOBox();
1001 } 969 }
1002*/ 970*/
1003 if (hasCity) { 971 if (hasCity) {
1004 (*slHomeAddress)[3] = ent.homeCity(); 972 (*slHomeAddress)[3] = ent.homeCity();
1005 (*slBusinessAddress)[3] = ent.homeCity(); 973 (*slBusinessAddress)[3] = ent.businessCity();
1006 } 974 }
1007 975
1008 if (hasState) { 976 if (hasState) {
1009 (*slHomeAddress)[4] = ent.homeState(); 977 (*slHomeAddress)[4] = ent.homeState();
1010 (*slBusinessAddress)[4] = ent.businessState(); 978 (*slBusinessAddress)[4] = ent.businessState();
1011 } 979 }
1012 980
1013 if (hasZip) { 981 if (hasZip) {
1014 (*slHomeAddress)[5] = ent.homeZip(); 982 (*slHomeAddress)[5] = ent.homeZip();
1015 (*slBusinessAddress)[5] = ent.businessZip(); 983 (*slBusinessAddress)[5] = ent.businessZip();
1016 } 984 }
1017 985
1018 if (hasCountry) { 986 if (hasCountry) {
1019 (*slHomeAddress)[6] = ent.homeCountry(); 987 (*slHomeAddress)[6] = ent.homeCountry();
1020 (*slBusinessAddress)[6] = ent.businessCountry(); 988 (*slBusinessAddress)[6] = ent.businessCountry();
1021 } 989 }