[PATCH] Added support for non-enligh IE MUI
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Tue Dec 8 03:50:08 CST 2009
---
dlls/shdocvw/En.rc | 26 ++++++++++++++++++++++++++
dlls/shdocvw/Makefile.in | 4 +++-
dlls/shdocvw/resource.h | 25 +++++++++++++++++++++++++
dlls/shdocvw/tests/En.rc | 26 ++++++++++++++++++++++++++
dlls/shdocvw/tests/Makefile.in | 2 ++
dlls/shdocvw/tests/resource.h | 25 +++++++++++++++++++++++++
dlls/shdocvw/tests/webbrowser.c | 11 ++++++++++-
dlls/shdocvw/webbrowser.c | 7 ++++++-
8 files changed, 123 insertions(+), 3 deletions(-)
create mode 100755 dlls/shdocvw/En.rc
create mode 100644 dlls/shdocvw/resource.h
create mode 100644 dlls/shdocvw/tests/En.rc
create mode 100644 dlls/shdocvw/tests/resource.h
diff --git a/dlls/shdocvw/En.rc b/dlls/shdocvw/En.rc
new file mode 100755
index 0000000..59613c8
--- /dev/null
+++ b/dlls/shdocvw/En.rc
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2009 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_CONTROLNAME "Microsoft Web Browser Control"
+}
diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in
index d8035ff..40e761b 100644
--- a/dlls/shdocvw/Makefile.in
+++ b/dlls/shdocvw/Makefile.in
@@ -28,7 +28,9 @@ C_SRCS = \
view.c \
webbrowser.c
-RC_SRCS = shdocvw.rc
+RC_SRCS = shdocvw.rc \
+ En.rc
+
IDL_TLB_SRCS = shdocvw_v1.idl
@MAKE_DLL_RULES@
diff --git a/dlls/shdocvw/resource.h b/dlls/shdocvw/resource.h
new file mode 100644
index 0000000..822321a
--- /dev/null
+++ b/dlls/shdocvw/resource.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2009 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <windef.h>
+#include <winuser.h>
+#include <commctrl.h>
+
+#define IDS_CONTROLNAME 7500
+
+
diff --git a/dlls/shdocvw/tests/En.rc b/dlls/shdocvw/tests/En.rc
new file mode 100644
index 0000000..59613c8
--- /dev/null
+++ b/dlls/shdocvw/tests/En.rc
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2009 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_CONTROLNAME "Microsoft Web Browser Control"
+}
diff --git a/dlls/shdocvw/tests/Makefile.in b/dlls/shdocvw/tests/Makefile.in
index 5ab9b5a..2b4a1ad 100644
--- a/dlls/shdocvw/tests/Makefile.in
+++ b/dlls/shdocvw/tests/Makefile.in
@@ -11,6 +11,8 @@ CTESTS = \
shortcut.c \
webbrowser.c
+RC_SRCS = En.rc
+
@MAKE_TEST_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/shdocvw/tests/resource.h b/dlls/shdocvw/tests/resource.h
new file mode 100644
index 0000000..822321a
--- /dev/null
+++ b/dlls/shdocvw/tests/resource.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2009 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <windef.h>
+#include <winuser.h>
+#include <commctrl.h>
+
+#define IDS_CONTROLNAME 7500
+
+
diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c
index fba30be..b56cebb 100644
--- a/dlls/shdocvw/tests/webbrowser.c
+++ b/dlls/shdocvw/tests/webbrowser.c
@@ -39,6 +39,7 @@
#include "shlguid.h"
#include "exdispid.h"
#include "mimeinfo.h"
+#include "resource.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
@@ -1596,6 +1597,8 @@ static void test_ie_funcs(IUnknown *unk)
LONG hwnd;
HRESULT hres;
BSTR sName;
+ WCHAR wszControlName[100];
+ HMODULE hmod = GetModuleHandleA(NULL);
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
@@ -1818,7 +1821,13 @@ static void test_ie_funcs(IUnknown *unk)
/* Name */
hres = IWebBrowser2_get_Name(wb, &sName);
ok(hres == S_OK, "getName failed: %08x, expected S_OK\n", hres);
- ok(!strcmp_wa(sName, "Microsoft Web Browser Control"), "got '%s', expected 'Microsoft Web Browser Control'\n", wine_dbgstr_w(sName));
+
+ LoadStringW(hmod, IDS_CONTROLNAME, wszControlName, sizeof(wszControlName)/sizeof(WCHAR));
+
+ ok(!lstrcmpW(sName, wszControlName) || !strcmp_wa(sName, "Microsoft Web Browser Control"),
+ "got '%s', expected '%s' or 'Microsoft Web Browser Control'\n",
+ wine_dbgstr_w(sName), wine_dbgstr_w(wszControlName));
+
SysFreeString(sName);
/* Quit */
diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c
index 6c3c671..1f4f852 100644
--- a/dlls/shdocvw/webbrowser.c
+++ b/dlls/shdocvw/webbrowser.c
@@ -22,6 +22,7 @@
#include "wine/debug.h"
#include "shdocvw.h"
#include "exdispid.h"
+#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
@@ -530,13 +531,17 @@ static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szPropert
static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
{
+ WCHAR wszControlName[100];
static const WCHAR sName[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',\
' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
WebBrowser *This = WEBBROWSER_THIS(iface);
TRACE("(%p)->(%p)\n", This, Name);
- *Name = SysAllocString(sName);
+ if(!LoadStringW(shdocvw_hinstance, IDS_CONTROLNAME, wszControlName, sizeof(wszControlName)/sizeof(WCHAR)))
+ *Name = SysAllocString(wszControlName);
+ else
+ *Name = SysAllocString(sName);
return S_OK;
}
--
1.6.2.5
--------------050005020201050008070804--
More information about the wine-patches
mailing list