gui/month-cell: Accept drops from other months
We support that now fairly easily, let's enable it. Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1077
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user