author | zautrix <zautrix> | 2005-04-05 15:46:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-05 15:46:34 (UTC) |
commit | 8734ae4789ed411cb546edd304816a77c431a2bf (patch) (side-by-side diff) | |
tree | 8fc66d9dfb9baf6ef62278dd58d49f6156c0414f /korganizer | |
parent | 637415693af8fe9974b45c355ecfdd0745617ac3 (diff) | |
download | kdepimpi-8734ae4789ed411cb546edd304816a77c431a2bf.zip kdepimpi-8734ae4789ed411cb546edd304816a77c431a2bf.tar.gz kdepimpi-8734ae4789ed411cb546edd304816a77c431a2bf.tar.bz2 |
urgs. bug fixes
-rw-r--r-- | korganizer/kolistview.cpp | 8 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 15 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 10 |
3 files changed, 18 insertions, 15 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e0e138e..341f473 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -1194,57 +1194,57 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) if ( ci ) ci->setSelected( true ); } } void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) { KListView::contentsMouseReleaseEvent(e); } void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) { KListView::contentsMouseMoveEvent(e); } #endif void KOListViewListView::popupMenu() { mPopupTimer->stop(); - //qDebug("HUUUUUUUUUUUUUUUUUUUU "); QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); QApplication::postEvent( this->viewport(), e ); + } void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) { - //qDebug("contentsMousePressEvent++++ "); + //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); mYMousePos = mapToGlobal( (e->pos())).y(); if ( e->button() == LeftButton ) { mPopupTimer->start( 600 ); - mEventPos = e->pos(); + mEventPos = contentsToViewport(e->pos()); mEventGlobalPos = e->globalPos(); } KListView::contentsMousePressEvent( e ); if ( e->button() == RightButton ) { QListViewItem* ci = currentItem(); //clearSelection(); if ( ci ) ci->setSelected( true ); } } void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) { mPopupTimer->stop(); KListView::contentsMouseReleaseEvent(e); } void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) { // qDebug("contentsMouseMoveEv....... "); // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); int diff = mYMousePos - mapToGlobal( (e->pos())).y(); if ( diff < 0 ) diff = -diff; if ( diff > 15 ) mPopupTimer->stop(); else { - mEventPos = e->pos(); + mEventPos = contentsToViewport(e->pos()); mEventGlobalPos = e->globalPos(); } KListView::contentsMouseMoveEvent(e); } diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 8439b81..e72f94b 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -813,62 +813,59 @@ void KOPrefsDialog::setupViewsTab() topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; QHBox* hdummy = new QHBox(topFrame); new QLabel(i18n("Days in What's Next:"),hdummy); mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); topLayout->addWidget(hdummy,ii++,0); QHBox *prioBox = new QHBox(topFrame); // intervalBox->setSpacing(mSpacingHint); topLayout->addWidget(prioBox,ii++,0); - QString messa = i18n("Show topmost todo prios in What's Next:"); - if ( QApplication::desktop()->width() < 300 ) - messa = i18n("Show topmost todo prios in What's N.:"); - QLabel *prioLabel = new QLabel(messa, prioBox); + QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); mPrioSpin = new QSpinBox(0,5,1,prioBox); if ( QApplication::desktop()->width() < 300 ) mPrioSpin->setFixedWidth( 40 ); KPrefsDialogWidBool *passwdk = - addWidBool(i18n("Show events, that are done in \nWhat's Next view"), + addWidBool(i18n("Show events, that are done"), &(KOPrefs::instance()->mWNViewShowsPast),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = - addWidBool(i18n("Show parent To-Do's in What's Next view"), + addWidBool(i18n("Show parent To-Do's"), &(KOPrefs::instance()->mWNViewShowsParents),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = - addWidBool(i18n("Show location in What's Next view"), + addWidBool(i18n("Show location"), &(KOPrefs::instance()->mWNViewShowLocation),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = - addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), + addWidBool(i18n("Show Sync Events in WN+Agenda"), &(KOPrefs::instance()->mShowSyncEvents),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = - addWidBool(i18n("Use short date in \nWhat's Next/Event view"), + addWidBool(i18n("Use short date in WN+Event view"), &(KOPrefs::instance()->mShortDateInViewer),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); // *********************** Todo View topFrame = addPage(i18n("Todo View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; dummy = diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index db60383..7a945e3 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -193,33 +193,36 @@ void SearchDialog::updateList() } } void SearchDialog::searchTextChanged( const QString &_text ) { #if 0 enableButton( KDialogBase::User1, !_text.isEmpty() ); #endif } void SearchDialog::doSearch() { QRegExp re; re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); - re.setPattern(searchEdit->text()); + QString st = searchEdit->text(); + if ( st.right(1) != "*") + st += "*"; + re.setPattern(st); if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { KMessageBox::sorry(this, i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); return; } if (!re.isValid() ) { KMessageBox::sorry(this, i18n("Invalid search expression,\ncannot perform " "the search.\nPlease enter a search expression\n" "using the wildcard characters\n '*' and '?'" "where needed.")); return; } search(re); @@ -235,33 +238,36 @@ void SearchDialog::doSearch() mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); setCaption( i18n("KO/Pi Find: ") + mess); } searchEdit->setFocus(); } void SearchDialog::updateConfig() { listView->updateConfig(); } void SearchDialog::updateView() { //qDebug("SearchDialog::updateView() %d ", isVisible()); QRegExp re; re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); - re.setPattern(searchEdit->text()); + QString st = searchEdit->text(); + if ( st.right(1) != "*") + st += "*"; + re.setPattern(st); if (re.isValid()) { search(re); } else { mMatchedEvents.clear(); mMatchedTodos.clear(); mMatchedJournals.clear(); } listView->setStartDate( mStartDate->date() ); listView->showEvents(mMatchedEvents); listView->addTodos(mMatchedTodos); listView->addJournals(mMatchedJournals); } void SearchDialog::search(const QRegExp &re) { QPtrList<Event> events = mCalendar->events( mStartDate->date(), |