summaryrefslogtreecommitdiff
authoreilers <eilers>2003-08-01 13:57:54 (UTC)
committer eilers <eilers>2003-08-01 13:57:54 (UTC)
commit5346424fc26bde232a15aa34fbb720f86218b26f (patch) (side-by-side diff)
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
@@ -937,121 +937,121 @@ void AddressbookWindow::slotSetCategory( int c )
else
// Checkmark Category Menu Item Selected
for ( unsigned int i = 3; i < catMenu->count(); i++ )
catMenu->setItemChecked( i, c == (int)i );
// Now switch to the selected category
for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
if (catMenu->isItemChecked( i )) {
if ( i == 1 ){ // default List view
book = QString::null;
view = AbView::TableView;
}else if ( i == 2 ){
book = tr( "Cards" );
view = AbView::CardView;
// }else if ( i == 3 ){
// book = tr( "Personal" );
// view = AbView:: PersonalView;
}else if ( i == 3 ){ // default All Categories
cat = QString::null;
}else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled
cat = "Unfiled";
qWarning ("Unfiled selected!");
}else{
cat = m_abView->categories()[i - 4];
}
}
}
// Switch to the selected View
slotViewSwitched( view );
// Tell the view about the selected category
m_abView -> setShowByCategory( cat );
if ( book.isEmpty() )
book = "List";
if ( cat.isEmpty() )
cat = "All";
setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
}
void AddressbookWindow::slotViewSwitched( int view )
{
qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view );
int menu = 0;
// Switch to selected view
switch ( view ){
case AbView::TableView:
menu = 1;
m_tableViewButton->setOn(true);
m_cardViewButton->setOn(false);
break;
case AbView::CardView:
menu = 2;
m_tableViewButton->setOn(false);
m_cardViewButton->setOn(true);
break;
}
for ( unsigned int i = 1; i < 3; i++ ){
if ( catMenu )
catMenu->setItemChecked( i, menu == (int)i );
}
// Tell the view about the selected view
m_abView -> setShowToView ( (AbView::Views) view );
active_view = view;
}
void AddressbookWindow::slotListView()
{
slotViewSwitched( AbView::TableView );
}
void AddressbookWindow::slotCardView()
{
slotViewSwitched( AbView::CardView );
}
void AddressbookWindow::slotSetLetter( char c ) {
m_abView->setShowByLetter( c, m_config.letterPickerSearch() );
}
void AddressbookWindow::populateCategories()
{
catMenu->clear();
int id, rememberId;
id = 1;
rememberId = 0;
- catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ );
- catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ );
+ catMenu->insertItem( Resource::loadPixmap( "addressbook/listview" ), tr( "List" ), id++ );
+ catMenu->insertItem( Resource::loadPixmap( "addressbook/cardview" ), tr( "Cards" ), id++ );
// catMenu->insertItem( tr( "Personal" ), id++ );
catMenu->insertSeparator();
catMenu->insertItem( tr( "All" ), id++ );
QStringList categories = m_abView->categories();
categories.append( tr( "Unfiled" ) );
for ( QStringList::Iterator it = categories.begin();
it != categories.end(); ++it ) {
catMenu->insertItem( *it, id );
if ( *it == m_abView -> showCategory() )
rememberId = id;
++id;
}
if ( m_abView -> showCategory().isEmpty() ) {
slotSetCategory( 3 );
}
else {
slotSetCategory( rememberId );
}
}