testentryicons: update dnd example

This code was #ifdefed out since 2008. Time to try it.
This commit is contained in:
Matthias Clasen 2015-11-30 18:41:33 -05:00
parent 4005f137a0
commit a3ce702a5a

View File

@ -18,8 +18,6 @@ drag_begin_cb (GtkWidget *widget,
pos = gtk_entry_get_current_icon_drag_source (GTK_ENTRY (widget));
if (pos != -1)
gtk_drag_set_icon_name (context, "dialog-information", 2, 2);
g_print ("drag begin %d\n", pos);
}
static void
@ -36,7 +34,6 @@ drag_data_get_cb (GtkWidget *widget,
if (pos == GTK_ENTRY_ICON_PRIMARY)
{
#if 0
gint start, end;
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (widget), &start, &end))
@ -47,9 +44,8 @@ drag_data_get_cb (GtkWidget *widget,
gtk_selection_data_set_text (data, str, -1);
g_free (str);
}
#else
gtk_selection_data_set_text (data, "XXX", -1);
#endif
else
gtk_selection_data_set_text (data, "XXX", -1);
}
}