diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-09-07 18:37:26 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-09-07 18:37:26 +0000 |
commit | 547fe9b1b25ce505789fdb19678e61949477989a (patch) | |
tree | ab6cdc1f982562e2253454b3fabbf73748018153 /plugins/IEView | |
parent | 15382e81baef152b87cc6623c41dfec4c306a22b (diff) |
support for unicode URLs
git-svn-id: http://svn.miranda-ng.org/main/trunk@1547 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r-- | plugins/IEView/src/IEView.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index 3b323180ba..25eae345a8 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -176,20 +176,13 @@ void IEViewSink::TitleChange(BSTR text) {} void IEViewSink::PropertyChange(BSTR text) {}
void IEViewSink::BeforeNavigate2(IDispatch* pDisp,VARIANT* url,VARIANT* flags, VARIANT* targetFrameName,
VARIANT* postData, VARIANT* headers, VARIANT_BOOL* cancel) {
- int i = (int)wcslen(url->bstrVal);
- char *tTemp = new char[i+1];
- WideCharToMultiByte(CP_ACP, 0, url->bstrVal, -1, tTemp, i+1, NULL, NULL);
#ifndef GECKO
- if (strcmp(tTemp, "about:blank")) {
-// if (smileyWindow==NULL) {
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) tTemp);
-// } else {
- // smileyWindow->choose(tTemp);
- // }
+ if (_tcscmp(url->bstrVal, _T("about:blank")))
+ {
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW|OUF_TCHAR, (LPARAM) url->bstrVal);
*cancel = VARIANT_TRUE;
}
#endif
- delete tTemp;
}
void IEViewSink::NewWindow2(IDispatch** ppDisp, VARIANT_BOOL* cancel) {}
@@ -1168,11 +1161,7 @@ bool IEView::mouseClick(POINT pt) { && !(GetKeyState(VK_MENU) & 0x8000)) {
SendMessage(GetParent(hwnd), WM_COMMAND, IDCANCEL, 0);
}
- int i = (int)wcslen(url);
- char *tTemp = new char[i+1];
- WideCharToMultiByte(CP_ACP, 0, url, -1, tTemp, i+1, NULL, NULL);
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) tTemp);
- delete tTemp;
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW|OUF_TCHAR, (LPARAM) url);
delete url;
result = true;
}
|