-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 13 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.h | 4 |
2 files changed, 12 insertions, 5 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 | |||
@@ -713,11 +713,19 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
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 ); |
@@ -728,8 +736,10 @@ void AddressbookWindow::editPersonal() | |||
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); |
@@ -742,6 +752,7 @@ void AddressbookWindow::slotPersonalView() | |||
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); |
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 2bedc0b..69fe2f8 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h | |||
@@ -99,15 +99,11 @@ private slots: | |||
99 | void slotConfig(); | 99 | void slotConfig(); |
100 | 100 | ||
101 | private: | 101 | private: |
102 | //void initFields(); // inititialize our fields... | ||
103 | // AbLabel *abView(); | ||
104 | void populateCategories(); | 102 | void populateCategories(); |
105 | 103 | ||
106 | QPopupMenu *catMenu; | 104 | QPopupMenu *catMenu; |
107 | QPEToolBar *listTools; | 105 | QPEToolBar *listTools; |
108 | QToolButton *deleteButton; | 106 | QToolButton *deleteButton; |
109 | //QValueList<int> allFields, orderedFields; | ||
110 | //QStringList slOrderedFields; | ||
111 | enum Panes { paneList=0, paneView, paneEdit }; | 107 | enum Panes { paneList=0, paneView, paneEdit }; |
112 | ContactEditor *abEditor; | 108 | ContactEditor *abEditor; |
113 | LetterPicker *pLabel; | 109 | LetterPicker *pLabel; |