summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--docs/reference/ChangeLog8
-rw-r--r--docs/reference/gtk/gtk-sections.txt1
-rw-r--r--gtk/gtk.symbols1
-rw-r--r--gtk/gtkquartz.c5
-rw-r--r--gtk/gtkselection.c25
-rw-r--r--gtk/gtkselection.h4
7 files changed, 41 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f9276827f..b84bea3291 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtk.symbols:
+ * gtk/gtkselection.[hc]: Split gtk_selection_data_get_data into
+ gtk_selection_data_get_data and gtk_selection_data_get_length.
+ Proposed by Owen Taylor.
+
2008-08-28 Christian Dywan <christian@imendio.com>
Bug 549734 – gtk_selection_data_get_data prototype is wrong
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 5904dddcbc..8eea5a5d1f 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtk-sections.txt: Add gtk_selection_data_get_length
+
+2008-08-18 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtk-sections.txt: Add some forgotten apis.
+
2008-08-19 Torsten Schoenfeld <kaffeetisch@gmx.de>
* gtk/gtk-sections.txt: Move gtk_menu_set_monitor next to
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index 811ea03b68..964fc06ab9 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -5848,6 +5848,7 @@ gtk_selection_data_targets_include_text
gtk_selection_data_targets_include_uri
gtk_selection_data_targets_include_rich_text
gtk_selection_data_get_data
+gtk_selection_data_get_length
gtk_selection_data_get_data_type
gtk_selection_data_get_display
gtk_selection_data_get_format
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 3da5b590de..295904de21 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -3452,6 +3452,7 @@ gtk_selection_data_get_data_type
gtk_selection_data_get_display
gtk_selection_data_get_format
gtk_selection_data_get_data
+gtk_selection_data_get_length
gtk_selection_data_get_pixbuf
gtk_selection_data_get_targets
gtk_selection_data_get_text
diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c
index bcecad4e36..4750948b59 100644
--- a/gtk/gtkquartz.c
+++ b/gtk/gtkquartz.c
@@ -260,12 +260,13 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
GdkDisplay *display;
gint format;
const guchar *data;
- guint length;
+ gint length;
target = gdk_atom_name (gtk_selection_data_get_target (selection_data));
display = gtk_selection_data_get_display (selection_data);
format = gtk_selection_data_get_format (selection_data);
- data = gtk_selection_data_get_data (selection_data, &length);
+ data = gtk_selection_data_get_data (selection_data);
+ length = gtk_selection_data_get_length (selection_data);
type = target_to_pasteboard_type (target);
g_free (target);
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index aca1bde176..b023d7972f 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -1168,7 +1168,6 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data)
/**
* gtk_selection_data_get_data:
* @selection_data: a pointer to a #GtkSelectionData structure.
- * @length: an integer to be filled in, or %NULL
*
* Retrieves the raw data of the selection.
*
@@ -1179,18 +1178,32 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data)
* Since: 2.14
**/
const guchar*
-gtk_selection_data_get_data (GtkSelectionData *selection_data,
- gint *length)
+gtk_selection_data_get_data (GtkSelectionData *selection_data)
{
g_return_val_if_fail (selection_data != NULL, NULL);
- if (length)
- *length = selection_data->length;
-
return selection_data->data;
}
/**
+ * gtk_selection_data_get_length:
+ * @selection_data: a pointer to a #GtkSelectionData structure.
+ *
+ * Retrieves the length of the raw data of the selection.
+ *
+ * Returns: the length of the data of the selection.
+ *
+ * Since: 2.14
+ */
+gint
+gtk_selection_data_get_length (GtkSelectionData *selection_data)
+{
+ g_return_val_if_fail (selection_data != NULL, -1);
+
+ return selection_data->length;
+}
+
+/**
* gtk_selection_data_get_display:
* @selection_data: a pointer to a #GtkSelectionData structure.
*
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index 2d13a43f7e..0cd474c79c 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -150,8 +150,8 @@ gboolean gtk_selection_convert (GtkWidget *widget,
GdkAtom gtk_selection_data_get_target (GtkSelectionData *selection_data);
GdkAtom gtk_selection_data_get_data_type (GtkSelectionData *selection_data);
gint gtk_selection_data_get_format (GtkSelectionData *selection_data);
-const guchar *gtk_selection_data_get_data (GtkSelectionData *selection_data,
- gint *length);
+const guchar *gtk_selection_data_get_data (GtkSelectionData *selection_data);
+gint gtk_selection_data_get_length (GtkSelectionData *selection_data);
GdkDisplay *gtk_selection_data_get_display (GtkSelectionData *selection_data);
void gtk_selection_data_set (GtkSelectionData *selection_data,