[gtk+/gtk-style-context: 492/533] Use gtk_icon_info_load_symbolic_for_context



commit dbd4cf0071026b2a5ffd875ef10486829adb6283
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 24 15:37:36 2010 -0500

    Use gtk_icon_info_load_symbolic_for_context
    
    gtk_icon_info_load_symbolic_for_style is going to be deprecated.

 gtk/gtkcellrendererpixbuf.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index 52b4ec9..729d08a 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -533,14 +533,13 @@ gtk_cell_renderer_pixbuf_create_themed_pixbuf (GtkCellRendererPixbuf *cellpixbuf
 
   if (info)
     {
-      GtkStyle *style;
-
-      style = gtk_widget_get_style (GTK_WIDGET (widget));
-      priv->pixbuf = gtk_icon_info_load_symbolic_for_style (info,
-                                                            style,
-                                                            GTK_STATE_NORMAL,
-                                                            NULL,
-                                                            NULL);
+      GtkStyleContext *context;
+
+      context = gtk_widget_get_style_context (GTK_WIDGET (widget));
+      priv->pixbuf = gtk_icon_info_load_symbolic_for_context (info,
+                                                              context,
+                                                              NULL,
+                                                              NULL);
       gtk_icon_info_free (info);
     }
 
@@ -603,12 +602,13 @@ create_symbolic_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
 
   if (info)
     {
-      GtkStyle *style;
+      GtkStyleContext *context;
 
-      style = gtk_widget_get_style (GTK_WIDGET (widget));
-      pixbuf = gtk_icon_info_load_symbolic_for_style (info,
-                                                      style, state,
-                                                      NULL, NULL);
+      context = gtk_widget_get_style_context (GTK_WIDGET (widget));
+      pixbuf = gtk_icon_info_load_symbolic_for_context (info,
+                                                        context,
+                                                        NULL,
+                                                        NULL);
       gtk_icon_info_free (info);
       return pixbuf;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]