From 5960a45d005200554b5e86ff293450e2e07099e2 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sat, 21 May 2016 19:02:39 -0300 Subject: [PATCH] month-view: consider the days delay when dealing with the cell The cell number does not consider the days delay, thus is not the current day. To find the current day, we must remove the days delay. --- src/gcal-month-view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index b200beec..f666d44f 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -810,7 +810,7 @@ get_dnd_cell (GtkWidget *widget, cell = gather_button_event_data (GCAL_MONTH_VIEW (widget), x, y, NULL, NULL, NULL); cell = real_cell (cell, priv->k); - if (cell < g_date_get_days_in_month (priv->date->month, priv->date->year)) + if (cell - priv->days_delay < g_date_get_days_in_month (priv->date->month, priv->date->year)) return cell; return -1; @@ -868,7 +868,7 @@ gcal_month_view_drag_drop (GtkWidget *widget, start_dt = gcal_event_get_date_start (event); end_dt = gcal_event_get_date_end (event); - diff = cell - g_date_time_get_day_of_month (start_dt) + 1; + diff = cell - priv->days_delay - g_date_time_get_day_of_month (start_dt) + 1; if (diff != 0) {