Added Open History button to local chat

This commit is contained in:
TighMacFanatic
2011-05-12 13:35:31 -04:00
parent 3fbc4a1dba
commit 3f426fcb67
3 changed files with 18 additions and 1 deletions

View File

@@ -115,6 +115,7 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat"));
childSetVisible("Chat History Editor with mute",FALSE);
childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
childSetAction("chat_history_open", onClickChatHistoryOpen, this);
setDefaultBtn("Chat");
}
@@ -666,6 +667,16 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
//self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
}
// static
void LLFloaterChat::onClickChatHistoryOpen(void* userdata)
{
char command[256];
sprintf(command, "\"%s\\%s\"", gDirUtilp->getPerAccountChatLogsDir().c_str(), "chat.txt");
gViewerWindow->getWindow()->ShellEx(command);
llinfos << command << llendl;
}
//static
bool LLFloaterChat::visible(LLFloater* instance, const LLSD& key)
{

View File

@@ -82,6 +82,7 @@ public:
static void onClickToggleShowMute(LLUICtrl* caller, void *data);
static void onClickToggleTranslateChat(LLUICtrl* caller, void *data);
static void onClickToggleActiveSpeakers(void* userdata);
static void onClickChatHistoryOpen(void* userdata);
static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata);
static void loadHistory();
static void* createSpeakersPanel(void* data);

View File

@@ -81,7 +81,12 @@
<check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall"
height="20" initial_value="false" label="Translate Chat (powered by Google)" left_delta="0"
name="translate chat" radio_style="false" width="100" />
<button bottom_delta="7" follows="right|top" height="20" label="&lt; &lt;"
<button bottom_delta="8" left_delta="250" follows="left|top" font="SansSerifSmall"
height="20" width="100" label="Open History" name="chat_history_open"
tool_top="Click here to open chat history in external editor." />
<button bottom_delta="7" follows="right|top" height="20" label="&lt; &lt;"
label_selected="&gt; &gt;" left="272" name="toggle_active_speakers_btn"
right="305"
tool_tip="Click here to show list of active participants in this IM session."