[gnome-calendar] quick-add-popover: only today events are timed
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] quick-add-popover: only today events are timed
- Date: Wed, 28 Sep 2016 03:29:13 +0000 (UTC)
commit 1e1452810e0a0a4263c8b742355586ade472da4f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Sep 28 00:28:55 2016 -0300
quick-add-popover: only today events are timed
Everything else is all day.
https://bugzilla.gnome.org/show_bug.cgi?id=770713
src/gcal-quick-add-popover.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-quick-add-popover.c b/src/gcal-quick-add-popover.c
index d3f61e9..3596038 100644
--- a/src/gcal-quick-add-popover.c
+++ b/src/gcal-quick-add-popover.c
@@ -420,18 +420,19 @@ edit_or_create_event (GcalQuickAddPopover *self,
if (!self->selected_row)
return;
+ now = g_date_time_new_now_local ();
source = g_object_get_data (G_OBJECT (self->selected_row), "source");
/*
- * We only consider all day events when talking about multiday events.
- * Everything else starts now and lasts 1 hour.
+ * We consider all day events multiday and/or non-today events.
+ * Events on today starts now and lasts 1 hour.
*/
- all_day = datetime_compare_date (self->date_end, self->date_start) > 1;
+ all_day = datetime_compare_date (self->date_end, self->date_start) > 1 ||
+ datetime_compare_date (now, self->date_start) != 0;
tz = all_day ? g_time_zone_new_utc () : g_time_zone_new_local ();
/* Gather start date */
- now = g_date_time_new_now_local ();
date_start = g_date_time_new (tz,
g_date_time_get_year (self->date_start),
g_date_time_get_month (self->date_start),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]