summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp11
-rw-r--r--korganizer/journalentry.h1
-rw-r--r--korganizer/kojournalview.cpp10
3 files changed, 15 insertions, 7 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 9e2c902..ca8d5f7 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -164,4 +164,4 @@ void JournalEntry::setDate(const QDate &date)
showOnlyMode = false;
- mDate = date;
writeJournal();
+ mDate = date;
int id = mCalendar->defaultCalendar();
@@ -181,4 +181,9 @@ void JournalEntry::toggleShowJournal()
emit showJournalOnly( mJournal );
+ //QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) );
}
}
+void JournalEntry::setVisibleOn()
+{
+ visibleMode = true;
+}
void JournalEntry::setShowOnly()
@@ -186,4 +191,6 @@ void JournalEntry::setShowOnly()
showOnlyMode = true;
+ if ( mTitle->text().isEmpty() )
+ mTitle->setFocus();
+ else
mEditor->setFocus();
- visibleMode = true;
}
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index e98d018..cc9b5ef 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -59,2 +59,3 @@ class JournalEntry : public QFrame {
void toggleShowJournal();
+ void setVisibleOn();
signals:
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 7a96aa5..6fa9b23 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -157,3 +157,3 @@ void KOJournalView::showOnly ( Journal* j )
{
- //qDebug("showOnly %x ", j);
+ qDebug("showOnly %x ", j);
flushView();
@@ -171,3 +171,3 @@ void KOJournalView::showList(QPtrList<Journal> jl)
{
- //qDebug("KOJournalView::showList %d",jl.count() );
+ qDebug("KOJournalView::showList %d",jl.count() );
JournalEntry* mEntry = jEntries.first();
@@ -179,6 +179,6 @@ void KOJournalView::showList(QPtrList<Journal> jl)
mEntry = getNewEntry();
- mEntry->show();
- mEntry->setVisibleMode( true );
mEntry->setDate(mDate);
mEntry->setJournal(jl.at(iii));
+ mEntry->setVisibleMode( true );
+ mEntry->show();
mEntry = 0;
@@ -187,4 +187,4 @@ void KOJournalView::showList(QPtrList<Journal> jl)
mEntry->setJournal(jl.at(iii));
- mEntry->show();
mEntry->setVisibleMode( true );
+ mEntry->show();
mEntry = jEntries.next();