summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterscriptdebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterscriptdebug.cpp')
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index eeea71cc4c..4a82f3a11c 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -63,6 +63,8 @@ LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key)
// avoid resizing of the window to match
// the initial size of the tabbed-childs, whenever a tab is opened or closed
mAutoResize = FALSE;
+ // enabled autocous blocks controling focus via LLFloaterReg::showInstance
+ setAutoFocus(FALSE);
}
LLFloaterScriptDebug::~LLFloaterScriptDebug()
@@ -93,7 +95,8 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
return NULL;
LLFloater::setFloaterHost(host);
- LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id);
+ // prevent stealing focus, see EXT-8040
+ LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE);
LLFloater::setFloaterHost(NULL);
return floaterp;
@@ -104,6 +107,10 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
LLViewerObject* objectp = gObjectList.findObject(source_id);
std::string floater_label;
+ // Handle /me messages.
+ std::string prefix = utf8mesg.substr(0, 4);
+ std::string message = (prefix == "/me " || prefix == "/me'") ? user_name + utf8mesg.substr(3) : utf8mesg;
+
if (objectp)
{
objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI));
@@ -121,14 +128,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
LLFloaterScriptDebugOutput* floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null);
if (floaterp)
{
- floaterp->addLine(utf8mesg, user_name, color);
+ floaterp->addLine(message, user_name, color);
}
// add to specific script instance floater
floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", source_id);
if (floaterp)
{
- floaterp->addLine(utf8mesg, floater_label, color);
+ floaterp->addLine(message, floater_label, color);
}
}
@@ -141,6 +148,9 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
mObjectID(object_id.asUUID())
{
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml");
+
+ // enabled autocous blocks controling focus via LLFloaterReg::showInstance
+ setAutoFocus(FALSE);
}
BOOL LLFloaterScriptDebugOutput::postBuild()