-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" ) ); |