Implement gail_image_get_image_size for storage GICON and ICON_NAME

Bug #602724.
This commit is contained in:
Christian Persch 2009-11-23 14:09:55 +01:00
parent 65485cbc7c
commit 7abd4d1359

View File

@ -229,20 +229,16 @@ gail_image_get_image_size (AtkImage *image,
break; break;
} }
case GTK_IMAGE_STOCK: case GTK_IMAGE_STOCK:
{
GtkIconSize size;
GtkSettings *settings;
settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget));
gtk_image_get_stock(gtk_image, NULL, &size);
gtk_icon_size_lookup_for_settings (settings, size, width, height);
break;
}
case GTK_IMAGE_ICON_SET: case GTK_IMAGE_ICON_SET:
case GTK_IMAGE_ICON_NAME:
case GTK_IMAGE_GICON:
{ {
GtkIconSize size; GtkIconSize size;
GtkSettings *settings; GtkSettings *settings;
settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget)); settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget));
gtk_image_get_icon_set(gtk_image, NULL, &size);
g_object_get (gtk_image, "icon-size", &size, NULL);
gtk_icon_size_lookup_for_settings (settings, size, width, height); gtk_icon_size_lookup_for_settings (settings, size, width, height);
break; break;
} }