summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (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
@@ -258,11 +258,12 @@ void JournalEntry::writeJournal()
mJournal = new Journal;
mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0)));
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());
}
void JournalEntry::flushEntry()
{
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index b659d53..51ae0a0 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -117,9 +117,13 @@ void KOJournalView::updateView()
mEntry = jEntries.next();
}
showDates( mDate, QDate() );
}
-
+void KOJournalView::checkModified()
+{
+ qDebug("checkmod ");
+ flushView();
+}
void KOJournalView::flushView()
{
static bool ff = false;
if ( ff ) return;
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 331bdfa..7fa94ae 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -49,8 +49,9 @@ class KOJournalView : public KOrg::BaseView
virtual QPtrList<Incidence> selectedIncidences();
DateList selectedDates()
{DateList q;
return q;};
+ void checkModified();
signals:
void deleteJournal(Journal *);
public slots:
void showOnly ( Journal* );
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index d5a8e3b..2e6aaed 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -76,8 +76,9 @@ class KOViewManager : public QObject
Incidence *currentSelection();
QDate currentSelectionDate();
KOAgendaView *agendaView() const { return mAgendaView; }
+ KOJournalView *journalView() const { return mJournalView; }
signals:
void printWNV();
void signalFullScreen( bool );
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d8373a6..fb6d6ec 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -46,8 +46,9 @@
#include "calendarview.h"
#include "koviewmanager.h"
#include "datenavigator.h"
#include "koagendaview.h"
+#include "kojournalview.h"
#include "koagenda.h"
#include "kodialogmanager.h"
#include "kdialogbase.h"
#include "kapplication.h"
@@ -1833,9 +1834,10 @@ void MainWindow::saveOnClose()
else
p->mToolBarUpF = filterToolBar->x() > width()/2 ;
}
#endif
-
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
save();
mView->writeSettings();
}
@@ -1898,8 +1900,10 @@ void MainWindow::backupAllFiles()
// retval == 3: do nothing, try again later
}
void MainWindow::save()
{
+ if ( mView->viewManager()->journalView() )
+ mView->viewManager()->journalView()->checkModified();
if ( !mCalendarModifiedFlag ) {
qDebug("KO: Calendar not modified. Nothing saved.");
return;
}