[gimp/gtk3-port: 103/226] Use gtk_widget_render_icon_pixbuf() instead of gtk_widget_render_icon()



commit 8ac22715e6e9b44042c3e6eedfbfd3837c4bcca3
Author: Michael Natterer <mitch gimp org>
Date:   Thu Dec 9 21:01:13 2010 +0100

    Use gtk_widget_render_icon_pixbuf() instead of gtk_widget_render_icon()
    
    because the latter is deprecated.

 app/display/gimpstatusbar.c             |   11 ++++++-----
 app/widgets/gimperrorconsole.c          |    6 +++---
 app/widgets/gimpfgbgeditor.c            |   14 ++++++++------
 app/widgets/gimpviewrenderer-frame.c    |    6 +++---
 app/widgets/gimpviewrenderer.c          |    8 ++++----
 libgimpwidgets/gimpcellrenderertoggle.c |    6 +++---
 libgimpwidgets/gimppageselector.c       |   13 ++++++-------
 plug-ins/common/compose.c               |    6 +++---
 plug-ins/help-browser/dialog.c          |    6 +++---
 9 files changed, 39 insertions(+), 37 deletions(-)
---
diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
index 82b0229..3143237 100644
--- a/app/display/gimpstatusbar.c
+++ b/app/display/gimpstatusbar.c
@@ -560,8 +560,9 @@ gimp_statusbar_progress_message (GimpProgress        *progress,
             {
               GdkPixbuf *pixbuf;
 
-              pixbuf = gtk_widget_render_icon (statusbar->label, stock_id,
-                                               GTK_ICON_SIZE_MENU, NULL);
+              pixbuf = gtk_widget_render_icon_pixbuf (statusbar->label,
+                                                      stock_id,
+                                                      GTK_ICON_SIZE_MENU);
 
               width += ICON_SPACING + gdk_pixbuf_get_width (pixbuf);
 
@@ -608,9 +609,9 @@ gimp_statusbar_set_text (GimpStatusbar *statusbar,
         g_object_unref (statusbar->icon);
 
       if (stock_id)
-        statusbar->icon = gtk_widget_render_icon (statusbar->label,
-                                                  stock_id,
-                                                  GTK_ICON_SIZE_MENU, NULL);
+        statusbar->icon = gtk_widget_render_icon_pixbuf (statusbar->label,
+                                                         stock_id,
+                                                         GTK_ICON_SIZE_MENU);
       else
         statusbar->icon = NULL;
 
diff --git a/app/widgets/gimperrorconsole.c b/app/widgets/gimperrorconsole.c
index ba8aebc..7bbf69e 100644
--- a/app/widgets/gimperrorconsole.c
+++ b/app/widgets/gimperrorconsole.c
@@ -190,9 +190,9 @@ gimp_error_console_add (GimpErrorConsole    *console,
 
   gtk_text_buffer_get_end_iter (console->text_buffer, &end);
 
-  pixbuf = gtk_widget_render_icon (console->text_view,
-                                   gimp_get_message_stock_id (severity),
-                                   GTK_ICON_SIZE_BUTTON, NULL);
+  pixbuf = gtk_widget_render_icon_pixbuf (console->text_view,
+                                          gimp_get_message_stock_id (severity),
+                                          GTK_ICON_SIZE_BUTTON);
   gtk_text_buffer_insert_pixbuf (console->text_buffer, &end, pixbuf);
   g_object_unref (pixbuf);
 
diff --git a/app/widgets/gimpfgbgeditor.c b/app/widgets/gimpfgbgeditor.c
index 9e2d497..0820dcc 100644
--- a/app/widgets/gimpfgbgeditor.c
+++ b/app/widgets/gimpfgbgeditor.c
@@ -244,9 +244,10 @@ gimp_fg_bg_editor_draw (GtkWidget *widget,
 
   /*  draw the default colors pixbuf  */
   if (! editor->default_icon)
-    editor->default_icon = gtk_widget_render_icon (widget,
-                                                   GIMP_STOCK_DEFAULT_COLORS,
-                                                   GTK_ICON_SIZE_MENU, NULL);
+    editor->default_icon =
+      gtk_widget_render_icon_pixbuf (widget,
+                                     GIMP_STOCK_DEFAULT_COLORS,
+                                     GTK_ICON_SIZE_MENU);
 
   default_w = gdk_pixbuf_get_width  (editor->default_icon);
   default_h = gdk_pixbuf_get_height (editor->default_icon);
@@ -264,9 +265,10 @@ gimp_fg_bg_editor_draw (GtkWidget *widget,
 
   /*  draw the swap colors pixbuf  */
   if (! editor->swap_icon)
-    editor->swap_icon = gtk_widget_render_icon (widget,
-                                                GIMP_STOCK_SWAP_COLORS,
-                                                GTK_ICON_SIZE_MENU, NULL);
+    editor->swap_icon =
+      gtk_widget_render_icon_pixbuf (widget,
+                                     GIMP_STOCK_SWAP_COLORS,
+                                     GTK_ICON_SIZE_MENU);
 
   swap_w = gdk_pixbuf_get_width  (editor->swap_icon);
   swap_h = gdk_pixbuf_get_height (editor->swap_icon);
diff --git a/app/widgets/gimpviewrenderer-frame.c b/app/widgets/gimpviewrenderer-frame.c
index 9e7b335..5061d28 100644
--- a/app/widgets/gimpviewrenderer-frame.c
+++ b/app/widgets/gimpviewrenderer-frame.c
@@ -197,9 +197,9 @@ gimp_view_renderer_ensure_frame (GimpViewRenderer *renderer,
 
   if (! class->frame)
     {
-      class->frame = gtk_widget_render_icon (widget,
-                                             GIMP_STOCK_FRAME,
-                                             GTK_ICON_SIZE_DIALOG, NULL);
+      class->frame = gtk_widget_render_icon_pixbuf (widget,
+                                                    GIMP_STOCK_FRAME,
+                                                    GTK_ICON_SIZE_DIALOG);
 
       /*  FIXME: shouldn't be hardcoded  */
       class->frame_left   = 2;
diff --git a/app/widgets/gimpviewrenderer.c b/app/widgets/gimpviewrenderer.c
index c919af7..fa90d95 100644
--- a/app/widgets/gimpviewrenderer.c
+++ b/app/widgets/gimpviewrenderer.c
@@ -902,7 +902,7 @@ gimp_view_renderer_render_stock (GimpViewRenderer *renderer,
                                   renderer->width, renderer->height);
 
   if (icon_size)
-    pixbuf = gtk_widget_render_icon (widget, stock_id, icon_size, NULL);
+    pixbuf = gtk_widget_render_icon_pixbuf (widget, stock_id, icon_size);
 
   if (pixbuf)
     {
@@ -1148,9 +1148,9 @@ gimp_view_renderer_create_background (GimpViewRenderer *renderer,
 
   if (renderer->bg_stock_id)
     {
-      GdkPixbuf *pixbuf = gtk_widget_render_icon (widget,
-                                                  renderer->bg_stock_id,
-                                                  GTK_ICON_SIZE_DIALOG, NULL);
+      GdkPixbuf *pixbuf = gtk_widget_render_icon_pixbuf (widget,
+                                                         renderer->bg_stock_id,
+                                                         GTK_ICON_SIZE_DIALOG);
 
       if (pixbuf)
         {
diff --git a/libgimpwidgets/gimpcellrenderertoggle.c b/libgimpwidgets/gimpcellrenderertoggle.c
index dd6304c..e04e9f1 100644
--- a/libgimpwidgets/gimpcellrenderertoggle.c
+++ b/libgimpwidgets/gimpcellrenderertoggle.c
@@ -420,9 +420,9 @@ gimp_cell_renderer_toggle_create_pixbuf (GimpCellRendererToggle *toggle,
   if (toggle->pixbuf)
     g_object_unref (toggle->pixbuf);
 
-  toggle->pixbuf = gtk_widget_render_icon (widget,
-                                           toggle->stock_id,
-                                           toggle->stock_size, NULL);
+  toggle->pixbuf = gtk_widget_render_icon_pixbuf (widget,
+                                                  toggle->stock_id,
+                                                  toggle->stock_size);
 }
 
 
diff --git a/libgimpwidgets/gimppageselector.c b/libgimpwidgets/gimppageselector.c
index a0525ab..572dd24 100644
--- a/libgimpwidgets/gimppageselector.c
+++ b/libgimpwidgets/gimppageselector.c
@@ -326,10 +326,9 @@ gimp_page_selector_init (GimpPageSelector *selector)
 
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
 
-  priv->default_thumbnail = gtk_widget_render_icon (GTK_WIDGET (selector),
-                                                    GTK_STOCK_FILE,
-                                                    GTK_ICON_SIZE_DND,
-                                                    NULL);
+  priv->default_thumbnail = gtk_widget_render_icon_pixbuf (GTK_WIDGET (selector),
+                                                           GTK_STOCK_FILE,
+                                                           GTK_ICON_SIZE_DND);
 }
 
 static void
@@ -1299,9 +1298,9 @@ gimp_page_selector_add_frame (GtkWidget *widget,
 
   if (! frame)
     {
-      frame = gtk_widget_render_icon (widget,
-                                      GIMP_STOCK_FRAME,
-                                      GTK_ICON_SIZE_DIALOG, NULL);
+      frame = gtk_widget_render_icon_pixbuf (widget,
+                                             GIMP_STOCK_FRAME,
+                                             GTK_ICON_SIZE_DIALOG);
       g_object_set_data_full (G_OBJECT (widget), "frame", frame,
                               (GDestroyNotify) g_object_unref);
     }
diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c
index a569678..a749d85 100644
--- a/plug-ins/common/compose.c
+++ b/plug-ins/common/compose.c
@@ -1179,9 +1179,9 @@ compose_dialog (const gchar *compose_type,
       combo = gimp_drawable_combo_box_new (check_gray, NULL);
       composeint.channel_menu[j] = combo;
 
-      ico = gtk_widget_render_icon (dialog,
-                                    GIMP_STOCK_CHANNEL_GRAY,
-                                    GTK_ICON_SIZE_BUTTON, NULL);
+      ico = gtk_widget_render_icon_pixbuf (dialog,
+                                           GIMP_STOCK_CHANNEL_GRAY,
+                                           GTK_ICON_SIZE_BUTTON);
       model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
       gtk_list_store_append (GTK_LIST_STORE (model), &iter);
       gtk_list_store_set (GTK_LIST_STORE (model), &iter,
diff --git a/plug-ins/help-browser/dialog.c b/plug-ins/help-browser/dialog.c
index ee1ff4a..a436d3b 100644
--- a/plug-ins/help-browser/dialog.c
+++ b/plug-ins/help-browser/dialog.c
@@ -346,9 +346,9 @@ window_set_icons (GtkWidget *window)
 
   for (i = 0; i < G_N_ELEMENTS (sizes); i++)
     list = g_list_prepend (list,
-                           gtk_widget_render_icon (window,
-                                                   GIMP_STOCK_USER_MANUAL,
-                                                   sizes[i], NULL));
+                           gtk_widget_render_icon_pixbuf (window,
+                                                          GIMP_STOCK_USER_MANUAL,
+                                                          sizes[i]));
 
   gtk_window_set_icon_list (GTK_WINDOW (window), list);
 


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