author | zautrix <zautrix> | 2005-06-30 06:47:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-30 06:47:32 (UTC) |
commit | 0e4ec4bb2a13a89d3d6145ea076a5734481cb252 (patch) (unidiff) | |
tree | fecf6ecb38a726323fb9522eaae1764930ec49cf | |
parent | 0fc571a7eadda739fd1a93d627e7129b9956c9f6 (diff) | |
download | kdepimpi-0e4ec4bb2a13a89d3d6145ea076a5734481cb252.zip kdepimpi-0e4ec4bb2a13a89d3d6145ea076a5734481cb252.tar.gz kdepimpi-0e4ec4bb2a13a89d3d6145ea076a5734481cb252.tar.bz2 |
fixixix
-rw-r--r-- | korganizer/journalentry.cpp | 7 | ||||
-rw-r--r-- | korganizer/kojournalview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kojournalview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 6 |
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() | |||
258 | mJournal = new Journal; | 258 | mJournal = new Journal; |
259 | mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0))); | 259 | mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0))); |
260 | mCalendar->addJournal(mJournal); | 260 | mCalendar->addJournal(mJournal); |
261 | } | 261 | } |
262 | 262 | if ( mJournal->description() != mEditor->text() ) | |
263 | mJournal->setDescription(mEditor->text()); | 263 | mJournal->setDescription(mEditor->text()); |
264 | mJournal->setSummary(mTitle->text()); | 264 | if ( mJournal->summary() != mTitle->text() ) |
265 | mJournal->setSummary(mTitle->text()); | ||
265 | } | 266 | } |
266 | 267 | ||
267 | void JournalEntry::flushEntry() | 268 | void JournalEntry::flushEntry() |
268 | { | 269 | { |
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() | |||
117 | mEntry = jEntries.next(); | 117 | mEntry = jEntries.next(); |
118 | } | 118 | } |
119 | showDates( mDate, QDate() ); | 119 | showDates( mDate, QDate() ); |
120 | } | 120 | } |
121 | 121 | void KOJournalView::checkModified() | |
122 | { | ||
123 | qDebug("checkmod "); | ||
124 | flushView(); | ||
125 | } | ||
122 | void KOJournalView::flushView() | 126 | void KOJournalView::flushView() |
123 | { | 127 | { |
124 | static bool ff = false; | 128 | static bool ff = false; |
125 | if ( ff ) return; | 129 | 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 | |||
49 | virtual QPtrList<Incidence> selectedIncidences(); | 49 | virtual QPtrList<Incidence> selectedIncidences(); |
50 | DateList selectedDates() | 50 | DateList selectedDates() |
51 | {DateList q; | 51 | {DateList q; |
52 | return q;}; | 52 | return q;}; |
53 | void checkModified(); | ||
53 | signals: | 54 | signals: |
54 | void deleteJournal(Journal *); | 55 | void deleteJournal(Journal *); |
55 | public slots: | 56 | public slots: |
56 | void showOnly ( Journal* ); | 57 | 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 | |||
76 | Incidence *currentSelection(); | 76 | Incidence *currentSelection(); |
77 | QDate currentSelectionDate(); | 77 | QDate currentSelectionDate(); |
78 | 78 | ||
79 | KOAgendaView *agendaView() const { return mAgendaView; } | 79 | KOAgendaView *agendaView() const { return mAgendaView; } |
80 | KOJournalView *journalView() const { return mJournalView; } | ||
80 | 81 | ||
81 | signals: | 82 | signals: |
82 | void printWNV(); | 83 | void printWNV(); |
83 | void signalFullScreen( bool ); | 84 | 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 @@ | |||
46 | #include "calendarview.h" | 46 | #include "calendarview.h" |
47 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
50 | #include "kojournalview.h" | ||
50 | #include "koagenda.h" | 51 | #include "koagenda.h" |
51 | #include "kodialogmanager.h" | 52 | #include "kodialogmanager.h" |
52 | #include "kdialogbase.h" | 53 | #include "kdialogbase.h" |
53 | #include "kapplication.h" | 54 | #include "kapplication.h" |
@@ -1833,9 +1834,10 @@ void MainWindow::saveOnClose() | |||
1833 | else | 1834 | else |
1834 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1835 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1835 | } | 1836 | } |
1836 | #endif | 1837 | #endif |
1837 | 1838 | if ( mView->viewManager()->journalView() ) | |
1839 | mView->viewManager()->journalView()->checkModified(); | ||
1838 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1840 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1839 | save(); | 1841 | save(); |
1840 | mView->writeSettings(); | 1842 | mView->writeSettings(); |
1841 | } | 1843 | } |
@@ -1898,8 +1900,10 @@ void MainWindow::backupAllFiles() | |||
1898 | // retval == 3: do nothing, try again later | 1900 | // retval == 3: do nothing, try again later |
1899 | } | 1901 | } |
1900 | void MainWindow::save() | 1902 | void MainWindow::save() |
1901 | { | 1903 | { |
1904 | if ( mView->viewManager()->journalView() ) | ||
1905 | mView->viewManager()->journalView()->checkModified(); | ||
1902 | if ( !mCalendarModifiedFlag ) { | 1906 | if ( !mCalendarModifiedFlag ) { |
1903 | qDebug("KO: Calendar not modified. Nothing saved."); | 1907 | qDebug("KO: Calendar not modified. Nothing saved."); |
1904 | return; | 1908 | return; |
1905 | } | 1909 | } |