[gnome-calendar] month-view: fix range selection



commit 6ddb9da442762574f07a1982e5108da7ee52472c
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sun Feb 15 11:19:00 2015 -0500

    month-view: fix range selection
    
    We add one day in order to have the all-day event span the selected
    days. If the range was selected from large day to a shorter one this was
    chopping one day of the range. Adding the extra day after the range has
    been sorted.

 src/gcal-month-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index e1504fe..b707007 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1569,7 +1569,7 @@ gcal_month_view_button_release (GtkWidget      *widget,
       start_date->is_date = 1;
 
       end_date = gcal_dup_icaltime (priv->date);
-      end_date->day = j - priv->days_delay + 1;
+      end_date->day = j - priv->days_delay;
       end_date->is_date = 1;
 
       if (start_date->day > end_date->day)
@@ -1578,6 +1578,7 @@ gcal_month_view_button_release (GtkWidget      *widget,
           start_date->day = end_date->day;
           end_date->day = day;
         }
+      end_date->day += 1 ;
 
       g_signal_emit_by_name (GCAL_VIEW (widget), "create-event", start_date, end_date, x, y);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]