summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-12-15 23:53:00 +0000
committerJavier Jardón <jjardon@gnome.org>2010-12-15 23:58:15 +0000
commit1ceddae7da71dae9f32bad726db5a4b490b8f0e5 (patch)
tree77edb5bc1db154e670c9a9b4b293e4a85558e242 /gtk/gtktextbuffer.c
parent2b7afcdd793ec56c6cc0c449acd5af0f25246caf (diff)
downloadgtk+-1ceddae7da71dae9f32bad726db5a4b490b8f0e5.tar.gz
gtk/gtktextbuffer: Use accessor functions to access GtkSelectionData
Diffstat (limited to 'gtk/gtktextbuffer.c')
-rw-r--r--gtk/gtktextbuffer.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index f1cd6f5098..c71d79b967 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -3156,7 +3156,7 @@ clipboard_get_selection_cb (GtkClipboard *clipboard,
* used within-process
*/
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
(void*)&buffer,
sizeof (buffer));
@@ -3167,11 +3167,11 @@ clipboard_get_selection_cb (GtkClipboard *clipboard,
gsize len;
str = gtk_text_buffer_serialize (buffer, buffer,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
&start, &end, &len);
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
str, len);
g_free (str);
@@ -3226,7 +3226,7 @@ clipboard_get_contents_cb (GtkClipboard *clipboard,
* be used within-process. OK to supply a NULL value for contents.
*/
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
(void*)&contents,
sizeof (contents));
@@ -3244,11 +3244,11 @@ clipboard_get_contents_cb (GtkClipboard *clipboard,
gtk_text_buffer_get_bounds (contents, &start, &end);
str = gtk_text_buffer_serialize (clipboard_source_buffer, contents,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
&start, &end, &len);
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, /* bytes */
str, len);
g_free (str);
@@ -3404,23 +3404,22 @@ selection_data_get_buffer (GtkSelectionData *selection_data,
GtkTextBuffer *src_buffer = NULL;
/* If we can get the owner, the selection is in-process */
- owner = gdk_selection_owner_get_for_display (selection_data->display,
- selection_data->selection);
+ owner = gdk_selection_owner_get_for_display (gtk_selection_data_get_display (selection_data),
+ gtk_selection_data_get_selection (selection_data));
if (owner == NULL)
return NULL;
if (gdk_window_get_window_type (owner) == GDK_WINDOW_FOREIGN)
return NULL;
-
- if (selection_data->type !=
- gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"))
+
+ if (gtk_selection_data_get_data_type (selection_data) != gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"))
return NULL;
- if (selection_data->length != sizeof (src_buffer))
+ if (gtk_selection_data_get_length (selection_data) != sizeof (src_buffer))
return NULL;
-
- 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)
return NULL;