add a deque specifically for use with llmessagelogfilter apply to defeat iterator invalidation, replace crlf with lf

This commit is contained in:
Hazim Gazov
2010-06-09 21:41:34 +00:00
parent 70e296e174
commit 4721c0d9bd
6 changed files with 429 additions and 417 deletions

View File

@@ -1,219 +1,219 @@
// <edit>
#include "llviewerprecompiledheaders.h"
#include "llao.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
#include "llfilepicker.h"
#include "llsdserialize.h"
std::map<LLUUID,LLUUID> LLAO::mOverrides;
LLFloaterAO* LLFloaterAO::sInstance;
//static
void LLAO::refresh()
{
mOverrides.clear();
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
LLSD overrides = settings["overrides"];
LLSD::map_iterator sd_it = overrides.beginMap();
LLSD::map_iterator sd_end = overrides.endMap();
for( ; sd_it != sd_end; sd_it++)
{
// don't allow override to be used as a trigger
if(mOverrides.find(sd_it->second.asUUID()) == mOverrides.end())
{
// ignore if override is null key...
if(sd_it->second.asUUID().notNull())
{
mOverrides[LLUUID(sd_it->first)] = sd_it->second.asUUID();
}
}
}
}
//static
void LLFloaterAO::show()
{
if(sInstance)
sInstance->open();
else
(new LLFloaterAO())->open();
}
LLFloaterAO::LLFloaterAO()
: LLFloater()
{
sInstance = this;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
}
LLFloaterAO::~LLFloaterAO()
{
sInstance = NULL;
}
BOOL LLFloaterAO::postBuild(void)
{
childSetAction("btn_save", onClickSave, this);
childSetAction("btn_load", onClickLoad, this);
childSetCommitCallback("line_walking", onCommitAnim, this);
childSetCommitCallback("line_running", onCommitAnim, this);
childSetCommitCallback("line_crouchwalk", onCommitAnim, this);
childSetCommitCallback("line_flying", onCommitAnim, this);
childSetCommitCallback("line_turn_left", onCommitAnim, this);
childSetCommitCallback("line_turn_right", onCommitAnim, this);
childSetCommitCallback("line_jumping", onCommitAnim, this);
childSetCommitCallback("line_fly_up", onCommitAnim, this);
childSetCommitCallback("line_crouching", onCommitAnim, this);
childSetCommitCallback("line_fly_down", onCommitAnim, this);
childSetCommitCallback("line_stand1", onCommitAnim, this);
childSetCommitCallback("line_stand2", onCommitAnim, this);
childSetCommitCallback("line_stand3", onCommitAnim, this);
childSetCommitCallback("line_hover", onCommitAnim, this);
childSetCommitCallback("line_sitting", onCommitAnim, this);
childSetCommitCallback("line_prejump", onCommitAnim, this);
childSetCommitCallback("line_falling", onCommitAnim, this);
childSetCommitCallback("line_stride", onCommitAnim, this);
childSetCommitCallback("line_soft_landing", onCommitAnim, this);
childSetCommitCallback("line_medium_landing", onCommitAnim, this);
childSetCommitCallback("line_hard_landing", onCommitAnim, this);
childSetCommitCallback("line_flying_slow", onCommitAnim, this);
childSetCommitCallback("line_sitting_on_ground", onCommitAnim, this);
refresh();
return TRUE;
}
std::string LLFloaterAO::idstr(LLUUID id)
{
if(id.notNull()) return id.asString();
else return "";
}
void LLFloaterAO::refresh()
{
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
LLSD overrides = settings["overrides"];
childSetText("line_walking", idstr(overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"]));
childSetText("line_running", idstr(overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"]));
childSetText("line_crouchwalk", idstr(overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"]));
childSetText("line_flying", idstr(overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"]));
childSetText("line_turn_left", idstr(overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"]));
childSetText("line_turn_right", idstr(overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"]));
childSetText("line_jumping", idstr(overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"]));
childSetText("line_fly_up", idstr(overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"]));
childSetText("line_crouching", idstr(overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"]));
childSetText("line_fly_down", idstr(overrides["20f063ea-8306-2562-0b07-5c853b37b31e"]));
childSetText("line_stand1", idstr(overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"]));
childSetText("line_stand2", idstr(overrides["15468e00-3400-bb66-cecc-646d7c14458e"]));
childSetText("line_stand3", idstr(overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"]));
childSetText("line_hover", idstr(overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"]));
childSetText("line_sitting", idstr(overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"]));
childSetText("line_prejump", idstr(overrides["7a4e87fe-de39-6fcb-6223-024b00893244"]));
childSetText("line_falling", idstr(overrides["666307d9-a860-572d-6fd4-c3ab8865c094"]));
childSetText("line_stride", idstr(overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"]));
childSetText("line_soft_landing", idstr(overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"]));
childSetText("line_medium_landing", idstr(overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"]));
childSetText("line_hard_landing", idstr(overrides["3da1d753-028a-5446-24f3-9c9b856d9422"]));
childSetText("line_flying_slow", idstr(overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"]));
childSetText("line_sitting_on_ground", idstr(overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"]));
}
// static
void LLFloaterAO::onCommitAnim(LLUICtrl* ctrl, void* user_data)
{
LLFloaterAO* floater = (LLFloaterAO*)user_data;
LLSD overrides;
LLUUID id;
id = LLUUID(floater->childGetValue("line_walking").asString());
if(id.notNull()) overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"] = id;
id = LLUUID(floater->childGetValue("line_running").asString());
if(id.notNull()) overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"] = id;
id = LLUUID(floater->childGetValue("line_crouchwalk").asString());
if(id.notNull()) overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"] = id;
id = LLUUID(floater->childGetValue("line_flying").asString());
if(id.notNull()) overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"] = id;
id = LLUUID(floater->childGetValue("line_turn_left").asString());
if(id.notNull()) overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"] = id;
id = LLUUID(floater->childGetValue("line_turn_right").asString());
if(id.notNull()) overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"] = id;
id = LLUUID(floater->childGetValue("line_jumping").asString());
if(id.notNull()) overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"] = id;
id = LLUUID(floater->childGetValue("line_fly_up").asString());
if(id.notNull()) overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"] = id;
id = LLUUID(floater->childGetValue("line_crouching").asString());
if(id.notNull()) overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"] = id;
id = LLUUID(floater->childGetValue("line_fly_down").asString());
if(id.notNull()) overrides["20f063ea-8306-2562-0b07-5c853b37b31e"] = id;
id = LLUUID(floater->childGetValue("line_stand1").asString());
if(id.notNull()) overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"] = id;
id = LLUUID(floater->childGetValue("line_stand2").asString());
if(id.notNull()) overrides["15468e00-3400-bb66-cecc-646d7c14458e"] = id;
id = LLUUID(floater->childGetValue("line_stand3").asString());
if(id.notNull()) overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"] = id;
id = LLUUID(floater->childGetValue("line_hover").asString());
if(id.notNull()) overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"] = id;
id = LLUUID(floater->childGetValue("line_sitting").asString());
if(id.notNull()) overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"] = id;
id = LLUUID(floater->childGetValue("line_prejump").asString());
if(id.notNull()) overrides["7a4e87fe-de39-6fcb-6223-024b00893244"] = id;
id = LLUUID(floater->childGetValue("line_falling").asString());
if(id.notNull()) overrides["666307d9-a860-572d-6fd4-c3ab8865c094"] = id;
id = LLUUID(floater->childGetValue("line_stride").asString());
if(id.notNull()) overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"] = id;
id = LLUUID(floater->childGetValue("line_soft_landing").asString());
if(id.notNull()) overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"] = id;
id = LLUUID(floater->childGetValue("line_medium_landing").asString());
if(id.notNull()) overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"] = id;
id = LLUUID(floater->childGetValue("line_hard_landing").asString());
if(id.notNull()) overrides["3da1d753-028a-5446-24f3-9c9b856d9422"] = id;
id = LLUUID(floater->childGetValue("line_flying_slow").asString());
if(id.notNull()) overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"] = id;
id = LLUUID(floater->childGetValue("line_sitting_on_ground").asString());
if(id.notNull()) overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"] = id;
LLSD settings;
settings["version"] = 1;
settings["overrides"] = overrides;
gSavedPerAccountSettings.setLLSD("AO.Settings", settings);
LLAO::refresh();
floater->refresh();
}
//static
void LLFloaterAO::onClickSave(void* user_data)
{
LLFilePicker& file_picker = LLFilePicker::instance();
if(file_picker.getSaveFile( LLFilePicker::FFSAVE_AO, LLDir::getScrubbedFileName("untitled.ao")))
{
std::string file_name = file_picker.getFirstFile();
llofstream export_file(file_name);
LLSDSerialize::toPrettyXML(gSavedPerAccountSettings.getLLSD("AO.Settings"), export_file);
export_file.close();
}
}
//static
void LLFloaterAO::onClickLoad(void* user_data)
{
LLFloaterAO* floater = (LLFloaterAO*)user_data;
LLFilePicker& file_picker = LLFilePicker::instance();
if(file_picker.getOpenFile(LLFilePicker::FFLOAD_AO))
{
std::string file_name = file_picker.getFirstFile();
llifstream xml_file(file_name);
if(!xml_file.is_open()) return;
LLSD data;
if(LLSDSerialize::fromXML(data, xml_file) >= 1)
{
gSavedPerAccountSettings.setLLSD("AO.Settings", data);
LLAO::refresh();
floater->refresh();
}
xml_file.close();
}
}
// </edit>
// <edit>
#include "llviewerprecompiledheaders.h"
#include "llao.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
#include "llfilepicker.h"
#include "llsdserialize.h"
std::map<LLUUID,LLUUID> LLAO::mOverrides;
LLFloaterAO* LLFloaterAO::sInstance;
//static
void LLAO::refresh()
{
mOverrides.clear();
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
LLSD overrides = settings["overrides"];
LLSD::map_iterator sd_it = overrides.beginMap();
LLSD::map_iterator sd_end = overrides.endMap();
for( ; sd_it != sd_end; sd_it++)
{
// don't allow override to be used as a trigger
if(mOverrides.find(sd_it->second.asUUID()) == mOverrides.end())
{
// ignore if override is null key...
if(sd_it->second.asUUID().notNull())
{
mOverrides[LLUUID(sd_it->first)] = sd_it->second.asUUID();
}
}
}
}
//static
void LLFloaterAO::show()
{
if(sInstance)
sInstance->open();
else
(new LLFloaterAO())->open();
}
LLFloaterAO::LLFloaterAO()
: LLFloater()
{
sInstance = this;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
}
LLFloaterAO::~LLFloaterAO()
{
sInstance = NULL;
}
BOOL LLFloaterAO::postBuild(void)
{
childSetAction("btn_save", onClickSave, this);
childSetAction("btn_load", onClickLoad, this);
childSetCommitCallback("line_walking", onCommitAnim, this);
childSetCommitCallback("line_running", onCommitAnim, this);
childSetCommitCallback("line_crouchwalk", onCommitAnim, this);
childSetCommitCallback("line_flying", onCommitAnim, this);
childSetCommitCallback("line_turn_left", onCommitAnim, this);
childSetCommitCallback("line_turn_right", onCommitAnim, this);
childSetCommitCallback("line_jumping", onCommitAnim, this);
childSetCommitCallback("line_fly_up", onCommitAnim, this);
childSetCommitCallback("line_crouching", onCommitAnim, this);
childSetCommitCallback("line_fly_down", onCommitAnim, this);
childSetCommitCallback("line_stand1", onCommitAnim, this);
childSetCommitCallback("line_stand2", onCommitAnim, this);
childSetCommitCallback("line_stand3", onCommitAnim, this);
childSetCommitCallback("line_hover", onCommitAnim, this);
childSetCommitCallback("line_sitting", onCommitAnim, this);
childSetCommitCallback("line_prejump", onCommitAnim, this);
childSetCommitCallback("line_falling", onCommitAnim, this);
childSetCommitCallback("line_stride", onCommitAnim, this);
childSetCommitCallback("line_soft_landing", onCommitAnim, this);
childSetCommitCallback("line_medium_landing", onCommitAnim, this);
childSetCommitCallback("line_hard_landing", onCommitAnim, this);
childSetCommitCallback("line_flying_slow", onCommitAnim, this);
childSetCommitCallback("line_sitting_on_ground", onCommitAnim, this);
refresh();
return TRUE;
}
std::string LLFloaterAO::idstr(LLUUID id)
{
if(id.notNull()) return id.asString();
else return "";
}
void LLFloaterAO::refresh()
{
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
LLSD overrides = settings["overrides"];
childSetText("line_walking", idstr(overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"]));
childSetText("line_running", idstr(overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"]));
childSetText("line_crouchwalk", idstr(overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"]));
childSetText("line_flying", idstr(overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"]));
childSetText("line_turn_left", idstr(overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"]));
childSetText("line_turn_right", idstr(overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"]));
childSetText("line_jumping", idstr(overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"]));
childSetText("line_fly_up", idstr(overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"]));
childSetText("line_crouching", idstr(overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"]));
childSetText("line_fly_down", idstr(overrides["20f063ea-8306-2562-0b07-5c853b37b31e"]));
childSetText("line_stand1", idstr(overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"]));
childSetText("line_stand2", idstr(overrides["15468e00-3400-bb66-cecc-646d7c14458e"]));
childSetText("line_stand3", idstr(overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"]));
childSetText("line_hover", idstr(overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"]));
childSetText("line_sitting", idstr(overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"]));
childSetText("line_prejump", idstr(overrides["7a4e87fe-de39-6fcb-6223-024b00893244"]));
childSetText("line_falling", idstr(overrides["666307d9-a860-572d-6fd4-c3ab8865c094"]));
childSetText("line_stride", idstr(overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"]));
childSetText("line_soft_landing", idstr(overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"]));
childSetText("line_medium_landing", idstr(overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"]));
childSetText("line_hard_landing", idstr(overrides["3da1d753-028a-5446-24f3-9c9b856d9422"]));
childSetText("line_flying_slow", idstr(overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"]));
childSetText("line_sitting_on_ground", idstr(overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"]));
}
// static
void LLFloaterAO::onCommitAnim(LLUICtrl* ctrl, void* user_data)
{
LLFloaterAO* floater = (LLFloaterAO*)user_data;
LLSD overrides;
LLUUID id;
id = LLUUID(floater->childGetValue("line_walking").asString());
if(id.notNull()) overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"] = id;
id = LLUUID(floater->childGetValue("line_running").asString());
if(id.notNull()) overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"] = id;
id = LLUUID(floater->childGetValue("line_crouchwalk").asString());
if(id.notNull()) overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"] = id;
id = LLUUID(floater->childGetValue("line_flying").asString());
if(id.notNull()) overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"] = id;
id = LLUUID(floater->childGetValue("line_turn_left").asString());
if(id.notNull()) overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"] = id;
id = LLUUID(floater->childGetValue("line_turn_right").asString());
if(id.notNull()) overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"] = id;
id = LLUUID(floater->childGetValue("line_jumping").asString());
if(id.notNull()) overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"] = id;
id = LLUUID(floater->childGetValue("line_fly_up").asString());
if(id.notNull()) overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"] = id;
id = LLUUID(floater->childGetValue("line_crouching").asString());
if(id.notNull()) overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"] = id;
id = LLUUID(floater->childGetValue("line_fly_down").asString());
if(id.notNull()) overrides["20f063ea-8306-2562-0b07-5c853b37b31e"] = id;
id = LLUUID(floater->childGetValue("line_stand1").asString());
if(id.notNull()) overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"] = id;
id = LLUUID(floater->childGetValue("line_stand2").asString());
if(id.notNull()) overrides["15468e00-3400-bb66-cecc-646d7c14458e"] = id;
id = LLUUID(floater->childGetValue("line_stand3").asString());
if(id.notNull()) overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"] = id;
id = LLUUID(floater->childGetValue("line_hover").asString());
if(id.notNull()) overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"] = id;
id = LLUUID(floater->childGetValue("line_sitting").asString());
if(id.notNull()) overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"] = id;
id = LLUUID(floater->childGetValue("line_prejump").asString());
if(id.notNull()) overrides["7a4e87fe-de39-6fcb-6223-024b00893244"] = id;
id = LLUUID(floater->childGetValue("line_falling").asString());
if(id.notNull()) overrides["666307d9-a860-572d-6fd4-c3ab8865c094"] = id;
id = LLUUID(floater->childGetValue("line_stride").asString());
if(id.notNull()) overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"] = id;
id = LLUUID(floater->childGetValue("line_soft_landing").asString());
if(id.notNull()) overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"] = id;
id = LLUUID(floater->childGetValue("line_medium_landing").asString());
if(id.notNull()) overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"] = id;
id = LLUUID(floater->childGetValue("line_hard_landing").asString());
if(id.notNull()) overrides["3da1d753-028a-5446-24f3-9c9b856d9422"] = id;
id = LLUUID(floater->childGetValue("line_flying_slow").asString());
if(id.notNull()) overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"] = id;
id = LLUUID(floater->childGetValue("line_sitting_on_ground").asString());
if(id.notNull()) overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"] = id;
LLSD settings;
settings["version"] = 1;
settings["overrides"] = overrides;
gSavedPerAccountSettings.setLLSD("AO.Settings", settings);
LLAO::refresh();
floater->refresh();
}
//static
void LLFloaterAO::onClickSave(void* user_data)
{
LLFilePicker& file_picker = LLFilePicker::instance();
if(file_picker.getSaveFile( LLFilePicker::FFSAVE_AO, LLDir::getScrubbedFileName("untitled.ao")))
{
std::string file_name = file_picker.getFirstFile();
llofstream export_file(file_name);
LLSDSerialize::toPrettyXML(gSavedPerAccountSettings.getLLSD("AO.Settings"), export_file);
export_file.close();
}
}
//static
void LLFloaterAO::onClickLoad(void* user_data)
{
LLFloaterAO* floater = (LLFloaterAO*)user_data;
LLFilePicker& file_picker = LLFilePicker::instance();
if(file_picker.getOpenFile(LLFilePicker::FFLOAD_AO))
{
std::string file_name = file_picker.getFirstFile();
llifstream xml_file(file_name);
if(!xml_file.is_open()) return;
LLSD data;
if(LLSDSerialize::fromXML(data, xml_file) >= 1)
{
gSavedPerAccountSettings.setLLSD("AO.Settings", data);
LLAO::refresh();
floater->refresh();
}
xml_file.close();
}
}
// </edit>

View File

@@ -1,32 +1,32 @@
// <edit>
#ifndef LL_LLAO_H
#define LL_LLAO_H
#include "llfloater.h"
class LLAO
{
public:
static std::map<LLUUID,LLUUID> mOverrides;
static void refresh();
};
class LLFloaterAO : public LLFloater
{
public:
static LLFloaterAO* sInstance;
static void show();
LLFloaterAO();
BOOL postBuild(void);
void refresh();
static void onCommitAnim(LLUICtrl* ctrl, void* user_data);
static void onClickSave(void* user_data);
static void onClickLoad(void* user_data);
private:
virtual ~LLFloaterAO();
std::string idstr(LLUUID id); // silly utility
};
#endif
// </edit>
// <edit>
#ifndef LL_LLAO_H
#define LL_LLAO_H
#include "llfloater.h"
class LLAO
{
public:
static std::map<LLUUID,LLUUID> mOverrides;
static void refresh();
};
class LLFloaterAO : public LLFloater
{
public:
static LLFloaterAO* sInstance;
static void show();
LLFloaterAO();
BOOL postBuild(void);
void refresh();
static void onCommitAnim(LLUICtrl* ctrl, void* user_data);
static void onClickSave(void* user_data);
static void onClickLoad(void* user_data);
private:
virtual ~LLFloaterAO();
std::string idstr(LLUUID id); // silly utility
};
#endif
// </edit>

View File

@@ -23,6 +23,10 @@ LLFloaterExportRegion::LLFloaterExportRegion(const LLSD& unused)
{
sInstance = this;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_export.xml");
//populate the list of objects to export
//int numOfObjects = gObjectList.getNumObjects();
}

View File

@@ -412,7 +412,9 @@ LLMessageLogFilterApply::LLMessageLogFilterApply()
mFinished(FALSE),
mProgress(0)
{
mIter = LLFloaterMessageLog::sMessageLogEntries.begin();
//make extra sure we don't invalidate any iterators and reserve a deque exclusively for our use
mFilterTempMessages = new std::deque <LLMessageLogEntry>(LLFloaterMessageLog::sMessageLogEntries);
mIter = mFilterTempMessages->begin();
}
void LLMessageLogFilterApply::cancel()
{
@@ -420,7 +422,7 @@ void LLMessageLogFilterApply::cancel()
}
BOOL LLMessageLogFilterApply::tick()
{
std::deque<LLMessageLogEntry>::iterator end = LLFloaterMessageLog::sMessageLogEntries.end();
std::deque<LLMessageLogEntry>::iterator end = mFilterTempMessages->end();
if(mIter == end || !LLFloaterMessageLog::sInstance)
{
mFinished = TRUE;
@@ -445,6 +447,9 @@ BOOL LLMessageLogFilterApply::tick()
LLFloaterMessageLog::sInstance->stopApplyingFilter();
}
}
delete mFilterTempMessages;
return TRUE;
}
@@ -686,7 +691,9 @@ void LLFloaterMessageLog::onLog(LLMessageLogEntry entry)
{
sMessageLogEntries.push_back(entry);
if(!sBusyApplyingFilter)
{
conditionalLog(LLFloaterMessageLogItem(entry));
}
}
// static
void LLFloaterMessageLog::conditionalLog(LLFloaterMessageLogItem item)

View File

@@ -1,91 +1,92 @@
// <edit>
#include "llfloater.h"
#include "llmessagelog.h"
#include "lltemplatemessagereader.h"
class LLNetListItem
{
public:
LLNetListItem(LLUUID id);
LLUUID mID;
BOOL mAutoName;
std::string mName;
std::string mPreviousRegionName;
LLCircuitData* mCircuitData;
};
class LLFloaterMessageLogItem : public LLMessageLogEntry
{
public:
LLFloaterMessageLogItem(LLMessageLogEntry entry);
~LLFloaterMessageLogItem();
LLUUID mID;
U32 mSequenceID;
std::string mName;
std::string mSummary;
U32 mFlags;
std::string getFull(BOOL show_header = TRUE);
BOOL isOutgoing();
private:
static LLTemplateMessageReader* sTemplateMessageReader;
static std::string getString(LLTemplateMessageReader* readerp, const char* block_name, S32 block_num, const char* var_name, e_message_variable_type var_type, BOOL &returned_hex, BOOL summary_mode = FALSE);
};
class LLMessageLogFilter
{
public:
LLMessageLogFilter();
~LLMessageLogFilter();
BOOL set(std::string filter);
std::list<std::string> mPositiveNames;
std::list<std::string> mNegativeNames;
};
class LLMessageLogFilterApply : public LLEventTimer
{
public:
LLMessageLogFilterApply();
void cancel();
BOOL tick();
S32 mProgress;
BOOL mFinished;
private:
std::deque<LLMessageLogEntry>::iterator mIter;
};
class LLFloaterMessageLog : public LLFloater, public LLEventTimer
{
public:
LLFloaterMessageLog();
~LLFloaterMessageLog();
static void show();
BOOL postBuild();
BOOL tick();
LLNetListItem* findNetListItem(LLHost host);
LLNetListItem* findNetListItem(LLUUID id);
void refreshNetList();
void refreshNetInfo(BOOL force);
enum ENetInfoMode { NI_NET, NI_LOG };
void setNetInfoMode(ENetInfoMode mode);
static void onLog(LLMessageLogEntry entry);
static void conditionalLog(LLFloaterMessageLogItem item);
static void onCommitNetList(LLUICtrl* ctrl, void* user_data);
static void onCommitMessageLog(LLUICtrl* ctrl, void* user_data);
static void onCommitFilter(LLUICtrl* ctrl, void* user_data);
static BOOL onClickCloseCircuit(void* user_data);
static void onConfirmCloseCircuit(S32 option, LLSD payload);
static void onConfirmRemoveRegion(S32 option, LLSD payload);
static void onClickFilterApply(void* user_data);
void startApplyingFilter(std::string filter, BOOL force);
void stopApplyingFilter();
void updateFilterStatus();
static BOOL sBusyApplyingFilter;
LLMessageLogFilterApply* mMessageLogFilterApply;
static void onClickClearLog(void* user_data);
static LLFloaterMessageLog* sInstance;
static std::list<LLNetListItem*> sNetListItems;
static std::deque<LLMessageLogEntry> sMessageLogEntries;
static std::vector<LLFloaterMessageLogItem> sFloaterMessageLogItems;
static LLMessageLogFilter sMessageLogFilter;
static std::string sMessageLogFilterString;
ENetInfoMode mNetInfoMode;
static void onClickFilterChoice(void* user_data);
static void onClickFilterMenu(void* user_data);
static void onClickSendToMessageBuilder(void* user_data);
};
// </edit>
// <edit>
#include "llfloater.h"
#include "llmessagelog.h"
#include "lltemplatemessagereader.h"
class LLNetListItem
{
public:
LLNetListItem(LLUUID id);
LLUUID mID;
BOOL mAutoName;
std::string mName;
std::string mPreviousRegionName;
LLCircuitData* mCircuitData;
};
class LLFloaterMessageLogItem : public LLMessageLogEntry
{
public:
LLFloaterMessageLogItem(LLMessageLogEntry entry);
~LLFloaterMessageLogItem();
LLUUID mID;
U32 mSequenceID;
std::string mName;
std::string mSummary;
U32 mFlags;
std::string getFull(BOOL show_header = TRUE);
BOOL isOutgoing();
private:
static LLTemplateMessageReader* sTemplateMessageReader;
static std::string getString(LLTemplateMessageReader* readerp, const char* block_name, S32 block_num, const char* var_name, e_message_variable_type var_type, BOOL &returned_hex, BOOL summary_mode = FALSE);
};
class LLMessageLogFilter
{
public:
LLMessageLogFilter();
~LLMessageLogFilter();
BOOL set(std::string filter);
std::list<std::string> mPositiveNames;
std::list<std::string> mNegativeNames;
};
class LLMessageLogFilterApply : public LLEventTimer
{
public:
LLMessageLogFilterApply();
void cancel();
BOOL tick();
S32 mProgress;
BOOL mFinished;
private:
std::deque<LLMessageLogEntry> *mFilterTempMessages;
std::deque<LLMessageLogEntry>::iterator mIter;
};
class LLFloaterMessageLog : public LLFloater, public LLEventTimer
{
public:
LLFloaterMessageLog();
~LLFloaterMessageLog();
static void show();
BOOL postBuild();
BOOL tick();
LLNetListItem* findNetListItem(LLHost host);
LLNetListItem* findNetListItem(LLUUID id);
void refreshNetList();
void refreshNetInfo(BOOL force);
enum ENetInfoMode { NI_NET, NI_LOG };
void setNetInfoMode(ENetInfoMode mode);
static void onLog(LLMessageLogEntry entry);
static void conditionalLog(LLFloaterMessageLogItem item);
static void onCommitNetList(LLUICtrl* ctrl, void* user_data);
static void onCommitMessageLog(LLUICtrl* ctrl, void* user_data);
static void onCommitFilter(LLUICtrl* ctrl, void* user_data);
static BOOL onClickCloseCircuit(void* user_data);
static void onConfirmCloseCircuit(S32 option, LLSD payload);
static void onConfirmRemoveRegion(S32 option, LLSD payload);
static void onClickFilterApply(void* user_data);
void startApplyingFilter(std::string filter, BOOL force);
void stopApplyingFilter();
void updateFilterStatus();
static BOOL sBusyApplyingFilter;
LLMessageLogFilterApply* mMessageLogFilterApply;
static void onClickClearLog(void* user_data);
static LLFloaterMessageLog* sInstance;
static std::list<LLNetListItem*> sNetListItems;
static std::deque<LLMessageLogEntry> sMessageLogEntries;
static std::vector<LLFloaterMessageLogItem> sFloaterMessageLogItems;
static LLMessageLogFilter sMessageLogFilter;
static std::string sMessageLogFilterString;
ENetInfoMode mNetInfoMode;
static void onClickFilterChoice(void* user_data);
static void onClickFilterMenu(void* user_data);
static void onClickSendToMessageBuilder(void* user_data);
};
// </edit>

View File

@@ -1,122 +1,122 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="false"
width="410" height="650"
name="AO Editor" title="AO Editor" rect_control="FloaterAORect">
<button bottom="-50" halign="center" height="24" label="Load..." left="220" name="btn_load" width="80" />
<button bottom="-50" halign="center" height="24" label="Save..." left_delta="90" name="btn_save" width="80" />
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="false"
width="410" height="650"
name="AO Editor" title="AO Editor" rect_control="FloaterAORect">
<button bottom="-50" halign="center" height="24" label="Load..." left="220" name="btn_load" width="80" />
<button bottom="-50" halign="center" height="24" label="Save..." left_delta="90" name="btn_save" width="80" />
<text follows="top|left" height="15" left="10" name="text_walking" bottom="-80">
Walking:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_walking"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_walking"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_running" bottom_delta="-25">
Running:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_running"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_running"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_crouchwalk" bottom_delta="-25">
Crouchwalk:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouchwalk"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouchwalk"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_flying" bottom_delta="-25">
Flying:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_turn_left" bottom_delta="-25">
Turn Left:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_left"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_left"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_turn_right" bottom_delta="-25">
Turn Right:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_right"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_right"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_jumping" bottom_delta="-25">
Jumping:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_jumping"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_jumping"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_fly_up" bottom_delta="-25">
Fly Up:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_up"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_up"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_crouching" bottom_delta="-25">
Crouching:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouching"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouching"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_fly_down" bottom_delta="-25">
Fly Down:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_down"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_down"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_stand1" bottom_delta="-25">
Stand1:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand1"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand1"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_stand2" bottom_delta="-25">
Stand2:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand2"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand2"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_stand3" bottom_delta="-25">
Stand3:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand3"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand3"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_hover" bottom_delta="-25">
Hover:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hover"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hover"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_sitting" bottom_delta="-25">
Sitting:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_sitting"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_sitting"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_prejump" bottom_delta="-25">
PreJump:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_prejump"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_prejump"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_falling" bottom_delta="-25">
Falling:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_falling"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_falling"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_stride" bottom_delta="-25">
Stride:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stride"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stride"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_soft_landing" bottom_delta="-25">
Soft Landing:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_soft_landing"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_soft_landing"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_medium_landing" bottom_delta="-25">
Medium Landing:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_medium_landing"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_medium_landing"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_hard_landing" bottom_delta="-25">
Hard Landing:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hard_landing"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hard_landing"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_flying_slow" bottom_delta="-25">
Flying Slow:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying_slow"
width="300" left="100" bottom_delta="0" />
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying_slow"
width="300" left="100" bottom_delta="0" />
<text follows="top|left" height="15" left="10" name="text_sitting_on_ground" bottom_delta="-25">
Sitting on Ground:
</text>
<line_editor follows="top|left|right" height="19" max_length="36" name="line_sitting_on_ground"
width="300" left="100" bottom_delta="0" />
</floater>
</floater>