summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-17 10:00:37 (UTC)
committer zautrix <zautrix>2005-02-17 10:00:37 (UTC)
commitec18172021a9adc0f6fa1fe80aec71e9a905a351 (patch) (side-by-side diff)
tree9ec02d294b1422b6a92e9451c29dc9f668d381c7 /korganizer
parentd9565b4258279d70fa651e7e6ebe072c0f3755d6 (diff)
downloadkdepimpi-ec18172021a9adc0f6fa1fe80aec71e9a905a351.zip
kdepimpi-ec18172021a9adc0f6fa1fe80aec71e9a905a351.tar.gz
kdepimpi-ec18172021a9adc0f6fa1fe80aec71e9a905a351.tar.bz2
trans fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 39966b5..3a95978 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -141,97 +141,97 @@ SearchDialog::~SearchDialog()
}
void SearchDialog::accept()
{
doSearch();
}
void SearchDialog::updateList()
{
//listView->updateList();
if ( isVisible() ) {
updateView();
//qDebug("SearchDialog::updated ");
}
else {
listView->clear();
//qDebug("SearchDialog::cleared ");
}
}
void SearchDialog::searchTextChanged( const QString &_text )
{
enableButton( KDialogBase::User1, !_text.isEmpty() );
}
void SearchDialog::doSearch()
{
QRegExp re;
re.setWildcard(true); // most people understand these better.
re.setCaseSensitive(false);
re.setPattern(searchEdit->text());
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);
listView->setStartDate( mStartDate->date() );
listView->showEvents(mMatchedEvents);
listView->addTodos(mMatchedTodos);
listView->addJournals(mMatchedJournals);
if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) {
KMessageBox::information(this,
- i18n("No event/todo were found matching\nyour search expression.\nUse the wildcard characters\n ' * ' and ' ? ' where needed."));
+ i18n("No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed."));
#ifndef DESKTOP_VERSION
setCaption(i18n("Click OK to search ->"));
#else
setCaption(i18n("KO/Pi Find "));
#endif
} else {
QString mess;
mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() );
setCaption( i18n("KO/Pi Find: ") + mess);
}
}
void SearchDialog::updateConfig()
{
listView->updateConfig();
}
void SearchDialog::updateView()
{
QRegExp re;
re.setWildcard(true); // most people understand these better.
re.setCaseSensitive(false);
re.setPattern(searchEdit->text());
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(),
mEndDate->date(),
false /*mInclusiveCheck->isChecked()*/ );
mMatchedEvents.clear();
if ( mSearchEvent->isChecked() ) {
Event *ev;
for(ev=events.first();ev;ev=events.next()) {
if (mSummaryCheck->isChecked()) {
#if QT_VERSION >= 0x030000