Commit 7e40d74b authored by Matthias Clasen's avatar Matthias Clasen

GtkIconHelper: Change setters to return success

This makes it easier to avoid redundant notifications in users.
parent d1f6858b
......@@ -903,37 +903,43 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
}
}
void
gboolean
_gtk_icon_helper_set_icon_size (GtkIconHelper *self,
GtkIconSize icon_size)
GtkIconSize icon_size)
{
if (self->priv->icon_size != icon_size)
{
self->priv->icon_size = icon_size;
_gtk_icon_helper_invalidate (self);
return TRUE;
}
return FALSE;
}
void
gboolean
_gtk_icon_helper_set_pixel_size (GtkIconHelper *self,
gint pixel_size)
gint pixel_size)
{
if (self->priv->pixel_size != pixel_size)
{
self->priv->pixel_size = pixel_size;
_gtk_icon_helper_invalidate (self);
return TRUE;
}
return FALSE;
}
void
gboolean
_gtk_icon_helper_set_use_fallback (GtkIconHelper *self,
gboolean use_fallback)
gboolean use_fallback)
{
if (self->priv->use_fallback != use_fallback)
{
self->priv->use_fallback = use_fallback;
_gtk_icon_helper_invalidate (self);
return TRUE;
}
return FALSE;
}
GtkImageType
......
......@@ -98,12 +98,12 @@ void _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
void _gtk_icon_helper_set_surface (GtkIconHelper *self,
cairo_surface_t *surface);
void _gtk_icon_helper_set_icon_size (GtkIconHelper *self,
GtkIconSize icon_size);
void _gtk_icon_helper_set_pixel_size (GtkIconHelper *self,
gint pixel_size);
void _gtk_icon_helper_set_use_fallback (GtkIconHelper *self,
gboolean use_fallback);
gboolean _gtk_icon_helper_set_icon_size (GtkIconHelper *self,
GtkIconSize icon_size);
gboolean _gtk_icon_helper_set_pixel_size (GtkIconHelper *self,
gint pixel_size);
gboolean _gtk_icon_helper_set_use_fallback (GtkIconHelper *self,
gboolean use_fallback);
GtkImageType _gtk_icon_helper_get_storage_type (GtkIconHelper *self);
GtkIconSize _gtk_icon_helper_get_icon_size (GtkIconHelper *self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment