summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.cpp
Unidiff
Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/viewmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 0614d06..c738ad8 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -103,16 +103,18 @@ void ViewManager::restoreSettings()
103 103
104 mActionSelectView->setItems( mViewNameList ); 104 mActionSelectView->setItems( mViewNameList );
105 105
106 // Filter 106 // Filter
107 mFilterList = Filter::restore( mCore->config(), "Filter" ); 107 mFilterList = Filter::restore( mCore->config(), "Filter" );
108 mActionSelectFilter->setItems( filterNames() ); 108 mActionSelectFilter->setItems( filterNames() );
109 mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); 109 mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter );
110 int cw = 150; 110 int cw = 150;
111 if ( QApplication::desktop()->width() >= 800 )
112 cw = 200;
111 if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch) 113 if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch)
112 cw = 0; 114 cw = 0;
113 mActionSelectFilter->setComboWidth( cw ); 115 mActionSelectFilter->setComboWidth( cw );
114 // Tell the views to reread their config, since they may have 116 // Tell the views to reread their config, since they may have
115 // been modified by global settings 117 // been modified by global settings
116 QString _oldgroup = mCore->config()->group(); 118 QString _oldgroup = mCore->config()->group();
117 119
118 QDictIterator<KAddressBookView> it( mViewDict ); 120 QDictIterator<KAddressBookView> it( mViewDict );
@@ -599,16 +601,18 @@ void ViewManager::configureFilters()
599 if ( dlg.exec() ) 601 if ( dlg.exec() )
600 mFilterList = dlg.filters(); 602 mFilterList = dlg.filters();
601 603
602 uint pos = mActionSelectFilter->currentItem(); 604 uint pos = mActionSelectFilter->currentItem();
603 mActionSelectFilter->setItems( filterNames() ); 605 mActionSelectFilter->setItems( filterNames() );
604 mActionSelectFilter->setCurrentItem( pos ); 606 mActionSelectFilter->setCurrentItem( pos );
605 setActiveFilter( pos ); 607 setActiveFilter( pos );
606 int cw = 150; 608 int cw = 150;
609 if ( QApplication::desktop()->width() >= 800 )
610 cw = 200;
607 if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch) 611 if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch)
608 cw = 0; 612 cw = 0;
609 mActionSelectFilter->setComboWidth( cw ); 613 mActionSelectFilter->setComboWidth( cw );
610 saveSettings(); 614 saveSettings();
611} 615}
612 616
613QStringList ViewManager::filterNames() const 617QStringList ViewManager::filterNames() const
614{ 618{