summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp37
-rw-r--r--korganizer/journalentry.h3
-rw-r--r--korganizer/kojournalview.cpp6
3 files changed, 14 insertions, 32 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 58863fe..add874f 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -63,10 +63,9 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
63 mJournal = 0; 63 mJournal = 0;
64 mDirty = false;
65 64
66 QHBox * vb = new QHBox ( this ); 65 QHBox * vb = new QHBox ( this );
67 QIconSet icon; 66 QPixmap iconp;
68 67
69 QPushButton * toggleJournal = new QPushButton( vb ); 68 QPushButton * toggleJournal = new QPushButton( vb );
70 icon = SmallIcon("1updownarrow"); 69 iconp = SmallIcon("1updownarrow");
71 toggleJournal->setIconSet (icon ) ; 70 toggleJournal->setPixmap (iconp ) ;
72 new QLabel(i18n(" Title: "),vb); 71 new QLabel(i18n(" Title: "),vb);
@@ -79,12 +78,12 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
79 if ( QApplication::desktop()->width() < 321 ) 78 if ( QApplication::desktop()->width() < 321 )
80 icon = SmallIcon("fileexport16"); 79 iconp = SmallIcon("fileexport16");
81 else 80 else
82 icon = SmallIcon("fileexport"); 81 iconp = SmallIcon("fileexport");
83 saveTemplate->setIconSet (icon ) ; 82 saveTemplate->setPixmap (iconp ) ;
84 int size = saveTemplate->sizeHint().height(); 83 int size = saveTemplate->sizeHint().height();
85 if ( QApplication::desktop()->width() < 321 ) 84 if ( QApplication::desktop()->width() < 321 )
86 icon = SmallIcon("fileimport16"); 85 iconp = SmallIcon("fileimport16");
87 else 86 else
88 icon = SmallIcon("fileimport"); 87 iconp = SmallIcon("fileimport");
89 loadTemplate->setIconSet (icon ) ; 88 loadTemplate->setPixmap (iconp ) ;
90 loadTemplate->setFixedSize( size, size ); 89 loadTemplate->setFixedSize( size, size );
@@ -93,3 +92,2 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
93 mEditor = new KTextEdit(this); 92 mEditor = new KTextEdit(this);
94 connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty()));
95#ifndef DESKTOP_VERSION 93#ifndef DESKTOP_VERSION
@@ -103,3 +101,2 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
103 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 101 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
104 connect( mTitle, SIGNAL( textChanged ( const QString & ) ), this , SLOT( setDirty() ) );
105 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 102 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
@@ -163,3 +160,2 @@ void JournalEntry::slotLoadTemplate()
163 //mEditor->setIgnoreMark( true ); 160 //mEditor->setIgnoreMark( true );
164 setDirty();
165} 161}
@@ -205,3 +201,2 @@ void JournalEntry::setJournal(Journal *journal)
205 201
206 mDirty = false;
207} 202}
@@ -213,8 +208,2 @@ Journal *JournalEntry::journal() const
213 208
214void JournalEntry::setDirty()
215{
216 mDirty = true;
217
218// kdDebug() << "JournalEntry::setDirty()" << endl;
219}
220 209
@@ -246,8 +235,5 @@ void JournalEntry::writeJournal()
246{ 235{
247// kdDebug() << "JournalEntry::writeJournal()" << endl;
248 if (!mDirty) return;
249 236
250 if (mEditor->text().isEmpty()) { 237 if (mEditor->text().isEmpty() && mTitle->text().isEmpty()) {
251 if ( mJournal ) { 238 if ( mJournal ) {
252 mDirty = false;
253 bool conf = KOPrefs::instance()->mConfirm; 239 bool conf = KOPrefs::instance()->mConfirm;
@@ -271,3 +257,2 @@ void JournalEntry::writeJournal()
271 mJournal->setSummary(mTitle->text()); 257 mJournal->setSummary(mTitle->text());
272 mDirty = false;
273} 258}
@@ -276,4 +261,2 @@ void JournalEntry::flushEntry()
276{ 261{
277 if (!mDirty) return;
278
279 writeJournal(); 262 writeJournal();
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index b37cabd..f2db785 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -57,3 +57,2 @@ class JournalEntry : public QFrame {
57 void slotLoadTemplate(); 57 void slotLoadTemplate();
58 void setDirty();
59 void toggleShowJournal(); 58 void toggleShowJournal();
@@ -79,4 +78,2 @@ class JournalEntry : public QFrame {
79 int heiHint; 78 int heiHint;
80
81 bool mDirty;
82}; 79};
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index ff87ef4..cb9a2c0 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -61,3 +61,3 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
61 QPushButton * newJournal = new QPushButton( vb ); 61 QPushButton * newJournal = new QPushButton( vb );
62 QIconSet icon; 62 QPixmap icon;
63 if ( QApplication::desktop()->width() < 321 ) 63 if ( QApplication::desktop()->width() < 321 )
@@ -66,3 +66,3 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
66 icon = SmallIcon("ko24old"); 66 icon = SmallIcon("ko24old");
67 newJournal->setIconSet (icon ) ; 67 newJournal->setPixmap (icon ) ;
68 int size = newJournal->sizeHint().height(); 68 int size = newJournal->sizeHint().height();
@@ -140,2 +140,3 @@ void KOJournalView::newJournal()
140{ 140{
141 flushView();
141 Journal* mJournal = new Journal; 142 Journal* mJournal = new Journal;
@@ -148,2 +149,3 @@ void KOJournalView::showOnly ( Journal* j )
148{ 149{
150 flushView();
149 if ( j == 0 ) { 151 if ( j == 0 ) {