Making clrchat command line option work, removed in-code disabling of not-yet-implemented command line options

master
ziree 2012-01-07 01:27:45 +01:00
parent ff7edb4405
commit e02ae7d5a4
7 changed files with 21 additions and 33 deletions

View File

@ -42,6 +42,7 @@
#include "llworld.h"
#include "lluuid.h"
#include "llviewercontrol.h"
#include "llnearbychat.h"
#include "material_codes.h"
#include "llvolume.h"
@ -969,20 +970,17 @@ bool cmd_line_chat(std::string revised_text, EChatType type, bool from_gesture)
}
#endif
#if 0 //Uh, what do i do here? LGG can you help me here?
else if(command == std::string(sFSCmdLineClearChat))
{
LLFloaterChat* chat = LLFloaterChat::getInstance(LLSD());
LLNearbyChat* chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
if(chat)
{
LLViewerTextEditor* history_editor = chat->getChild<LLViewerTextEditor>("Chat History Editor");
LLViewerTextEditor* history_editor_with_mute = chat->getChild<LLViewerTextEditor>("Chat History Editor with mute");
history_editor->clear();
history_editor_with_mute->clear();
chat->clearChatHistory();
return false;
}
}
#endif
else if(command == "zdrop")
{
std::string setting;

View File

@ -16,7 +16,7 @@
static LLRegisterPanelClassWrapper<PanelPreferenceFirestorm> t_pref_fs("panel_preference_firestorm");
PanelPreferenceFirestorm::PanelPreferenceFirestorm() : LLPanelPreference(), m_calcLineEditor(NULL), m_acLineEditor(NULL), m_tp2LineEditor(NULL), m_clearchatLineEditor(NULL), m_musicLineEditor(NULL)
PanelPreferenceFirestorm::PanelPreferenceFirestorm() : LLPanelPreference()
{
}
@ -36,22 +36,6 @@ BOOL PanelPreferenceFirestorm::postBuild()
getChild<LLUICtrl>("refresh_beams")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::refreshBeamLists, this));
getChild<LLUICtrl>("delete_beam")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamDelete, this));
m_tp2LineEditor = getChild<LLLineEditor>("FSCmdLineTP2");
m_clearchatLineEditor = getChild<LLLineEditor>("FSCmdLineClearChat");
m_musicLineEditor = getChild<LLLineEditor>("FSCmdLineMusic");
if(m_tp2LineEditor)
{
m_tp2LineEditor->setEnabled(FALSE);
}
if(m_clearchatLineEditor)
{
m_clearchatLineEditor->setEnabled(FALSE);
}
if(m_musicLineEditor)
{
m_musicLineEditor->setEnabled(FALSE);
}
//WS: Set the combo_box vars and refresh/reload them
m_UseLegacyClienttags = getChild<LLComboBox>("UseLegacyClienttags");
m_ColorClienttags = getChild<LLComboBox>("ColorClienttags");

View File

@ -25,15 +25,8 @@ public:
void applyTagCombos();
protected:
LLLineEditor* m_calcLineEditor;
LLLineEditor* m_acLineEditor;
LLLineEditor* m_tp2LineEditor;
LLLineEditor* m_clearchatLineEditor;
LLLineEditor* m_musicLineEditor;
LLLineEditor* m_aoLineEditor;
LLComboBox* m_UseLegacyClienttags;
LLComboBox* m_ColorClienttags;
LLComboBox* m_ClientTagsVisibility;
};
#endif
#endif

View File

@ -759,6 +759,10 @@ void LLChatHistory::onClickMoreText()
void LLChatHistory::clear()
{
mLastFromName.clear();
// workaround: Setting the text to an empty line before clear() gets rid of
// the scrollbar, if present, which otherwise would get stuck until the next
// line was appended. -Zi
mEditor->setText(std::string(" \n"));
mEditor->clear();
mLastFromID = LLUUID::null;
}

View File

@ -457,9 +457,15 @@ void LLNearbyChat::getAllowedRect(LLRect& rect)
rect = gViewerWindow->getWorldViewRectScaled();
}
void LLNearbyChat::updateChatHistoryStyle()
// exported here for "clrchat" command line -Zi
void LLNearbyChat::clearChatHistory()
{
mChatHistory->clear();
}
void LLNearbyChat::updateChatHistoryStyle()
{
clearChatHistory();
LLSD do_not_log;
do_not_log["do_not_log"] = true;

View File

@ -69,6 +69,7 @@ public:
virtual void setRect (const LLRect &rect);
void clearChatHistory();
virtual void updateChatHistoryStyle();
static void processChatHistoryStyleUpdate(const LLSD& newvalue);

View File

@ -1031,6 +1031,7 @@
</text>
<line_editor
top_pad="0"
enabled="false"
follows="left|top"
height="20"
max_length="256"
@ -1103,6 +1104,7 @@
</text>
<line_editor
top_pad="0"
enabled="false"
follows="left|top"
height="20"
max_length="256"