summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertopobjects.cpp
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-06-27 13:58:37 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-06-27 13:58:37 -0700
commit1ca7d3a57e7185f56ba78b3e00c4f41f1e568746 (patch)
tree28b7ebc027e75d761efaeb5794e86f8ee621338d /indra/newview/llfloatertopobjects.cpp
parent13295abfe76083be62044cb1b70a5b012870cc6c (diff)
MAINT-1173 : Top Scripts: Break down usage by parcel. Follow-on code to add
per-parcel filtering. Reviewed by Kelly
Diffstat (limited to 'indra/newview/llfloatertopobjects.cpp')
-rw-r--r--indra/newview/llfloatertopobjects.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 08997d58cb..2d91a61b54 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -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");