summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-07 00:03:44 (UTC)
committer zautrix <zautrix>2005-07-07 00:03:44 (UTC)
commitcb350dbe9151db2ded62942d29d11d6c8b88eabd (patch) (unidiff)
tree3ba8d483461e10afddb67f17cd038118d99513ef
parent93bc4dbbef774e28672c947281291b12d5971803 (diff)
downloadkdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.zip
kdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.tar.gz
kdepimpi-cb350dbe9151db2ded62942d29d11d6c8b88eabd.tar.bz2
fixessss
Diffstat (more/less context) (show 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)
2819 } 2819 }
2820 2820
2821 todoChanged( to ); 2821 todoChanged( to );
2822 } else { 2822 } else if ( mMoveIncidence->typeID() == eventID ) {
2823 if ( mMoveIncidence->doesRecur() ) { 2823 if ( mMoveIncidence->doesRecur() ) {
2824#if 0 2824#if 0
2825 // PENDING implement this 2825 // PENDING implement this
@@ -2839,8 +2839,12 @@ void CalendarView::slotSelectPickerDate( QDate d)
2839 mMoveIncidence->setDtStart( dt ); 2839 mMoveIncidence->setDtStart( dt );
2840 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2840 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2841 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2841 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2842 } else if ( mMoveIncidence->typeID() == journalID ) {
2843 QTime tim = mMoveIncidence->dtStart().time();
2844 QDateTime dt ( d,tim );
2845 mMoveIncidence->setDtStart( dt );
2846 updateView();
2842 } 2847 }
2843
2844 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2848 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2845 } 2849 }
2846} 2850}
@@ -3185,7 +3189,7 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
3185 delete t; 3189 delete t;
3186 } 3190 }
3187 } 3191 }
3188 else { 3192 else if ( newInc->typeID() == eventID ) {
3189 Event* e = (Event*) newInc; 3193 Event* e = (Event*) newInc;
3190 showEventEditor(); 3194 showEventEditor();
3191 mEventEditor->editEvent( e ); 3195 mEventEditor->editEvent( e );
@@ -3195,6 +3199,9 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
3195 } else { 3199 } else {
3196 delete e; 3200 delete e;
3197 } 3201 }
3202 } if ( newInc->typeID() == journalID ) {
3203 mCalendar->addJournal( (Journal*) newInc );
3204 editJournal( (Journal*) newInc );
3198 } 3205 }
3199 setActiveWindow(); 3206 setActiveWindow();
3200} 3207}
@@ -3498,7 +3505,7 @@ void CalendarView::deleteTodo(Todo *todo)
3498 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 3505 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
3499 3506
3500 } 3507 }
3501 switch (msgItemDelete(text)) { 3508 switch (msgItemDelete(i18n("Todo:") +"\n"+text)) {
3502 case KMessageBox::Continue: // OK 3509 case KMessageBox::Continue: // OK
3503 bool deleteT = false; 3510 bool deleteT = false;
3504 if (!todo->relations().isEmpty()) { 3511 if (!todo->relations().isEmpty()) {
@@ -3529,7 +3536,17 @@ void CalendarView::deleteJournal(Journal *jour)
3529 return; 3536 return;
3530 } 3537 }
3531 if (KOPrefs::instance()->mConfirm) { 3538 if (KOPrefs::instance()->mConfirm) {
3532 switch (msgItemDelete( jour->description().left(20))) { 3539
3540 QString des;
3541 if ( !jour->summary().isEmpty() ) {
3542 des = jour->summary();
3543 } else {
3544 des = jour->description().left(30);
3545 des = des.simplifyWhiteSpace ();
3546 des.replace (QRegExp ("\\n"),"" );
3547 des.replace (QRegExp ("\\r"),"" );
3548 }
3549 switch (msgItemDelete( i18n("Journal:") +"\n"+des.left(20))) {
3533 case KMessageBox::Continue: // OK 3550 case KMessageBox::Continue: // OK
3534 calendar()->deleteJournal(jour); 3551 calendar()->deleteJournal(jour);
3535 updateView(); 3552 updateView();
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 5f90dc6..7783dd4 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -971,9 +971,11 @@ void KOListView::resetFocus()
971void KOListView::updateView() 971void KOListView::updateView()
972{ 972{
973 mListView->setFocus(); 973 mListView->setFocus();
974 if ( mListView->firstChild () ) 974 if ( mListView->firstChild () ) {
975 mListView->setCurrentItem( mListView->firstChild () ); 975 mListView->setCurrentItem( mListView->firstChild () );
976} 976}
977 processSelectionChange( mListView->firstChild () );
978}
977void KOListView::updateConfig() 979void KOListView::updateConfig()
978{ 980{
979 981
@@ -997,7 +999,7 @@ void KOListView::showDates(const QDate &start, const QDate &end)
997 addJournals( calendar()->journals4Date(date) ); 999 addJournals( calendar()->journals4Date(date) );
998 date = date.addDays( 1 ); 1000 date = date.addDays( 1 );
999 } 1001 }
1000 emit incidenceSelected( 0 ); 1002 //emit incidenceSelected( 0 );
1001 updateView(); 1003 updateView();
1002 1004
1003} 1005}