aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 18:45:03 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 18:45:03 +0800
commit58338b08f3a880320bed171256850d326b895c23 (patch)
tree65a82b122919d410f33cab1b5e230a88c78759c4 /widgets
parent319df4d63875c9e9039acd7091cf48625187ef68 (diff)
downloadgsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar.gz
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar.bz2
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar.lz
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar.xz
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.tar.zst
gsoc2013-evolution-58338b08f3a880320bed171256850d326b895c23.zip
** Fix for bug #351932
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #351932 * widgets/misc/e-dateedit.h: (e_date_edit_have_time): * widgets/misc/e-dateedit.c: (e_date_edit_have_time): Extend API to be able to check if time is set independently of date part. * calendar/gui/dialogs/task-page.c: (check_start_before_end), (times_updated), (start_date_changed_cb), (due_date_changed_cb), (init_widgets): Ensure due date is not before start date. svn path=/trunk/; revision=34500
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-dateedit.c14
-rw-r--r--widgets/misc/e-dateedit.h3
3 files changed, 25 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 9b7eb344a5..c25fcfc9b4 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-05 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #351932
+
+ * e-dateedit.h: (e_date_edit_have_time):
+ * e-dateedit.c: (e_date_edit_have_time): Extend API to be able
+ to check if time is set independently of date part.
+
2007-10-29 Kjartan Maraas <kmaraas@gnome.org>
* e-activity-handler.c: (e_activity_handler_new):
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index d1598074e7..c5399d8637 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1953,6 +1953,20 @@ e_date_edit_time_is_valid (EDateEdit *dedit)
return TRUE;
}
+/**
+ * e_date_edit_have_time
+ * Check if time is set, i.e. it isn't 'None'/empty. Date can be set in this case.
+ *
+ * @param dedit an EDateEdit widget.
+ * @return TRUE is time is set, FALSE otherwise.
+ **/
+gboolean
+e_date_edit_have_time (EDateEdit *dedit)
+{
+ g_return_val_if_fail (dedit != NULL, FALSE);
+
+ return !dedit->priv->date_set_to_none && !dedit->priv->time_set_to_none;
+}
static gboolean
e_date_edit_set_date_internal (EDateEdit *dedit,
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index ffc6d87ac1..1e9aa4142c 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -86,6 +86,9 @@ void e_date_edit_set_editable (EDateEdit *dedit, gboolean
gboolean e_date_edit_date_is_valid (EDateEdit *dedit);
gboolean e_date_edit_time_is_valid (EDateEdit *dedit);
+/* Returns TRUE if time was set, FALSE otherwise. */
+gboolean e_date_edit_have_time (EDateEdit *dedit);
+
/* Returns the last valid date & time set, or -1 if the date & time was set to
'None' and this is permitted via e_date_edit_set_allow_no_date_set. */
time_t e_date_edit_get_time (EDateEdit *dedit);