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 /gtk/a11y | |
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 'gtk/a11y')
-rw-r--r-- | gtk/a11y/gtkimageaccessible.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/a11y/gtkimageaccessible.c b/gtk/a11y/gtkimageaccessible.c index 338d894e22..543152eac2 100644 --- a/gtk/a11y/gtkimageaccessible.c +++ b/gtk/a11y/gtkimageaccessible.c @@ -192,17 +192,14 @@ gtk_image_accessible_get_name (AtkObject *accessible) if (storage_type == GTK_IMAGE_ICON_NAME) { - const gchar *icon_name; - - gtk_image_get_icon_name (image, &icon_name, NULL); - image_accessible->priv->stock_name = name_from_icon_name (icon_name); + image_accessible->priv->stock_name = name_from_icon_name (gtk_image_get_icon_name (image)); } else if (storage_type == GTK_IMAGE_GICON) { GIcon *icon; const gchar * const *icon_names; - gtk_image_get_gicon (image, &icon, NULL); + icon = gtk_image_get_gicon (image); if (G_IS_THEMED_ICON (icon)) { icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon)); |