Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index c2cce92..12dc24e 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -710,41 +710,52 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
710 | 710 | ||
711 | } | 711 | } |
712 | 712 | ||
713 | void AddressbookWindow::editPersonal() | 713 | void AddressbookWindow::editPersonal() |
714 | { | 714 | { |
715 | OContact entry; | 715 | OContact entry; |
716 | |||
717 | // Switch to personal view if not selected | ||
718 | // but take care of the menu, too | ||
719 | if ( ! actionPersonal->isOn() ){ | ||
720 | qWarning("*** ++++"); | ||
721 | actionPersonal->setOn( true ); | ||
722 | slotPersonalView(); | ||
723 | } | ||
724 | |||
716 | if ( !abEditor ) { | 725 | if ( !abEditor ) { |
717 | abEditor = new ContactEditor( entry, this, "editor" ); | 726 | abEditor = new ContactEditor( entry, this, "editor" ); |
718 | } | 727 | } |
719 | 728 | ||
720 | m_abView->showPersonal( true ); | ||
721 | abEditor->setCaption(tr("Edit My Personal Details")); | 729 | abEditor->setCaption(tr("Edit My Personal Details")); |
722 | abEditor->setPersonalView( true ); | 730 | abEditor->setPersonalView( true ); |
723 | editEntry( EditEntry ); | 731 | editEntry( EditEntry ); |
724 | abEditor->setPersonalView( false ); | 732 | abEditor->setPersonalView( false ); |
725 | 733 | ||
726 | } | 734 | } |
727 | 735 | ||
728 | 736 | ||
729 | void AddressbookWindow::slotPersonalView() | 737 | void AddressbookWindow::slotPersonalView() |
730 | { | 738 | { |
739 | qWarning("slotPersonalView()"); | ||
731 | if (!actionPersonal->isOn()) { | 740 | if (!actionPersonal->isOn()) { |
732 | // we just turned it off | 741 | // we just turned it off |
742 | qWarning("slotPersonalView()-> OFF"); | ||
733 | setCaption( tr("Contacts") ); | 743 | setCaption( tr("Contacts") ); |
734 | actionNew->setEnabled(TRUE); | 744 | actionNew->setEnabled(TRUE); |
735 | actionTrash->setEnabled(TRUE); | 745 | actionTrash->setEnabled(TRUE); |
736 | actionFind->setEnabled(TRUE); | 746 | actionFind->setEnabled(TRUE); |
737 | actionMail->setEnabled(TRUE); | 747 | actionMail->setEnabled(TRUE); |
738 | // slotUpdateToolbar(); | 748 | // slotUpdateToolbar(); |
739 | 749 | ||
740 | m_abView->showPersonal( false ); | 750 | m_abView->showPersonal( false ); |
741 | 751 | ||
742 | return; | 752 | return; |
743 | } | 753 | } |
744 | 754 | ||
755 | qWarning("slotPersonalView()-> ON"); | ||
745 | // XXX need to disable some QActions. | 756 | // XXX need to disable some QActions. |
746 | actionNew->setEnabled(FALSE); | 757 | actionNew->setEnabled(FALSE); |
747 | actionTrash->setEnabled(FALSE); | 758 | actionTrash->setEnabled(FALSE); |
748 | actionFind->setEnabled(FALSE); | 759 | actionFind->setEnabled(FALSE); |
749 | actionMail->setEnabled(FALSE); | 760 | actionMail->setEnabled(FALSE); |
750 | 761 | ||