diff --git a/src/gui/views/gcal-month-cell.c b/src/gui/views/gcal-month-cell.c index 51ba6e54..4c1adcb6 100644 --- a/src/gui/views/gcal-month-cell.c +++ b/src/gui/views/gcal-month-cell.c @@ -132,9 +132,9 @@ move_event (GcalMonthCell *self, current_month - start_month, 0, 0, 0, 0); - diff = g_date_time_get_day_of_month (self->date) - g_date_time_get_day_of_month (start_dt); + diff = gcal_date_time_compare_date (self->date, start_dt); - if (diff != 0 || current_month != start_month || current_year != start_year) + if (diff != 0) { g_autoptr (GDateTime) new_start = g_date_time_add_days (start_dt, diff); @@ -227,7 +227,7 @@ on_drop_target_accept_cb (GtkDropTarget *drop_target, if (!gdk_content_formats_contain_gtype (gdk_drop_get_formats (drop), GCAL_TYPE_EVENT_WIDGET)) GCAL_RETURN (FALSE); - GCAL_RETURN (!self->different_month); + GCAL_RETURN (TRUE); } static void @@ -253,9 +253,6 @@ on_drop_target_drop_cb (GtkDropTarget *drop_target, GCAL_ENTRY; - if (self->different_month) - GCAL_RETURN (FALSE); - if (!G_VALUE_HOLDS (value, GCAL_TYPE_EVENT_WIDGET)) GCAL_RETURN (FALSE);