mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 473417 - updater.exe window is blank, and doesn't close. r=bsmedberg
This commit is contained in:
parent
e7e7213705
commit
d04b7e3393
@ -179,11 +179,8 @@ InitDialog(HWND hDlg)
|
||||
if (!GetStringsFile(filename))
|
||||
return;
|
||||
|
||||
char path[MAX_PATH];
|
||||
WideCharToMultiByte(CP_UTF8, 0, filename, -1, path,
|
||||
sizeof(path)/sizeof(path[0]), NULL, NULL );
|
||||
StringTable uiStrings;
|
||||
if (ReadStrings(path, &uiStrings) != OK)
|
||||
if (ReadStrings(filename, &uiStrings) != OK)
|
||||
return;
|
||||
|
||||
WCHAR szwTitle[MAX_TEXT_LEN];
|
||||
|
@ -44,9 +44,11 @@
|
||||
#include "prtypes.h"
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#define BINARY_MODE "b"
|
||||
# define NS_tfopen _wfopen
|
||||
# define OPEN_MODE L"rb"
|
||||
#else
|
||||
#define BINARY_MODE
|
||||
# define NS_tfopen fopen
|
||||
# define OPEN_MODE "r"
|
||||
#endif
|
||||
|
||||
// stack based FILE wrapper to ensure that fclose is called.
|
||||
@ -111,9 +113,9 @@ NS_strtok(const char *delims, char **str)
|
||||
|
||||
// very basic parser for updater.ini taken mostly from nsINIParser.cpp
|
||||
int
|
||||
ReadStrings(const char *path, StringTable *results)
|
||||
ReadStrings(const NS_tchar *path, StringTable *results)
|
||||
{
|
||||
AutoFILE fp = fopen(path, "r" BINARY_MODE);
|
||||
AutoFILE fp = NS_tfopen(path, OPEN_MODE);
|
||||
|
||||
if (!fp)
|
||||
return READ_ERROR;
|
||||
|
@ -41,6 +41,13 @@
|
||||
|
||||
#define MAX_TEXT_LEN 200
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
# include <windows.h>
|
||||
typedef WCHAR NS_tchar;
|
||||
#else
|
||||
typedef char NS_tchar;
|
||||
#endif
|
||||
|
||||
struct StringTable {
|
||||
char title[MAX_TEXT_LEN];
|
||||
char info[MAX_TEXT_LEN];
|
||||
@ -49,6 +56,6 @@ struct StringTable {
|
||||
/**
|
||||
* This function reads in localized strings from updater.ini
|
||||
*/
|
||||
int ReadStrings(const char *path, StringTable *results);
|
||||
int ReadStrings(const NS_tchar *path, StringTable *results);
|
||||
|
||||
#endif // READSTRINGS_H__
|
||||
|
Loading…
Reference in New Issue
Block a user