aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-06-14 02:24:00 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-06-14 02:24:00 +0800
commit6bbcfe409475a5450fbe414ef1af7de5a6b35864 (patch)
treea0b477cb57ac2d867f339079ac5fe220cd709730 /calendar/gui
parent3dc527df6627d11b8a7ed176092d70ee80b9e9a6 (diff)
downloadgsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar.gz
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar.bz2
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar.lz
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar.xz
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.tar.zst
gsoc2013-evolution-6bbcfe409475a5450fbe414ef1af7de5a6b35864.zip
set the completed time in the date editor if appropriate
001-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 svn path=/trunk/; revision=10208
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/task-details-page.c3
-rw-r--r--calendar/gui/dialogs/task-page.c19
2 files changed, 17 insertions, 5 deletions
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));
}