summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-25 11:29:28 (UTC)
committer zautrix <zautrix>2005-02-25 11:29:28 (UTC)
commitff810f8f74f6928e664bf52f8e8d128edb8ac5ad (patch) (side-by-side diff)
treed5473801c69b42d90879104fc4d05a5ad9b69e87 /korganizer
parentff8a2f593fae5ffe82f889ab70d32bf02a45f4fb (diff)
downloadkdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.zip
kdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.tar.gz
kdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.tar.bz2
many small fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewerdialog.cpp6
-rw-r--r--korganizer/kolistview.cpp2
-rw-r--r--korganizer/searchdialog.cpp9
-rw-r--r--korganizer/searchdialog.h4
4 files changed, 18 insertions, 3 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index e2c8e6e..f606124 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -259,18 +259,24 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
case Qt::Key_E :
case Qt::Key_R :
editIncidence();
break;
case Qt::Key_C:
case Qt::Key_Escape:
+ sendSignalViewerClosed = true;
close();
break;
case Qt::Key_I:
+#ifndef DESKTOP_VERSION
+ sendSignalViewerClosed = true;
+ close();
+#else
sendSignalViewerClosed = true;
slotViewerClosed();
//accept();
+#endif
break;
default:
KDialogBase::keyPressEvent ( e );
break;
}
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 6acee75..710a9f9 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1080,14 +1080,14 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
if ( ci ){
//emit showIncidence( ci->data());
cn = cn->nextSibling();
if ( cn ) {
setCurrentItem ( cn );
ensureItemVisible ( cn );
- emit showIncidence( ci->data());
}
+ emit showIncidence( ci->data());
}
}
e->accept();
}
break;
case Qt::Key_Return:
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index cef59a2..678e1bd 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -23,23 +23,25 @@
*/
#include <qlayout.h>
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <qlabel.h>
+#include <qlistview.h>
#include <qwhatsthis.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <libkdepim/kdateedit.h>
#include "koglobals.h"
#include "koprefs.h"
+#include "klineedit.h"
#include "calendarview.h"
#include "koviewmanager.h"
#include "searchdialog.h"
SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
@@ -54,13 +56,13 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
QHBoxLayout *subLayout = new QHBoxLayout();
layout->addLayout(subLayout);
searchLabel = new QLabel(topFrame);
searchLabel->setText(i18n("Search for:"));
subLayout->addWidget(searchLabel);
- searchEdit = new QLineEdit(topFrame);
+ searchEdit = new KLineEdit(topFrame);
subLayout->addWidget(searchEdit);
QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame );
//OkButton->setDefault( true );
connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
subLayout->addWidget(OkButton);
searchEdit->setText("*"); // Find all events by default
@@ -111,24 +113,29 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
layout->addWidget(rangeWidget);
// Results list view
listView = new KOListView(mCalendar,topFrame);
layout->addWidget(listView);
listView->readSettings(KOGlobals::config(),"SearchListView Layout");
+ connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList()));
setCaption( i18n("KO/Pi Find: "));
#ifdef DESKTOP_VERSION
OkButton = new QPushButton( i18n("Close"), this );
connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
#endif
}
SearchDialog::~SearchDialog()
{
}
+void SearchDialog::setFocusToList()
+{
+ listView->resetFocus();
+}
void SearchDialog::accept()
{
doSearch();
}
void SearchDialog::updateList()
{
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index f4aad9e..b730ed5 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -33,12 +33,13 @@
#include "kolistview.h"
class KDateEdit;
class QCheckBox;
class QLineEdit;
+class KLineEdit;
class QLabel;
class CalendarView;
using namespace KCal;
class SearchDialog : public QVBox
{
@@ -51,12 +52,13 @@ class SearchDialog : public QVBox
public slots:
void changeEventDisplay(Event *, int) { updateView(); }
void updateConfig();
void updateList();
protected slots:
+ void setFocusToList();
void accept();
void doSearch();
void searchTextChanged( const QString &_text );
signals:
void showEventSignal(Event *);
@@ -70,13 +72,13 @@ class SearchDialog : public QVBox
QPtrList<Event> mMatchedEvents;
QPtrList<Todo> mMatchedTodos;
QPtrList<Journal> mMatchedJournals;
QLabel *searchLabel;
- QLineEdit *searchEdit;
+ KLineEdit *searchEdit;
KOListView *listView;
KDateEdit *mStartDate;
KDateEdit *mEndDate;
QCheckBox *mSummaryCheck;
QCheckBox *mDescriptionCheck;