summaryrefslogtreecommitdiffstats
path: root/korganizer/kojournaleditor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /korganizer/kojournaleditor.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* 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
Diffstat (limited to 'korganizer/kojournaleditor.cpp')
-rw-r--r--korganizer/kojournaleditor.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp
index a50ba1fe2..b53e071ee 100644
--- a/korganizer/kojournaleditor.cpp
+++ b/korganizer/kojournaleditor.cpp
@@ -62,8 +62,10 @@ void KOJournalEditor::init()
void KOJournalEditor::reload()
{
- kdDebug(5851)<<"reloading Journal"<<endl;
- if ( mJournal ) readJournal( mJournal );
+ kdDebug(5851) << "reloading Journal" << endl;
+ if ( mJournal ) {
+ readJournal( mJournal, TQDate() );
+ }
}
void KOJournalEditor::setupGeneral()
@@ -94,7 +96,7 @@ void KOJournalEditor::setupGeneral()
mGeneral->finishSetup();
}
-void KOJournalEditor::editIncidence( Incidence *incidence, Calendar * )
+void KOJournalEditor::editIncidence( Incidence *incidence, const TQDate &date, Calendar * )
{
Journal *journal=dynamic_cast<Journal*>(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"<<endl;
- mGeneral->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() );
}
}