author | drw <drw> | 2005-02-07 22:08:38 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-07 22:08:38 (UTC) |
commit | 2e4fd59ce900490ccbbb6c0f7b2fcd4811ac8a07 (patch) (unidiff) | |
tree | dd1c91d19c4e53fea60245e3d4d535ac176ee2c8 | |
parent | 7631c91d6c495a6c60e87a9ab131280f31ee4c87 (diff) | |
download | opie-2e4fd59ce900490ccbbb6c0f7b2fcd4811ac8a07.zip opie-2e4fd59ce900490ccbbb6c0f7b2fcd4811ac8a07.tar.gz opie-2e4fd59ce900490ccbbb6c0f7b2fcd4811ac8a07.tar.bz2 |
Fix contact edit dialog captioning
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 75e539a..6984501 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -655,26 +655,30 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) | |||
655 | } | 655 | } |
656 | 656 | ||
657 | void AddressbookWindow::editEntry( EntryMode entryMode ) | 657 | void AddressbookWindow::editEntry( EntryMode entryMode ) |
658 | { | 658 | { |
659 | Opie::OPimContact entry; | 659 | Opie::OPimContact entry; |
660 | if ( !abEditor ) { | 660 | if ( !abEditor ) { |
661 | abEditor = new ContactEditor( entry, this, "editor" ); | 661 | abEditor = new ContactEditor( entry, this, "editor" ); |
662 | } | 662 | } |
663 | if ( entryMode == EditEntry ) | 663 | if ( entryMode == EditEntry ) |
664 | abEditor->setEntry( m_abView -> currentEntry() ); | 664 | abEditor->setEntry( m_abView -> currentEntry() ); |
665 | else if ( entryMode == NewEntry ) | 665 | else if ( entryMode == NewEntry ) |
666 | abEditor->setEntry( entry ); | 666 | abEditor->setEntry( entry ); |
667 | // other things may change the caption. | 667 | |
668 | abEditor->setCaption( tr("Edit Address") ); | 668 | // Set the dialog caption |
669 | if ( m_actionPersonal->isOn() ) | ||
670 | abEditor->setCaption( tr( "Edit My Personal Details" ) ); | ||
671 | else | ||
672 | abEditor->setCaption( tr( "Edit Contact" ) ); | ||
669 | 673 | ||
670 | // fix the focus... | 674 | // fix the focus... |
671 | abEditor->setNameFocus(); | 675 | abEditor->setNameFocus(); |
672 | if ( QPEApplication::execDialog( abEditor ) == QDialog::Accepted ) { | 676 | if ( QPEApplication::execDialog( abEditor ) == QDialog::Accepted ) { |
673 | setFocus(); | 677 | setFocus(); |
674 | if ( entryMode == NewEntry ) { | 678 | if ( entryMode == NewEntry ) { |
675 | Opie::OPimContact insertEntry = abEditor->entry(); | 679 | Opie::OPimContact insertEntry = abEditor->entry(); |
676 | insertEntry.assignUid(); | 680 | insertEntry.assignUid(); |
677 | m_abView -> addEntry( insertEntry ); | 681 | m_abView -> addEntry( insertEntry ); |
678 | m_abView -> setCurrentUid( insertEntry.uid() ); | 682 | m_abView -> setCurrentUid( insertEntry.uid() ); |
679 | } else { | 683 | } else { |
680 | Opie::OPimContact replEntry = abEditor->entry(); | 684 | Opie::OPimContact replEntry = abEditor->entry(); |
@@ -697,28 +701,27 @@ void AddressbookWindow::editPersonal() | |||
697 | // Switch to personal view if not selected | 701 | // Switch to personal view if not selected |
698 | // but take care of the menu, too | 702 | // but take care of the menu, too |
699 | if ( ! m_actionPersonal->isOn() ){ | 703 | if ( ! m_actionPersonal->isOn() ){ |
700 | odebug << "*** ++++" << oendl; | 704 | odebug << "*** ++++" << oendl; |
701 | m_actionPersonal->setOn( true ); | 705 | m_actionPersonal->setOn( true ); |
702 | slotPersonalView(); | 706 | slotPersonalView(); |
703 | } | 707 | } |
704 | 708 | ||
705 | if ( !abEditor ) { | 709 | if ( !abEditor ) { |
706 | abEditor = new ContactEditor( entry, this, "editor" ); | 710 | abEditor = new ContactEditor( entry, this, "editor" ); |
707 | } | 711 | } |
708 | 712 | ||
709 | abEditor->setCaption(tr("Edit My Personal Details")); | 713 | abEditor->setPersonalView( true ); |
710 | abEditor->setPersonalView( true ); | ||
711 | editEntry( EditEntry ); | 714 | editEntry( EditEntry ); |
712 | abEditor->setPersonalView( false ); | 715 | abEditor->setPersonalView( false ); |
713 | 716 | ||
714 | } | 717 | } |
715 | 718 | ||
716 | 719 | ||
717 | void AddressbookWindow::slotPersonalView() | 720 | void AddressbookWindow::slotPersonalView() |
718 | { | 721 | { |
719 | odebug << "slotPersonalView()" << oendl; | 722 | odebug << "slotPersonalView()" << oendl; |
720 | 723 | ||
721 | bool personal = m_actionPersonal->isOn(); | 724 | bool personal = m_actionPersonal->isOn(); |
722 | 725 | ||
723 | // Disable actions when showing personal details | 726 | // Disable actions when showing personal details |
724 | setItemNewEnabled( !personal ); | 727 | setItemNewEnabled( !personal ); |