r23408 - gnucash/trunk/src/gnome-utils - Bug 336843: Correct Win32 Display function.
John Ralls
jralls at code.gnucash.org
Sun Nov 17 17:20:20 EST 2013
Author: jralls
Date: 2013-11-17 17:20:20 -0500 (Sun, 17 Nov 2013)
New Revision: 23408
Trac: http://svn.gnucash.org/trac/changeset/23408
Modified:
gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
Log:
Bug 336843: Correct Win32 Display function.
Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2013-11-17 06:32:08 UTC (rev 23407)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2013-11-17 22:20:20 UTC (rev 23408)
@@ -51,7 +51,8 @@
#include "gnc-session.h"
#include "qofbookslots.h"
#ifdef G_OS_WIN32
-# include "gnc-help-utils.h"
+#include <windows.h>
+#include "gnc-help-utils.h"
#endif
#ifdef MAC_INTEGRATION
#import <Cocoa/Cocoa.h>
@@ -430,17 +431,18 @@
gnc_launch_assoc (const char *uri)
{
wchar_t *winuri = (wchar_t *)g_utf8_to_utf16(uri, -1, NULL, NULL, NULL);
-
+ wchar_t *wincmd = (wchar_t *)g_utf8_to_utf16("open", -1, NULL, NULL, NULL);
if (winuri)
{
- if ((INT_PTR)ShellExecuteW(NULL, "open", winuri, NULL, NULL, SW_SHOWNORMAL) <= 32)
+ if ((INT_PTR)ShellExecuteW(NULL, wincmd, winuri, NULL, NULL, SW_SHOWNORMAL) <= 32)
{
const gchar *message =
_("GnuCash could not find the associated file.");
gnc_error_dialog(NULL, "%s", message);
}
- free(winuri);
+ g_free (winuri);
}
+ g_free (wincmd);
}
#else
More information about the gnucash-changes
mailing list