Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 35d084d..1dce841 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -61,57 +61,62 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) // } else { // setMinimumSize(300,200); // resize(320,300); // } mSyncMode = false; mSyncResult = 0; } KOEventViewerDialog::~KOEventViewerDialog() { //qDebug("-------~KOEventViewerDialog() "); } void KOEventViewerDialog::showMe() { #ifdef DESKTOP_VERSION int x,y,w,h; x = geometry().x(); y = geometry().y(); w = width(); h = height(); show(); setGeometry(x,y,w,h); + raise(); #else showMaximized(); #endif - raise(); - setActiveWindow(); - mEventViewer->setFocus(); - //raise(); + QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) ); } +void KOEventViewerDialog::setMyFocus() +{ + + setActiveWindow(); + mEventViewer->setFocus(); + +} void KOEventViewerDialog::print() { mEventViewer->printMe(); } void KOEventViewerDialog::setSyncMode( bool b ) { mSyncMode = b; //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); if ( mSyncMode ) { findButton( Close )->setText( i18n("Cancel Sync")); findButton( Ok )->setText( i18n("Remote")); findButton( User1 )->setText( i18n("Local")); } else { findButton( Close )->setText( i18n("Close")); findButton( Ok )->setText( i18n("Edit")); findButton( User1 )->setText( i18n("Agenda")); } mEventViewer->setSyncMode( b ); } void KOEventViewerDialog::setColorMode( int m ) { mEventViewer->setColorMode( m ); } @@ -191,49 +196,50 @@ void KOEventViewerDialog::setJournal(Journal *j) mIncidence = (Incidence*)j; mEventViewer->setFocus(); //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::addText(QString text) { mEventViewer->addText(text); mEventViewer->setFocus(); //findButton( Close )->setFocus(); } void KOEventViewerDialog::editIncidence() { sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 2; accept(); return; } if ( mIncidence ){ #ifndef DESKTOP_VERSION - hide(); + //hide(); + close(); #endif emit editIncidence( mIncidence ); } } void KOEventViewerDialog::showIncidence() { sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 1; accept(); return; } if ( mIncidence ){ #ifndef DESKTOP_VERSION hide(); #endif QDate date; if ( mIncidence->type() == "Todo" ) { /* if ( ((Todo*)mIncidence)->hasDueDate() ) date = ((Todo*)mIncidence)->dtDue().date(); else { globalFlagBlockAgenda = 2; |