--- a/src/gtkft.c Sun May 15 20:17:37 2005 -0400
+++ b/src/gtkft.c Sun May 15 20:46:29 2005 -0400
@@ -293,11 +293,11 @@
gtk_widget_show(dialog->remove_button);
#ifdef _WIN32 /* Only supported in Win32 right now */
- if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) {
- gtk_widget_set_sensitive(dialog->open_button, TRUE);
- gtk_widget_set_sensitive(dialog->open_button, FALSE);
+ if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { + gtk_widget_set_sensitive(dialog->open_button, TRUE); + gtk_widget_set_sensitive(dialog->open_button, FALSE); gtk_widget_set_sensitive(dialog->pause_button, FALSE);
gtk_widget_set_sensitive(dialog->resume_button, FALSE);
@@ -407,20 +407,41 @@
open_button_cb(GtkButton *button, GaimGtkXferDialog *dialog)
#ifdef _WIN32 /* Only supported in Win32 right now */
- int code = (int)ShellExecute(NULL, NULL,
- gaim_xfer_get_local_filename(dialog->selected_xfer),
- if (code == SE_ERR_ASSOCINCOMPLETE || code == SE_ERR_NOASSOC)
- gaim_notify_error(NULL, NULL,
- _("There is no application configured to open this type of file."), NULL);
- gaim_notify_error(NULL, NULL,
- _("An error occurred while opening the file."), NULL);
- gaim_debug_warning("ft", "filename: %s; code: %d\n", gaim_xfer_get_local_filename(dialog->selected_xfer), code);
+ if (G_WIN32_HAVE_WIDECHAR_API ()) { + wchar_t *wc_filename = g_utf8_to_utf16( + gaim_xfer_get_local_filename( + dialog->selected_xfer), + code = (int) ShellExecuteW(NULL, NULL, wc_filename, NULL, NULL, + char *l_filename = g_locale_from_utf8( + gaim_xfer_get_local_filename( + dialog->selected_xfer), + code = (int) ShellExecuteA(NULL, NULL, l_filename, NULL, NULL, + if (code == SE_ERR_ASSOCINCOMPLETE || code == SE_ERR_NOASSOC) + gaim_notify_error(NULL, NULL, + _("There is no application configured to open this type of file."), NULL); + gaim_notify_error(NULL, NULL, + _("An error occurred while opening the file."), NULL); + gaim_debug_warning("ft", "filename: %s; code: %d\n", + gaim_xfer_get_local_filename(dialog->selected_xfer), code);