mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Bug 336843: Correct Win32 Display function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23408 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -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 @@ void
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user