summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp46
1 files changed, 18 insertions, 28 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 3b2e4b8..5d588da 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -823,8 +823,10 @@ void AddressbookWindow::slotSetCategory( int c )
823 823
824 // Checkmark Book Menu Item Selected 824 // Switch view
825 if ( c < 3 ) 825 if ( c < 3 )
826 for ( unsigned int i = 1; i < 3; i++ ) 826 for ( unsigned int i = 1; i < 3; i++ ){
827 catMenu->setItemChecked( i, c == (int)i ); 827 if ( catMenu )
828 // Checkmark Category Menu Item Selected 828 catMenu->setItemChecked( i, c == (int)i );
829 }
829 else 830 else
831 // Checkmark Category Menu Item Selected
830 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 832 for ( unsigned int i = 3; i < catMenu->count(); i++ )
@@ -832,2 +834,3 @@ void AddressbookWindow::slotSetCategory( int c )
832 834
835 // Now switch to the selected category
833 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 836 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
@@ -854,5 +857,7 @@ void AddressbookWindow::slotSetCategory( int c )
854 857
858 // Switch to the selected View
855 slotViewSwitched( view ); 859 slotViewSwitched( view );
856 860
857 m_abView -> setShowByCategory( view, cat ); 861 // Tell the view about the selected category
862 m_abView -> setShowByCategory( cat );
858 863
@@ -870,2 +875,4 @@ void AddressbookWindow::slotViewSwitched( int view )
870 int menu = 0; 875 int menu = 0;
876
877 // Switch to selected view
871 switch ( view ){ 878 switch ( view ){
@@ -881,11 +888,2 @@ void AddressbookWindow::slotViewSwitched( int view )
881 break; 888 break;
882 // case AbView::PersonalView:
883 // menu = 3;
884 // break;
885 // case AbView::CompanyBook:
886 // menu = 3;
887 // break;
888 // case AbView::EmailBook:
889 // menu = 4;
890 // break;
891 } 889 }
@@ -895,2 +893,6 @@ void AddressbookWindow::slotViewSwitched( int view )
895 } 893 }
894
895 // Tell the view about the selected view
896 m_abView -> setShowToView ( (AbView::Views) view );
897
896} 898}
@@ -900,3 +902,3 @@ void AddressbookWindow::slotListView()
900{ 902{
901 emit slotSetCategory( AbView::TableView +1 ); 903 slotViewSwitched( AbView::TableView );
902} 904}
@@ -905,3 +907,3 @@ void AddressbookWindow::slotCardView()
905{ 907{
906 emit slotSetCategory( AbView::CardView +1 ); 908 slotViewSwitched( AbView::CardView );
907} 909}
@@ -939,14 +941,2 @@ void AddressbookWindow::populateCategories()
939 941
940 // :SX
941 // if ( abList->showBook().isEmpty() ) {
942 // catMenu->setItemChecked( 1, true );
943 // } else if ( abList->showBook() == "Phone" ) {
944 // catMenu->setItemChecked( 2, true );
945 // } else if ( abList->showBook() == "Company" ) {
946 // catMenu->setItemChecked( 3, true );
947 // } else if ( abList->showBook() == "Email" ) {
948 // catMenu->setItemChecked( 4, true );
949 // } else if ( abList->showBook() == "Cards" ) {
950 // catMenu->setItemChecked( 5, true );
951 // }
952 942