dnd: Remove GDK_ACTION_DEFAULT and GDK_ACTION_PRIVATE
authorBenjamin Otte <otte@redhat.com>
Tue, 8 May 2018 11:56:08 +0000 (13:56 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 21:49:19 +0000 (23:49 +0200)
They're unused and nobody knows what they're supposed to men anyway.

gdk/gdkdnd.c
gdk/gdkdnd.h
gdk/quartz/GdkQuartzNSWindow.c
gdk/wayland/gdkdnd-wayland.c
gdk/win32/gdkdrag-win32.c
gdk/win32/gdkdrop-win32.c
gdk/win32/gdkmain-win32.c

index debefb07962b9c058db3c66c5195f7969a48c8e1..47da69eda347af9aedfaab8f0c330abb4de754b7 100644 (file)
@@ -53,7 +53,6 @@ static struct {
   const gchar  *name;
   GdkCursor    *cursor;
 } drag_cursors[] = {
-  { GDK_ACTION_DEFAULT, NULL,       NULL },
   { GDK_ACTION_ASK,     "dnd-ask",  NULL },
   { GDK_ACTION_COPY,    "dnd-copy", NULL },
   { GDK_ACTION_MOVE,    "dnd-move", NULL },
@@ -167,7 +166,7 @@ gdk_drag_context_get_formats (GdkDragContext *context)
 GdkDragAction
 gdk_drag_context_get_actions (GdkDragContext *context)
 {
-  g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_ACTION_DEFAULT);
+  g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), 0);
 
   return context->actions;
 }
index 205d7151d20772acd1bfd1ebbda44c527dcc6865..74c65e4f67a99ea5c921632ec52d87900a40bbfd 100644 (file)
@@ -41,14 +41,11 @@ G_BEGIN_DECLS
 
 /**
  * GdkDragAction:
- * @GDK_ACTION_DEFAULT: Means nothing, and should not be used.
  * @GDK_ACTION_COPY: Copy the data.
  * @GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
  *  it from the source using the DELETE target of the X selection protocol.
  * @GDK_ACTION_LINK: Add a link to the data. Note that this is only
  *  useful if source and destination agree on what it means.
- * @GDK_ACTION_PRIVATE: Special action which tells the source that the
- *  destination will do something that the source doesn’t understand.
  * @GDK_ACTION_ASK: Ask the user what to do with the data.
  *
  * Used in #GdkDragContext to indicate what the destination
@@ -56,12 +53,10 @@ G_BEGIN_DECLS
  */
 typedef enum
 {
-  GDK_ACTION_DEFAULT = 1 << 0,
-  GDK_ACTION_COPY    = 1 << 1,
-  GDK_ACTION_MOVE    = 1 << 2,
-  GDK_ACTION_LINK    = 1 << 3,
-  GDK_ACTION_PRIVATE = 1 << 4,
-  GDK_ACTION_ASK     = 1 << 5
+  GDK_ACTION_COPY    = 1 << 0,
+  GDK_ACTION_MOVE    = 1 << 1,
+  GDK_ACTION_LINK    = 1 << 2,
+  GDK_ACTION_ASK     = 1 << 3
 } GdkDragAction;
 
 /**
index bac6225d4ee1e8b5d8e347a14564475edba9e1b7..edf2095b6d09221f72a60eaab3ebc1a531f2bf2c 100644 (file)
@@ -527,16 +527,6 @@ drag_operation_to_drag_action (NSDragOperation operation)
   /* GDK and Quartz drag operations do not map 1:1.
    * This mapping represents about the best that we
    * can come up.
-   *
-   * Note that NSDragOperationPrivate and GDK_ACTION_PRIVATE
-   * have almost opposite meanings: the GDK one means that the
-   * destination is solely responsible for the action; the Quartz
-   * one means that the source and destination will agree
-   * privately on the action. NSOperationGeneric is close in meaning
-   * to GDK_ACTION_PRIVATE but there is a problem: it will be
-   * sent for any ordinary drag, and likely not understood
-   * by any intra-widget drag (since the source & dest are the
-   * same).
    */
 
   if (operation & NSDragOperationGeneric)
index 9c9e77f9c7cea0984cd0b9f6fd54dfcd445aab64..98e85d6a38d7ba792017b5d039796c727e9a06cf 100644 (file)
@@ -136,7 +136,7 @@ gdk_to_wl_actions (GdkDragAction action)
 {
   uint32_t dnd_actions = 0;
 
-  if (action & (GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_PRIVATE))
+  if (action & (GDK_ACTION_COPY | GDK_ACTION_LINK))
     dnd_actions |= WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY;
   if (action & GDK_ACTION_MOVE)
     dnd_actions |= WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE;
index be4b55955ddfe76eb00dff67a878172c2b9add7b..069e3c1e4f53f1965c1cae883d257e26ff805997 100644 (file)
@@ -903,9 +903,6 @@ action_for_drop_effect (DWORD effect)
   if (effect & DROPEFFECT_COPY)
     action |= GDK_ACTION_COPY;
 
-  if (action == 0)
-    action = GDK_ACTION_DEFAULT;
-
   return action;
 }
 
@@ -1739,9 +1736,6 @@ _gdk_win32_drag_context_send_local_status_event (GdkDragContext *src_context,
   if (src_context_win32->drag_status == GDK_DRAG_STATUS_MOTION_WAIT)
     src_context_win32->drag_status = GDK_DRAG_STATUS_DRAG;
 
-  if (action == GDK_ACTION_DEFAULT)
-    action = 0;
-
   src_context->action = action;
 
   GDK_NOTE (DND, g_print ("gdk_dnd_handle_drag_status: 0x%p\n",
index 1b2d19930c79d15efbfd89e3b6a251e69ccadabe..f8b21e182cafe3031aedf2e0a60a15549723193c 100644 (file)
@@ -436,7 +436,7 @@ idroptarget_dragenter (LPDROPTARGET This,
                                   source_context ? source_context->source_surface : NULL,
                                   ctx->dest_surface,
                                   query_targets (pDataObj, NULL),
-                                  GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE,
+                                  GDK_ACTION_COPY | GDK_ACTION_MOVE,
                                   GDK_DRAG_PROTO_OLE2);
   context_win32 = GDK_WIN32_DROP_CONTEXT (context);
   gdk_content_formats_unref (query_targets (pDataObj, context_win32->droptarget_w32format_contentformat_map));
index cf73d6cf5147793e60427a95e5d96c34267c1ac1..dc878fa522d91b5a7603029974157ac7d79a6e19 100644 (file)
@@ -438,11 +438,9 @@ _gdk_win32_drag_action_to_string (GdkDragAction actions)
   if (actions & GDK_ACTION_ ## x)                              \
     (bufp += sprintf (bufp, "%s" #x, s), s = "|")
 
-  BIT (DEFAULT);
   BIT (COPY);
   BIT (MOVE);
   BIT (LINK);
-  BIT (PRIVATE);
   BIT (ASK);
 #undef BIT