-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | desktop/rpm/kdepim_rpm | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 10 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 35 | ||||
-rw-r--r-- | version | 2 |
5 files changed, 17 insertions, 37 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index beeaf60..05c1afd 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,66 +1,71 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.12 ************ | ||
4 | |||
5 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | ||
6 | |||
7 | |||
3 | ********** VERSION 2.0.11 ************ | 8 | ********** VERSION 2.0.11 ************ |
4 | 9 | ||
5 | Fixed some problems in pi-sync mode | 10 | Fixed some problems in pi-sync mode |
6 | (e.g. details of events were not synced properly) | 11 | (e.g. details of events were not synced properly) |
7 | 12 | ||
8 | ********** VERSION 2.0.10 ************ | 13 | ********** VERSION 2.0.10 ************ |
9 | 14 | ||
10 | KO/Pi: | 15 | KO/Pi: |
11 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 16 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
12 | This is fixed. | 17 | This is fixed. |
13 | Changed the search dialog a bit to make it more user friendly. | 18 | Changed the search dialog a bit to make it more user friendly. |
14 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 19 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
15 | 20 | ||
16 | Added config option to hide the week number in KO/Pi toolbar. | 21 | Added config option to hide the week number in KO/Pi toolbar. |
17 | 22 | ||
18 | ********** VERSION 2.0.9 ************ | 23 | ********** VERSION 2.0.9 ************ |
19 | 24 | ||
20 | Made month view icons for multiday events a bit nicer. | 25 | Made month view icons for multiday events a bit nicer. |
21 | Some minor fixes in KO/Pi | 26 | Some minor fixes in KO/Pi |
22 | (e.g. go to today did not work for new week view properly). | 27 | (e.g. go to today did not work for new week view properly). |
23 | 28 | ||
24 | 29 | ||
25 | ********** VERSION 2.0.8 ************ | 30 | ********** VERSION 2.0.8 ************ |
26 | 31 | ||
27 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 32 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
28 | 33 | ||
29 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | 34 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. |
30 | 35 | ||
31 | Added a "go today" button to the datepicker. | 36 | Added a "go today" button to the datepicker. |
32 | 37 | ||
33 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 38 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
34 | and made it configureable to show these values. | 39 | and made it configureable to show these values. |
35 | 40 | ||
36 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 41 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
37 | 42 | ||
38 | 43 | ||
39 | ********** VERSION 2.0.7 ************ | 44 | ********** VERSION 2.0.7 ************ |
40 | 45 | ||
41 | Added global application font settings | 46 | Added global application font settings |
42 | (for all KDE-Pim/Pi apps) to the general settings. | 47 | (for all KDE-Pim/Pi apps) to the general settings. |
43 | 48 | ||
44 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 49 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
45 | (like the IMAP server of Apple: mail.mac.com ) | 50 | (like the IMAP server of Apple: mail.mac.com ) |
46 | 51 | ||
47 | Added recurring todos to KO/Pi. | 52 | Added recurring todos to KO/Pi. |
48 | 53 | ||
49 | 54 | ||
50 | ********** VERSION 2.0.6 ************ | 55 | ********** VERSION 2.0.6 ************ |
51 | 56 | ||
52 | Some bugfixes in the pi-sync mode. | 57 | Some bugfixes in the pi-sync mode. |
53 | Added German translation for pi-sync mode. | 58 | Added German translation for pi-sync mode. |
54 | 59 | ||
55 | KO/Pi: | 60 | KO/Pi: |
56 | Made the todolist using alternate background. | 61 | Made the todolist using alternate background. |
57 | 62 | ||
58 | Other minor fixes in KO/Pi. | 63 | Other minor fixes in KO/Pi. |
59 | 64 | ||
60 | 65 | ||
61 | ********** VERSION 2.0.5 ************ | 66 | ********** VERSION 2.0.5 ************ |
62 | 67 | ||
63 | Bugfixes in KO/Pi. | 68 | Bugfixes in KO/Pi. |
64 | 69 | ||
65 | ********** VERSION 2.0.4 ************ | 70 | ********** VERSION 2.0.4 ************ |
66 | 71 | ||
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm index b6a8491..0d4c9d6 100644 --- a/desktop/rpm/kdepim_rpm +++ b/desktop/rpm/kdepim_rpm | |||
@@ -1,67 +1,67 @@ | |||
1 | Summary: A collection of PIM programs | 1 | Summary: A collection of PIM programs |
2 | Name: KDE-Pim-Pi | 2 | Name: KDE-Pim-Pi |
3 | Version: 2.0.11 | 3 | Version: 2.0.12 |
4 | Release: SuSE_9.2 | 4 | Release: SuSE_9.2 |
5 | Copyright:GPL | 5 | Copyright:GPL |
6 | Group: Productivity/Pim | 6 | Group: Productivity/Pim |
7 | Source:http://sourceforge.net/projects/kdepimpi/ | 7 | Source:http://sourceforge.net/projects/kdepimpi/ |
8 | URL:http://sourceforge.net/projects/kdepimpi/ | 8 | URL:http://sourceforge.net/projects/kdepimpi/ |
9 | Packager: zautrix | 9 | Packager: zautrix |
10 | 10 | ||
11 | %description | 11 | %description |
12 | This package contains the platform-independent PIM programs from | 12 | This package contains the platform-independent PIM programs from |
13 | www.pi-sync.net, compiled for SuSE 9.2: | 13 | www.pi-sync.net, compiled for SuSE 9.2: |
14 | KTimeTacker/Pi | 14 | KTimeTacker/Pi |
15 | KPhone/Pi | 15 | KPhone/Pi |
16 | KAddressbook/Pi | 16 | KAddressbook/Pi |
17 | KOrganizer/Pi | 17 | KOrganizer/Pi |
18 | PasswordManager/Pi | 18 | PasswordManager/Pi |
19 | KOPieMail/Pi | 19 | KOPieMail/Pi |
20 | 20 | ||
21 | These applications do not need anything from the KDE-desktop | 21 | These applications do not need anything from the KDE-desktop |
22 | at all to run on Linux. However, there is a dependency from | 22 | at all to run on Linux. However, there is a dependency from |
23 | two KDE libs, because a small command line program is included | 23 | two KDE libs, because a small command line program is included |
24 | to make it possible to sync with the KDE-desktop applications. | 24 | to make it possible to sync with the KDE-desktop applications. |
25 | 25 | ||
26 | These applications are independent from the KDE-desktop | 26 | These applications are independent from the KDE-desktop |
27 | environment. That means, nothing of your existing | 27 | environment. That means, nothing of your existing |
28 | KDE-desktop setup will be changed, or any data | 28 | KDE-desktop setup will be changed, or any data |
29 | (calendar-addressbook) used by the KDE-desktop | 29 | (calendar-addressbook) used by the KDE-desktop |
30 | applications will be changed or accessed. | 30 | applications will be changed or accessed. |
31 | These applications stores their data and config in | 31 | These applications stores their data and config in |
32 | $HOME/kdepim/ | 32 | $HOME/kdepim/ |
33 | However, because the same file format is used, | 33 | However, because the same file format is used, |
34 | an easy exchange of data with the KDE-desktop | 34 | an easy exchange of data with the KDE-desktop |
35 | is possible. | 35 | is possible. |
36 | A small command line program is included | 36 | A small command line program is included |
37 | to make it possible to sync with the KDE-desktop applications. | 37 | to make it possible to sync with the KDE-desktop applications. |
38 | You do not need to call this program from the commandline, | 38 | You do not need to call this program from the commandline, |
39 | it is called from the KDE-Pim/Pi apps when you choose there: | 39 | it is called from the KDE-Pim/Pi apps when you choose there: |
40 | Sync with KDE_Desktop. | 40 | Sync with KDE_Desktop. |
41 | If something is going wrong, please start the | 41 | If something is going wrong, please start the |
42 | KDE-Pim/Pi program itself from the console to get detailed output. | 42 | KDE-Pim/Pi program itself from the console to get detailed output. |
43 | 43 | ||
44 | After installation, you should have a | 44 | After installation, you should have a |
45 | PIM-pi | 45 | PIM-pi |
46 | folder in your KDE start menu, where you can | 46 | folder in your KDE start menu, where you can |
47 | start the applications from. | 47 | start the applications from. |
48 | 48 | ||
49 | These programs makes it possible to sync your Zaurus easily | 49 | These programs makes it possible to sync your Zaurus easily |
50 | (with the KDE-Pim/Pi programs running on the Zaurus) | 50 | (with the KDE-Pim/Pi programs running on the Zaurus) |
51 | with the KDE-desktop calendar/addressbook data. | 51 | with the KDE-desktop calendar/addressbook data. |
52 | If you want to use that, you have to update your | 52 | If you want to use that, you have to update your |
53 | KDE-desktop to version 3.3.0 or higher. | 53 | KDE-desktop to version 3.3.0 or higher. |
54 | SuSE 9.2 contains KDE 3.3.0 such that no update is needed. | 54 | SuSE 9.2 contains KDE 3.3.0 such that no update is needed. |
55 | Actually - after the (non difficult) configuration is set up - | 55 | Actually - after the (non difficult) configuration is set up - |
56 | with two mouseklicks on the Zaurus, | 56 | with two mouseklicks on the Zaurus, |
57 | the Zaurus syncs with the corresponding KDE-Pim/Pi | 57 | the Zaurus syncs with the corresponding KDE-Pim/Pi |
58 | program on the Linux Desktop which syncs automatically | 58 | program on the Linux Desktop which syncs automatically |
59 | with the KDE-desktop data. | 59 | with the KDE-desktop data. |
60 | 60 | ||
61 | If you want to use the KDE-desktop calendar/addressbook applications, | 61 | If you want to use the KDE-desktop calendar/addressbook applications, |
62 | just install these apps in this package and use them as a syncing tool for the | 62 | just install these apps in this package and use them as a syncing tool for the |
63 | Zaurus <-> KDE-desktop sync. | 63 | Zaurus <-> KDE-desktop sync. |
64 | The sync requires a network connection from your Zaurus to | 64 | The sync requires a network connection from your Zaurus to |
65 | the PC. A detailed Sync HowTo is available in the | 65 | the PC. A detailed Sync HowTo is available in the |
66 | Help menu of the applications. | 66 | Help menu of the applications. |
67 | 67 | ||
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 4ff6899..db66413 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -940,138 +940,132 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | |||
940 | // if ( type == KOAgenda::RESIZEBOTTOM ) | 940 | // if ( type == KOAgenda::RESIZEBOTTOM ) |
941 | // qDebug("RESIZEBOTTOM "); | 941 | // qDebug("RESIZEBOTTOM "); |
942 | // if ( type == KOAgenda::MOVE ) | 942 | // if ( type == KOAgenda::MOVE ) |
943 | // qDebug("MOVE "); | 943 | // qDebug("MOVE "); |
944 | if ( item->incidence()->type() == "Event" ) { | 944 | if ( item->incidence()->type() == "Event" ) { |
945 | startDt =item->incidence()->dtStart(); | 945 | startDt =item->incidence()->dtStart(); |
946 | endDt = item->incidence()->dtEnd(); | 946 | endDt = item->incidence()->dtEnd(); |
947 | lenInSecs = startDt.secsTo( endDt ); | 947 | lenInSecs = startDt.secsTo( endDt ); |
948 | } | 948 | } |
949 | 949 | ||
950 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); | 950 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); |
951 | 951 | ||
952 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { | 952 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { |
953 | startDate = mSelectedDates[item->mLastMoveXPos]; | 953 | startDate = mSelectedDates[item->mLastMoveXPos]; |
954 | } else { | 954 | } else { |
955 | if (item->cellX() < 0) { | 955 | if (item->cellX() < 0) { |
956 | startDate = (mSelectedDates.first()).addDays(item->cellX()); | 956 | startDate = (mSelectedDates.first()).addDays(item->cellX()); |
957 | } else { | 957 | } else { |
958 | startDate = mSelectedDates[item->cellX()]; | 958 | startDate = mSelectedDates[item->cellX()]; |
959 | } | 959 | } |
960 | } | 960 | } |
961 | startDt.setDate(startDate); | 961 | startDt.setDate(startDate); |
962 | 962 | ||
963 | if (item->incidence()->doesFloat()) { | 963 | if (item->incidence()->doesFloat()) { |
964 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); | 964 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); |
965 | } else { | 965 | } else { |
966 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) | 966 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) |
967 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); | 967 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); |
968 | if ( item->incidence()->type() == "Event" ) { | 968 | if ( item->incidence()->type() == "Event" ) { |
969 | if ( type == KOAgenda::MOVE ) { | 969 | if ( type == KOAgenda::MOVE ) { |
970 | endDt = startDt.addSecs(lenInSecs); | 970 | endDt = startDt.addSecs(lenInSecs); |
971 | 971 | ||
972 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { | 972 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { |
973 | if (item->lastMultiItem()) { | 973 | if (item->lastMultiItem()) { |
974 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 974 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
975 | endDt.setDate(startDate. | 975 | endDt.setDate(startDate. |
976 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 976 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
977 | } else { | 977 | } else { |
978 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 978 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
979 | endDt.setDate(startDate); | 979 | endDt.setDate(startDate); |
980 | } | 980 | } |
981 | } | 981 | } |
982 | } else { | 982 | } else { |
983 | // todo | 983 | // todo |
984 | if (item->lastMultiItem()) { | 984 | if (item->lastMultiItem()) { |
985 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 985 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
986 | endDt.setDate(startDate. | 986 | endDt.setDate(startDate. |
987 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 987 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
988 | } else { | 988 | } else { |
989 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); | 989 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); |
990 | if ( item->cellYBottom() > 0 ) | 990 | if ( item->cellYBottom() > 0 ) |
991 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 991 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
992 | else | 992 | else |
993 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 993 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
994 | endDt.setDate(startDate); | 994 | endDt.setDate(startDate); |
995 | } | 995 | } |
996 | } | 996 | } |
997 | } | 997 | } |
998 | if ( item->incidence()->type() == "Event" ) { | 998 | if ( item->incidence()->type() == "Event" ) { |
999 | item->incidence()->setDtStart(startDt); | 999 | item->incidence()->setDtStart(startDt); |
1000 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 1000 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
1001 | } else if ( item->incidence()->type() == "Todo" ) { | 1001 | } else if ( item->incidence()->type() == "Todo" ) { |
1002 | Todo* to = static_cast<Todo*>(item->incidence()); | 1002 | Todo* to = static_cast<Todo*>(item->incidence()); |
1003 | 1003 | ||
1004 | int len = 0; | ||
1005 | if ( to->hasStartDate() && to->hasDueDate() ) | ||
1006 | len = to->dtStart().secsTo( to->dtDue()); | ||
1007 | to->setDtDue(endDt); | 1004 | to->setDtDue(endDt); |
1008 | if ( to->hasStartDate() ) { | 1005 | if ( to->hasStartDate() ) { |
1009 | if ( len>0 ) | 1006 | if (to->dtStart() >= to->dtDue() ) |
1010 | to->setDtStart(to->dtDue().addSecs( -len )); | 1007 | to->setDtStart(to->dtDue().addDays( -2 )); |
1011 | else | ||
1012 | if (to->dtStart() > to->dtDue() ) | ||
1013 | to->setDtStart(to->dtDue().addDays( -3 )); | ||
1014 | } | 1008 | } |
1015 | 1009 | ||
1016 | } | 1010 | } |
1017 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 1011 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
1018 | item->incidence()->setRevision(item->incidence()->revision()+1); | 1012 | item->incidence()->setRevision(item->incidence()->revision()+1); |
1019 | item->setItemDate(startDt.date()); | 1013 | item->setItemDate(startDt.date()); |
1020 | //item->updateItem(); | 1014 | //item->updateItem(); |
1021 | if ( item->incidence()->type() == "Todo" ) { | 1015 | if ( item->incidence()->type() == "Todo" ) { |
1022 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); | 1016 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); |
1023 | 1017 | ||
1024 | } | 1018 | } |
1025 | else | 1019 | else |
1026 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); | 1020 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); |
1027 | item->updateItem(); | 1021 | item->updateItem(); |
1028 | } | 1022 | } |
1029 | 1023 | ||
1030 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) | 1024 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) |
1031 | { | 1025 | { |
1032 | // kdDebug() << "KOAgendaView::selectDates" << endl; | 1026 | // kdDebug() << "KOAgendaView::selectDates" << endl; |
1033 | 1027 | ||
1034 | mSelectedDates.clear(); | 1028 | mSelectedDates.clear(); |
1035 | // qDebug("KOAgendaView::showDates "); | 1029 | // qDebug("KOAgendaView::showDates "); |
1036 | QDate d = start; | 1030 | QDate d = start; |
1037 | while (d <= end) { | 1031 | while (d <= end) { |
1038 | mSelectedDates.append(d); | 1032 | mSelectedDates.append(d); |
1039 | d = d.addDays( 1 ); | 1033 | d = d.addDays( 1 ); |
1040 | } | 1034 | } |
1041 | 1035 | ||
1042 | // and update the view | 1036 | // and update the view |
1043 | fillAgenda(); | 1037 | fillAgenda(); |
1044 | } | 1038 | } |
1045 | 1039 | ||
1046 | 1040 | ||
1047 | void KOAgendaView::showEvents(QPtrList<Event>) | 1041 | void KOAgendaView::showEvents(QPtrList<Event>) |
1048 | { | 1042 | { |
1049 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; | 1043 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; |
1050 | } | 1044 | } |
1051 | 1045 | ||
1052 | void KOAgendaView::changeEventDisplay(Event *, int) | 1046 | void KOAgendaView::changeEventDisplay(Event *, int) |
1053 | { | 1047 | { |
1054 | // qDebug("KOAgendaView::changeEventDisplay "); | 1048 | // qDebug("KOAgendaView::changeEventDisplay "); |
1055 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; | 1049 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; |
1056 | // this should be re-written to be MUCH smarter. Right now we | 1050 | // this should be re-written to be MUCH smarter. Right now we |
1057 | // are just playing dumb. | 1051 | // are just playing dumb. |
1058 | fillAgenda(); | 1052 | fillAgenda(); |
1059 | } | 1053 | } |
1060 | 1054 | ||
1061 | void KOAgendaView::fillAgenda(const QDate &) | 1055 | void KOAgendaView::fillAgenda(const QDate &) |
1062 | { | 1056 | { |
1063 | // qDebug("KOAgendaView::fillAgenda "); | 1057 | // qDebug("KOAgendaView::fillAgenda "); |
1064 | fillAgenda(); | 1058 | fillAgenda(); |
1065 | } | 1059 | } |
1066 | 1060 | ||
1067 | void KOAgendaView::fillAgenda() | 1061 | void KOAgendaView::fillAgenda() |
1068 | { | 1062 | { |
1069 | if ( globalFlagBlockStartup ) | 1063 | if ( globalFlagBlockStartup ) |
1070 | return; | 1064 | return; |
1071 | if ( globalFlagBlockAgenda == 1 ) | 1065 | if ( globalFlagBlockAgenda == 1 ) |
1072 | return; | 1066 | return; |
1073 | //if ( globalFlagBlockAgenda == 2 ) | 1067 | //if ( globalFlagBlockAgenda == 2 ) |
1074 | //globalFlagBlockAgenda = 0; | 1068 | //globalFlagBlockAgenda = 0; |
1075 | // globalFlagBlockPainting = false; | 1069 | // globalFlagBlockPainting = false; |
1076 | if ( globalFlagBlockAgenda == 0 ) | 1070 | if ( globalFlagBlockAgenda == 0 ) |
1077 | globalFlagBlockAgenda = 1; | 1071 | globalFlagBlockAgenda = 1; |
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index f9f037a..51e2524 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp | |||
@@ -291,157 +291,138 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) | |||
291 | if ( mRelatedTodo ) { | 291 | if ( mRelatedTodo ) { |
292 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); | 292 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); |
293 | mGeneral->setSecrecy (mRelatedTodo->secrecy ()); | 293 | mGeneral->setSecrecy (mRelatedTodo->secrecy ()); |
294 | if ( mRelatedTodo->priority() < 3 ) | 294 | if ( mRelatedTodo->priority() < 3 ) |
295 | mGeneral->mPriorityCombo->setCurrentItem(mRelatedTodo->priority()-1); | 295 | mGeneral->mPriorityCombo->setCurrentItem(mRelatedTodo->priority()-1); |
296 | mGeneral->mSummaryEdit->lineEdit()->setText(mRelatedTodo->summary()+": "); | 296 | mGeneral->mSummaryEdit->lineEdit()->setText(mRelatedTodo->summary()+": "); |
297 | int len = mRelatedTodo->summary().length(); | 297 | int len = mRelatedTodo->summary().length(); |
298 | mGeneral->mSummaryEdit->lineEdit()->setFocus(); | 298 | mGeneral->mSummaryEdit->lineEdit()->setFocus(); |
299 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); | 299 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); |
300 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); | 300 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); |
301 | 301 | ||
302 | } else | 302 | } else |
303 | mGeneral->setFocusOn( 2 ); | 303 | mGeneral->setFocusOn( 2 ); |
304 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 304 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
305 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 305 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); |
306 | } | 306 | } |
307 | void KOTodoEditor::checkRecurrence() | 307 | void KOTodoEditor::checkRecurrence() |
308 | { | 308 | { |
309 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 309 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
310 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); | 310 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); |
311 | 311 | ||
312 | if ( mTodo ) | 312 | if ( mTodo ) |
313 | mRecurrence->readEvent( mTodo ); | 313 | mRecurrence->readEvent( mTodo ); |
314 | else { | 314 | else { |
315 | bool time = mGeneral->mTimeButton->isChecked(); | 315 | bool time = mGeneral->mTimeButton->isChecked(); |
316 | QDateTime from,to; | 316 | QDateTime from,to; |
317 | if ( time ) { | 317 | if ( time ) { |
318 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; | 318 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; |
319 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; | 319 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; |
320 | } else { | 320 | } else { |
321 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; | 321 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; |
322 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; | 322 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; |
323 | } | 323 | } |
324 | if ( to < from ) | 324 | if ( to < from ) |
325 | to = from; | 325 | to = from; |
326 | mRecurrence->setDefaults(from,to,!time); | 326 | mRecurrence->setDefaults(from,to,!time); |
327 | } | 327 | } |
328 | } else { | 328 | } else { |
329 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 329 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
330 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 330 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); |
331 | } | 331 | } |
332 | } | 332 | } |
333 | void KOTodoEditor::readTodo(Todo *todo) | 333 | void KOTodoEditor::readTodo(Todo *todo) |
334 | { | 334 | { |
335 | mGeneral->readTodo(todo); | 335 | mGeneral->readTodo(todo); |
336 | mDetails->readEvent(todo); | 336 | mDetails->readEvent(todo); |
337 | mRelatedTodo = 0;//todo->relatedTo(); | 337 | mRelatedTodo = 0;//todo->relatedTo(); |
338 | // categories | 338 | // categories |
339 | // mCategoryDialog->setSelected(todo->categories()); | 339 | // mCategoryDialog->setSelected(todo->categories()); |
340 | 340 | ||
341 | // We should handle read-only events here. | 341 | // We should handle read-only events here. |
342 | } | 342 | } |
343 | 343 | ||
344 | void KOTodoEditor::writeTodo(Todo *event) | 344 | void KOTodoEditor::writeTodo(Todo *event) |
345 | { | 345 | { |
346 | mGeneral->writeTodo(event); | 346 | mGeneral->writeTodo(event); |
347 | mDetails->writeEvent(event); | 347 | mDetails->writeEvent(event); |
348 | 348 | ||
349 | // set related event, i.e. parent to-do in this case. | 349 | // set related event, i.e. parent to-do in this case. |
350 | if (mRelatedTodo) { | 350 | if (mRelatedTodo) { |
351 | event->setRelatedTo(mRelatedTodo); | 351 | event->setRelatedTo(mRelatedTodo); |
352 | } | 352 | } |
353 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 353 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
354 | mRecurrence->writeEvent(event); | 354 | mRecurrence->writeEvent(event); |
355 | event->setRecurrenceID( event->dtStart().addSecs(-1) ); | 355 | if ( event->doesRecur() ) { |
356 | event->setRecurDates(); | 356 | event->setRecurrenceID( event->dtStart().addSecs(-1) ); |
357 | #if 0 | 357 | event->setRecurDates(); |
358 | bool ok; | 358 | } else { |
359 | QDateTime next = event->getNextOccurence( event->dtStart().addSecs(-1), &ok ); | ||
360 | if ( ok ) { | ||
361 | QDateTime from,to; | ||
362 | bool time = mGeneral->mTimeButton->isChecked(); | ||
363 | if ( time ) { | ||
364 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; | ||
365 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; | ||
366 | } else { | ||
367 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; | ||
368 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; | ||
369 | } | ||
370 | if ( to < from ) | ||
371 | to = from; | ||
372 | int secs = from.secsTo( to ); | ||
373 | event->setRecurrenceID( next ); | ||
374 | event->setDtStart( next ); | ||
375 | event->setDtDue( next.addSecs( secs ) ); | ||
376 | } | ||
377 | else { | ||
378 | event->setHasRecurrenceID( false ); | 359 | event->setHasRecurrenceID( false ); |
379 | event->recurrence()->unsetRecurs(); | ||
380 | } | 360 | } |
381 | #endif | 361 | } else { |
382 | } else | 362 | event->setHasRecurrenceID( false ); |
383 | event->recurrence()->unsetRecurs(); | 363 | event->recurrence()->unsetRecurs(); |
364 | } | ||
384 | } | 365 | } |
385 | 366 | ||
386 | bool KOTodoEditor::validateInput() | 367 | bool KOTodoEditor::validateInput() |
387 | { | 368 | { |
388 | if (!mGeneral->validateInput()) return false; | 369 | if (!mGeneral->validateInput()) return false; |
389 | if (!mDetails->validateInput()) return false; | 370 | if (!mDetails->validateInput()) return false; |
390 | return true; | 371 | return true; |
391 | } | 372 | } |
392 | 373 | ||
393 | int KOTodoEditor::msgItemDelete() | 374 | int KOTodoEditor::msgItemDelete() |
394 | { | 375 | { |
395 | return KMessageBox::warningContinueCancel(this, | 376 | return KMessageBox::warningContinueCancel(this, |
396 | i18n("This item will be permanently deleted."), | 377 | i18n("This item will be permanently deleted."), |
397 | i18n("KOrganizer Confirmation"),i18n("Delete")); | 378 | i18n("KOrganizer Confirmation"),i18n("Delete")); |
398 | } | 379 | } |
399 | 380 | ||
400 | void KOTodoEditor::modified (int modification) | 381 | void KOTodoEditor::modified (int modification) |
401 | { | 382 | { |
402 | if (modification == KOGlobals::CATEGORY_MODIFIED || | 383 | if (modification == KOGlobals::CATEGORY_MODIFIED || |
403 | KOGlobals::UNKNOWN_MODIFIED == modification ) | 384 | KOGlobals::UNKNOWN_MODIFIED == modification ) |
404 | // mCategoryDialog->setSelected (mTodo->categories ()); | 385 | // mCategoryDialog->setSelected (mTodo->categories ()); |
405 | mGeneral->modified (mTodo, modification); | 386 | mGeneral->modified (mTodo, modification); |
406 | 387 | ||
407 | } | 388 | } |
408 | 389 | ||
409 | void KOTodoEditor::slotLoadTemplate() | 390 | void KOTodoEditor::slotLoadTemplate() |
410 | { | 391 | { |
411 | 392 | ||
412 | QString fileName =locateLocal( "templates", "todos" ); | 393 | QString fileName =locateLocal( "templates", "todos" ); |
413 | QDir t_dir; | 394 | QDir t_dir; |
414 | if ( !t_dir.exists(fileName) ) | 395 | if ( !t_dir.exists(fileName) ) |
415 | t_dir.mkdir ( fileName ); | 396 | t_dir.mkdir ( fileName ); |
416 | fileName += "/todo"; | 397 | fileName += "/todo"; |
417 | fileName = KFileDialog::getSaveFileName( fileName , "Load Todo template", this ); | 398 | fileName = KFileDialog::getSaveFileName( fileName , "Load Todo template", this ); |
418 | if ( fileName.length() == 0 ) | 399 | if ( fileName.length() == 0 ) |
419 | return; | 400 | return; |
420 | CalendarLocal cal; | 401 | CalendarLocal cal; |
421 | ICalFormat format; | 402 | ICalFormat format; |
422 | if ( !format.load( &cal, fileName ) ) { | 403 | if ( !format.load( &cal, fileName ) ) { |
423 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") | 404 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") |
424 | .arg( fileName ) ); | 405 | .arg( fileName ) ); |
425 | return ; | 406 | return ; |
426 | } | 407 | } |
427 | QPtrList<Todo> todos = cal.todos(); | 408 | QPtrList<Todo> todos = cal.todos(); |
428 | Todo * todo = todos.first(); | 409 | Todo * todo = todos.first(); |
429 | if ( !todo ) { | 410 | if ( !todo ) { |
430 | KMessageBox::error( this, | 411 | KMessageBox::error( this, |
431 | i18n("Template does not\ncontain a valid Todo.")); | 412 | i18n("Template does not\ncontain a valid Todo.")); |
432 | } else { | 413 | } else { |
433 | readTodo( todo ); | 414 | readTodo( todo ); |
434 | } | 415 | } |
435 | 416 | ||
436 | } | 417 | } |
437 | 418 | ||
438 | void KOTodoEditor::slotSaveTemplate() | 419 | void KOTodoEditor::slotSaveTemplate() |
439 | { | 420 | { |
440 | QString fileName =locateLocal( "templates", "todos" ); | 421 | QString fileName =locateLocal( "templates", "todos" ); |
441 | QDir t_dir; | 422 | QDir t_dir; |
442 | if ( !t_dir.exists(fileName) ) | 423 | if ( !t_dir.exists(fileName) ) |
443 | t_dir.mkdir ( fileName ); | 424 | t_dir.mkdir ( fileName ); |
444 | fileName += "/todo"; | 425 | fileName += "/todo"; |
445 | fileName = KFileDialog::getSaveFileName( fileName , "Save as Todo template", this ); | 426 | fileName = KFileDialog::getSaveFileName( fileName , "Save as Todo template", this ); |
446 | if ( fileName.length() > 0 ) | 427 | if ( fileName.length() > 0 ) |
447 | saveTemplate( fileName ); | 428 | saveTemplate( fileName ); |
@@ -1 +1 @@ | |||
version = "2.0.11"; | version = "2.0.12"; | ||