Gave some much-needed love to the message logger and builder, fixed invisible icon in both and added the circuit chooser for the message builder
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,32 +1,55 @@
|
||||
// <edit>]
|
||||
#ifndef LL_LLFLOATERMESSAGEBUILDER_H
|
||||
#define LL_LLFLOATERMESSAGEBUILDER_H
|
||||
#include "llfloater.h"
|
||||
class LLFloaterMessageBuilder : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterMessageBuilder(std::string initial_text);
|
||||
~LLFloaterMessageBuilder();
|
||||
static void show(std::string initial_text);
|
||||
BOOL postBuild();
|
||||
static BOOL addField(e_message_variable_type var_type, const char* var_name, std::string input, BOOL hex);
|
||||
static void onClickSend(void* user_data);
|
||||
static void onCommitPacketCombo(LLUICtrl* ctrl, void* user_data);
|
||||
static LLFloaterMessageBuilder* sInstance;
|
||||
BOOL handleKeyHere(KEY key, MASK mask);
|
||||
std::string mInitialText;
|
||||
struct parts_var
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
BOOL hex;
|
||||
e_message_variable_type var_type;
|
||||
};
|
||||
struct parts_block
|
||||
{
|
||||
std::string name;
|
||||
std::vector<parts_var> vars;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
// </edit>
|
||||
// <edit>]
|
||||
#ifndef LL_LLFLOATERMESSAGEBUILDER_H
|
||||
#define LL_LLFLOATERMESSAGEBUILDER_H
|
||||
#include "llfloater.h"
|
||||
#include "lltemplatemessagereader.h"
|
||||
#include "llmessagelog.h"
|
||||
|
||||
class LLNetListItem
|
||||
{
|
||||
public:
|
||||
LLNetListItem(LLUUID id);
|
||||
LLUUID mID;
|
||||
BOOL mAutoName;
|
||||
std::string mName;
|
||||
std::string mPreviousRegionName;
|
||||
LLCircuitData* mCircuitData;
|
||||
};
|
||||
|
||||
class LLFloaterMessageBuilder : public LLFloater, public LLEventTimer
|
||||
{
|
||||
public:
|
||||
LLFloaterMessageBuilder(std::string initial_text);
|
||||
~LLFloaterMessageBuilder();
|
||||
static void show(std::string initial_text);
|
||||
static std::list<LLNetListItem*> sNetListItems;
|
||||
BOOL postBuild();
|
||||
BOOL tick();
|
||||
static BOOL addField(e_message_variable_type var_type, const char* var_name, std::string input, BOOL hex);
|
||||
static void onClickSend(void* user_data);
|
||||
static void onCommitPacketCombo(LLUICtrl* ctrl, void* user_data);
|
||||
static LLFloaterMessageBuilder* sInstance;
|
||||
BOOL handleKeyHere(KEY key, MASK mask);
|
||||
std::string mInitialText;
|
||||
struct parts_var
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
BOOL hex;
|
||||
e_message_variable_type var_type;
|
||||
};
|
||||
struct parts_block
|
||||
{
|
||||
std::string name;
|
||||
std::vector<parts_var> vars;
|
||||
};
|
||||
static LLNetListItem* findNetListItem(LLHost host);
|
||||
static LLNetListItem* findNetListItem(LLUUID id);
|
||||
void refreshNetList();
|
||||
enum ENetInfoMode { NI_NET, NI_LOG };
|
||||
ENetInfoMode mNetInfoMode;
|
||||
static void onCommitMessageLog(LLUICtrl* ctrl, void* user_data);
|
||||
static void onCommitFilter(LLUICtrl* ctrl, void* user_data);
|
||||
};
|
||||
#endif
|
||||
// </edit>
|
||||
|
||||
@@ -13,17 +13,6 @@
|
||||
#include "llfloatermessagebuilder.h"
|
||||
#include "llagent.h"
|
||||
////////////////////////////////
|
||||
// LLNetListItem
|
||||
////////////////////////////////
|
||||
LLNetListItem::LLNetListItem(LLUUID id)
|
||||
: mID(id),
|
||||
mAutoName(TRUE),
|
||||
mName("No name"),
|
||||
mPreviousRegionName(""),
|
||||
mCircuitData(NULL)
|
||||
{
|
||||
}
|
||||
////////////////////////////////
|
||||
// LLFloaterMessageLogItem
|
||||
////////////////////////////////
|
||||
#define MAX_PACKET_LEN (0x2000)
|
||||
@@ -619,7 +608,7 @@ void LLFloaterMessageLog::refreshNetList()
|
||||
LLSD& text_column = element["columns"][0];
|
||||
text_column["column"] = "text";
|
||||
text_column["value"] = itemp->mName + (itemp->mCircuitData->getHost() == gAgent.getRegionHost() ? " (main)" : "");
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
LLSD& icon_column = element["columns"][i + 1];
|
||||
icon_column["column"] = llformat("icon%d", i);
|
||||
@@ -630,18 +619,18 @@ void LLFloaterMessageLog::refreshNetList()
|
||||
BOOL has_live_circuit = itemp->mCircuitData && itemp->mCircuitData->isAlive();
|
||||
if(has_live_circuit)
|
||||
{
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(2);
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(1);
|
||||
icon->setValue("icon_net_close_circuit.tga");
|
||||
icon->setClickCallback(onClickCloseCircuit, itemp);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(2);
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(1);
|
||||
icon->setValue("icon_net_close_circuit_gray.tga");
|
||||
icon->setClickCallback(NULL, NULL);
|
||||
}
|
||||
// Event queue isn't even supported yet... FIXME
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(3);
|
||||
LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(2);
|
||||
icon->setValue("icon_net_close_eventpoll_gray.tga");
|
||||
icon->setClickCallback(NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -2,16 +2,8 @@
|
||||
#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;
|
||||
};
|
||||
#include "llfloatermessagebuilder.h"
|
||||
|
||||
class LLFloaterMessageLogItem : public LLMessageLogEntry
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<scroll_list column_padding="0" draw_heading="false" follows="left|top|right" left="10" top="-25"
|
||||
name="net_list" search_column="0" right="-10" bottom="450">
|
||||
<column dynamicwidth="true" name="text" label="text" />
|
||||
<column name="icon0" label="icon0" width="24" />
|
||||
<column name="icon1" label="icon1" width="24" />
|
||||
<column name="icon2" label="icon2" width="24" />
|
||||
<column name="state" label="state" width="24" />
|
||||
</scroll_list>
|
||||
<combo_box name="untrusted_message_combo" allow_text_entry="false" follows="left|top" left="10" top="-150" right="-370" bottom="433" tool_tip="No trust">
|
||||
</combo_box>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<column dynamicwidth="true" name="text" label="text" />
|
||||
<column name="icon0" label="icon0" width="24" />
|
||||
<column name="icon1" label="icon1" width="24" />
|
||||
<column name="icon2" label="icon2" width="24" />
|
||||
</scroll_list>
|
||||
<button name="filter_choice_btn" follows="left|top" left="10" top="-150" right="-370" bottom="430" label="…"/>
|
||||
<line_editor name="filter_edit" follows="left|top|right" left="30" top="-149" right="-28" bottom="430" max_length="65535"/>
|
||||
|
||||
Reference in New Issue
Block a user