Completed, added open capabilities to chat logs, crash logs, cache and settings file locations.
parent
03be587563
commit
06eeb3fffb
|
|
@ -155,6 +155,7 @@ public:
|
|||
virtual void updateLanguageTextInputArea() {}
|
||||
virtual void interruptLanguageTextInput() {}
|
||||
virtual void spawnWebBrowser(const std::string& escaped_url, bool async) {};
|
||||
virtual void openFile(const std::string& file_name) {};
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
|
|
|
|||
|
|
@ -2969,8 +2969,18 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
|
|||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
void LLWindowWin32::openFile(const std::string& file_name )
|
||||
{
|
||||
LLWString url_wstring = utf8str_to_wstring( file_name );
|
||||
llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
|
||||
|
||||
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 );
|
||||
}
|
||||
void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
{
|
||||
bool found = false;
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ public:
|
|||
/*virtual*/ void updateLanguageTextInputArea();
|
||||
/*virtual*/ void interruptLanguageTextInput();
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
void openFile(const std::string& file_name);
|
||||
|
||||
LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url );
|
||||
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("Pref.BrowseCache", boost::bind(&LLFloaterPreference::onClickBrowseCache, this));
|
||||
mCommitCallbackRegistrar.add("Pref.BrowseCrashLogs", boost::bind(&LLFloaterPreference::onClickBrowseCrashLogs, this));
|
||||
mCommitCallbackRegistrar.add("Pref.BrowseSettingsDir", boost::bind(&LLFloaterPreference::onClickBrowseSettingsDir, this));
|
||||
mCommitCallbackRegistrar.add("Pref.BrowseLogPath", boost::bind(&LLFloaterPreference::onClickBrowseChatLogDir, this));
|
||||
mCommitCallbackRegistrar.add("Pref.ResetCache", boost::bind(&LLFloaterPreference::onClickResetCache, this));
|
||||
mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this));
|
||||
// mCommitCallbackRegistrar.add("Pref.ClickSkin", boost::bind(&LLFloaterPreference::onClickSkin, this,_1, _2));
|
||||
|
|
@ -789,15 +790,19 @@ void LLFloaterPreference::onClickSetCache()
|
|||
}
|
||||
void LLFloaterPreference::onClickBrowseCache()
|
||||
{
|
||||
//todo: add window open (JL)
|
||||
gViewerWindow->getWindow()->openFile(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""));
|
||||
}
|
||||
void LLFloaterPreference::onClickBrowseCrashLogs()
|
||||
{
|
||||
//todo: add window open (JL)
|
||||
gViewerWindow->getWindow()->openFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS,""));
|
||||
}
|
||||
void LLFloaterPreference::onClickBrowseSettingsDir()
|
||||
{
|
||||
//todo: add window open (JL)
|
||||
gViewerWindow->getWindow()->openFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,""));
|
||||
}
|
||||
void LLFloaterPreference::onClickBrowseChatLogDir()
|
||||
{
|
||||
gViewerWindow->getWindow()->openFile(gDirUtilp->getExpandedFilename(LL_PATH_CHAT_LOGS,""));
|
||||
}
|
||||
void LLFloaterPreference::onClickResetCache()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ public:
|
|||
void onClickSetCache();
|
||||
void onClickBrowseCache();
|
||||
void onClickBrowseCrashLogs();
|
||||
void onClickBrowseChatLogDir();
|
||||
void onClickResetCache();
|
||||
void onClickClearCache();
|
||||
void onClickBrowseSettingsDir();
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@
|
|||
top_pad="5"
|
||||
width="270" />
|
||||
<button
|
||||
enabled="false"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Browse"
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
top_pad="5"
|
||||
width="270"/>
|
||||
<button
|
||||
enabled="false"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Browse"
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
top_delta="-1"
|
||||
width="45">
|
||||
<button.commit_callback
|
||||
function="Pref.LogPath" />
|
||||
function="Pref.BrowseLogPath" />
|
||||
</button>
|
||||
<button
|
||||
enabled="false"
|
||||
|
|
@ -280,7 +280,7 @@
|
|||
function="Pref.ResetLogPath" />
|
||||
</button>
|
||||
<button
|
||||
enabled="false"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Browse Crash Logs"
|
||||
|
|
@ -294,7 +294,7 @@
|
|||
function="Pref.BrowseCrashLogs" />
|
||||
</button>
|
||||
<button
|
||||
enabled="false"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Browse Settings folder"
|
||||
|
|
|
|||
Loading…
Reference in New Issue