From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch * Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korganizer/kojournaleditor.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'korganizer/kojournaleditor.cpp') diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp index a50ba1fe..b53e071e 100644 --- a/korganizer/kojournaleditor.cpp +++ b/korganizer/kojournaleditor.cpp @@ -62,8 +62,10 @@ void KOJournalEditor::init() void KOJournalEditor::reload() { - kdDebug(5851)<<"reloading Journal"<finishSetup(); } -void KOJournalEditor::editIncidence( Incidence *incidence, Calendar * ) +void KOJournalEditor::editIncidence( Incidence *incidence, const TQDate &date, Calendar * ) { Journal *journal=dynamic_cast(incidence); if (journal) @@ -102,7 +104,7 @@ void KOJournalEditor::editIncidence( Incidence *incidence, Calendar * ) init(); mJournal = journal; - readJournal(mJournal); + readJournal(mJournal, date); } } @@ -140,7 +142,7 @@ bool KOJournalEditor::processInput() if ( mJournal ) { Journal *oldJournal = mJournal->clone(); writeJournal( mJournal ); - mChanger->changeIncidence( oldJournal, mJournal ); + mChanger->changeIncidence( oldJournal, mJournal, KOGlobals::NOTHING_MODIFIED, this ); delete oldJournal; } else { mJournal = new Journal; @@ -149,8 +151,7 @@ bool KOJournalEditor::processInput() writeJournal( mJournal ); - if ( !mChanger->addIncidence( mJournal, this ) ) { - KODialogManager::errorSaveIncidence( this, mJournal ); + if ( !mChanger->addIncidence( mJournal, mResource, mSubResource, this ) ) { delete mJournal; mJournal = 0; return false; @@ -176,10 +177,10 @@ void KOJournalEditor::setDate( const TQDate &date ) mDetails->setDefaults(); } -void KOJournalEditor::readJournal( Journal *journal ) +void KOJournalEditor::readJournal( Journal *journal, const TQDate &date ) { kdDebug(5851)<<"read Journal"<readJournal( journal ); + mGeneral->readJournal( journal, date ); mDetails->readEvent( journal ); } @@ -201,10 +202,10 @@ int KOJournalEditor::msgItemDelete() i18n("KOrganizer Confirmation"), KGuiItem( i18n("Delete"), "editdelete" )); } -void KOJournalEditor::modified( int /*modification*/) +void KOJournalEditor::modified() { - // Play dump, just reload the Journal. This dialog has become so complicated that - // there is no point in trying to be smart here... + // Play dump, just reload the Journal. This dialog has become so complicated + // that there is no point in trying to be smart here... reload(); } @@ -215,7 +216,7 @@ void KOJournalEditor::loadTemplate( /*const*/ CalendarLocal& cal) KMessageBox::error( this, i18n("Template does not contain a valid journal.") ); } else { - readJournal( journals.first() ); + readJournal( journals.first(), TQDate() ); } } -- cgit v1.2.3