Commit 774e064f authored by Michael Natterer's avatar Michael Natterer 😴

Bug 691169 - Gimp fails to open files with UTF8 characters as filenames...

...when started via Windows Explorer (e.g. the file context menu)

When built against GLib >= 2.39.90, use g_win32_get_command_line()
and g_option_context_parse_strv() which handle all sorts of windows
filename encodings properly.
parent 91bb872d
......@@ -336,6 +336,16 @@ main (int argc,
g_set_application_name (GIMP_NAME);
#if GLIB_CHECK_VERSION (2, 39, 90)
#ifdef G_OS_WIN32
argv = g_win32_get_command_line ();
#else
argv = g_strdupv (argv);
#endif
#else
argv = g_strdupv (argv);
#endif
basename = g_path_get_basename (argv[0]);
g_set_prgname (basename);
g_free (basename);
......@@ -391,7 +401,11 @@ main (int argc,
app_libs_init (context, no_interface);
#if GLIB_CHECK_VERSION (2, 39, 90)
if (! g_option_context_parse_strv (context, &argv, &error))
#else
if (! g_option_context_parse (context, &argc, &argv, &error))
#endif
{
if (error)
{
......@@ -455,6 +469,8 @@ main (int argc,
stack_trace_mode,
pdb_compat_mode);
g_strfreev (argv);
g_option_context_free (context);
return EXIT_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment