summaryrefslogtreecommitdiffabout
path: root/korganizer/journalentry.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/journalentry.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 05bfd31..232ea58 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -171,50 +171,55 @@ void JournalEntry::setDate(const QDate &date)
writeJournal();
int id = mCalendar->defaultCalendar();
QString calname = KOPrefs::instance()->getCalendar( id )->mName;
mTitleLabel->setText( " (" + calname +")");
}
void JournalEntry::toggleShowJournal()
{
flushEntry();
if ( showOnlyMode )
emit showJournalOnly( 0 );
else
emit showJournalOnly( mJournal );
}
void JournalEntry::setShowOnly()
{
showOnlyMode = true;
mEditor->setFocus();
}
void JournalEntry::setJournal(Journal *journal)
{
writeJournal();
mJournal = journal;
+ if ( journal->isReadOnly() )
+ mTitle->setText(mJournal->summary()+" ("+i18n("readonly")+")");
+ else
mTitle->setText(mJournal->summary());
mEditor->setText(mJournal->description());
+ mTitle->setReadOnly (journal->isReadOnly() );
+ mEditor->setReadOnly ( journal->isReadOnly() );
int id = mJournal->calID();
QString calname = KOPrefs::instance()->getCalendar( id )->mName;
mTitleLabel->setText( " (" + calname +")");
mDirty = false;
}
Journal *JournalEntry::journal() const
{
return mJournal;
}
void JournalEntry::setDirty()
{
mDirty = true;
// kdDebug() << "JournalEntry::setDirty()" << endl;
}
void JournalEntry::clear()
{
mJournal = 0;
mEditor->setText("");