summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp7
-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, 16 insertions, 5 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 395392c..3c01eeb 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -260,7 +260,8 @@ void JournalEntry::writeJournal()
mCalendar->addJournal(mJournal);
}
-
- mJournal->setDescription(mEditor->text());
- mJournal->setSummary(mTitle->text());
+ 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
@@ -119,5 +119,9 @@ void KOJournalView::updateView()
showDates( mDate, QDate() );
}
-
+void KOJournalView::checkModified()
+{
+ qDebug("checkmod ");
+ flushView();
+}
void KOJournalView::flushView()
{
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 331bdfa..7fa94ae 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -51,4 +51,5 @@ class KOJournalView : public KOrg::BaseView
{DateList q;
return q;};
+ void checkModified();
signals:
void deleteJournal(Journal *);
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index d5a8e3b..2e6aaed 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -78,4 +78,5 @@ class KOViewManager : public QObject
KOAgendaView *agendaView() const { return mAgendaView; }
+ KOJournalView *journalView() const { return mJournalView; }
signals:
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d8373a6..fb6d6ec 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -48,4 +48,5 @@
#include "datenavigator.h"
#include "koagendaview.h"
+#include "kojournalview.h"
#include "koagenda.h"
#include "kodialogmanager.h"
@@ -1835,5 +1836,6 @@ void MainWindow::saveOnClose()
}
#endif
-
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
save();
@@ -1900,4 +1902,6 @@ void MainWindow::backupAllFiles()
void MainWindow::save()
{
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( !mCalendarModifiedFlag ) {
qDebug("KO: Calendar not modified. Nothing saved.");