Calendar: Ignore event drag&drop in read-only calendars in Year View
This commit is contained in:
@ -2557,6 +2557,10 @@ cal_comp_util_move_component_by_days (GtkWindow *parent,
|
|||||||
g_return_val_if_fail (E_IS_CAL_COMPONENT (in_comp), FALSE);
|
g_return_val_if_fail (E_IS_CAL_COMPONENT (in_comp), FALSE);
|
||||||
g_return_val_if_fail (days != 0, FALSE);
|
g_return_val_if_fail (days != 0, FALSE);
|
||||||
|
|
||||||
|
/* Silently skip requests for read-only clients */
|
||||||
|
if (e_client_is_readonly (E_CLIENT (client)))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
registry = e_cal_model_get_registry (model);
|
registry = e_cal_model_get_registry (model);
|
||||||
|
|
||||||
if (e_cal_component_has_attendees (in_comp) &&
|
if (e_cal_component_has_attendees (in_comp) &&
|
||||||
|
@ -1438,6 +1438,18 @@ year_view_month_drag_motion_cb (GtkWidget *widget,
|
|||||||
month != self->priv->drag_month ||
|
month != self->priv->drag_month ||
|
||||||
year != self->priv->drag_year);
|
year != self->priv->drag_year);
|
||||||
|
|
||||||
|
if (can_drop) {
|
||||||
|
GSList *link;
|
||||||
|
|
||||||
|
can_drop = FALSE;
|
||||||
|
|
||||||
|
for (link = self->priv->drag_data; link && !can_drop; link = g_slist_next (link)) {
|
||||||
|
DragData *dd = link->data;
|
||||||
|
|
||||||
|
can_drop = !e_client_is_readonly (E_CLIENT (dd->client));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gdk_drag_status (context,
|
gdk_drag_status (context,
|
||||||
can_drop ? gdk_drag_context_get_selected_action (context) : 0, time);
|
can_drop ? gdk_drag_context_get_selected_action (context) : 0, time);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user