views: use ACTION_MOVE to display correct cursor

When dragging events around, the cursors show a + as opposed to a
an arrow indicating that the event is being moved. This can confuse
users.

The fix is to tell GTK that the drag being performed is a move.

https://bugzilla.gnome.org/show_bug.cgi?id=774922
This commit is contained in:
Jente Hidskes
2017-03-22 22:55:50 -03:00
committed by Georges Basile Stavracas Neto
parent 3078f1c6c1
commit de2578ac54
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -207,7 +207,7 @@ gcal_event_widget_init (GcalEventWidget *self)
GDK_BUTTON1_MASK, GDK_BUTTON1_MASK,
NULL, NULL,
0, 0,
GDK_ACTION_COPY); GDK_ACTION_MOVE);
gtk_drag_source_add_text_targets (widget); gtk_drag_source_add_text_targets (widget);
} }
@@ -843,7 +843,7 @@ gcal_event_widget_set_read_only (GcalEventWidget *event,
0, 0,
NULL, NULL,
0, 0,
GDK_ACTION_COPY); GDK_ACTION_MOVE);
gtk_drag_source_add_text_targets (widget); gtk_drag_source_add_text_targets (widget);
} }
+1 -1
View File
@@ -754,7 +754,7 @@ gcal_month_view_drag_motion (GtkWidget *widget,
* aborts the drag with FALSE. * aborts the drag with FALSE.
*/ */
gdk_drag_status (context, gdk_drag_status (context,
self->dnd_cell == -1 ? 0 : GDK_ACTION_COPY, self->dnd_cell == -1 ? 0 : GDK_ACTION_MOVE,
time); time);
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
+1 -1
View File
@@ -983,7 +983,7 @@ gcal_week_grid_drag_motion (GtkWidget *widget,
* aborts the drag with FALSE. * aborts the drag with FALSE.
*/ */
gdk_drag_status (context, gdk_drag_status (context,
self->dnd_cell == -1 ? 0 : GDK_ACTION_COPY, self->dnd_cell == -1 ? 0 : GDK_ACTION_MOVE,
time); time);
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
+1 -1
View File
@@ -1383,7 +1383,7 @@ gcal_week_header_drag_motion (GtkWidget *widget,
* aborts the drag with FALSE. * aborts the drag with FALSE.
*/ */
gdk_drag_status (context, gdk_drag_status (context,
self->dnd_cell == -1 ? 0 : GDK_ACTION_COPY, self->dnd_cell == -1 ? 0 : GDK_ACTION_MOVE,
time); time);
gtk_widget_queue_draw (widget); gtk_widget_queue_draw (widget);
+2 -2
View File
@@ -1398,7 +1398,7 @@ navigator_drag_motion_cb (GcalYearView *self,
self->selected_data->dnd_day = day; self->selected_data->dnd_day = day;
self->selected_data->dnd_month = month; self->selected_data->dnd_month = month;
gdk_drag_status (context, GDK_ACTION_COPY, time); gdk_drag_status (context, GDK_ACTION_MOVE, time);
retval = TRUE; retval = TRUE;
} }
@@ -1955,7 +1955,7 @@ gcal_year_view_init (GcalYearView *self)
0, 0,
NULL, NULL,
0, 0,
GDK_ACTION_COPY); GDK_ACTION_MOVE);
} }
static void static void