-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index b1ffe04..5f8b83d 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp | |||
@@ -105,35 +105,38 @@ void IncSearchWidget::announceDoSearch2() | |||
105 | } | 105 | } |
106 | 106 | ||
107 | void IncSearchWidget::announceDoSearch() | 107 | void IncSearchWidget::announceDoSearch() |
108 | { | 108 | { |
109 | 109 | ||
110 | emit doSearch( mSearchText->text() ); | 110 | emit doSearch( mSearchText->text() ); |
111 | // qDebug("emit dosreach "); | 111 | // qDebug("emit dosreach "); |
112 | } | 112 | } |
113 | 113 | ||
114 | void IncSearchWidget::announceFieldChanged() | 114 | void IncSearchWidget::announceFieldChanged() |
115 | { | 115 | { |
116 | emit fieldChanged(); | 116 | emit fieldChanged(); |
117 | } | 117 | } |
118 | void IncSearchWidget::setSize() | 118 | void IncSearchWidget::setSize() |
119 | { | 119 | { |
120 | if ( KABPrefs::instance()->mHideSearchOnSwitch && QApplication::desktop()->width() == 480) { | 120 | if ( KABPrefs::instance()->mHideSearchOnSwitch && QApplication::desktop()->width() == 480) { |
121 | mFieldCombo->setMaximumWidth( 40 ); | 121 | setCurrentItem( 0 ); |
122 | mSearchText->setMaximumWidth( 30 ); | 122 | //mFieldCombo->setMaximumWidth( 0 ); |
123 | mFieldCombo->hide(); | ||
124 | mSearchText->setMaximumWidth( 200 ); | ||
123 | } else { | 125 | } else { |
126 | mFieldCombo->show(); | ||
124 | QFontMetrics fm ( mFieldCombo->font() ); | 127 | QFontMetrics fm ( mFieldCombo->font() ); |
125 | int wid = fm.width(i18n( "All Fields" ) ); | 128 | int wid = fm.width(i18n( "All Fields" ) ); |
126 | #ifdef DESKTOP_VERSION | 129 | #ifdef DESKTOP_VERSION |
127 | mFieldCombo->setMinimumWidth( wid+60 ); | 130 | mFieldCombo->setMinimumWidth( wid+60 ); |
128 | wid = wid * 2; | 131 | wid = wid * 2; |
129 | #endif | 132 | #endif |
130 | mFieldCombo->setMaximumWidth( wid+60 ); | 133 | mFieldCombo->setMaximumWidth( wid+60 ); |
131 | mSearchText->setMaximumWidth( 1024 ); | 134 | mSearchText->setMaximumWidth( 1024 ); |
132 | } | 135 | } |
133 | } | 136 | } |
134 | void IncSearchWidget::setFields( const KABC::Field::List &list ) | 137 | void IncSearchWidget::setFields( const KABC::Field::List &list ) |
135 | { | 138 | { |
136 | 139 | ||
137 | mFieldCombo->clear(); | 140 | mFieldCombo->clear(); |
138 | mFieldCombo->insertItem( i18n( "All Fields" ) ); | 141 | mFieldCombo->insertItem( i18n( "All Fields" ) ); |
139 | 142 | ||
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 046cb63..b4e0b07 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -815,32 +815,33 @@ void KABCore::beamMySelf() | |||
815 | } else { | 815 | } else { |
816 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); | 816 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); |
817 | 817 | ||
818 | 818 | ||
819 | } | 819 | } |
820 | } | 820 | } |
821 | void KABCore::updateMainWindow() | 821 | void KABCore::updateMainWindow() |
822 | { | 822 | { |
823 | mMainWindow->showMaximized(); | 823 | mMainWindow->showMaximized(); |
824 | mMainWindow->update(); | 824 | mMainWindow->update(); |
825 | } | 825 | } |
826 | void KABCore::resizeEvent(QResizeEvent* e ) | 826 | void KABCore::resizeEvent(QResizeEvent* e ) |
827 | { | 827 | { |
828 | if ( !mMiniSplitter ) | 828 | if ( !mMiniSplitter ) |
829 | return; | 829 | return; |
830 | //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); | 830 | //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); |
831 | if ( e->oldSize().width() != e->size().width() ) | ||
831 | if ( QApplication::desktop()->width() >= 480 ) { | 832 | if ( QApplication::desktop()->width() >= 480 ) { |
832 | if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 | 833 | if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 |
833 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { | 834 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { |
834 | mMiniSplitter->setOrientation( Qt::Horizontal); | 835 | mMiniSplitter->setOrientation( Qt::Horizontal); |
835 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 836 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
836 | } | 837 | } |
837 | if ( QApplication::desktop()->width() <= 640 ) { | 838 | if ( QApplication::desktop()->width() <= 640 ) { |
838 | mMainWindow->showMinimized(); | 839 | mMainWindow->showMinimized(); |
839 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); | 840 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
840 | mViewManager->getFilterAction()->setComboWidth( 150 ); | 841 | mViewManager->getFilterAction()->setComboWidth( 150 ); |
841 | if ( mIncSearchWidget ) | 842 | if ( mIncSearchWidget ) |
842 | mIncSearchWidget->setSize(); | 843 | mIncSearchWidget->setSize(); |
843 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); | 844 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); |
844 | } | 845 | } |
845 | 846 | ||
846 | } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 | 847 | } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 |