diff options
author | Damon Chaplin <damon@ximian.com> | 2001-10-30 09:37:52 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-10-30 09:37:52 +0800 |
commit | cf4dbf9ee3790b9cf5e146594fa851757cd89881 (patch) | |
tree | a7b5fc1a3a17c61e7f3e49e3cdf218c5cb8f9819 /widgets/misc/e-dateedit.c | |
parent | 46dee516710185ab5fb881a02580c66f3e82181c (diff) | |
download | gsoc2013-evolution-cf4dbf9ee3790b9cf5e146594fa851757cd89881.tar.gz gsoc2013-evolution-cf4dbf9ee3790b9cf5e146594fa851757cd89881.tar.zst gsoc2013-evolution-cf4dbf9ee3790b9cf5e146594fa851757cd89881.zip |
ref the ECalendarItem and check if it gets destroyed, to try to avoid a
2001-10-29 Damon Chaplin <damon@ximian.com>
* e-calendar-item.c (e_calendar_item_signal_emission_idle_cb): ref
the ECalendarItem and check if it gets destroyed, to try to avoid a
free memory write.
* e-dateedit.c (e_date_edit_set_time_of_day): allow setting the time
to empty by passing hour as -1.
svn path=/trunk/; revision=14394
Diffstat (limited to 'widgets/misc/e-dateedit.c')
-rw-r--r-- | widgets/misc/e-dateedit.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index c0456c6437..fc3ac67407 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -758,7 +758,7 @@ e_date_edit_get_time_of_day (EDateEdit *dedit, /** * e_date_edit_set_time_of_day: * @dedit: an #EDateEdit widget. - * @hour: the hour to set. + * @hour: the hour to set, or -1 to set the time to None (i.e. empty). * @minute: the minute to set. * * Description: Sets the time in the time field. @@ -775,9 +775,15 @@ e_date_edit_set_time_of_day (EDateEdit *dedit, priv = dedit->priv; - if (priv->time_set_to_none - || priv->hour != hour - || priv->minute != minute) { + if (hour == -1) { + gboolean allow_no_date_set = e_date_edit_get_allow_no_date_set (dedit); + g_return_if_fail (allow_no_date_set); + if (!priv->time_set_to_none) { + priv->time_set_to_none = TRUE; + } + } else if (priv->time_set_to_none + || priv->hour != hour + || priv->minute != minute) { priv->time_set_to_none = FALSE; priv->hour = hour; priv->minute = minute; |