MAINT-1173 : Top Scripts: Break down usage by parcel. Follow-on code to add
per-parcel filtering. Reviewed by Kellymaster
parent
13295abfe7
commit
1ca7d3a57e
|
|
@ -62,6 +62,7 @@ enum LAND_STAT_FLAGS
|
|||
STAT_FILTER_BY_PARCEL = 0x00000001,
|
||||
STAT_FILTER_BY_OWNER = 0x00000002,
|
||||
STAT_FILTER_BY_OBJECT = 0x00000004,
|
||||
STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
|
||||
STAT_REQUEST_LAST_ENTRY = 0x80000000,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByParcelName", boost::bind(&LLFloaterTopObjects::onGetByParcelName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this));
|
||||
}
|
||||
|
||||
|
|
@ -99,21 +100,6 @@ BOOL LLFloaterTopObjects::postBuild()
|
|||
|
||||
setDefaultBtn("show_beacon_btn");
|
||||
|
||||
/*
|
||||
LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor");
|
||||
if (line_editor)
|
||||
{
|
||||
line_editor->setCommitOnFocusLost(FALSE);
|
||||
line_editor->setCommitCallback(onGetByOwnerName, this);
|
||||
}
|
||||
|
||||
line_editor = getChild<LLLineEditor>("object_name_editor");
|
||||
if (line_editor)
|
||||
{
|
||||
line_editor->setCommitOnFocusLost(FALSE);
|
||||
line_editor->setCommitCallback(onGetByObjectName, this);
|
||||
}*/
|
||||
|
||||
mCurrentMode = STAT_REPORT_TOP_SCRIPTS;
|
||||
mFlags = 0;
|
||||
mFilter.clear();
|
||||
|
|
@ -277,7 +263,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
|||
|
||||
LLUIString format = getString("top_scripts_text");
|
||||
format.setArg("[COUNT]", llformat("%d", total_count));
|
||||
format.setArg("[TIME]", llformat("%0.1f", mtotalScore));
|
||||
format.setArg("[TIME]", llformat("%0.3f", mtotalScore));
|
||||
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
|
||||
}
|
||||
else
|
||||
|
|
@ -315,6 +301,7 @@ void LLFloaterTopObjects::updateSelectionInfo()
|
|||
{
|
||||
getChild<LLUICtrl>("object_name_editor")->setValue(sli->getColumn(1)->getValue().asString());
|
||||
getChild<LLUICtrl>("owner_name_editor")->setValue(sli->getColumn(2)->getValue().asString());
|
||||
getChild<LLUICtrl>("parcel_name_editor")->setValue(sli->getColumn(4)->getValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -494,6 +481,15 @@ void LLFloaterTopObjects::onGetByOwnerName()
|
|||
onRefresh();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTopObjects::onGetByParcelName()
|
||||
{
|
||||
mFlags = STAT_FILTER_BY_PARCEL_NAME;
|
||||
mFilter = getChild<LLUICtrl>("parcel_name_editor")->getValue().asString();
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTopObjects::showBeacon()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
|
|
|
|||
|
|
@ -73,9 +73,7 @@ private:
|
|||
|
||||
void onGetByOwnerName();
|
||||
void onGetByObjectName();
|
||||
|
||||
// static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); };
|
||||
// static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
|
||||
void onGetByParcelName();
|
||||
|
||||
void showBeacon();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<floater
|
||||
legacy_header_height="18"
|
||||
can_resize="true"
|
||||
height="350"
|
||||
height="372"
|
||||
layout="topleft"
|
||||
min_height="300"
|
||||
min_width="450"
|
||||
|
|
@ -193,6 +193,38 @@
|
|||
<button.commit_callback
|
||||
function="TopObjects.GetByOwnerName" />
|
||||
</button>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="5"
|
||||
name="parcel_name_text"
|
||||
width="107">
|
||||
Parcel:
|
||||
</text>
|
||||
<line_editor
|
||||
follows="left|bottom|right"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left_pad="3"
|
||||
name="parcel_name_editor"
|
||||
top_delta="-3"
|
||||
width="568" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
label="Filter"
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
name="filter_parcel_btn"
|
||||
top_delta="0"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="TopObjects.GetByParcelName" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="22"
|
||||
|
|
|
|||
Loading…
Reference in New Issue