Launch transcripts in external text editor on mac too
This commit is contained in:
@@ -3277,7 +3277,7 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
|
||||
llinfos << "Opening URL " << escaped_url << llendl;
|
||||
|
||||
CFStringRef stringRef = CFStringCreateWithCString(NULL, escaped_url.c_str(), kCFStringEncodingUTF8);
|
||||
CFStringRef stringRef = CFStringCreateWithBytes(NULL, (UInt8 *)escaped_url.c_str(), strlen(escaped_url.c_str()), kCFStringEncodingUTF8, false);
|
||||
if (stringRef)
|
||||
{
|
||||
// This will succeed if the string is a full URL, including the http://
|
||||
@@ -3315,6 +3315,21 @@ void LLWindowMacOSX::setTitle(const std::string &title)
|
||||
SetWindowTitleWithCFString(mWindow, title_str);
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLWindowMacOSX::ShellEx(const std::string& command)
|
||||
{
|
||||
char * path = NULL;
|
||||
asprintf(&path, "%s %s", (char*)"file://", command.c_str());
|
||||
CFURLRef url = CFURLCreateAbsoluteURLWithBytes(NULL, (UInt8 *)path, strlen(path),
|
||||
kCFURLPOSIXPathStyle, NULL, true);
|
||||
if (url != NULL)
|
||||
{
|
||||
LSOpenCFURLRef(url, NULL);
|
||||
CFRelease(url);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
LLSD LLWindowMacOSX::getNativeKeyData()
|
||||
{
|
||||
LLSD result = LLSD::emptyMap();
|
||||
|
||||
@@ -116,6 +116,7 @@ public:
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
/*virtual*/ void setTitle(const std::string &title);
|
||||
/*virtual*/ void ShellEx(const std::string& command);
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
|
||||
@@ -3329,9 +3329,9 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
|
||||
return retval;
|
||||
}
|
||||
|
||||
void LLWindowWin32::ShellEx(const std::string& command )
|
||||
void LLWindowWin32::ShellEx(const std::string& command)
|
||||
{
|
||||
LLWString url_wstring = utf8str_to_wstring( command );
|
||||
LLWString url_wstring = utf8str_to_wstring( "\"" + command + "\"" );
|
||||
llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
|
||||
|
||||
SHELLEXECUTEINFO sei = { sizeof( sei ) };
|
||||
|
||||
@@ -1002,10 +1002,10 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
||||
|
||||
void show_log_browser(const std::string& name, const std::string& id)
|
||||
{
|
||||
#if LL_WINDOWS // Singu TODO: Other platforms?
|
||||
#if LL_WINDOWS || LL_DARWIN // Singu TODO: Linux?
|
||||
if (gSavedSettings.getBOOL("LiruLegacyLogLaunch"))
|
||||
{
|
||||
gViewerWindow->getWindow()->ShellEx("\"" + LLLogChat::makeLogFileName(name) + "\"");
|
||||
gViewerWindow->getWindow()->ShellEx(LLLogChat::makeLogFileName(name));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user