mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
tests: Fix gio API usage
Related: glib!3261
This commit is contained in:
parent
771ea81715
commit
70f0cde730
@ -119,10 +119,15 @@ row_data_update_info (RowData *data,
|
||||
icon = g_file_icon_new (thumbnail_file);
|
||||
g_object_unref (thumbnail_file);
|
||||
}
|
||||
else
|
||||
else if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
|
||||
{
|
||||
icon = g_file_info_get_icon (info);
|
||||
}
|
||||
else
|
||||
{
|
||||
icon = NULL;
|
||||
}
|
||||
|
||||
|
||||
gtk_widget_set_visible (data->icon, icon != NULL);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (data->icon), icon);
|
||||
|
@ -376,10 +376,14 @@ row_data_update_info (RowData *data,
|
||||
icon = g_file_icon_new (thumbnail_file);
|
||||
g_object_unref (thumbnail_file);
|
||||
}
|
||||
else
|
||||
else if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
|
||||
{
|
||||
icon = g_file_info_get_icon (info);
|
||||
}
|
||||
else
|
||||
{
|
||||
icon = NULL;
|
||||
}
|
||||
|
||||
gtk_widget_set_visible (data->icon, icon != NULL);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (data->icon), icon);
|
||||
|
Loading…
Reference in New Issue
Block a user