author | zautrix <zautrix> | 2004-09-08 15:08:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-08 15:08:13 (UTC) |
commit | 83570b43ee0d53737007031161c2694824351089 (patch) (side-by-side diff) | |
tree | 986fca69a9daf0632fbbfd3f144960858e0ebd84 /kaddressbook | |
parent | a1bf91640d9719694b3cfb027b0b53988480f041 (diff) | |
download | kdepimpi-83570b43ee0d53737007031161c2694824351089.zip kdepimpi-83570b43ee0d53737007031161c2694824351089.tar.gz kdepimpi-83570b43ee0d53737007031161c2694824351089.tar.bz2 |
Fix for the Z
-rw-r--r-- | kaddressbook/kabcore.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 74e5cf7..1a1bcff 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -265,76 +265,84 @@ void KABCore::restoreSettings() if (mMultipleViewsAtOnce) state = KABPrefs::instance()->mDetailsPageVisible; else state = false; mActionDetails->setChecked( state ); setDetailsVisible( state ); state = KABPrefs::instance()->mJumpButtonBarVisible; mActionJumpBar->setChecked( state ); setJumpButtonBarVisible( state ); /*US QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; if ( splitterSize.count() == 0 ) { splitterSize.append( width() / 2 ); splitterSize.append( width() / 2 ); } mMiniSplitter->setSizes( splitterSize ); if ( mExtensionBarSplitter ) { splitterSize = KABPrefs::instance()->mExtensionsSplitter; if ( splitterSize.count() == 0 ) { splitterSize.append( width() / 2 ); splitterSize.append( width() / 2 ); } mExtensionBarSplitter->setSizes( splitterSize ); } */ mViewManager->restoreSettings(); mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); mExtensionManager->restoreSettings(); - - QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; - if ( splitterSize.count() == 0 ) { - splitterSize.append( width() / 2 ); - splitterSize.append( width() / 2 ); +#ifdef DESKTOP_VERSION + int wid = width(); + if ( wid < 10 ) + wid = 400; +#else + int wid = QApplication::desktop()->width(); + if ( wid < 640 ) + wid = QApplication::desktop()->height(); +#endif + QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + if ( true /*splitterSize.count() == 0*/ ) { + splitterSize.append( wid / 2 ); + splitterSize.append( wid / 2 ); } mMiniSplitter->setSizes( splitterSize ); if ( mExtensionBarSplitter ) { - splitterSize = KABPrefs::instance()->mExtensionsSplitter; - if ( splitterSize.count() == 0 ) { - splitterSize.append( width() / 2 ); - splitterSize.append( width() / 2 ); + //splitterSize = KABPrefs::instance()->mExtensionsSplitter; + if ( true /*splitterSize.count() == 0*/ ) { + splitterSize.append( wid / 2 ); + splitterSize.append( wid / 2 ); } mExtensionBarSplitter->setSizes( splitterSize ); } } void KABCore::saveSettings() { KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); if ( mExtensionBarSplitter ) KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); #ifndef KAB_EMBEDDED KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); #endif //KAB_EMBEDDED mExtensionManager->saveSettings(); mViewManager->saveSettings(); KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); } KABC::AddressBook *KABCore::addressBook() const { return mAddressBook; } KConfig *KABCore::config() |