[gtk/dnd-gestures-2: 41/57] droptarget: Drop defaults flags



commit 613bdeb0739b429adad724ed0409f8b8af495830
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 5 17:23:50 2020 -0500

    droptarget: Drop defaults flags
    
    These no longer have any effect.
    
    Update all callers.

 demos/gtk-demo/clipboard.c |  4 +--
 gtk/gtkcalendar.c          |  2 +-
 gtk/gtkcolorbutton.c       |  2 +-
 gtk/gtkcolorswatch.c       |  2 +-
 gtk/gtkdragdest.c          | 63 +---------------------------------------------
 gtk/gtkdragdest.h          | 32 +----------------------
 gtk/gtkexpander.c          |  2 +-
 gtk/gtkfilechooserbutton.c |  2 +-
 gtk/gtkfilechooserwidget.c |  2 +-
 gtk/gtkiconview.c          |  2 +-
 gtk/gtknotebook.c          |  2 +-
 gtk/gtkplacessidebar.c     |  2 +-
 gtk/gtkstackswitcher.c     |  2 +-
 gtk/gtktext.c              |  2 +-
 gtk/gtktextview.c          |  2 +-
 gtk/gtktreeview.c          |  2 +-
 gtk/gtkwindow.c            |  2 +-
 tests/testdnd.c            |  8 +++---
 tests/testdnd2.c           |  2 +-
 tests/testlist3.c          |  2 +-
 tests/testnotebookdnd.c    |  2 +-
 tests/testtoolbar.c        |  2 +-
 tests/testtreednd.c        |  2 +-
 23 files changed, 27 insertions(+), 118 deletions(-)
---
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index f60dcca83d..e40b89ac4c 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -339,7 +339,7 @@ do_clipboard (GtkWidget *do_widget)
       /* accept drops on image */
       formats = gdk_content_formats_new (NULL, 0);
       formats = gtk_content_formats_add_image_targets (formats, FALSE);
-      dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_HIGHLIGHT, formats, 
GDK_ACTION_COPY);
+      dest = gtk_drop_target_new (formats, GDK_ACTION_COPY);
       gdk_content_formats_unref (formats);
       g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
       gtk_drop_target_attach (dest, image);
@@ -372,7 +372,7 @@ do_clipboard (GtkWidget *do_widget)
       /* accept drops on image */
       formats = gdk_content_formats_new (NULL, 0);
       formats = gtk_content_formats_add_image_targets (formats, FALSE);
-      dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_HIGHLIGHT, formats, 
GDK_ACTION_COPY);
+      dest = gtk_drop_target_new (formats, GDK_ACTION_COPY);
       gdk_content_formats_unref (formats);
       g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
       gtk_drop_target_attach (dest, image);
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index cc224fdcb6..b9b7d1d062 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -784,7 +784,7 @@ gtk_calendar_init (GtkCalendar *calendar)
 
   formats = gdk_content_formats_new (NULL, 0);
   formats = gtk_content_formats_add_text_targets (formats);
-  dest = gtk_drop_target_new (0, formats, GDK_ACTION_COPY);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_COPY);
   gdk_content_formats_unref (formats);
 
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_calendar_drag_motion), calendar);
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 6257384af5..20b0471492 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -326,7 +326,7 @@ gtk_color_button_init (GtkColorButton *button)
   priv->use_alpha = FALSE;
 
   targets = gdk_content_formats_new (drop_types, G_N_ELEMENTS (drop_types));
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, targets, 
GDK_ACTION_COPY);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_COPY);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_color_button_drag_drop), button);
   gtk_drop_target_attach (dest, GTK_WIDGET (button));
   gdk_content_formats_unref (targets);
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c
index a857a83d4d..121626f1c3 100644
--- a/gtk/gtkcolorswatch.c
+++ b/gtk/gtkcolorswatch.c
@@ -677,7 +677,7 @@ gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch,
       GdkContentFormats *targets;
 
       targets = gdk_content_formats_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
-      priv->dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, targets, 
GDK_ACTION_COPY);
+      priv->dest = gtk_drop_target_new (targets, GDK_ACTION_COPY);
       g_signal_connect (priv->dest, "drag-drop", G_CALLBACK (swatch_drag_drop), swatch);
       gtk_drop_target_attach (priv->dest, GTK_WIDGET (swatch)); 
       gdk_content_formats_unref (targets);
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index 8fcffc52d2..dcaa9f160d 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -55,7 +55,6 @@ struct _GtkDropTarget
 
   GdkContentFormats *formats;
   GdkDragAction actions;
-  GtkDestDefaults defaults;
 
   GtkWidget *widget;
   GdkDrop *drop;
@@ -76,7 +75,6 @@ struct _GtkDropTargetClass
 enum {
   PROP_FORMATS = 1,
   PROP_ACTIONS,
-  PROP_DEFAULTS,
   PROP_TRACK_MOTION,
   PROP_ARMED,
   NUM_PROPERTIES
@@ -103,7 +101,6 @@ G_DEFINE_TYPE (GtkDropTarget, gtk_drop_target, G_TYPE_OBJECT);
 static void
 gtk_drop_target_init (GtkDropTarget *dest)
 {
-  dest->defaults = GTK_DEST_DEFAULT_ALL;
 }
 
 static void
@@ -134,10 +131,6 @@ gtk_drop_target_set_property (GObject      *object,
       gtk_drop_target_set_actions (dest, g_value_get_flags (value));
       break;
 
-    case PROP_DEFAULTS:
-      gtk_drop_target_set_defaults (dest, g_value_get_flags (value));
-      break;
-
     case PROP_TRACK_MOTION:
       gtk_drop_target_set_track_motion (dest, g_value_get_boolean (value));
       break;
@@ -165,10 +158,6 @@ gtk_drop_target_get_property (GObject    *object,
       g_value_set_flags (value, gtk_drop_target_get_actions (dest));
       break;
 
-    case PROP_DEFAULTS:
-      g_value_set_flags (value, gtk_drop_target_get_defaults (dest));
-      break;
-
     case PROP_TRACK_MOTION:
       g_value_set_boolean (value, gtk_drop_target_get_track_motion (dest));
       break;
@@ -213,16 +202,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
                            GDK_TYPE_DRAG_ACTION, 0,
                            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
 
-  /**
-   * GtkDropTargets:defaults:
-   *
-   * Flags that determine the default behavior 
-   */
-  properties[PROP_DEFAULTS] =
-       g_param_spec_flags ("defaults", P_("Defaults"), P_("Defaults"),
-                           GTK_TYPE_DEST_DEFAULTS, GTK_DEST_DEFAULT_ALL,
-                           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
-
   /**
    * GtkDropTarget:track-motion:
    *
@@ -351,7 +330,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
 
 /**
  * gtk_drop_target_new:
- * @defaults: flags determining the default behaviour
  * @formats: (nullable): the supported data formats
  * @actions: the supported actions
  *
@@ -360,12 +338,10 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
  * Returns: the new #GtkDropTarget
  */
 GtkDropTarget *
-gtk_drop_target_new (GtkDestDefaults    defaults,
-                     GdkContentFormats *formats,
+gtk_drop_target_new (GdkContentFormats *formats,
                      GdkDragAction      actions)
 {
   return g_object_new (GTK_TYPE_DROP_TARGET,
-                       "defaults", defaults,
                        "formats", formats,
                        "actions", actions,
                        NULL);
@@ -451,43 +427,6 @@ gtk_drop_target_get_actions (GtkDropTarget *dest)
   return dest->actions;
 }
 
-/**
- * gtk_drop_target_set_defaults:
- * @dest: a #GtkDropTarget
- * @defaults: flags determining the default behaviour
- *
- * Sets the flags determining the behavior of the drop target.
- */
-void
-gtk_drop_target_set_defaults (GtkDropTarget   *dest,
-                              GtkDestDefaults  defaults)
-{
-  g_return_if_fail (GTK_IS_DROP_TARGET (dest));
-  
-  if (dest->defaults == defaults)
-    return;
-
-  dest->defaults = defaults;
-
-  g_object_notify_by_pspec (G_OBJECT (dest), properties[PROP_DEFAULTS]);
-}
-
-/**
- * gtk_drop_target_get_defaults:
- * @dest: a #GtkDropTarget
- *
- * Gets the flags determining the behavior of the drop target.
- *
- * Returns: flags determining the behaviour of the drop target
- */
-GtkDestDefaults
-gtk_drop_target_get_defaults (GtkDropTarget *dest)
-{
-  g_return_val_if_fail (GTK_IS_DROP_TARGET (dest), GTK_DEST_DEFAULT_ALL);
-
-  return dest->defaults;
-}
-
 /**
  * gtk_drop_target_set_track_motion:
  * @dest: a #GtkDropTarget
diff --git a/gtk/gtkdragdest.h b/gtk/gtkdragdest.h
index 2854eef2c3..dae74edff1 100644
--- a/gtk/gtkdragdest.h
+++ b/gtk/gtkdragdest.h
@@ -39,29 +39,6 @@ G_BEGIN_DECLS
 
 typedef struct _GtkDropTarget GtkDropTarget;
 
-/**
- * GtkDestDefaults:
- * @GTK_DEST_DEFAULT_MOTION: If set for a widget, GTK+, during a drag over this
- *   widget will check if the drag matches this widget’s list of possible formats
- *   and actions.
- *   GTK+ will then call gdk_drag_status() as appropriate.
- * @GTK_DEST_DEFAULT_HIGHLIGHT: Does not do anything now. GTK always adds
- *   the dnd style class to armed drop sites.
- * @GTK_DEST_DEFAULT_DROP: Does not do anything now.
- * @GTK_DEST_DEFAULT_ALL: If set, specifies that all default actions should
- *   be taken.
- *
- * The #GtkDestDefaults enumeration specifies the various
- * types of action that will be taken on behalf
- * of the user for a drag destination site.
- */
-typedef enum {
-  GTK_DEST_DEFAULT_MOTION     = 1 << 0,
-  GTK_DEST_DEFAULT_HIGHLIGHT  = 1 << 1,
-  GTK_DEST_DEFAULT_DROP       = 1 << 2,
-  GTK_DEST_DEFAULT_ALL        = 0x7
-} GtkDestDefaults;
-
 
 #define GTK_TYPE_DROP_TARGET         (gtk_drop_target_get_type ())
 #define GTK_DROP_TARGET(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_DROP_TARGET, GtkDropTarget))
@@ -76,8 +53,7 @@ GDK_AVAILABLE_IN_ALL
 GType              gtk_drop_target_get_type         (void) G_GNUC_CONST;
 
 GDK_AVAILABLE_IN_ALL
-GtkDropTarget       *gtk_drop_target_new            (GtkDestDefaults    defaults,
-                                                     GdkContentFormats *formats,
+GtkDropTarget       *gtk_drop_target_new            (GdkContentFormats *formats,
                                                      GdkDragAction      actions);
 
 GDK_AVAILABLE_IN_ALL
@@ -92,12 +68,6 @@ void               gtk_drop_target_set_actions      (GtkDropTarget     *dest,
 GDK_AVAILABLE_IN_ALL
 GdkDragAction      gtk_drop_target_get_actions      (GtkDropTarget     *dest);
 
-GDK_AVAILABLE_IN_ALL
-void               gtk_drop_target_set_defaults     (GtkDropTarget     *dest,
-                                                     GtkDestDefaults    defaults);
-GDK_AVAILABLE_IN_ALL
-GtkDestDefaults    gtk_drop_target_get_defaults     (GtkDropTarget     *dest);
-
 GDK_AVAILABLE_IN_ALL
 void               gtk_drop_target_set_track_motion (GtkDropTarget     *dest,
                                                      gboolean           track_motion);
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 7353126e80..3ce1891627 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -377,7 +377,7 @@ gtk_expander_init (GtkExpander *expander)
   gtk_container_add (GTK_CONTAINER (priv->title_widget), priv->arrow_widget);
 
   formats = gdk_content_formats_new (NULL, 0);
-  dest = gtk_drop_target_new (0, formats, 0);
+  dest = gtk_drop_target_new (formats, 0);
   gtk_drop_target_set_track_motion (dest, TRUE);
   gdk_content_formats_unref (formats);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_expander_drag_motion), expander);
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 2a6eb33916..a80e56f0bc 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -498,7 +498,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
   target_list = gdk_content_formats_new (NULL, 0);
   target_list = gtk_content_formats_add_uri_targets (target_list);
   target_list = gtk_content_formats_add_text_targets (target_list);
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, target_list, 
GDK_ACTION_COPY);
+  dest = gtk_drop_target_new (target_list, GDK_ACTION_COPY);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_file_chooser_button_drag_drop), button);
   gtk_drop_target_attach (dest, GTK_WIDGET (button));
   gdk_content_formats_unref (target_list);
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index eb3d19d038..8635228b01 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -8519,7 +8519,7 @@ post_process_ui (GtkFileChooserWidget *impl)
   g_signal_connect (source, "drag-end", G_CALLBACK (file_list_drag_end_cb), impl);
 
   
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_ALL, formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (file_list_drag_motion_cb), impl);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (file_list_drag_drop_cb), impl);
   gtk_drop_target_attach (dest, priv->browse_files_tree_view);
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 1a7c635afb..d243666376 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6495,7 +6495,7 @@ gtk_icon_view_enable_model_drag_dest (GtkIconView       *icon_view,
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
 
-  icon_view->priv->dest = gtk_drop_target_new (0, formats, actions);
+  icon_view->priv->dest = gtk_drop_target_new (formats, actions);
   g_signal_connect (icon_view->priv->dest, "drag-leave", G_CALLBACK (gtk_icon_view_drag_leave), icon_view);
   g_signal_connect (icon_view->priv->dest, "drag-motion", G_CALLBACK (gtk_icon_view_drag_motion), icon_view);
   g_signal_connect (icon_view->priv->dest, "drag-drop", G_CALLBACK (gtk_icon_view_drag_drop), icon_view);
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index ae49894cd7..a4f960ef9d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1326,7 +1326,7 @@ gtk_notebook_init (GtkNotebook *notebook)
   priv->has_scrolled = FALSE;
 
   targets = gdk_content_formats_new (dst_notebook_targets, G_N_ELEMENTS (dst_notebook_targets));
-  dest = gtk_drop_target_new (0, targets, GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_notebook_drag_motion), NULL);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_notebook_drag_leave), NULL);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_notebook_drag_drop), NULL);
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index eaa17307a3..3b0f588536 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -4094,7 +4094,7 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
   /* DND support */
   formats = gdk_content_formats_new (dnd_drop_targets, G_N_ELEMENTS (dnd_drop_targets));
   formats = gtk_content_formats_add_uri_targets (formats);
-  dest = gtk_drop_target_new (0, formats, GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
   gdk_content_formats_unref (formats);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (drag_motion_callback), sidebar);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop_callback), sidebar);
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c
index 0ead3b12c7..a48e9757c9 100644
--- a/gtk/gtkstackswitcher.c
+++ b/gtk/gtkstackswitcher.c
@@ -116,7 +116,7 @@ gtk_stack_switcher_init (GtkStackSwitcher *switcher)
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_LINKED);
 
   formats = gdk_content_formats_new (NULL, 0);
-  dest = gtk_drop_target_new (0, formats, 0);
+  dest = gtk_drop_target_new (formats, 0);
   gdk_content_formats_unref (formats);
   gtk_drop_target_set_track_motion (dest, TRUE);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_stack_switcher_drag_leave), switcher);
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index e3938147b8..1131eac1d5 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -1727,7 +1727,7 @@ gtk_text_init (GtkText *self)
 
   formats = gdk_content_formats_new (NULL, 0);
   formats = gtk_content_formats_add_text_targets (formats);
-  dest = gtk_drop_target_new (0, formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_text_drag_motion), self);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_text_drag_leave), self);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (gtk_text_drag_drop), self);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 0beca10587..87b6435d0c 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1630,7 +1630,7 @@ gtk_text_view_init (GtkTextView *text_view)
   priv->scroll_after_paste = FALSE;
 
   formats = gdk_content_formats_new_for_gtype (GTK_TYPE_TEXT_BUFFER);
-  dest = gtk_drop_target_new (0, formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   gdk_content_formats_unref (formats);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (gtk_text_view_drag_leave), text_view);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (gtk_text_view_drag_motion), text_view);
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index baf2b7b70e..fd0d50f40f 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -12964,7 +12964,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView       *tree_view,
   di = ensure_info (tree_view);
   di->dest_set = TRUE;
 
-  di->dest = gtk_drop_target_new (0, formats, actions);
+  di->dest = gtk_drop_target_new (formats, actions);
   g_signal_connect (di->dest, "drag-leave", G_CALLBACK (gtk_tree_view_drag_leave), tree_view);
   g_signal_connect (di->dest, "drag-motion", G_CALLBACK (gtk_tree_view_drag_motion), tree_view);
   g_signal_connect (di->dest, "drag-drop", G_CALLBACK (gtk_tree_view_drag_drop), tree_view);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 0422043dfc..3b84905561 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1838,7 +1838,7 @@ gtk_window_init (GtkWindow *window)
 
 #ifdef GDK_WINDOWING_X11
   targets = gdk_content_formats_new (dnd_dest_targets, G_N_ELEMENTS (dnd_dest_targets));
-  dest = gtk_drop_target_new ( GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, targets, GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   gdk_content_formats_unref (targets);
   gtk_drop_target_attach (dest, GTK_WIDGET (window));
 #endif
diff --git a/tests/testdnd.c b/tests/testdnd.c
index d4fbc870d5..9c43601ffe 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -501,7 +501,7 @@ popup_cb (gpointer data)
                 gtk_widget_set_vexpand (button, TRUE);
                gtk_grid_attach (GTK_GRID (grid), button, i, j, 1, 1);
 
-                dest = gtk_drop_target_new (GTK_DEST_DEFAULT_ALL, targets, GDK_ACTION_COPY | 
GDK_ACTION_MOVE);
+                dest = gtk_drop_target_new (targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
                g_signal_connect (dest, "drag-motion", G_CALLBACK (popup_motion), NULL);
                g_signal_connect (dest, "drag-leave", G_CALLBACK (popup_leave), NULL);
                 gtk_drop_target_attach (dest, button);
@@ -595,7 +595,7 @@ main (int argc, char **argv)
   label = gtk_label_new ("Drop Here\n");
 
   targets = gdk_content_formats_new (target_table, n_targets - 1); /* no rootwin */
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, targets, GDK_ACTION_COPY 
| GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (label_drag_drop), NULL);
   gtk_drop_target_attach (dest, label);
 
@@ -605,7 +605,7 @@ main (int argc, char **argv)
 
   label = gtk_label_new ("Popup\n");
 
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_ALL, targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (popsite_motion), NULL);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (popsite_leave), NULL);
   gtk_drop_target_attach (dest, label);
@@ -618,7 +618,7 @@ main (int argc, char **argv)
   
   pixmap = gtk_image_new_from_pixbuf (trashcan_closed);
   targets = gdk_content_formats_new (NULL, 0);
-  dest = gtk_drop_target_new (0, targets, 0);
+  dest = gtk_drop_target_new (targets, 0);
   g_signal_connect (dest, "drag-leave", G_CALLBACK (target_drag_leave), pixmap);
   g_signal_connect (dest, "drag-motion", G_CALLBACK (target_drag_motion), pixmap);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (target_drag_drop), pixmap);
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 465c4de792..1911346026 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -305,7 +305,7 @@ make_image (const gchar *icon_name, int hotspot)
   g_signal_connect (source, "drag-failed", G_CALLBACK (drag_failed), NULL);
   gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK);
 
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, formats, 
GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_ASK);
+  dest = gtk_drop_target_new (formats, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_ASK);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (image_drag_drop), image);
   gtk_drop_target_attach (dest, image);
 
diff --git a/tests/testlist3.c b/tests/testlist3.c
index 8bce1c77b9..b43454ee76 100644
--- a/tests/testlist3.c
+++ b/tests/testlist3.c
@@ -88,7 +88,7 @@ create_row (const gchar *text)
   gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK);
 
   targets = gdk_content_formats_new (entries, 1);
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, targets, 
GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), row);
   gtk_drop_target_attach (dest, row);
 
diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c
index dae1f2d9d3..8cea384793 100644
--- a/tests/testnotebookdnd.c
+++ b/tests/testnotebookdnd.c
@@ -301,7 +301,7 @@ create_trash_button (void)
   button = gtk_button_new_with_mnemonic ("_Delete");
 
   targets = gdk_content_formats_new (button_targets, G_N_ELEMENTS (button_targets));
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION, targets, GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (on_button_drag_drop), NULL);
   gtk_drop_target_attach (dest, button);
   gdk_content_formats_unref (targets);
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index 8b4e23a2a7..82ee0a4f2b 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -621,7 +621,7 @@ main (gint argc, gchar **argv)
   source = gtk_drag_source_new (content, GDK_ACTION_MOVE);
   g_object_unref (content);
   gtk_drag_source_attach (source, button, GDK_BUTTON1_MASK);
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_DROP, targets, GDK_ACTION_MOVE);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag_motion", G_CALLBACK (toolbar_drag_motion), toolbar);
   g_signal_connect (dest, "drag_leave", G_CALLBACK (toolbar_drag_leave), toolbar);
   g_signal_connect (dest, "drag_drop", G_CALLBACK (toolbar_drag_drop), label);
diff --git a/tests/testtreednd.c b/tests/testtreednd.c
index d7438b92bb..9b2d44c252 100644
--- a/tests/testtreednd.c
+++ b/tests/testtreednd.c
@@ -125,7 +125,7 @@ get_droptarget (void)
 
   label = gtk_label_new ("Drop here");
   targets = gdk_content_formats_new (entries, G_N_ELEMENTS (entries));
-  dest = gtk_drop_target_new (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, targets, 
GDK_ACTION_COPY);
+  dest = gtk_drop_target_new (targets, GDK_ACTION_COPY);
   g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), NULL);
   gtk_drop_target_attach (dest, label);
   gdk_content_formats_unref (targets);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]