summaryrefslogtreecommitdiff
path: root/core/pim/datebook
Unidiff
Diffstat (limited to 'core/pim/datebook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp27
-rw-r--r--core/pim/datebook/dateentryimpl.cpp10
2 files changed, 7 insertions, 30 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 44f1515..706cc08 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -262,18 +262,13 @@ void DateBook::slotSettings()
262 if(!found) { 262 if(!found) {
263 frmSettings.comboLocation->insertItem(defaultLocation); 263 frmSettings.comboLocation->insertItem(defaultLocation);
264 frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1); 264 frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1);
265 } 265 }
266 frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar")); 266 frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar"));
267 267
268#if defined (Q_WS_QWS) || defined(_WS_QWS_) 268 if ( QPEApplication::execDialog( &frmSettings ) ) {
269 frmSettings.showMaximized();
270#endif
271
272 if ( frmSettings.exec() ) {
273
274 aPreset = frmSettings.alarmPreset(); 269 aPreset = frmSettings.alarmPreset();
275 presetTime = frmSettings.presetTime(); 270 presetTime = frmSettings.presetTime();
276 startTime = frmSettings.startTime(); 271 startTime = frmSettings.startTime();
277 bJumpToCurTime = frmSettings.jumpToCurTime(); 272 bJumpToCurTime = frmSettings.jumpToCurTime();
278 rowStyle = frmSettings.rowStyle(); 273 rowStyle = frmSettings.rowStyle();
279 defaultView=frmSettings.comboDefaultView->currentItem()+1; 274 defaultView=frmSettings.comboDefaultView->currentItem()+1;
@@ -434,16 +429,13 @@ void DateBook::duplicateEvent( const Event &e )
434 sv->setHScrollBarMode( QScrollView::AlwaysOff ); 429 sv->setHScrollBarMode( QScrollView::AlwaysOff );
435 vb->addWidget( sv ); 430 vb->addWidget( sv );
436 entry = new DateEntry( onMonday, dupevent, ampm, &editDlg, "editor" ); 431 entry = new DateEntry( onMonday, dupevent, ampm, &editDlg, "editor" );
437 entry->timezone->setEnabled( FALSE ); 432 entry->timezone->setEnabled( FALSE );
438 sv->addChild( entry ); 433 sv->addChild( entry );
439 434
440#if defined(Q_WS_QWS) || defined(_WS_QWS_) 435 while ( QPEApplication::execDialog( &editDlg ) ) {
441 editDlg.showMaximized();
442#endif
443 while (editDlg.exec() ) {
444 Event newEv = entry->event(); 436 Event newEv = entry->event();
445 QString error = checkEvent(newEv); 437 QString error = checkEvent(newEv);
446 if (!error.isNull()) { 438 if (!error.isNull()) {
447 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) 439 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0)
448 continue; 440 continue;
449 } 441 }
@@ -483,16 +475,13 @@ void DateBook::editEvent( const Event &e )
483 sv->setHScrollBarMode( QScrollView::AlwaysOff ); 475 sv->setHScrollBarMode( QScrollView::AlwaysOff );
484 vb->addWidget( sv ); 476 vb->addWidget( sv );
485 entry = new DateEntry( onMonday, e, ampm, &editDlg, "editor" ); 477 entry = new DateEntry( onMonday, e, ampm, &editDlg, "editor" );
486 entry->timezone->setEnabled( FALSE ); 478 entry->timezone->setEnabled( FALSE );
487 sv->addChild( entry ); 479 sv->addChild( entry );
488 480
489#if defined(Q_WS_QWS) || defined(_WS_QWS_) 481 while ( QPEApplication::execDialog( &editDlg ) ) {
490 editDlg.showMaximized();
491#endif
492 while (editDlg.exec() ) {
493 Event newEv = entry->event(); 482 Event newEv = entry->event();
494 if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) 483 if(newEv.description().isEmpty() && newEv.notes().isEmpty() )
495 break; 484 break;
496 newEv.setUid(e.uid()); // FIXME: Hack not to clear uid 485 newEv.setUid(e.uid()); // FIXME: Hack not to clear uid
497 QString error = checkEvent(newEv); 486 QString error = checkEvent(newEv);
498 if (!error.isNull()) { 487 if (!error.isNull()) {
@@ -704,16 +693,13 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
704 QLabel *lblMsg = new QLabel( msg, &dlg ); 693 QLabel *lblMsg = new QLabel( msg, &dlg );
705 view->addChild( lblMsg ); 694 view->addChild( lblMsg );
706 QPushButton *cmdOk = new QPushButton( tr("OK"), &dlg ); 695 QPushButton *cmdOk = new QPushButton( tr("OK"), &dlg );
707 connect( cmdOk, SIGNAL(clicked()), &dlg, SLOT(accept()) ); 696 connect( cmdOk, SIGNAL(clicked()), &dlg, SLOT(accept()) );
708 vb->addWidget( cmdOk ); 697 vb->addWidget( cmdOk );
709 698
710#if defined(Q_WS_QWS) || defined(_WS_QWS_) 699 needShow = QPEApplication::execDialog( &dlg );
711 dlg.showMaximized();
712#endif
713 needShow = dlg.exec();
714 700
715 if ( bSound ) 701 if ( bSound )
716 killTimer( stopTimer ); 702 killTimer( stopTimer );
717 } 703 }
718 } 704 }
719 } else if ( msg == "nextView()" ) { 705 } else if ( msg == "nextView()" ) {
@@ -899,16 +885,13 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const
899 ev.setStart( start ); 885 ev.setStart( start );
900 ev.setEnd( end ); 886 ev.setEnd( end );
901 887
902 e = new DateEntry( onMonday, ev, ampm, &newDlg ); 888 e = new DateEntry( onMonday, ev, ampm, &newDlg );
903 e->setAlarmEnabled( aPreset, presetTime, Event::Loud ); 889 e->setAlarmEnabled( aPreset, presetTime, Event::Loud );
904 sv->addChild( e ); 890 sv->addChild( e );
905#if defined(Q_WS_QWS) || defined(_WS_QWS_) 891 while ( QPEApplication::execDialog( &newDlg ) ) {
906 newDlg.showMaximized();
907#endif
908 while (newDlg.exec()) {
909 ev = e->event(); 892 ev = e->event();
910 ev.assignUid(); 893 ev.assignUid();
911 QString error = checkEvent( ev ); 894 QString error = checkEvent( ev );
912 if ( !error.isNull() ) { 895 if ( !error.isNull() ) {
913 if ( QMessageBox::warning( this, tr("Error!"), error, tr("Fix it"), tr("Continue"), 0, 0, 1 ) == 0 ) 896 if ( QMessageBox::warning( this, tr("Error!"), error, tr("Fix it"), tr("Continue"), 0, 0, 1 ) == 0 )
914 continue; 897 continue;
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index d9e5225..856837c 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -246,16 +246,13 @@ void DateEntry::slotEditNote() {
246 QString s; 246 QString s;
247 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>"; 247 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>";
248// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); 248// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
249 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, 249 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
250 this,0,TRUE); 250 this,0,TRUE);
251 251
252#if defined(Q_WS_QWS) || defined(_WS_QWS_) 252 if ( QPEApplication::execDialog( &noteDlg ) ) {
253 noteDlg.showMaximized();
254#endif
255 if (noteDlg.exec() ) {
256 noteStr=noteDlg.note->text(); 253 noteStr=noteDlg.note->text();
257 } 254 }
258 255
259} 256}
260 257
261void DateEntry::endDateChanged( int y, int m, int d ) 258void DateEntry::endDateChanged( int y, int m, int d )
@@ -392,16 +389,13 @@ void DateEntry::slotRepeat()
392 // since, this dialog doesn't need to keep track of it... 389 // since, this dialog doesn't need to keep track of it...
393 if ( rp.type != Event::NoRepeat ) 390 if ( rp.type != Event::NoRepeat )
394 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); 391 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this);
395 else 392 else
396 e = new RepeatEntry( startWeekOnMonday, startDate, this ); 393 e = new RepeatEntry( startWeekOnMonday, startDate, this );
397 394
398#if defined(Q_WS_QWS) || defined(_WS_QWS_) 395 if ( QPEApplication::execDialog( e ) ) {
399 e->showMaximized();
400#endif
401 if ( e->exec() ) {
402 rp = e->repeatPattern(); 396 rp = e->repeatPattern();
403 setRepeatLabel(); 397 setRepeatLabel();
404 } 398 }
405 // deleting sounds like a nice idea... 399 // deleting sounds like a nice idea...
406 delete e; 400 delete e;
407} 401}