Use GtkSelectionData's accessors

This commit is contained in:
Michael Natterer 2009-10-09 22:00:14 +02:00
parent c83788377a
commit 9c9306f653
1 changed files with 3 additions and 2 deletions

View File

@ -98,9 +98,10 @@ handle_drop(GtkWidget *widget, GdkDragContext *context, gint x, gint y,
{
gboolean success = FALSE;
if (data->length >= 0 && data->format == 8)
if (gtk_selection_data_get_length (data) >= 0 &&
gtk_selection_data_get_format (data) == 8)
{
const gchar *text = (const gchar *) data->data;
const gchar *text = (const gchar *) gtk_selection_data_get_data (data);
if (g_utf8_validate (text, -1, NULL))
{