aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog16
-rw-r--r--calendar/gui/dialogs/task-details-page.c3
-rw-r--r--calendar/gui/dialogs/task-page.c19
3 files changed, 33 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 411108f923..4fd6ace68c 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,19 @@
+2001-06-13 JP Rosevear <jpr@ximian.com>
+
+ * gui/dialogs/task-details-page.c (task_details_page_set_dates):
+ set the completed time in the date editor if appropriate
+
+ * gui/dialogs/task-page.c (task_page_set_dates): if we are
+ updating, return
+ (complete_date_changed): don't returns if we are updating - the
+ guards are done in the calling function
+ (status_changed): indicate when we are updating and when we are
+ finished, round the completion time to the nearest minute
+ (percent_complete_changed): indicate when are updating and when we
+ are finished
+ (percent_complete_changed): notify of the date change after the
+ option menu is updated
+
2001-06-11 Rodrigo Moya <rodrigo@ximian.com>
* gui/e-day-view.[ch]: added cut&paste support, by using a GtkInvisible
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index d6f0e57738..7fb3bd1672 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -298,6 +298,9 @@ task_details_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
priv = tdpage->priv;
comp_editor_date_label (dates, priv->date_time);
+ if (dates->complete != 0)
+ e_date_edit_set_time (E_DATE_EDIT (priv->completed_date),
+ dates->complete);
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index ffa5521b29..fc0e1d8a67 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -36,6 +36,7 @@
#include <gal/widgets/e-categories.h>
#include <widgets/misc/e-dateedit.h>
#include "e-util/e-dialog-widgets.h"
+#include "comp-editor-util.h"
#include "task-page.h"
@@ -569,6 +570,9 @@ task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
tpage = TASK_PAGE (page);
priv = tpage->priv;
+ if (priv->updating)
+ return;
+
priv->updating = TRUE;
if (dates->complete != 0) {
@@ -753,9 +757,6 @@ complete_date_changed (TaskPage *tpage, time_t complete)
priv = tpage->priv;
- if (priv->updating)
- return;
-
dates.start = 0;
dates.end = 0;
dates.due = 0;
@@ -777,6 +778,8 @@ status_changed (GtkMenu *menu, TaskPage *tpage)
if (priv->updating)
return;
+ priv->updating = TRUE;
+
status = e_dialog_option_menu_get (priv->status, status_map);
if (status == ICAL_STATUS_NEEDSACTION) {
e_dialog_spin_set (priv->percent_complete, 0);
@@ -786,9 +789,11 @@ status_changed (GtkMenu *menu, TaskPage *tpage)
complete_date_changed (tpage, -1);
} else if (status == ICAL_STATUS_COMPLETED) {
e_dialog_spin_set (priv->percent_complete, 100);
- complete_date_changed (tpage, time (NULL));
+ complete_date_changed (tpage, time (NULL) - (time (NULL) % 60));
}
+ priv->updating = FALSE;
+
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
}
@@ -804,6 +809,8 @@ percent_complete_changed (GtkAdjustment *adj, TaskPage *tpage)
if (priv->updating)
return;
+
+ priv->updating = TRUE;
percent = e_dialog_spin_get_int (priv->percent_complete);
if (percent == 100) {
@@ -818,8 +825,10 @@ percent_complete_changed (GtkAdjustment *adj, TaskPage *tpage)
status = ICAL_STATUS_INPROCESS;
}
- complete_date_changed (tpage, date_completed);
e_dialog_option_menu_set (priv->status, status, status_map);
+ complete_date_changed (tpage, date_completed);
+
+ priv->updating = FALSE;
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
}