[gnome-calendar] app: add event uses current date as start
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] app: add event uses current date as start
- Date: Mon, 27 Apr 2015 01:51:12 +0000 (UTC)
commit 601f3c461ee751736095734a86645783ee97354a
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sun Apr 26 21:49:25 2015 -0400
app: add event uses current date as start
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=748133
src/gcal-window.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 5ce4967..2467ce0 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1605,8 +1605,10 @@ gcal_window_new_event (GcalWindow *window)
/* 1st and 2nd steps */
set_new_event_mode (window, TRUE);
- start_date = gcal_dup_icaltime (priv->active_date);
- end_date = gcal_dup_icaltime (priv->active_date);
+ start_date = gcal_dup_icaltime (priv->current_date);
+ start_date->is_date = 1;
+ end_date = gcal_dup_icaltime (priv->current_date);
+ end_date->is_date = 1;
/* adjusting dates according to the actual view */
switch (priv->active_view)
@@ -1616,14 +1618,10 @@ gcal_window_new_event (GcalWindow *window)
end_date->hour += 1;
*end_date = icaltime_normalize (*end_date);
break;
- case GCAL_WINDOW_VIEW_YEAR:
- start_date->day = 1;
- end_date->day = icaltime_days_in_month (end_date->month, end_date->year);
- break;
case GCAL_WINDOW_VIEW_MONTH:
- start_date->is_date = 1;
- end_date->is_date = 1;
+ case GCAL_WINDOW_VIEW_YEAR:
end_date->day += 1;
+ end_date->is_date = 1;
*end_date = icaltime_normalize (*end_date);
break;
case GCAL_WINDOW_VIEW_LIST:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]