From b0e9858b4ebd59a45a1786890a808bd7fa45a80e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 7 Apr 2012 12:48:37 +0200 Subject: [PATCH] Added script info button to top objects floater (FIRE-2206) --- indra/newview/llfloatertopobjects.cpp | 19 ++++++++++++++++++- indra/newview/llfloatertopobjects.h | 2 ++ .../default/xui/de/floater_top_objects.xml | 7 ++++--- .../default/xui/en/floater_top_objects.xml | 19 ++++++++++++++++--- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 9150429059..fca9b3e54c 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -52,6 +52,7 @@ #include "llviewerwindow.h" #include "llavataractions.h" +#include "llviewercontrol.h" //LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL; @@ -92,6 +93,8 @@ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key) mCommitCallbackRegistrar.add("TopObjects.Kick", boost::bind(&LLFloaterTopObjects::onKick, this)); // Show profile mCommitCallbackRegistrar.add("TopObjects.Profile", boost::bind(&LLFloaterTopObjects::onProfile, this)); + // Script info + mCommitCallbackRegistrar.add("TopObjects.ScriptInfo", boost::bind(&LLFloaterTopObjects::onScriptInfo, this)); } LLFloaterTopObjects::~LLFloaterTopObjects() @@ -594,4 +597,18 @@ void LLFloaterTopObjects::onAvatarCheck(const LLUUID& avatar_id, LLAvatarName av getChild("estate_kick_btn")->setEnabled(isAvatar); } } -// Enable avatar-specific buttons if current selection is an avatar \ No newline at end of file +// Enable avatar-specific buttons if current selection is an avatar + +// Script info +void LLFloaterTopObjects::onScriptInfo() +{ + LLScrollListCtrl* list = getChild("objects_list"); + if (!list) return; + + LLScrollListItem* first_selected = list->getFirstSelected(); + if (!first_selected) return; + + const LLUUID& objectId = first_selected->getUUID(); + LLAvatarActions::getScriptInfo(objectId); +} +// Script info diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index 98c0414e45..ea028935d3 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -75,6 +75,8 @@ private: void onKick(); // Show profile void onProfile(); + // Script info + void onScriptInfo(); // Enable avatar-specific buttons if current selection is an avatar void onAvatarCheck(const LLUUID& avatar_id, const LLAvatarName av_name); diff --git a/indra/newview/skins/default/xui/de/floater_top_objects.xml b/indra/newview/skins/default/xui/de/floater_top_objects.xml index 2a0ce264f0..62c3b97591 100644 --- a/indra/newview/skins/default/xui/de/floater_top_objects.xml +++ b/indra/newview/skins/default/xui/de/floater_top_objects.xml @@ -1,7 +1,7 @@ - + - Top-Skripts + TOP-SKRIPTE [COUNT] Skripts benötigen insgesamt [TIME] ms @@ -13,7 +13,7 @@ Mono-Uhrzeit: - Top-Kollisionsobjekte + TOP-KOLLISIONSOBJEKTE Top [COUNT] Objekte mit vielen potenziellen Kollisionen @@ -58,5 +58,6 @@ +