summaryrefslogtreecommitdiff
authoreilers <eilers>2003-08-01 13:57:54 (UTC)
committer eilers <eilers>2003-08-01 13:57:54 (UTC)
commit5346424fc26bde232a15aa34fbb720f86218b26f (patch) (unidiff)
treeb6ce224b1fb517e8b31db1b9e0ef30cf539f6f6f
parent307b353d11842b0994827e4130b48386454b3f94 (diff)
downloadopie-5346424fc26bde232a15aa34fbb720f86218b26f.zip
opie-5346424fc26bde232a15aa34fbb720f86218b26f.tar.gz
opie-5346424fc26bde232a15aa34fbb720f86218b26f.tar.bz2
Icon bug.. fixed.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 6819085..03c96c8 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -969,89 +969,89 @@ void AddressbookWindow::slotSetCategory( int c )
969 m_abView -> setShowByCategory( cat ); 969 m_abView -> setShowByCategory( cat );
970 970
971 if ( book.isEmpty() ) 971 if ( book.isEmpty() )
972 book = "List"; 972 book = "List";
973 if ( cat.isEmpty() ) 973 if ( cat.isEmpty() )
974 cat = "All"; 974 cat = "All";
975 975
976 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 976 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
977} 977}
978 978
979void AddressbookWindow::slotViewSwitched( int view ) 979void AddressbookWindow::slotViewSwitched( int view )
980{ 980{
981 qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); 981 qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view );
982 int menu = 0; 982 int menu = 0;
983 983
984 // Switch to selected view 984 // Switch to selected view
985 switch ( view ){ 985 switch ( view ){
986 case AbView::TableView: 986 case AbView::TableView:
987 menu = 1; 987 menu = 1;
988 m_tableViewButton->setOn(true); 988 m_tableViewButton->setOn(true);
989 m_cardViewButton->setOn(false); 989 m_cardViewButton->setOn(false);
990 break; 990 break;
991 case AbView::CardView: 991 case AbView::CardView:
992 menu = 2; 992 menu = 2;
993 m_tableViewButton->setOn(false); 993 m_tableViewButton->setOn(false);
994 m_cardViewButton->setOn(true); 994 m_cardViewButton->setOn(true);
995 break; 995 break;
996 } 996 }
997 for ( unsigned int i = 1; i < 3; i++ ){ 997 for ( unsigned int i = 1; i < 3; i++ ){
998 if ( catMenu ) 998 if ( catMenu )
999 catMenu->setItemChecked( i, menu == (int)i ); 999 catMenu->setItemChecked( i, menu == (int)i );
1000 } 1000 }
1001 1001
1002 // Tell the view about the selected view 1002 // Tell the view about the selected view
1003 m_abView -> setShowToView ( (AbView::Views) view ); 1003 m_abView -> setShowToView ( (AbView::Views) view );
1004 active_view = view; 1004 active_view = view;
1005} 1005}
1006 1006
1007 1007
1008void AddressbookWindow::slotListView() 1008void AddressbookWindow::slotListView()
1009{ 1009{
1010 slotViewSwitched( AbView::TableView ); 1010 slotViewSwitched( AbView::TableView );
1011} 1011}
1012 1012
1013void AddressbookWindow::slotCardView() 1013void AddressbookWindow::slotCardView()
1014{ 1014{
1015 slotViewSwitched( AbView::CardView ); 1015 slotViewSwitched( AbView::CardView );
1016} 1016}
1017 1017
1018void AddressbookWindow::slotSetLetter( char c ) { 1018void AddressbookWindow::slotSetLetter( char c ) {
1019 1019
1020 m_abView->setShowByLetter( c, m_config.letterPickerSearch() ); 1020 m_abView->setShowByLetter( c, m_config.letterPickerSearch() );
1021 1021
1022} 1022}
1023 1023
1024 1024
1025void AddressbookWindow::populateCategories() 1025void AddressbookWindow::populateCategories()
1026{ 1026{
1027 catMenu->clear(); 1027 catMenu->clear();
1028 1028
1029 int id, rememberId; 1029 int id, rememberId;
1030 id = 1; 1030 id = 1;
1031 rememberId = 0; 1031 rememberId = 0;
1032 1032
1033 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); 1033 catMenu->insertItem( Resource::loadPixmap( "addressbook/listview" ), tr( "List" ), id++ );
1034 catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); 1034 catMenu->insertItem( Resource::loadPixmap( "addressbook/cardview" ), tr( "Cards" ), id++ );
1035 // catMenu->insertItem( tr( "Personal" ), id++ ); 1035 // catMenu->insertItem( tr( "Personal" ), id++ );
1036 catMenu->insertSeparator(); 1036 catMenu->insertSeparator();
1037 1037
1038 catMenu->insertItem( tr( "All" ), id++ ); 1038 catMenu->insertItem( tr( "All" ), id++ );
1039 QStringList categories = m_abView->categories(); 1039 QStringList categories = m_abView->categories();
1040 categories.append( tr( "Unfiled" ) ); 1040 categories.append( tr( "Unfiled" ) );
1041 for ( QStringList::Iterator it = categories.begin(); 1041 for ( QStringList::Iterator it = categories.begin();
1042 it != categories.end(); ++it ) { 1042 it != categories.end(); ++it ) {
1043 catMenu->insertItem( *it, id ); 1043 catMenu->insertItem( *it, id );
1044 if ( *it == m_abView -> showCategory() ) 1044 if ( *it == m_abView -> showCategory() )
1045 rememberId = id; 1045 rememberId = id;
1046 ++id; 1046 ++id;
1047 } 1047 }
1048 1048
1049 1049
1050 if ( m_abView -> showCategory().isEmpty() ) { 1050 if ( m_abView -> showCategory().isEmpty() ) {
1051 slotSetCategory( 3 ); 1051 slotSetCategory( 3 );
1052 } 1052 }
1053 else { 1053 else {
1054 slotSetCategory( rememberId ); 1054 slotSetCategory( rememberId );
1055 } 1055 }
1056} 1056}
1057 1057