forked from AuroraMiddleware/gtk
dnd: Drop suggested_action
The only user of this field was the x11 backend, and it turns out that it does not need to store the value at all.
This commit is contained in:
parent
da22ba3b86
commit
a756caa106
@ -130,8 +130,7 @@ gdk_drag_get_formats (GdkDrag *drag)
|
||||
* gdk_drag_get_actions:
|
||||
* @drag: a #GdkDrag
|
||||
*
|
||||
* Determines the bitmask of actions proposed by the source if
|
||||
* gdk_drag_get_suggested_action() returns %GDK_ACTION_ASK.
|
||||
* Determines the bitmask of possible actions proposed by the source.
|
||||
*
|
||||
* Returns: the #GdkDragAction flags
|
||||
**/
|
||||
@ -143,22 +142,6 @@ gdk_drag_get_actions (GdkDrag *drag)
|
||||
return drag->actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drag_get_suggested_action:
|
||||
* @drag: a #GdkDrag
|
||||
*
|
||||
* Determines the suggested drag action of the GdkDrag object.
|
||||
*
|
||||
* Returns: a #GdkDragAction value
|
||||
**/
|
||||
GdkDragAction
|
||||
gdk_drag_get_suggested_action (GdkDrag *drag)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAG (drag), 0);
|
||||
|
||||
return drag->suggested_action;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drag_get_selected_action:
|
||||
* @drag: a #GdkDrag
|
||||
@ -620,13 +603,6 @@ gdk_drag_set_actions (GdkDrag *drag,
|
||||
g_object_notify_by_pspec (G_OBJECT (drag), properties[PROP_ACTIONS]);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_drag_set_suggested_action (GdkDrag *drag,
|
||||
GdkDragAction suggested_action)
|
||||
{
|
||||
drag->suggested_action = suggested_action;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_drag_set_selected_action (GdkDrag *drag,
|
||||
GdkDragAction action)
|
||||
|
@ -66,8 +66,6 @@ GdkContentFormats *gdk_drag_get_formats (GdkDrag *drag);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDragAction gdk_drag_get_actions (GdkDrag *drag);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDragAction gdk_drag_get_suggested_action (GdkDrag *drag);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDragAction gdk_drag_get_selected_action (GdkDrag *drag);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -70,7 +70,6 @@ struct _GdkDrag {
|
||||
|
||||
GdkDragAction actions;
|
||||
GdkDragAction selected_action;
|
||||
GdkDragAction suggested_action;
|
||||
|
||||
guint drop_done : 1; /* Whether gdk_drag_drop_done() was performed */
|
||||
};
|
||||
@ -79,8 +78,6 @@ void gdk_drag_set_cursor (GdkDrag *drag,
|
||||
GdkCursor *cursor);
|
||||
void gdk_drag_set_actions (GdkDrag *drag,
|
||||
GdkDragAction actions);
|
||||
void gdk_drag_set_suggested_action (GdkDrag *drag,
|
||||
GdkDragAction suggested_action);
|
||||
void gdk_drag_set_selected_action (GdkDrag *drag,
|
||||
GdkDragAction action);
|
||||
|
||||
|
@ -1478,7 +1478,6 @@ gdk_x11_drag_drag_motion (GdkDrag *drag,
|
||||
move_drag_surface (drag, x_root, y_root);
|
||||
|
||||
gdk_drag_set_actions (drag, possible_actions);
|
||||
gdk_drag_set_suggested_action (drag, suggested_action);
|
||||
|
||||
if (protocol == GDK_DRAG_PROTO_XDND && drag_x11->version == 0)
|
||||
{
|
||||
@ -1582,7 +1581,7 @@ 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_selected_action (drag, gdk_drag_get_suggested_action (drag));
|
||||
gdk_drag_set_selected_action (drag, suggested_action);
|
||||
else
|
||||
gdk_drag_set_selected_action (drag, 0);
|
||||
|
||||
@ -2248,19 +2247,20 @@ gdk_drag_update (GdkDrag *drag,
|
||||
guint32 evtime)
|
||||
{
|
||||
GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
|
||||
GdkDragAction action, possible_actions;
|
||||
GdkDragAction suggested_action;
|
||||
GdkDragAction possible_actions;
|
||||
GdkDragProtocol protocol;
|
||||
Window proxy;
|
||||
|
||||
gdk_drag_get_current_actions (mods, GDK_BUTTON_PRIMARY, x11_drag->actions,
|
||||
&action, &possible_actions);
|
||||
&suggested_action, &possible_actions);
|
||||
|
||||
proxy = gdk_x11_drag_find_surface (drag,
|
||||
x11_drag->drag_surface,
|
||||
x_root, y_root, &protocol);
|
||||
x11_drag->drag_surface,
|
||||
x_root, y_root, &protocol);
|
||||
|
||||
gdk_x11_drag_drag_motion (drag, proxy, protocol, x_root, y_root,
|
||||
action, possible_actions, evtime);
|
||||
suggested_action, possible_actions, evtime);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user