author | zautrix <zautrix> | 2004-12-07 09:55:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-07 09:55:57 (UTC) |
commit | 17b25691f0332e648dd1d800e89ccf4e1da8955d (patch) (unidiff) | |
tree | b7bc28e6c57c043fc49328a7ebd86e1b5cd0f17a | |
parent | dcd2bbbc8d3064b35f268a831c567feaafea5fd8 (diff) | |
download | kdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.zip kdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.tar.gz kdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.tar.bz2 |
some kopi usebility fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 13 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 46 | ||||
-rw-r--r-- | korganizer/calendarview.h | 3 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 4 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 10 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 7 | ||||
-rw-r--r-- | libkcal/calendar.cpp | 11 | ||||
-rw-r--r-- | libkcal/calendar.h | 3 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 17 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 14 | ||||
-rw-r--r-- | libkcal/incidence.h | 1 | ||||
-rw-r--r-- | version | 2 |
14 files changed, 123 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 5021212..46d59a3 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -2,2 +2,15 @@ Info about the changes in new versions of KDE-Pim/Pi | |||
2 | 2 | ||
3 | ********** VERSION 1.9.15 ************ | ||
4 | |||
5 | Usebilty enhancements in KO/Pi: | ||
6 | When clicking on the date in a month view cell, the day view is shown. | ||
7 | Old behaviour was, that the "new event" dialog popped up. | ||
8 | |||
9 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | ||
10 | That means, you can restore the latest | ||
11 | event/todo/journal you have deleted. | ||
12 | A journal is deleted, if you clear all the text of the journal. | ||
13 | |||
14 | |||
15 | |||
3 | ********** VERSION 1.9.14 ************ | 16 | ********** VERSION 1.9.14 ************ |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 543897a..15c5dd9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -493,2 +493,9 @@ CalendarView::~CalendarView() | |||
493 | } | 493 | } |
494 | |||
495 | void CalendarView::showDay( QDate d ) | ||
496 | { | ||
497 | dateNavigator()->selectDate( d ); | ||
498 | mViewManager->showWeekView(); | ||
499 | dateNavigator()->selectDate( d ); | ||
500 | } | ||
494 | void CalendarView::timerAlarm() | 501 | void CalendarView::timerAlarm() |
@@ -2211,2 +2218,3 @@ void CalendarView::edit_options() | |||
2211 | 2218 | ||
2219 | |||
2212 | void CalendarView::slotSelectPickerDate( QDate d) | 2220 | void CalendarView::slotSelectPickerDate( QDate d) |
@@ -2231,2 +2239,15 @@ void CalendarView::slotSelectPickerDate( QDate d) | |||
2231 | } else { | 2239 | } else { |
2240 | if ( mMoveIncidence->doesRecur() ) { | ||
2241 | #if 0 | ||
2242 | // PENDING implement this | ||
2243 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); | ||
2244 | mCalendar()->addIncidence( newInc ); | ||
2245 | if ( mMoveIncidence->type() == "Todo" ) | ||
2246 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); | ||
2247 | else | ||
2248 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); | ||
2249 | mMoveIncidence = newInc; | ||
2250 | |||
2251 | #endif | ||
2252 | } | ||
2232 | QTime tim = mMoveIncidence->dtStart().time(); | 2253 | QTime tim = mMoveIncidence->dtStart().time(); |
@@ -2428,2 +2449,4 @@ void CalendarView::moveIncidence(Incidence * inc ) | |||
2428 | } | 2449 | } |
2450 | //PENDING set date for recurring incidence to date of recurrence | ||
2451 | //mMoveIncidenceOldDate; | ||
2429 | mDatePicker->setDate( da ); | 2452 | mDatePicker->setDate( da ); |
@@ -2886,3 +2909,3 @@ void CalendarView::deleteEvent(Event *anEvent) | |||
2886 | if (KOPrefs::instance()->mConfirm) { | 2909 | if (KOPrefs::instance()->mConfirm) { |
2887 | km = KMessageBox::warningContinueCancel(this,anEvent->summary() + | 2910 | km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
2888 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), | 2911 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), |
@@ -2894,3 +2917,3 @@ void CalendarView::deleteEvent(Event *anEvent) | |||
2894 | } else { | 2917 | } else { |
2895 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary() + | 2918 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + |
2896 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ | 2919 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ |
@@ -2935,3 +2958,3 @@ void CalendarView::deleteEvent(Event *anEvent) | |||
2935 | if (KOPrefs::instance()->mConfirm) { | 2958 | if (KOPrefs::instance()->mConfirm) { |
2936 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary() + | 2959 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
2937 | i18n("\nAre you sure you want\nto delete this event?"), | 2960 | i18n("\nAre you sure you want\nto delete this event?"), |
@@ -3801 +3824,18 @@ void CalendarView::removeSyncInfo( QString syncProfile) | |||
3801 | } | 3824 | } |
3825 | |||
3826 | void CalendarView::undo_delete() | ||
3827 | { | ||
3828 | //qDebug("undo_delete() "); | ||
3829 | Incidence* undo = mCalendar->undoIncidence(); | ||
3830 | if ( !undo ) { | ||
3831 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), | ||
3832 | i18n("KO/Pi")); | ||
3833 | return; | ||
3834 | } | ||
3835 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) + | ||
3836 | i18n("\nAre you sure you want\nto restore this?"), | ||
3837 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { | ||
3838 | mCalendar->undoDeleteIncidence(); | ||
3839 | updateView(); | ||
3840 | } | ||
3841 | } | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 437a51c..646973d 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -452,2 +452,4 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
452 | void setSyncName( QString ); | 452 | void setSyncName( QString ); |
453 | void showDay( QDate ); | ||
454 | void undo_delete(); | ||
453 | protected slots: | 455 | protected slots: |
@@ -556,2 +558,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
556 | Incidence *mMoveIncidence; | 558 | Incidence *mMoveIncidence; |
559 | QDate mMoveIncidenceOldDate; | ||
557 | KOTodoView *mTodoList; | 560 | KOTodoView *mTodoList; |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index f027343..46184ac 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -152,2 +152,3 @@ void KOAgendaItem::recreateIncidence() | |||
152 | { | 152 | { |
153 | #if 0 | ||
153 | Incidence* newInc = mIncidence->clone(); | 154 | Incidence* newInc = mIncidence->clone(); |
@@ -162,3 +163,4 @@ void KOAgendaItem::recreateIncidence() | |||
162 | } | 163 | } |
163 | mIncidence = newInc; | 164 | #endif |
165 | mIncidence = mIncidence->recreateCloneException( mDate ); | ||
164 | } | 166 | } |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 7d1e82f..08232e2 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -283,4 +283,4 @@ MonthViewCell::MonthViewCell( KOMonthView *parent) | |||
283 | updateConfig(); | 283 | updateConfig(); |
284 | connect( mLabel, SIGNAL( clicked( )), | 284 | //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); |
285 | SLOT( newEvent() )); | 285 | connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); |
286 | connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ), | 286 | connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ), |
@@ -631,2 +631,6 @@ void MonthViewCell::defaultAction( QListBoxItem *item ) | |||
631 | } | 631 | } |
632 | void MonthViewCell::showDay() | ||
633 | { | ||
634 | emit showDaySignal( date() ); | ||
635 | } | ||
632 | void MonthViewCell::newEvent() | 636 | void MonthViewCell::newEvent() |
@@ -731,2 +735,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
731 | SIGNAL( newEventSignal( QDateTime ) ) ); | 735 | SIGNAL( newEventSignal( QDateTime ) ) ); |
736 | connect( cell, SIGNAL( showDaySignal( QDate ) ), | ||
737 | SIGNAL( showDaySignal( QDate ) ) ); | ||
732 | } | 738 | } |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index e94952f..5124057 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -145,2 +145,3 @@ class MonthViewCell : public QWidget | |||
145 | void newEventSignal( QDateTime ); | 145 | void newEventSignal( QDateTime ); |
146 | void showDaySignal( QDate ); | ||
146 | 147 | ||
@@ -155,2 +156,3 @@ class MonthViewCell : public QWidget | |||
155 | void newEvent(); | 156 | void newEvent(); |
157 | void showDay(); | ||
156 | 158 | ||
@@ -223,2 +225,3 @@ class KOMonthView: public KOEventView | |||
223 | void selectWeekNum ( int ); | 225 | void selectWeekNum ( int ); |
226 | void showDaySignal( QDate ); | ||
224 | protected: | 227 | protected: |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 391f98c..6e151f9 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -34,2 +34,3 @@ | |||
34 | #endif | 34 | #endif |
35 | #include <qdatetime.h> | ||
35 | #include "calendarview.h" | 36 | #include "calendarview.h" |
@@ -446,2 +447,4 @@ void KOViewManager::showMonthView() | |||
446 | mMainView, SLOT ( selectWeekNum( int ) ) ); | 447 | mMainView, SLOT ( selectWeekNum( int ) ) ); |
448 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | ||
449 | mMainView, SLOT ( showDay( QDate ) ) ); | ||
447 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 450 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 46ae6a0..a652c05 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -578,2 +578,9 @@ void MainWindow::initActions() | |||
578 | actionMenu->insertSeparator(); | 578 | actionMenu->insertSeparator(); |
579 | |||
580 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | ||
581 | action->addTo( actionMenu ); | ||
582 | connect( action, SIGNAL( activated() ), | ||
583 | mView, SLOT( undo_delete() ) ); | ||
584 | actionMenu->insertSeparator(); | ||
585 | |||
579 | icon = loadPixmap( pathString + "newevent" ); | 586 | icon = loadPixmap( pathString + "newevent" ); |
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 52daaaa..88351eb 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -54,3 +54,3 @@ void Calendar::init() | |||
54 | mNewObserver = false; | 54 | mNewObserver = false; |
55 | 55 | mUndoIncidence = 0; | |
56 | mModified = false; | 56 | mModified = false; |
@@ -111,2 +111,4 @@ Calendar::~Calendar() | |||
111 | delete mDefaultFilter; | 111 | delete mDefaultFilter; |
112 | if ( mUndoIncidence ) | ||
113 | delete mUndoIncidence; | ||
112 | } | 114 | } |
@@ -118,2 +120,9 @@ const QString &Calendar::getOwner() const | |||
118 | 120 | ||
121 | bool Calendar::undoDeleteIncidence() | ||
122 | { | ||
123 | if (!mUndoIncidence) | ||
124 | return false; | ||
125 | addIncidence(mUndoIncidence); | ||
126 | mUndoIncidence = 0; | ||
127 | } | ||
119 | void Calendar::setOwner(const QString &os) | 128 | void Calendar::setOwner(const QString &os) |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index b7d6a1f..2f2c3aa 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -67,2 +67,4 @@ public: | |||
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | Incidence * undoIncidence() { return mUndoIncidence; }; | ||
69 | bool undoDeleteIncidence(); | ||
68 | void deleteIncidence(Incidence *in); | 70 | void deleteIncidence(Incidence *in); |
@@ -324,2 +326,3 @@ public: | |||
324 | Incidence *mNextAlarmIncidence; | 326 | Incidence *mNextAlarmIncidence; |
327 | Incidence *mUndoIncidence; | ||
325 | 328 | ||
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 3f46d53..12294c0 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -154,7 +154,7 @@ void CalendarLocal::deleteEvent( Event *event ) | |||
154 | { | 154 | { |
155 | 155 | if ( mUndoIncidence ) delete mUndoIncidence; | |
156 | 156 | mUndoIncidence = event->clone(); | |
157 | if ( mEventList.removeRef( event ) ) { | 157 | if ( mEventList.removeRef( event ) ) { |
158 | setModified( true ); | 158 | setModified( true ); |
159 | } | 159 | } |
160 | } | 160 | } |
@@ -203,3 +203,5 @@ void CalendarLocal::deleteTodo( Todo *todo ) | |||
203 | // Handle orphaned children | 203 | // Handle orphaned children |
204 | removeRelations( todo ); | 204 | if ( mUndoIncidence ) delete mUndoIncidence; |
205 | mUndoIncidence = todo->clone(); | ||
206 | removeRelations( todo ); | ||
205 | 207 | ||
@@ -689,2 +691,5 @@ void CalendarLocal::deleteJournal( Journal *journal ) | |||
689 | { | 691 | { |
692 | if ( mUndoIncidence ) delete mUndoIncidence; | ||
693 | mUndoIncidence = journal->clone(); | ||
694 | mUndoIncidence->setSummary( mUndoIncidence->description().left(25)); | ||
690 | if ( mJournalList.removeRef(journal) ) { | 695 | if ( mJournalList.removeRef(journal) ) { |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 5a9ef0e..28402ae 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -175,2 +175,16 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) | |||
175 | 175 | ||
176 | Incidence* Incidence::recreateCloneException( QDate d ) | ||
177 | { | ||
178 | Incidence* newInc = clone(); | ||
179 | newInc->recreate(); | ||
180 | if ( doesRecur() ) { | ||
181 | addExDate( d ); | ||
182 | newInc->recurrence()->unsetRecurs(); | ||
183 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); | ||
184 | QTime tim = dtStart().time(); | ||
185 | newInc->setDtStart( QDateTime(d, tim) ); | ||
186 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); | ||
187 | } | ||
188 | return newInc; | ||
189 | } | ||
176 | 190 | ||
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index 7dc6f10..1807bc4 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -124,2 +124,3 @@ class Incidence : public IncidenceBase | |||
124 | void recreate(); | 124 | void recreate(); |
125 | Incidence* recreateCloneException(QDate); | ||
125 | 126 | ||
@@ -1 +1 @@ | |||
version = "1.9.14"; | version = "1.9.15"; | ||