summaryrefslogtreecommitdiff
authordrw <drw>2005-02-07 20:32:51 (UTC)
committer drw <drw>2005-02-07 20:32:51 (UTC)
commite56c7dfec502972fc7efcd9e0357c371d0e9cd15 (patch) (side-by-side diff)
tree7dec179671853b250afdfc6f55decda42d86fc2d
parentaeda5d05178f635c05ce4556e3a0b7f9be7d6401 (diff)
downloadopie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.zip
opie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.tar.gz
opie-e56c7dfec502972fc7efcd9e0357c371d0e9cd15.tar.bz2
Disable certain UI elements while editing personal details
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp44
1 files changed, 36 insertions, 8 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()
- // Disable certain menu items when showing personal details
+ // Disable actions when showing personal details
setItemNewEnabled( !personal );
@@ -715,2 +715,3 @@ void AddressbookWindow::slotPersonalView()
m_actionMail->setEnabled( !personal );
+ setShowCategories( !personal );
@@ -719,5 +720,20 @@ void AddressbookWindow::slotPersonalView()
- // Set application caption
- personal ? setCaption( tr( "Contacts - My Personal Details") )
- : setCaption( tr( "Contacts") );
+ if ( personal )
+ {
+ setCaption( tr( "Contacts - My Personal Details") );
+
+ // Set category to 'All' to make sure personal details is visible
+ setViewCategory( "All" );
+ m_abView->setShowByCategory( "All" );
+
+ // Temporarily disable letter picker
+ pLabel->hide();
+ }
+ else
+ {
+ setCaption( tr( "Contacts") );
+
+ // Re-enable letter picker
+ pLabel->show();
+ }
}
@@ -740,6 +756,18 @@ void AddressbookWindow::closeEvent( QCloseEvent *e )
{
- if(active_view == AbView::CardView){
- slotViewSwitched( AbView::TableView );
- e->ignore();
- return;
+ if ( active_view == AbView::CardView )
+ {
+ if ( !m_actionPersonal->isOn() )
+ {
+ // Switch to table view only if not editing personal details
+ slotViewSwitched( AbView::TableView );
+ }
+ else
+ {
+ // If currently editing personal details, switch off personal view
+ m_actionPersonal->setOn( false );
+ slotPersonalView();
+ }
+
+ e->ignore();
+ return;
}