summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-22 18:54:01 (UTC)
committer zautrix <zautrix>2005-04-22 18:54:01 (UTC)
commit3fa082fb01716c63546df5d753c1b677e54c59ce (patch) (side-by-side diff)
treef19e79e515174aab2cea0e8016eb9aa59bcc5095
parente6feb1ca0c45397ba7b922198c87fe9b95b7d872 (diff)
downloadkdepimpi-3fa082fb01716c63546df5d753c1b677e54c59ce.zip
kdepimpi-3fa082fb01716c63546df5d753c1b677e54c59ce.tar.gz
kdepimpi-3fa082fb01716c63546df5d753c1b677e54c59ce.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/incsearchwidget.cpp1
-rw-r--r--kaddressbook/kabcore.cpp19
-rw-r--r--kaddressbook/mainembedded.cpp26
-rw-r--r--kaddressbook/viewmanager.cpp4
4 files changed, 27 insertions, 23 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index 7577079..b1ffe04 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -124,6 +124,7 @@ void IncSearchWidget::setSize()
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 );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index a4f3579..cba5850 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -585,24 +585,7 @@ void KABCore::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
@@ -89,14 +89,30 @@ int main( int argc, char **argv )
#else
a.setMainWidget( &m );
- m.resize (640, 480 );
m.show();
#endif
a.exec();
-
- dumpMissing();
-
- KPimGlobalPrefs::instance()->writeConfig();
+#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();
}
qDebug("KA: Bye! ");
}
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 0614d06..c738ad8 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -108,6 +108,8 @@ void ViewManager::restoreSettings()
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 );
@@ -604,6 +606,8 @@ void ViewManager::configureFilters()
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 );