author | zautrix <zautrix> | 2004-12-13 12:35:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-13 12:35:00 (UTC) |
commit | 7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (side-by-side diff) | |
tree | c7610e0e25020f19af82ac6257c2debab2638316 /kaddressbook | |
parent | 17b25691f0332e648dd1d800e89ccf4e1da8955d (diff) | |
download | kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.zip kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.gz kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.bz2 |
many bugfixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 11 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 11 |
2 files changed, 16 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b7edccd..f6bdda4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -784,12 +784,13 @@ void KABCore::updateMainWindow() mMainWindow->update(); } void KABCore::resizeEvent(QResizeEvent* e ) { if ( !mMiniSplitter ) return; + //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); if ( QApplication::desktop()->width() >= 480 ) { if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 if ( mMiniSplitter->orientation() == Qt::Vertical ) { mMiniSplitter->setOrientation( Qt::Horizontal); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); if ( QApplication::desktop()->width() <= 640 ) { @@ -2189,17 +2190,19 @@ void KABCore::addActionsManually() mActionAboutKAddressbook->plug( helpMenu ); if (KGlobal::getDesktopSize() > KGlobal::Small ) { mActionSave->plug( tb ); mViewManager->getFilterAction()->plug ( tb); - if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { - mActionUndo->plug( tb ); - mActionDelete->plug( tb ); - mActionRedo->plug( tb ); + //LR hide filteraction on started in 480x640 + if (QApplication::desktop()->width() == 480 ) { + mViewManager->getFilterAction()->setComboWidth( 0 ); } + mActionUndo->plug( tb ); + mActionDelete->plug( tb ); + mActionRedo->plug( tb ); } else { mActionSave->plug( tb ); tb->enableMoving(false); } //mActionQuit->plug ( tb ); // tb->insertWidget(-1, 0, mIncSearchWidget, 6); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 0d91c12..33bef5a 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -57,12 +57,13 @@ $Id$ #include <kdebug.h> #include <kactionclasses.h> #include <qlayout.h> +#include <qapplication.h> #include <qwidgetstack.h> #include <kabc/addressbook.h> #include "filtereditdialog.h" #include "addviewdialog.h" #include "kabcore.h" @@ -103,13 +104,16 @@ void ViewManager::restoreSettings() mActionSelectView->setItems( mViewNameList ); // Filter mFilterList = Filter::restore( mCore->config(), "Filter" ); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); - mActionSelectFilter->setComboWidth( 150 ); + int cw = 150; + if (QApplication::desktop()->width() == 480 ) + cw = 0; + mActionSelectFilter->setComboWidth( cw ); // Tell the views to reread their config, since they may have // been modified by global settings QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -594,13 +598,16 @@ void ViewManager::configureFilters() mFilterList = dlg.filters(); uint pos = mActionSelectFilter->currentItem(); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); - mActionSelectFilter->setComboWidth( 150 ); + int cw = 150; + if (QApplication::desktop()->width() == 480 ) + cw = 0; + mActionSelectFilter->setComboWidth( cw ); } QStringList ViewManager::filterNames() const { QStringList names( i18n( "No Filter" ) ); |