summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-12-09 13:29:59 +0100
committerBenjamin Otte <otte@redhat.com>2015-12-09 13:30:40 +0100
commit861ac8e373681cacfe577b1d6c3c17934a33e1aa (patch)
tree980af6371c33ef3a67605b5a3921fc60a9f5255f
parentccfc4d3f128d0617b3d9c0bbe034b5ceae771780 (diff)
downloadgtk+-861ac8e373681cacfe577b1d6c3c17934a33e1aa.tar.gz
iconhelper_ Don't use deprecated functions
Use gtk_widget_get_direction() instead of gtk_style_context_get_direction().
-rw-r--r--gtk/gtkiconhelper.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index a8f6698118..f9f282dfba 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -454,24 +454,22 @@ gtk_icon_helper_load_surface (GtkIconHelper *self,
case GTK_IMAGE_STOCK:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
icon_set = gtk_icon_factory_lookup_default (gtk_image_definition_get_stock (self->priv->def));
+G_GNUC_END_IGNORE_DEPRECATIONS;
if (icon_set != NULL)
surface = ensure_surface_for_icon_set (self,
gtk_style_context_lookup_style (context),
- gtk_style_context_get_direction (context),
+ gtk_widget_get_direction (self->priv->owner),
scale, icon_set);
else
surface = NULL;
-G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case GTK_IMAGE_ICON_SET:
icon_set = gtk_image_definition_get_icon_set (self->priv->def);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
surface = ensure_surface_for_icon_set (self,
gtk_style_context_lookup_style (context),
- gtk_style_context_get_direction (context),
+ gtk_widget_get_direction (self->priv->owner),
scale, icon_set);
-G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case GTK_IMAGE_ICON_NAME:
@@ -479,24 +477,20 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
gicon = g_themed_icon_new_with_default_fallbacks (gtk_image_definition_get_icon_name (self->priv->def));
else
gicon = g_themed_icon_new (gtk_image_definition_get_icon_name (self->priv->def));
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
surface = ensure_surface_for_gicon (self,
gtk_style_context_lookup_style (context),
- gtk_style_context_get_direction (context),
+ gtk_widget_get_direction (self->priv->owner),
scale,
gicon);
-G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_unref (gicon);
break;
case GTK_IMAGE_GICON:
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
surface = ensure_surface_for_gicon (self,
gtk_style_context_lookup_style (context),
- gtk_style_context_get_direction (context),
+ gtk_widget_get_direction (self->priv->owner),
scale,
gtk_image_definition_get_gicon (self->priv->def));
-G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case GTK_IMAGE_ANIMATION: