author | eilers <eilers> | 2003-08-01 14:19:44 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 14:19:44 (UTC) |
commit | 34991bac7d96b1c17601be6a5607819342571e0c (patch) (side-by-side diff) | |
tree | 65d0bc2db22bcc1dc1b5eafdafd53b9cb08a6395 /core/pim/datebook/datebook.cpp | |
parent | 5346424fc26bde232a15aa34fbb720f86218b26f (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 46 |
1 files changed, 38 insertions, 8 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,2 +230,6 @@ void DateBook::receive( const QCString &msg, const QByteArray &data ) editEvent(e); + }else if (msg == "viewDefault(QDate)"){ + QDate day; + stream >> day; + viewDefault(day); } @@ -438,5 +442,15 @@ void DateBook::duplicateEvent( const Event &e ) if (!error.isNull()) { - if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) + if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) continue; } + /* + * The problem: + * DateBookDB does remove repeating events not by uid but by the time + * the recurrence was created + * so we need to update that time as well + */ + Event::RepeatPattern rp = newEv.repeatPattern(); + rp.createTime = ::time( NULL ); + newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... + db->addEvent(newEv); @@ -478,3 +492,3 @@ void DateBook::editEvent( const Event &e ) if (!error.isNull()) { - if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; + if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) continue; } @@ -521,4 +535,4 @@ void DateBook::initDay() views->addWidget( dayView, DAY ); - dayView->setStartViewTime( startTime ); dayView->setJumpToCurTime( bJumpToCurTime ); + dayView->setStartViewTime( startTime ); dayView->setRowStyle( rowStyle ); @@ -699,2 +713,3 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) } else if ( msg == "nextView()" ) { + needShow = true; if ( !qApp-> activeWindow ( )) { @@ -715,12 +730,27 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) } + } else if (msg == "editEvent(int)") { + /* simple copy from receive */ + QDataStream stream(data,IO_ReadOnly); + int uid; + stream >> uid; + Event e=db->eventByUID(uid); + editEvent(e); + } else if (msg == "viewDefault(QDate)"){ + /* simple copy from receive */ + QDataStream stream(data,IO_ReadOnly); + QDate day; + stream >> day; + viewDefault(day); + needShow = true; } + if ( needShow ) { #if defined(Q_WS_QWS) || defined(_WS_QWS_) - showMaximized(); +// showMaximized(); #else - show(); +// show(); #endif - raise(); +// raise(); QPEApplication::setKeepRunning(); - setActiveWindow(); +// setActiveWindow(); } @@ -919,3 +949,3 @@ void DateBook::slotFind() viewDay(); - FindDialog frmFind( "Calendar", this ); + FindDialog frmFind( "Calendar", this ); // no tr needed frmFind.setUseDate( true ); |