-rw-r--r-- | korganizer/kolistview.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 17 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 12 |
3 files changed, 21 insertions, 18 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e0e138e..341f473 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1202,27 +1202,27 @@ void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | |||
1202 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1202 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1203 | { | 1203 | { |
1204 | KListView::contentsMouseMoveEvent(e); | 1204 | KListView::contentsMouseMoveEvent(e); |
1205 | } | 1205 | } |
1206 | #endif | 1206 | #endif |
1207 | void KOListViewListView::popupMenu() | 1207 | void KOListViewListView::popupMenu() |
1208 | { | 1208 | { |
1209 | mPopupTimer->stop(); | 1209 | mPopupTimer->stop(); |
1210 | //qDebug("HUUUUUUUUUUUUUUUUUUUU "); | ||
1211 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); | 1210 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); |
1212 | QApplication::postEvent( this->viewport(), e ); | 1211 | QApplication::postEvent( this->viewport(), e ); |
1212 | |||
1213 | } | 1213 | } |
1214 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1214 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1215 | { | 1215 | { |
1216 | //qDebug("contentsMousePressEvent++++ "); | 1216 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); |
1217 | mYMousePos = mapToGlobal( (e->pos())).y(); | 1217 | mYMousePos = mapToGlobal( (e->pos())).y(); |
1218 | if ( e->button() == LeftButton ) { | 1218 | if ( e->button() == LeftButton ) { |
1219 | mPopupTimer->start( 600 ); | 1219 | mPopupTimer->start( 600 ); |
1220 | mEventPos = e->pos(); | 1220 | mEventPos = contentsToViewport(e->pos()); |
1221 | mEventGlobalPos = e->globalPos(); | 1221 | mEventGlobalPos = e->globalPos(); |
1222 | } | 1222 | } |
1223 | KListView::contentsMousePressEvent( e ); | 1223 | KListView::contentsMousePressEvent( e ); |
1224 | if ( e->button() == RightButton ) { | 1224 | if ( e->button() == RightButton ) { |
1225 | QListViewItem* ci = currentItem(); | 1225 | QListViewItem* ci = currentItem(); |
1226 | //clearSelection(); | 1226 | //clearSelection(); |
1227 | if ( ci ) | 1227 | if ( ci ) |
1228 | ci->setSelected( true ); | 1228 | ci->setSelected( true ); |
@@ -1237,14 +1237,14 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | |||
1237 | { | 1237 | { |
1238 | // qDebug("contentsMouseMoveEv....... "); | 1238 | // qDebug("contentsMouseMoveEv....... "); |
1239 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); | 1239 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); |
1240 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); | 1240 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); |
1241 | if ( diff < 0 ) diff = -diff; | 1241 | if ( diff < 0 ) diff = -diff; |
1242 | if ( diff > 15 ) | 1242 | if ( diff > 15 ) |
1243 | mPopupTimer->stop(); | 1243 | mPopupTimer->stop(); |
1244 | else { | 1244 | else { |
1245 | mEventPos = e->pos(); | 1245 | mEventPos = contentsToViewport(e->pos()); |
1246 | mEventGlobalPos = e->globalPos(); | 1246 | mEventGlobalPos = e->globalPos(); |
1247 | } | 1247 | } |
1248 | KListView::contentsMouseMoveEvent(e); | 1248 | KListView::contentsMouseMoveEvent(e); |
1249 | } | 1249 | } |
1250 | 1250 | ||
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 8439b81..e72f94b 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -821,46 +821,43 @@ void KOPrefsDialog::setupViewsTab() | |||
821 | new QLabel(i18n("Days in What's Next:"),hdummy); | 821 | new QLabel(i18n("Days in What's Next:"),hdummy); |
822 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 822 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
823 | 823 | ||
824 | topLayout->addWidget(hdummy,ii++,0); | 824 | topLayout->addWidget(hdummy,ii++,0); |
825 | 825 | ||
826 | QHBox *prioBox = new QHBox(topFrame); | 826 | QHBox *prioBox = new QHBox(topFrame); |
827 | // intervalBox->setSpacing(mSpacingHint); | 827 | // intervalBox->setSpacing(mSpacingHint); |
828 | topLayout->addWidget(prioBox,ii++,0); | 828 | topLayout->addWidget(prioBox,ii++,0); |
829 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 829 | |
830 | 830 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); | |
831 | if ( QApplication::desktop()->width() < 300 ) | ||
832 | messa = i18n("Show topmost todo prios in What's N.:"); | ||
833 | QLabel *prioLabel = new QLabel(messa, prioBox); | ||
834 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 831 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
835 | if ( QApplication::desktop()->width() < 300 ) | 832 | if ( QApplication::desktop()->width() < 300 ) |
836 | mPrioSpin->setFixedWidth( 40 ); | 833 | mPrioSpin->setFixedWidth( 40 ); |
837 | 834 | ||
838 | KPrefsDialogWidBool *passwdk = | 835 | KPrefsDialogWidBool *passwdk = |
839 | 836 | ||
840 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), | 837 | addWidBool(i18n("Show events, that are done"), |
841 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 838 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
842 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 839 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
843 | passwdk = | 840 | passwdk = |
844 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 841 | addWidBool(i18n("Show parent To-Do's"), |
845 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 842 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
846 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 843 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
847 | 844 | ||
848 | passwdk = | 845 | passwdk = |
849 | addWidBool(i18n("Show location in What's Next view"), | 846 | addWidBool(i18n("Show location"), |
850 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 847 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
851 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 848 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
852 | 849 | ||
853 | passwdk = | 850 | passwdk = |
854 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 851 | addWidBool(i18n("Show Sync Events in WN+Agenda"), |
855 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 852 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
856 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 853 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
857 | passwdk = | 854 | passwdk = |
858 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 855 | addWidBool(i18n("Use short date in WN+Event view"), |
859 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 856 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
860 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 857 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
861 | 858 | ||
862 | 859 | ||
863 | 860 | ||
864 | 861 | ||
865 | // *********************** Todo View | 862 | // *********************** Todo View |
866 | 863 | ||
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index db60383..7a945e3 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -201,17 +201,20 @@ void SearchDialog::searchTextChanged( const QString &_text ) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | void SearchDialog::doSearch() | 203 | void SearchDialog::doSearch() |
204 | { | 204 | { |
205 | QRegExp re; | 205 | QRegExp re; |
206 | 206 | ||
207 | re.setWildcard(true); // most people understand these better. | 207 | re.setWildcard(true); // most people understand these better. |
208 | re.setCaseSensitive(false); | 208 | re.setCaseSensitive(false); |
209 | re.setPattern(searchEdit->text()); | 209 | QString st = searchEdit->text(); |
210 | if ( st.right(1) != "*") | ||
211 | st += "*"; | ||
212 | re.setPattern(st); | ||
210 | if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { | 213 | if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { |
211 | KMessageBox::sorry(this, | 214 | KMessageBox::sorry(this, |
212 | i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); | 215 | i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); |
213 | return; | 216 | return; |
214 | } | 217 | } |
215 | if (!re.isValid() ) { | 218 | if (!re.isValid() ) { |
216 | KMessageBox::sorry(this, | 219 | KMessageBox::sorry(this, |
217 | i18n("Invalid search expression,\ncannot perform " | 220 | i18n("Invalid search expression,\ncannot perform " |
@@ -242,18 +245,21 @@ void SearchDialog::updateConfig() | |||
242 | { | 245 | { |
243 | listView->updateConfig(); | 246 | listView->updateConfig(); |
244 | } | 247 | } |
245 | void SearchDialog::updateView() | 248 | void SearchDialog::updateView() |
246 | { | 249 | { |
247 | //qDebug("SearchDialog::updateView() %d ", isVisible()); | 250 | //qDebug("SearchDialog::updateView() %d ", isVisible()); |
248 | QRegExp re; | 251 | QRegExp re; |
249 | re.setWildcard(true); // most people understand these better. | 252 | re.setWildcard(true); // most people understand these better. |
250 | re.setCaseSensitive(false); | 253 | re.setCaseSensitive(false); |
251 | re.setPattern(searchEdit->text()); | 254 | QString st = searchEdit->text(); |
255 | if ( st.right(1) != "*") | ||
256 | st += "*"; | ||
257 | re.setPattern(st); | ||
252 | if (re.isValid()) { | 258 | if (re.isValid()) { |
253 | search(re); | 259 | search(re); |
254 | } else { | 260 | } else { |
255 | mMatchedEvents.clear(); | 261 | mMatchedEvents.clear(); |
256 | mMatchedTodos.clear(); | 262 | mMatchedTodos.clear(); |
257 | mMatchedJournals.clear(); | 263 | mMatchedJournals.clear(); |
258 | } | 264 | } |
259 | listView->setStartDate( mStartDate->date() ); | 265 | listView->setStartDate( mStartDate->date() ); |