Fix the << button on local chat not working, thanks for pointing this out, Nomade~

Also code cleanupsies~
This commit is contained in:
Inusaito Sayori
2015-01-21 17:21:38 -05:00
parent 123ded50ef
commit 290f143b5c
9 changed files with 15 additions and 40 deletions

View File

@@ -112,7 +112,11 @@ BOOL LLFloaterChat::postBuild()
{ {
mPanel = getChild<LLParticipantList>("active_speakers_panel"); mPanel = getChild<LLParticipantList>("active_speakers_panel");
getChild<LLUICtrl>("toggle_active_speakers_btn")->setCommitCallback(boost::bind(&LLFloaterChat::onClickToggleActiveSpeakers, this, _2)); // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
getChild<LLUICtrl>("toggle_active_speakers_btn")->setCommitCallback(boost::bind(&LLView::setVisible, mPanel, boost::bind(std::logical_and<bool>(), _2, !boost::bind(&RlvHandler::hasBehaviour, boost::ref(gRlvHandler), RLV_BHVR_SHOWNAMES))));
// [/RLVa:KB]
//getChild<LLUICtrl>("toggle_active_speakers_btn")->setCommitCallback(boost::bind(&LLView::setVisible, mPanel, _2));
mChatPanel.connect(this,"chat_panel"); mChatPanel.connect(this,"chat_panel");
mChatPanel->setGestureCombo(getChild<LLComboBox>( "Gesture")); mChatPanel->setGestureCombo(getChild<LLComboBox>( "Gesture"));
return TRUE; return TRUE;
@@ -496,21 +500,11 @@ LLColor4 get_text_color(const LLChat& chat, bool from_im)
} }
} }
static const LLCachedControl<bool> mKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false); static const LLCachedControl<bool> sKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false);
static const LLCachedControl<LLColor4> mKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f)); if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(chat.mText.substr(chat.mFromName.length()), 1))
if ((gAgent.getID() != chat.mFromID) && (chat.mSourceType != CHAT_SOURCE_SYSTEM))
{ {
if (mKeywordsChangeColor) static const LLCachedControl<LLColor4> sKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f));
{ text_color = sKeywordsColor;
std::string shortmsg(chat.mText);
shortmsg.erase(0, chat.mFromName.length());
if (AscentKeyword::hasKeyword(shortmsg, 1))
{
text_color = mKeywordsColor;
}
}
} }
return text_color; return text_color;
@@ -556,16 +550,6 @@ void* LLFloaterChat::createChatPanel(void* data)
return new LLChatBar; return new LLChatBar;
} }
// static
void LLFloaterChat::onClickToggleActiveSpeakers(const LLSD& val)
{
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
mPanel->setVisible(val && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
//mPanel->setVisible(val);
}
//static //static
bool LLFloaterChat::visible(LLFloater* instance, const LLSD& key) bool LLFloaterChat::visible(LLFloater* instance, const LLSD& key)
{ {

View File

@@ -71,7 +71,6 @@ public:
static void triggerAlerts(const std::string& text); static void triggerAlerts(const std::string& text);
void onClickToggleShowMute(bool show_mute, class LLTextEditor* history_editor, LLTextEditor* history_editor_with_mute); void onClickToggleShowMute(bool show_mute, class LLTextEditor* history_editor, LLTextEditor* history_editor_with_mute);
void onClickToggleActiveSpeakers(const LLSD& val);
static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata); static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
static void loadHistory(); static void loadHistory();
static void* createSpeakersPanel(void* data); static void* createSpeakersPanel(void* data);

View File

@@ -510,7 +510,7 @@ BOOL LLFloaterIMPanel::postBuild()
getChild<LLButton>("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, boost::ref(mSessionUUID))); getChild<LLButton>("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, boost::ref(mSessionUUID)));
getChild<LLButton>("send_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onSendMsg,this)); getChild<LLButton>("send_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onSendMsg,this));
if (LLButton* btn = findChild<LLButton>("toggle_active_speakers_btn")) if (LLButton* btn = findChild<LLButton>("toggle_active_speakers_btn"))
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2)); btn->setCommitCallback(boost::bind(&LLView::setVisible, getChildView("active_speakers_panel"), _2));
mHistoryEditor = getChild<LLViewerTextEditor>("im_history"); mHistoryEditor = getChild<LLViewerTextEditor>("im_history");
mHistoryEditor->setParseHTML(TRUE); mHistoryEditor->setParseHTML(TRUE);
@@ -600,8 +600,6 @@ void LLFloaterIMPanel::draw()
if (mSpeakerPanel) mSpeakerPanel->setVisible(true); if (mSpeakerPanel) mSpeakerPanel->setVisible(true);
mShowSpeakersOnConnect = false; mShowSpeakersOnConnect = false;
} }
if (LLUICtrl* ctrl = findChild<LLUICtrl>("toggle_active_speakers_btn"))
ctrl->setValue(getChildView("active_speakers_panel")->getVisible());
if (mTyping) if (mTyping)
{ {
@@ -1031,11 +1029,6 @@ void LLFloaterIMPanel::onClickHistory()
} }
} }
void LLFloaterIMPanel::onClickToggleActiveSpeakers(const LLSD& value)
{
childSetVisible("active_speakers_panel", !value);
}
void LLFloaterIMPanel::onInputEditorFocusReceived() void LLFloaterIMPanel::onInputEditorFocusReceived()
{ {
if (gSavedSettings.getBOOL("LiruLegacyScrollToEnd")) if (gSavedSettings.getBOOL("LiruLegacyScrollToEnd"))

View File

@@ -105,7 +105,6 @@ public:
void onClickHistory(); void onClickHistory();
void onFlyoutCommit(class LLComboBox* flyout, const LLSD& value); void onFlyoutCommit(class LLComboBox* flyout, const LLSD& value);
void onClickToggleActiveSpeakers(const LLSD& value);
static void* createSpeakersPanel(void* data); static void* createSpeakersPanel(void* data);
//callbacks for P2P muting and volume control //callbacks for P2P muting and volume control

View File

@@ -18,7 +18,7 @@
<check_box bottom_delta="-2" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Show Muted Text" left_delta="124" name="show mutes" width="116"/> <check_box bottom_delta="-2" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Show Muted Text" left_delta="124" name="show mutes" width="116"/>
<!--check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Translate Chat (powered by Google)" name="translate chat" width="100" control_name="TranslateChat"/--> <!--check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Translate Chat (powered by Google)" name="translate chat" width="100" control_name="TranslateChat"/-->
<button bottom_delta="2" left_delta="120" follows="left|top" font="SansSerifSmall" height="20" width="100" label="Open History" name="chat_history_open" tool_tip="Click here to open chat history in external editor."/> <button bottom_delta="2" left_delta="120" follows="left|top" font="SansSerifSmall" height="20" width="100" label="Open History" name="chat_history_open" tool_tip="Click here to open chat history in external editor."/>
<button bottom_delta="0" 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 a list of active participants in this IM session." width="80"/> <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="272" name="toggle_active_speakers_btn" right="305" tool_tip="Click here to show a list of active participants in this IM session." width="80"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/> <text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/> <text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
</layout_panel> </layout_panel>

View File

@@ -16,7 +16,7 @@
</button> </button>
<button bottom_delta="0" enabled="false" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/> <button bottom_delta="0" enabled="false" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="left|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80"/> <button bottom_delta="0" follows="left|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/> <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="143" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/> <text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="143" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to instant message" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/> <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to instant message" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/>
<button bottom_delta="0" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/> <button bottom_delta="0" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/>

View File

@@ -14,7 +14,7 @@
</button> </button>
<button bottom_delta="0" enabled="false" follows="right|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/> <button bottom_delta="0" enabled="false" follows="right|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80"/> <button bottom_delta="0" follows="right|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="420" name="toggle_active_speakers_btn" right="450" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/> <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="420" name="toggle_active_speakers_btn" right="450" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="180" left="0" orientation="horizontal" tab_group="1" width="496" name="panels"> <layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="180" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="195" left="0" min_width="115" name="im_contents_panel" width="495"> <layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="195" left="0" min_width="115" name="im_contents_panel" width="495">
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="160" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/> <text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="160" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>

View File

@@ -19,7 +19,7 @@
</button> </button>
<button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/> <button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/> <button bottom_delta="0" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/> <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="143" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/> <text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="143" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" height="20" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/> <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" height="20" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/>
<button bottom="5" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/> <button bottom="5" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/>

View File

@@ -17,7 +17,7 @@
</button> </button>
<button bottom_delta="0" enabled="false" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/> <button bottom_delta="0" enabled="false" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/> <button bottom_delta="0" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="420" name="toggle_active_speakers_btn" right="450" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/> <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="420" name="toggle_active_speakers_btn" right="450" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="180" left="0" orientation="horizontal" tab_group="1" width="496" name="panels"> <layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="180" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="195" left="0" min_width="115" name="im_contents_panel" width="495"> <layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="195" left="0" min_width="115" name="im_contents_panel" width="495">
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="160" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/> <text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="160" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>