diff options
author | Benjamin Otte <otte@redhat.com> | 2017-01-22 22:58:45 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-15 14:22:17 -0500 |
commit | 049cc6aa013601c4e662c38df408f8956b155f0a (patch) | |
tree | 4f8359363a1b005790b6d8cbc7d7f590fa859ee7 /tests/testdnd2.c | |
parent | f53b72e5ffc034f003801b9d4ee64328180bc297 (diff) | |
download | gtk+-049cc6aa013601c4e662c38df408f8956b155f0a.tar.gz |
image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.
As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.
Instead, provide gtk_image_get_icon_size() to query the icon size.
Diffstat (limited to 'tests/testdnd2.c')
-rw-r--r-- | tests/testdnd2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/testdnd2.c b/tests/testdnd2.c index 67d0bb99ca..c4a1c98710 100644 --- a/tests/testdnd2.c +++ b/tests/testdnd2.c @@ -4,8 +4,6 @@ static cairo_surface_t * get_image_surface (GtkImage *image, int *out_size) { - const gchar *icon_name; - GtkIconSize size; GtkIconTheme *icon_theme; int width; cairo_surface_t *surface; @@ -17,7 +15,8 @@ get_image_surface (GtkImage *image, *out_size = cairo_image_surface_get_width (surface); return cairo_surface_reference (surface); case GTK_IMAGE_ICON_NAME: - gtk_image_get_icon_name (image, &icon_name, &size); +<<<<<<< HEAD + icon_name = gtk_image_get_icon_name (image); icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (image))); gtk_icon_size_lookup (size, &width, NULL); *out_size = width; @@ -175,7 +174,7 @@ image_drag_data_get (GtkWidget *widget, break; case TARGET_TEXT: if (gtk_image_get_storage_type (GTK_IMAGE (data)) == GTK_IMAGE_ICON_NAME) - gtk_image_get_icon_name (GTK_IMAGE (data), &name, NULL); + name = gtk_image_get_icon_name (GTK_IMAGE (data)); else name = "Boo!"; gtk_selection_data_set_text (selection_data, name, -1); |