summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp3
-rw-r--r--korganizer/kojournalview.cpp6
-rw-r--r--korganizer/kojournalview.h1
-rw-r--r--korganizer/koviewmanager.h1
-rw-r--r--korganizer/mainwindow.cpp6
5 files changed, 14 insertions, 3 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 395392c..3c01eeb 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -259,8 +259,9 @@ void JournalEntry::writeJournal()
mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0)));
mCalendar->addJournal(mJournal);
}
-
+ if ( mJournal->description() != mEditor->text() )
mJournal->setDescription(mEditor->text());
+ if ( mJournal->summary() != mTitle->text() )
mJournal->setSummary(mTitle->text());
}
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index b659d53..51ae0a0 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -118,7 +118,11 @@ void KOJournalView::updateView()
}
showDates( mDate, QDate() );
}
-
+void KOJournalView::checkModified()
+{
+ qDebug("checkmod ");
+ flushView();
+}
void KOJournalView::flushView()
{
static bool ff = false;
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 331bdfa..7fa94ae 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -50,6 +50,7 @@ class KOJournalView : public KOrg::BaseView
DateList selectedDates()
{DateList q;
return q;};
+ void checkModified();
signals:
void deleteJournal(Journal *);
public slots:
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index d5a8e3b..2e6aaed 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -77,6 +77,7 @@ class KOViewManager : public QObject
QDate currentSelectionDate();
KOAgendaView *agendaView() const { return mAgendaView; }
+ KOJournalView *journalView() const { return mJournalView; }
signals:
void printWNV();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d8373a6..fb6d6ec 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -47,6 +47,7 @@
#include "koviewmanager.h"
#include "datenavigator.h"
#include "koagendaview.h"
+#include "kojournalview.h"
#include "koagenda.h"
#include "kodialogmanager.h"
#include "kdialogbase.h"
@@ -1834,7 +1835,8 @@ void MainWindow::saveOnClose()
p->mToolBarUpF = filterToolBar->x() > width()/2 ;
}
#endif
-
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
save();
mView->writeSettings();
@@ -1899,6 +1901,8 @@ void MainWindow::backupAllFiles()
}
void MainWindow::save()
{
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( !mCalendarModifiedFlag ) {
qDebug("KO: Calendar not modified. Nothing saved.");
return;