summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-03 19:21:14 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-03 19:21:14 +0000
commitb5936a4b1d8780b5b8cd425998eacd2c64ffa693 (patch)
treec1581bcf34e96a897c6e1d9a4aed95f353713baa /indra/llwindow/llwindowwin32.cpp
parent55c25229b79b1755c989e5996c8e8d118f369721 (diff)
1.19.1 Viewer merge: QAR_367, QAR-374, QAR-408, QAR-426
QAR_367 (RC1) - merge Branch_1-19-1-Viewer -r 81609 : 81993 -> release QAR-374 (RC2) - merge Branch_1-19-1-Viewer -r 81993 : 82589 -> release QAR-408 (RC3) - merge Branch_1-19-1-Viewer -r 82589 : 83128 -> release QAR-426 (rc4) - merge Branch_1-19-1-Viewer -r 83125 : 83719 -> release (Actual merge: release@83793 Branch_1-19-1-Viewer-merge@83953 -> release)
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c9554ce7fe..f05397b058 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3038,10 +3038,29 @@ void spawn_web_browser(const char* escaped_url )
llinfos << "Opening URL " << escaped_url << llendl;
+ // replaced ShellExecute code with ShellExecuteEx since ShellExecute doesn't work
+ // reliablly on Vista.
+
+ // this is madness.. no, this is..
+ LLWString url_wstring = utf8str_to_wstring( escaped_url );
+ llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
+
+ // let the OS decide what to use to open the URL
+ SHELLEXECUTEINFO sei = { sizeof( sei ) };
+ sei.fMask = SEE_MASK_FLAG_DDEWAIT;
+ sei.nShow = SW_SHOWNORMAL;
+ sei.lpVerb = L"open";
+ sei.lpFile = url_utf16.c_str();
+ ShellExecuteEx( &sei );
+
+ //// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
+ //// DELETE THIS ONCE THE MERGES ARE DONE
+
// Figure out the user's default web browser
// HKEY_CLASSES_ROOT\http\shell\open\command
- char reg_path_str[256]; /* Flawfinder: ignore */
- snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); /* Flawfinder: ignore */
+ /*
+ char reg_path_str[256]; // Flawfinder: ignore
+ snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); // Flawfinder: ignore
WCHAR reg_path_wstr[256];
mbstowcs(reg_path_wstr, reg_path_str, sizeof(reg_path_wstr)/sizeof(reg_path_wstr[0]));
@@ -3092,7 +3111,7 @@ void spawn_web_browser(const char* escaped_url )
// MS docs say to cast to int and compare to 32.
HWND our_window = NULL;
LPCWSTR directory_wstr = NULL;
- int retval = (int) ShellExecute(our_window, /* Flawfinder: ignore */
+ int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
L"open",
browser_exec_utf16.c_str(),
url_utf16.c_str(),
@@ -3106,6 +3125,7 @@ void spawn_web_browser(const char* escaped_url )
{
llinfos << "load_url failure with " << retval << llendl;
}
+ */
}