summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-23 17:06:44 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-23 17:06:44 +0000
commitd0a5b4e0c84ec2535beec2b3336c4dd38efef656 (patch)
treee4422075608d98dd67ac8a7c1324063cdfc7e0ca /gtk/gtkdnd.c
parent179e3421a12d55501fc100e9760660eb8d140a8c (diff)
downloadgdk-pixbuf-d0a5b4e0c84ec2535beec2b3336c4dd38efef656.tar.gz
Create the change to initialize target_list to an empty list instead of
Fri Jul 23 13:04:10 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to initialize target_list to an empty list instead of NULL, since it broke tree dnd. (#148215, Ernst Persson) * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead handle target list being NULL here.
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 2f9862e7c..a8a139e70 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -901,7 +901,7 @@ gtk_drag_dest_set (GtkWidget *widget,
site->flags = flags;
site->have_drag = FALSE;
- site->target_list = gtk_target_list_new (targets, n_targets);
+ site->target_list = NULL;
site->actions = actions;
site->do_proxy = FALSE;
site->proxy_window = NULL;
@@ -1036,6 +1036,8 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
GtkTargetList *target_list;
target_list = gtk_drag_dest_get_target_list (widget);
+ if (!target_list)
+ target_list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (target_list);
gtk_drag_dest_set_target_list (widget, target_list);
}
@@ -2198,6 +2200,8 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
GtkTargetList *target_list;
target_list = gtk_drag_source_get_target_list (widget);
+ if (!target_list)
+ target_list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (target_list);
gtk_drag_source_set_target_list (widget, target_list);
}