summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-07 00:03:44 (UTC)
committer zautrix <zautrix>2005-07-07 00:03:44 (UTC)
commitcb350dbe9151db2ded62942d29d11d6c8b88eabd (patch) (side-by-side diff)
tree3ba8d483461e10afddb67f17cd038118d99513ef /korganizer
parent93bc4dbbef774e28672c947281291b12d5971803 (diff)
downloadkdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.zip
kdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.tar.gz
kdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.tar.bz2
fixessss
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp27
-rw-r--r--korganizer/kolistview.cpp6
2 files changed, 26 insertions, 7 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 98e0ac1..bc1c0c7 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2819,7 +2819,7 @@ void CalendarView::slotSelectPickerDate( QDate d)
}
todoChanged( to );
- } else {
+ } else if ( mMoveIncidence->typeID() == eventID ) {
if ( mMoveIncidence->doesRecur() ) {
#if 0
// PENDING implement this
@@ -2839,8 +2839,12 @@ void CalendarView::slotSelectPickerDate( QDate d)
mMoveIncidence->setDtStart( dt );
((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
+ } else if ( mMoveIncidence->typeID() == journalID ) {
+ QTime tim = mMoveIncidence->dtStart().time();
+ QDateTime dt ( d,tim );
+ mMoveIncidence->setDtStart( dt );
+ updateView();
}
-
mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
}
}
@@ -3185,7 +3189,7 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
delete t;
}
}
- else {
+ else if ( newInc->typeID() == eventID ) {
Event* e = (Event*) newInc;
showEventEditor();
mEventEditor->editEvent( e );
@@ -3195,6 +3199,9 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
} else {
delete e;
}
+ } if ( newInc->typeID() == journalID ) {
+ mCalendar->addJournal( (Journal*) newInc );
+ editJournal( (Journal*) newInc );
}
setActiveWindow();
}
@@ -3498,7 +3505,7 @@ void CalendarView::deleteTodo(Todo *todo)
text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
}
- switch (msgItemDelete(text)) {
+ switch (msgItemDelete(i18n("Todo:") +"\n"+text)) {
case KMessageBox::Continue: // OK
bool deleteT = false;
if (!todo->relations().isEmpty()) {
@@ -3529,7 +3536,17 @@ void CalendarView::deleteJournal(Journal *jour)
return;
}
if (KOPrefs::instance()->mConfirm) {
- switch (msgItemDelete( jour->description().left(20))) {
+
+ QString des;
+ if ( !jour->summary().isEmpty() ) {
+ des = jour->summary();
+ } else {
+ des = jour->description().left(30);
+ des = des.simplifyWhiteSpace ();
+ des.replace (QRegExp ("\\n"),"" );
+ des.replace (QRegExp ("\\r"),"" );
+ }
+ switch (msgItemDelete( i18n("Journal:") +"\n"+des.left(20))) {
case KMessageBox::Continue: // OK
calendar()->deleteJournal(jour);
updateView();
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 5f90dc6..7783dd4 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -971,8 +971,10 @@ void KOListView::resetFocus()
void KOListView::updateView()
{
mListView->setFocus();
- if ( mListView->firstChild () )
+ if ( mListView->firstChild () ) {
mListView->setCurrentItem( mListView->firstChild () );
+ }
+ processSelectionChange( mListView->firstChild () );
}
void KOListView::updateConfig()
{
@@ -997,7 +999,7 @@ void KOListView::showDates(const QDate &start, const QDate &end)
addJournals( calendar()->journals4Date(date) );
date = date.addDays( 1 );
}
- emit incidenceSelected( 0 );
+ //emit incidenceSelected( 0 );
updateView();
}