mirror of https://github.com/GNOME/gimp.git
changed return value from gchar* to const gchar*. Renamed parameters to be
2004-06-30 Michael Natterer <mitch@gimp.org> * widgets/gimpselectiondata.[ch] (gimp_selection_data_get_svg): changed return value from gchar* to const gchar*. Renamed parameters to be consistent with other SVG functions. * widgets/gimpcontainertreeview-dnd.c * widgets/gimpdnd.c: changed accordingly.
This commit is contained in:
parent
2cf661fc16
commit
425fd699e3
|
@ -1,3 +1,12 @@
|
|||
2004-06-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* widgets/gimpselectiondata.[ch] (gimp_selection_data_get_svg):
|
||||
changed return value from gchar* to const gchar*. Renamed
|
||||
parameters to be consistent with other SVG functions.
|
||||
|
||||
* widgets/gimpcontainertreeview-dnd.c
|
||||
* widgets/gimpdnd.c: changed accordingly.
|
||||
|
||||
2004-06-30 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/vectors/gimpstroke.[ch]
|
||||
|
|
|
@ -386,8 +386,8 @@ gimp_container_tree_view_drag_data_received (GtkWidget *widget,
|
|||
case GIMP_DND_TYPE_SVG_XML:
|
||||
if (tree_view_class->drop_svg)
|
||||
{
|
||||
gchar *svg_data;
|
||||
gint svg_data_length;
|
||||
const gchar *svg_data;
|
||||
gint svg_data_length;
|
||||
|
||||
svg_data = gimp_selection_data_get_svg (selection_data,
|
||||
&svg_data_length);
|
||||
|
|
|
@ -1119,8 +1119,8 @@ gimp_dnd_set_svg_data (GtkWidget *widget,
|
|||
gpointer set_svg_data,
|
||||
GtkSelectionData *selection)
|
||||
{
|
||||
gchar *svg_data;
|
||||
gint svg_data_length;
|
||||
const gchar *svg_data;
|
||||
gint svg_data_length;
|
||||
|
||||
svg_data = gimp_selection_data_get_svg (selection, &svg_data_length);
|
||||
|
||||
|
|
|
@ -378,24 +378,24 @@ gimp_selection_data_get_color (GtkSelectionData *selection,
|
|||
void
|
||||
gimp_selection_data_set_svg (GtkSelectionData *selection,
|
||||
GdkAtom atom,
|
||||
const gchar *data,
|
||||
gint data_length)
|
||||
const gchar *svg_data,
|
||||
gint svg_data_length)
|
||||
{
|
||||
g_return_if_fail (selection != NULL);
|
||||
g_return_if_fail (atom != GDK_NONE);
|
||||
g_return_if_fail (data != NULL);
|
||||
g_return_if_fail (data_length > 0);
|
||||
g_return_if_fail (svg_data != NULL);
|
||||
g_return_if_fail (svg_data_length > 0);
|
||||
|
||||
gtk_selection_data_set (selection, atom,
|
||||
8, (guchar *) data, data_length);
|
||||
8, (guchar *) svg_data, svg_data_length);
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
gimp_selection_data_get_svg (GtkSelectionData *selection,
|
||||
gint *length)
|
||||
gint *svg_data_length)
|
||||
{
|
||||
g_return_val_if_fail (selection != NULL, NULL);
|
||||
g_return_val_if_fail (length != NULL, NULL);
|
||||
g_return_val_if_fail (svg_data_length != NULL, NULL);
|
||||
|
||||
if ((selection->format != 8) || (selection->length < 1))
|
||||
{
|
||||
|
@ -403,9 +403,9 @@ gimp_selection_data_get_svg (GtkSelectionData *selection,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
*length = selection->length;
|
||||
*svg_data_length = selection->length;
|
||||
|
||||
return selection->data;
|
||||
return (const gchar *) selection->data;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -41,10 +41,10 @@ gboolean gimp_selection_data_get_color (GtkSelectionData *selection,
|
|||
|
||||
void gimp_selection_data_set_svg (GtkSelectionData *selection,
|
||||
GdkAtom atom,
|
||||
const gchar *data,
|
||||
gint data_length);
|
||||
gchar * gimp_selection_data_get_svg (GtkSelectionData *selection,
|
||||
gint *length);
|
||||
const gchar *svg_data,
|
||||
gint svg_data_length);
|
||||
const gchar * gimp_selection_data_get_svg (GtkSelectionData *selection,
|
||||
gint *svg_data_length);
|
||||
|
||||
|
||||
/* image */
|
||||
|
|
Loading…
Reference in New Issue