diff options
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r-- | gtk/gtkimage.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index de530f08d4..577f483106 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -2106,3 +2106,35 @@ gtk_image_get_pixel_size (GtkImage *image) return priv->pixel_size; } + +#ifdef G_OS_WIN32 + +#undef gtk_image_new_from_file + +GtkWidget* +gtk_image_new_from_file (const gchar *filename) +{ + gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL); + GtkWidget *retval; + + retval = gtk_image_new_from_file_utf8 (utf8_filename); + + g_free (utf8_filename); + + return retval; +} + +#undef gtk_image_set_from_file + +void +gtk_image_set_from_file (GtkImage *image, + const gchar *filename) +{ + gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL); + + gtk_image_set_from_file_utf8 (image, utf8_filename); + + g_free (utf8_filename); +} + +#endif |