summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
authoreilers <eilers>2003-08-01 14:19:44 (UTC)
committer eilers <eilers>2003-08-01 14:19:44 (UTC)
commit34991bac7d96b1c17601be6a5607819342571e0c (patch) (unidiff)
tree65d0bc2db22bcc1dc1b5eafdafd53b9cb08a6395 /core/pim/datebook/datebook.cpp
parent5346424fc26bde232a15aa34fbb720f86218b26f (diff)
downloadopie-34991bac7d96b1c17601be6a5607819342571e0c.zip
opie-34991bac7d96b1c17601be6a5607819342571e0c.tar.gz
opie-34991bac7d96b1c17601be6a5607819342571e0c.tar.bz2
Merging changes from BRANCH_1_0 to HEAD..
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp50
1 files changed, 40 insertions, 10 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index b7e89b0..10a9b59 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -230,3 +230,7 @@ void DateBook::receive( const QCString &msg, const QByteArray &data )
230 editEvent(e); 230 editEvent(e);
231 } 231 }else if (msg == "viewDefault(QDate)"){
232 QDate day;
233 stream >> day;
234 viewDefault(day);
235 }
232} 236}
@@ -438,5 +442,15 @@ void DateBook::duplicateEvent( const Event &e )
438 if (!error.isNull()) { 442 if (!error.isNull()) {
439 if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) 443 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0)
440 continue; 444 continue;
441 } 445 }
446 /*
447 * The problem:
448 * DateBookDB does remove repeating events not by uid but by the time
449 * the recurrence was created
450 * so we need to update that time as well
451 */
452 Event::RepeatPattern rp = newEv.repeatPattern();
453 rp.createTime = ::time( NULL );
454 newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern...
455
442 db->addEvent(newEv); 456 db->addEvent(newEv);
@@ -478,3 +492,3 @@ void DateBook::editEvent( const Event &e )
478 if (!error.isNull()) { 492 if (!error.isNull()) {
479 if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; 493 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) continue;
480 } 494 }
@@ -521,4 +535,4 @@ void DateBook::initDay()
521 views->addWidget( dayView, DAY ); 535 views->addWidget( dayView, DAY );
536 dayView->setJumpToCurTime( bJumpToCurTime );
522 dayView->setStartViewTime( startTime ); 537 dayView->setStartViewTime( startTime );
523 dayView->setJumpToCurTime( bJumpToCurTime );
524 dayView->setRowStyle( rowStyle ); 538 dayView->setRowStyle( rowStyle );
@@ -699,2 +713,3 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
699 } else if ( msg == "nextView()" ) { 713 } else if ( msg == "nextView()" ) {
714 needShow = true;
700 if ( !qApp-> activeWindow ( )) { 715 if ( !qApp-> activeWindow ( )) {
@@ -715,12 +730,27 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
715 } 730 }
716 } 731 } else if (msg == "editEvent(int)") {
732 /* simple copy from receive */
733 QDataStream stream(data,IO_ReadOnly);
734 int uid;
735 stream >> uid;
736 Event e=db->eventByUID(uid);
737 editEvent(e);
738 } else if (msg == "viewDefault(QDate)"){
739 /* simple copy from receive */
740 QDataStream stream(data,IO_ReadOnly);
741 QDate day;
742 stream >> day;
743 viewDefault(day);
744 needShow = true;
745 }
746
717 if ( needShow ) { 747 if ( needShow ) {
718#if defined(Q_WS_QWS) || defined(_WS_QWS_) 748#if defined(Q_WS_QWS) || defined(_WS_QWS_)
719 showMaximized(); 749 // showMaximized();
720#else 750#else
721 show(); 751 // show();
722#endif 752#endif
723 raise(); 753 // raise();
724 QPEApplication::setKeepRunning(); 754 QPEApplication::setKeepRunning();
725 setActiveWindow(); 755 // setActiveWindow();
726 } 756 }
@@ -919,3 +949,3 @@ void DateBook::slotFind()
919 viewDay(); 949 viewDay();
920 FindDialog frmFind( "Calendar", this ); 950 FindDialog frmFind( "Calendar", this ); // no tr needed
921 frmFind.setUseDate( true ); 951 frmFind.setUseDate( true );