gtk/gtktextview.c: Use accessor functions to access GtkSelectionData
This commit is contained in:
@ -6924,7 +6924,7 @@ gtk_text_view_drag_data_get (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
/* Extract the selected text */
|
/* Extract the selected text */
|
||||||
str = gtk_text_buffer_serialize (buffer, buffer,
|
str = gtk_text_buffer_serialize (buffer, buffer,
|
||||||
selection_data->target,
|
gtk_selection_data_get_target (selection_data),
|
||||||
&start, &end,
|
&start, &end,
|
||||||
&len);
|
&len);
|
||||||
}
|
}
|
||||||
@ -6932,7 +6932,7 @@ gtk_text_view_drag_data_get (GtkWidget *widget,
|
|||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
gtk_selection_data_set (selection_data,
|
gtk_selection_data_set (selection_data,
|
||||||
selection_data->target,
|
gtk_selection_data_get_target (selection_data),
|
||||||
8, /* bytes */
|
8, /* bytes */
|
||||||
(guchar *) str, len);
|
(guchar *) str, len);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
@ -7188,10 +7188,10 @@ gtk_text_view_drag_data_received (GtkWidget *widget,
|
|||||||
GtkTextIter start, end;
|
GtkTextIter start, end;
|
||||||
gboolean copy_tags = TRUE;
|
gboolean copy_tags = TRUE;
|
||||||
|
|
||||||
if (selection_data->length != sizeof (src_buffer))
|
if (gtk_selection_data_get_length (selection_data) != sizeof (src_buffer))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memcpy (&src_buffer, selection_data->data, sizeof (src_buffer));
|
memcpy (&src_buffer, gtk_selection_data_get_data (selection_data), sizeof (src_buffer));
|
||||||
|
|
||||||
if (src_buffer == NULL)
|
if (src_buffer == NULL)
|
||||||
return;
|
return;
|
||||||
@ -7255,17 +7255,17 @@ gtk_text_view_drag_data_received (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (selection_data->length > 0 &&
|
else if (gtk_selection_data_get_length (selection_data) > 0 &&
|
||||||
info == GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT)
|
info == GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT)
|
||||||
{
|
{
|
||||||
gboolean retval;
|
gboolean retval;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
retval = gtk_text_buffer_deserialize (buffer, buffer,
|
retval = gtk_text_buffer_deserialize (buffer, buffer,
|
||||||
selection_data->target,
|
gtk_selection_data_get_target (selection_data),
|
||||||
&drop_point,
|
&drop_point,
|
||||||
(guint8 *) selection_data->data,
|
(guint8 *) gtk_selection_data_get_data (selection_data),
|
||||||
selection_data->length,
|
gtk_selection_data_get_length (selection_data),
|
||||||
&error);
|
&error);
|
||||||
|
|
||||||
if (!retval)
|
if (!retval)
|
||||||
|
Reference in New Issue
Block a user