projects
/
gtk+3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
918445b
)
testlist3: Handle dropping a row onto itself
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 23 Apr 2017 01:37:55 +0000
(21:37 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 23 Apr 2017 01:39:10 +0000
(21:39 -0400)
Instead of spewing criticals, we should handle this
gracefully by doing nothing.
tests/testlist3.c
patch
|
blob
|
history
diff --git
a/tests/testlist3.c
b/tests/testlist3.c
index 32558dc63f70f0dea1e9f9af23baa55fa8652cce..bf3ea91e77241c9fd660521209903fc90e61d095 100644
(file)
--- a/
tests/testlist3.c
+++ b/
tests/testlist3.c
@@
-70,6
+70,9
@@
drag_data_received (GtkWidget *widget,
row = (gpointer)* (gpointer*)gtk_selection_data_get_data (selection_data);
source = gtk_widget_get_ancestor (row, GTK_TYPE_LIST_BOX_ROW);
+ if (source == target)
+ return;
+
g_object_ref (source);
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (source)), source);
gtk_list_box_insert (GTK_LIST_BOX (gtk_widget_get_parent (target)), source, pos);