-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index f606124..f734696 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -66,48 +66,49 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) } 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); #else showMaximized(); #endif raise(); setActiveWindow(); mEventViewer->setFocus(); + //raise(); } 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 ); } int KOEventViewerDialog::executeS( bool local ) { mSyncResult = 3; @@ -268,31 +269,34 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) case Qt::Key_I: #ifndef DESKTOP_VERSION sendSignalViewerClosed = true; close(); #else sendSignalViewerClosed = true; slotViewerClosed(); //accept(); #endif break; default: KDialogBase::keyPressEvent ( e ); break; } } void KOEventViewerDialog::hideEvent ( QHideEvent * e ) { KDialogBase::hideEvent ( e ); QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); } void KOEventViewerDialog::slotViewerClosed() { + if ( mSyncMode ) + return; + if ( sendSignalViewerClosed ) { //qDebug("KOEventViewerDialog::hideEvent "); emit signalViewerClosed(); } sendSignalViewerClosed = true; } |