*/
#include "config.h"
+#define __GTK_H_INSIDE__
#include "../gtk/gtkversion.h" /* versioning */
+#undef __GTK_H_INSIDE__
#include "gdk-pixbuf.h"
#include "gdk-pixdata.h"
#include <glib/gprintf.h>
/* --- defines --- */
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "Gdk-Pixbuf-CSource"
-#define PRG_NAME "gdk-pixbuf-csource"
-#define PKG_NAME "Gtk+"
+#define PRG_NAME "gdk-pixbuf-csource-3.0"
+#define PKG_NAME "GTK+"
#define PKG_HTTP_HOME "http://www.gtk.org"
{
GdkPixbuf *pixbuf;
GError *error = NULL;
+ gchar *infilename;
/* initialize glib/GdkPixbuf */
g_type_init ();
return 1;
}
- pixbuf = gdk_pixbuf_new_from_file (argv[1], &error);
+#ifdef G_OS_WIN32
+ infilename = g_locale_to_utf8 (argv[1], -1, NULL, NULL, NULL);
+#else
+ infilename = argv[1];
+#endif
+
+ pixbuf = gdk_pixbuf_new_from_file (infilename, &error);
if (!pixbuf)
{
g_fprintf (stderr, "failed to load \"%s\": %s\n",
while (j--)
{
+#ifdef G_OS_WIN32
+ infilename = g_locale_to_utf8 (*p, -1, NULL, NULL, NULL);
+#else
+ infilename = *p;
+#endif
+
if (!toggle)
- image_name = *p++;
+ {
+ image_name = infilename;
+ p++;
+ }
else
{
- pixbuf = gdk_pixbuf_new_from_file (*p, &error);
+ pixbuf = gdk_pixbuf_new_from_file (infilename, &error);
if (!pixbuf)
{
g_fprintf (stderr, "failed to load \"%s\": %s\n",
if (!print_help)
{
g_fprintf (bout, "%s version ", PRG_NAME);
- g_fprintf (bout, "%u.%u.%u", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ g_fprintf (bout, "%d.%d.%d", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
g_fprintf (bout, "\n");
g_fprintf (bout, "%s comes with ABSOLUTELY NO WARRANTY.\n", PRG_NAME);
g_fprintf (bout, "You may redistribute copies of %s under the terms of\n", PRG_NAME);