summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/gdkdrag.c21
-rw-r--r--gdk/gdkdragprivate.h2
-rw-r--r--gdk/wayland/gdkdnd-wayland.c4
-rw-r--r--gdk/win32/gdkdrag-win32.c2
-rw-r--r--gdk/x11/gdkdnd-x11.c10
5 files changed, 20 insertions, 19 deletions
diff --git a/gdk/gdkdrag.c b/gdk/gdkdrag.c
index 5d14d03adf..c79f1ef0f3 100644
--- a/gdk/gdkdrag.c
+++ b/gdk/gdkdrag.c
@@ -53,7 +53,8 @@ enum {
PROP_DEVICE,
PROP_DISPLAY,
PROP_FORMATS,
- PROP_ACTION,
+ PROP_SELECTED_ACTION,
+ PROP_ACTIONS,
N_PROPERTIES
};
@@ -238,10 +239,10 @@ gdk_drag_set_property (GObject *gobject,
}
break;
- case PROP_ACTION:
+ case PROP_SELECTED_ACTION:
{
GdkDragAction action = g_value_get_flags (value);
- gdk_drag_set_action (drag, action);
+ gdk_drag_set_selected_action (drag, action);
}
break;
@@ -277,7 +278,7 @@ gdk_drag_get_property (GObject *gobject,
g_value_set_boxed (value, drag->formats);
break;
- case PROP_ACTION:
+ case PROP_SELECTED_ACTION:
g_value_set_flags (value, drag->selected_action);
break;
@@ -371,9 +372,9 @@ gdk_drag_class_init (GdkDragClass *klass)
G_PARAM_STATIC_STRINGS |
G_PARAM_EXPLICIT_NOTIFY);
- properties[PROP_ACTION] =
- g_param_spec_flags ("action",
- "Action",
+ properties[PROP_SELECTED_ACTION] =
+ g_param_spec_flags ("selected-action",
+ "Selected action",
"The currently selected action",
GDK_TYPE_DRAG_ACTION,
0,
@@ -597,8 +598,8 @@ gdk_drag_set_actions (GdkDrag *drag,
}
void
-gdk_drag_set_action (GdkDrag *drag,
- GdkDragAction action)
+gdk_drag_set_selected_action (GdkDrag *drag,
+ GdkDragAction action)
{
GdkCursor *cursor;
@@ -610,7 +611,7 @@ gdk_drag_set_action (GdkDrag *drag,
cursor = gdk_drag_get_cursor (drag, action);
gdk_drag_set_cursor (drag, cursor);
- g_object_notify_by_pspec (G_OBJECT (drag), properties[PROP_ACTION]);
+ g_object_notify_by_pspec (G_OBJECT (drag), properties[PROP_SELECTED_ACTION]);
}
/**
diff --git a/gdk/gdkdragprivate.h b/gdk/gdkdragprivate.h
index 3afd035760..835dd26807 100644
--- a/gdk/gdkdragprivate.h
+++ b/gdk/gdkdragprivate.h
@@ -80,7 +80,7 @@ void gdk_drag_set_cursor (GdkDrag *drag,
void gdk_drag_set_actions (GdkDrag *drag,
GdkDragAction actions,
GdkDragAction suggested_action);
-void gdk_drag_set_action (GdkDrag *drag,
+void gdk_drag_set_selected_action (GdkDrag *drag,
GdkDragAction action);
void gdk_drag_cancel (GdkDrag *drag,
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index 195b86b76b..a20b882dbe 100644
--- a/gdk/wayland/gdkdnd-wayland.c
+++ b/gdk/wayland/gdkdnd-wayland.c
@@ -124,7 +124,7 @@ gdk_wayland_drag_init (GdkWaylandDrag *drag_wayland)
drag = GDK_DRAG (drag_wayland);
drags = g_list_prepend (drags, drag);
- gdk_drag_set_action (drag, GDK_ACTION_COPY);
+ gdk_drag_set_selected_action (drag, GDK_ACTION_COPY);
}
static GdkSurface *
@@ -335,7 +335,7 @@ data_source_action (void *data,
g_message ("data source action, source = %p action=%x",
source, action));
- gdk_drag_set_action (drag, _wl_to_gdk_actions (action));
+ gdk_drag_set_selected_action (drag, _wl_to_gdk_actions (action));
}
static const struct wl_data_source_listener data_source_listener = {
diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c
index ed9c927d25..34cf71ccf7 100644
--- a/gdk/win32/gdkdrag-win32.c
+++ b/gdk/win32/gdkdrag-win32.c
@@ -806,7 +806,7 @@ gdk_drag_new (GdkDisplay *display,
else
drag_win32->scale = _gdk_win32_display_get_monitor_scale_factor (win32_display, NULL, NULL, NULL);
- gdk_drag_set_actions (drag, actions, actions);
+ gdk_drag_set_selected_actions (drag, actions, actions);
drag_win32->protocol = protocol;
return drag;
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 9dd2a442b6..b45542ff4a 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -879,7 +879,7 @@ gdk_x11_drag_handle_status (GdkDisplay *display,
action = 0;
}
- gdk_drag_set_action (drag, xdnd_action_from_atom (display, action));
+ gdk_drag_set_selected_action (drag, xdnd_action_from_atom (display, action));
drag_x11->current_action = action;
}
}
@@ -1002,7 +1002,7 @@ send_client_message_async_cb (Window window,
window == drag_x11->proxy_xid)
{
drag_x11->proxy_xid = None;
- gdk_drag_set_action (drag, 0);
+ gdk_drag_set_selected_action (drag, 0);
drag_x11->current_action = 0;
drag_x11->drag_status = GDK_DRAG_STATUS_DRAG;
}
@@ -1546,7 +1546,7 @@ gdk_x11_drag_drag_motion (GdkDrag *drag,
{
drag_x11->proxy_xid = None;
drag_x11->drop_xid = None;
- gdk_drag_set_action (drag, 0);
+ gdk_drag_set_selected_action (drag, 0);
}
/* Push a status event, to let the client know that
@@ -1581,9 +1581,9 @@ gdk_x11_drag_drag_motion (GdkDrag *drag,
*/
if (gdk_content_formats_contain_mime_type (formats, "application/x-rootwindow-drop") ||
gdk_content_formats_contain_mime_type (formats, "application/x-rootwin-drop"))
- gdk_drag_set_action (drag, gdk_drag_get_suggested_action (drag));
+ gdk_drag_set_selected_action (drag, gdk_drag_get_suggested_action (drag));
else
- gdk_drag_set_action (drag, 0);
+ gdk_drag_set_selected_action (drag, 0);
drag_x11->current_action = gdk_drag_get_selected_action (drag);
}