-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) | |||
66 | 66 | ||
67 | } | 67 | } |
68 | 68 | ||
69 | KOEventViewerDialog::~KOEventViewerDialog() | 69 | KOEventViewerDialog::~KOEventViewerDialog() |
70 | { | 70 | { |
71 | //qDebug("-------~KOEventViewerDialog() "); | 71 | //qDebug("-------~KOEventViewerDialog() "); |
72 | } | 72 | } |
73 | void KOEventViewerDialog::showMe() | 73 | void KOEventViewerDialog::showMe() |
74 | { | 74 | { |
75 | 75 | ||
76 | #ifdef DESKTOP_VERSION | 76 | #ifdef DESKTOP_VERSION |
77 | int x,y,w,h; | 77 | int x,y,w,h; |
78 | x = geometry().x(); | 78 | x = geometry().x(); |
79 | y = geometry().y(); | 79 | y = geometry().y(); |
80 | w = width(); | 80 | w = width(); |
81 | h = height(); | 81 | h = height(); |
82 | show(); | 82 | show(); |
83 | setGeometry(x,y,w,h); | 83 | setGeometry(x,y,w,h); |
84 | #else | 84 | #else |
85 | showMaximized(); | 85 | showMaximized(); |
86 | #endif | 86 | #endif |
87 | raise(); | 87 | raise(); |
88 | setActiveWindow(); | 88 | setActiveWindow(); |
89 | mEventViewer->setFocus(); | 89 | mEventViewer->setFocus(); |
90 | //raise(); | ||
90 | 91 | ||
91 | } | 92 | } |
92 | void KOEventViewerDialog::setSyncMode( bool b ) | 93 | void KOEventViewerDialog::setSyncMode( bool b ) |
93 | { | 94 | { |
94 | mSyncMode = b; | 95 | mSyncMode = b; |
95 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 96 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
96 | if ( mSyncMode ) { | 97 | if ( mSyncMode ) { |
97 | findButton( Close )->setText( i18n("Cancel Sync")); | 98 | findButton( Close )->setText( i18n("Cancel Sync")); |
98 | findButton( Ok )->setText( i18n("Remote")); | 99 | findButton( Ok )->setText( i18n("Remote")); |
99 | findButton( User1 )->setText( i18n("Local")); | 100 | findButton( User1 )->setText( i18n("Local")); |
100 | } else { | 101 | } else { |
101 | findButton( Close )->setText( i18n("Close")); | 102 | findButton( Close )->setText( i18n("Close")); |
102 | findButton( Ok )->setText( i18n("Edit")); | 103 | findButton( Ok )->setText( i18n("Edit")); |
103 | findButton( User1 )->setText( i18n("Agenda")); | 104 | findButton( User1 )->setText( i18n("Agenda")); |
104 | } | 105 | } |
105 | mEventViewer->setSyncMode( b ); | 106 | mEventViewer->setSyncMode( b ); |
106 | } | 107 | } |
107 | void KOEventViewerDialog::setColorMode( int m ) | 108 | void KOEventViewerDialog::setColorMode( int m ) |
108 | { | 109 | { |
109 | mEventViewer->setColorMode( m ); | 110 | mEventViewer->setColorMode( m ); |
110 | } | 111 | } |
111 | int KOEventViewerDialog::executeS( bool local ) | 112 | int KOEventViewerDialog::executeS( bool local ) |
112 | { | 113 | { |
113 | mSyncResult = 3; | 114 | mSyncResult = 3; |
@@ -268,31 +269,34 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | |||
268 | case Qt::Key_I: | 269 | case Qt::Key_I: |
269 | #ifndef DESKTOP_VERSION | 270 | #ifndef DESKTOP_VERSION |
270 | sendSignalViewerClosed = true; | 271 | sendSignalViewerClosed = true; |
271 | close(); | 272 | close(); |
272 | #else | 273 | #else |
273 | sendSignalViewerClosed = true; | 274 | sendSignalViewerClosed = true; |
274 | slotViewerClosed(); | 275 | slotViewerClosed(); |
275 | //accept(); | 276 | //accept(); |
276 | #endif | 277 | #endif |
277 | break; | 278 | break; |
278 | default: | 279 | default: |
279 | KDialogBase::keyPressEvent ( e ); | 280 | KDialogBase::keyPressEvent ( e ); |
280 | break; | 281 | break; |
281 | } | 282 | } |
282 | 283 | ||
283 | } | 284 | } |
284 | void KOEventViewerDialog::hideEvent ( QHideEvent * e ) | 285 | void KOEventViewerDialog::hideEvent ( QHideEvent * e ) |
285 | { | 286 | { |
286 | KDialogBase::hideEvent ( e ); | 287 | KDialogBase::hideEvent ( e ); |
287 | QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); | 288 | QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); |
288 | } | 289 | } |
289 | 290 | ||
290 | void KOEventViewerDialog::slotViewerClosed() | 291 | void KOEventViewerDialog::slotViewerClosed() |
291 | { | 292 | { |
293 | if ( mSyncMode ) | ||
294 | return; | ||
295 | |||
292 | if ( sendSignalViewerClosed ) { | 296 | if ( sendSignalViewerClosed ) { |
293 | //qDebug("KOEventViewerDialog::hideEvent "); | 297 | //qDebug("KOEventViewerDialog::hideEvent "); |
294 | emit signalViewerClosed(); | 298 | emit signalViewerClosed(); |
295 | } | 299 | } |
296 | sendSignalViewerClosed = true; | 300 | sendSignalViewerClosed = true; |
297 | } | 301 | } |
298 | 302 | ||