gtk-demo: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf()

This commit is contained in:
Benjamin Otte 2010-12-15 12:14:51 +01:00
parent e274ac4b6c
commit e77ce71caa
5 changed files with 11 additions and 11 deletions

View File

@ -110,7 +110,7 @@ create_page1 (GtkWidget *assistant)
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1"); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO); gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL); pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf); gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
} }
@ -133,7 +133,7 @@ create_page2 (GtkWidget *assistant)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE); gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2"); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL); pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf); gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
} }
@ -152,7 +152,7 @@ create_page3 (GtkWidget *assistant)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE); gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation"); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL); pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf); gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
} }

View File

@ -77,8 +77,8 @@ get_image_pixbuf (GtkImage *image)
return g_object_ref (gtk_image_get_pixbuf (image)); return g_object_ref (gtk_image_get_pixbuf (image));
case GTK_IMAGE_STOCK: case GTK_IMAGE_STOCK:
gtk_image_get_stock (image, &stock_id, &size); gtk_image_get_stock (image, &stock_id, &size);
return gtk_widget_render_icon (GTK_WIDGET (image), return gtk_widget_render_icon_pixbuf (GTK_WIDGET (image),
stock_id, size, NULL); stock_id, size);
default: default:
g_warning ("Image storage type %d not handled", g_warning ("Image storage type %d not handled",
gtk_image_get_storage_type (image)); gtk_image_get_storage_type (image));

View File

@ -65,8 +65,8 @@ create_stock_icon_store (void)
{ {
if (stock_id[i]) if (stock_id[i])
{ {
pixbuf = gtk_widget_render_icon (cellview, stock_id[i], pixbuf = gtk_widget_render_icon_pixbuf (cellview, stock_id[i],
GTK_ICON_SIZE_BUTTON, NULL); GTK_ICON_SIZE_BUTTON);
gtk_stock_lookup (stock_id[i], &item); gtk_stock_lookup (stock_id[i], &item);
label = strip_underscore (item.label); label = strip_underscore (item.label);
gtk_list_store_append (store, &iter); gtk_list_store_append (store, &iter);

View File

@ -166,9 +166,9 @@ create_model (void)
} }
g_free (sizes); g_free (sizes);
info.small_icon = gtk_widget_render_icon (window, info.id, info.small_icon = gtk_widget_render_icon_pixbuf (window,
size, info.id,
NULL); size);
if (size != GTK_ICON_SIZE_MENU) if (size != GTK_ICON_SIZE_MENU)
{ {

View File

@ -41,7 +41,7 @@ canvas_item_new (GtkWidget *widget,
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
stock_id = gtk_tool_button_get_stock_id (button); stock_id = gtk_tool_button_get_stock_id (button);
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL); pixbuf = gtk_widget_render_icon_pixbuf (widget, stock_id, GTK_ICON_SIZE_DIALOG);
if (pixbuf) if (pixbuf)
{ {