author | drw <drw> | 2005-02-07 20:32:51 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-07 20:32:51 (UTC) |
commit | e56c7dfec502972fc7efcd9e0357c371d0e9cd15 (patch) (unidiff) | |
tree | 7dec179671853b250afdfc6f55decda42d86fc2d /core/pim/addressbook | |
parent | aeda5d05178f635c05ce4556e3a0b7f9be7d6401 (diff) | |
download | opie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.zip opie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.tar.gz opie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.tar.bz2 |
Disable certain UI elements while editing personal details
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index a4c2c6e..7c52ef2 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -710,3 +710,3 @@ void AddressbookWindow::slotPersonalView() | |||
710 | 710 | ||
711 | // Disable certain menu items when showing personal details | 711 | // Disable actions when showing personal details |
712 | setItemNewEnabled( !personal ); | 712 | setItemNewEnabled( !personal ); |
@@ -715,2 +715,3 @@ void AddressbookWindow::slotPersonalView() | |||
715 | m_actionMail->setEnabled( !personal ); | 715 | m_actionMail->setEnabled( !personal ); |
716 | setShowCategories( !personal ); | ||
716 | 717 | ||
@@ -719,5 +720,20 @@ void AddressbookWindow::slotPersonalView() | |||
719 | 720 | ||
720 | // Set application caption | 721 | if ( personal ) |
721 | personal ? setCaption( tr( "Contacts - My Personal Details") ) | 722 | { |
722 | : setCaption( tr( "Contacts") ); | 723 | setCaption( tr( "Contacts - My Personal Details") ); |
724 | |||
725 | // Set category to 'All' to make sure personal details is visible | ||
726 | setViewCategory( "All" ); | ||
727 | m_abView->setShowByCategory( "All" ); | ||
728 | |||
729 | // Temporarily disable letter picker | ||
730 | pLabel->hide(); | ||
731 | } | ||
732 | else | ||
733 | { | ||
734 | setCaption( tr( "Contacts") ); | ||
735 | |||
736 | // Re-enable letter picker | ||
737 | pLabel->show(); | ||
738 | } | ||
723 | } | 739 | } |
@@ -740,4 +756,16 @@ void AddressbookWindow::closeEvent( QCloseEvent *e ) | |||
740 | { | 756 | { |
741 | if(active_view == AbView::CardView){ | 757 | if ( active_view == AbView::CardView ) |
758 | { | ||
759 | if ( !m_actionPersonal->isOn() ) | ||
760 | { | ||
761 | // Switch to table view only if not editing personal details | ||
742 | slotViewSwitched( AbView::TableView ); | 762 | slotViewSwitched( AbView::TableView ); |
763 | } | ||
764 | else | ||
765 | { | ||
766 | // If currently editing personal details, switch off personal view | ||
767 | m_actionPersonal->setOn( false ); | ||
768 | slotPersonalView(); | ||
769 | } | ||
770 | |||
743 | e->ignore(); | 771 | e->ignore(); |