-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 19 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 20 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 4 |
4 files changed, 24 insertions, 20 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 7577079..b1ffe04 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -123,8 +123,9 @@ void IncSearchWidget::setSize() } else { QFontMetrics fm ( mFieldCombo->font() ); int wid = fm.width(i18n( "All Fields" ) ); #ifdef DESKTOP_VERSION + mFieldCombo->setMinimumWidth( wid+60 ); wid = wid * 2; #endif mFieldCombo->setMaximumWidth( wid+60 ); mSearchText->setMaximumWidth( 1024 ); diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a4f3579..cba5850 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -584,26 +584,9 @@ void KABCore::saveSettings() mExtensionManager->saveSettings(); mViewManager->saveSettings(); KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); -#ifdef DESKTOP_VERSION - KConfig *config = KABPrefs::instance()->getConfig(); - config->setGroup("WidgetLayout"); - QStringList list ;//= config->readListEntry("MainLayout"); - int x,y,w,h; - QWidget* wid; - wid = topLevelWidget(); - x = wid->geometry().x(); - y = wid->geometry().y(); - w = wid->width(); - h = wid->height(); - list.clear(); - list << QString::number( x ); - list << QString::number( y ); - list << QString::number( w ); - list << QString::number( h ); - config->writeEntry("MainLayout",list ); -#endif + KABPrefs::instance()->writeConfig(); qDebug("KA: KABCore::saveSettings() "); } diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 336e350..50db377 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -88,13 +88,29 @@ int main( int argc, char **argv ) a.showMainWidget( &m ); #else a.setMainWidget( &m ); - m.resize (640, 480 ); m.show(); #endif a.exec(); - +#ifdef DESKTOP_VERSION + KConfig *config = KABPrefs::instance()->getConfig(); + config->setGroup("WidgetLayout"); + QStringList list ;//= config->readListEntry("MainLayout"); + int x,y,w,h; + QWidget* wid; + wid = &m; + x = wid->geometry().x(); + y = wid->geometry().y(); + w = wid->width(); + h = wid->height(); + list.clear(); + list << QString::number( x ); + list << QString::number( y ); + list << QString::number( w ); + list << QString::number( h ); + config->writeEntry("MainLayout",list ); +#endif dumpMissing(); KPimGlobalPrefs::instance()->writeConfig(); } diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 0614d06..c738ad8 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -107,8 +107,10 @@ void ViewManager::restoreSettings() mFilterList = Filter::restore( mCore->config(), "Filter" ); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); int cw = 150; + if ( QApplication::desktop()->width() >= 800 ) + cw = 200; if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch) cw = 0; mActionSelectFilter->setComboWidth( cw ); // Tell the views to reread their config, since they may have @@ -603,8 +605,10 @@ void ViewManager::configureFilters() mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); int cw = 150; + if ( QApplication::desktop()->width() >= 800 ) + cw = 200; if (QApplication::desktop()->width() == 480 && !KABPrefs::instance()->mHideSearchOnSwitch) cw = 0; mActionSelectFilter->setComboWidth( cw ); saveSettings(); |