From 0ac63ffbb1acb32278645f6a9ab97cdc271c8d30 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 3 Mar 2010 11:03:46 -0500 Subject: EXT-4013 : Functionality loss: Inspect object Detail button implemented as instructed; this brings up the old 1.23 multi-inspect floater. --- indra/newview/llsidepaneltaskinfo.cpp | 16 ++++++++++++++++ indra/newview/llsidepaneltaskinfo.h | 2 ++ .../newview/skins/default/xui/en/sidepanel_task_info.xml | 11 +++++++++++ 3 files changed, 29 insertions(+) (limited to 'indra') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 0630981d7e..6ebe55e362 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -100,6 +100,8 @@ BOOL LLSidepanelTaskInfo::postBuild() mPayBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onPayButtonClicked, this)); mBuyBtn = getChild("buy_btn"); mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this)); + mDetailsBtn = getChild("details_btn"); + mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this)); mLabelGroupName = getChild("Group Name Proxy"); @@ -1122,6 +1124,15 @@ void LLSidepanelTaskInfo::updateVerbs() //mEditBtn->setEnabled(obj && obj->permModify()); */ + LLSafeHandle object_selection = LLSelectMgr::getInstance()->getSelection(); + const BOOL multi_select = (object_selection->getNumNodes() > 1); + + mOpenBtn->setVisible(!multi_select); + mPayBtn->setVisible(!multi_select); + mBuyBtn->setVisible(!multi_select); + mDetailsBtn->setVisible(multi_select); + mDetailsBtn->setEnabled(multi_select); + mOpenBtn->setEnabled(enable_object_open()); mPayBtn->setEnabled(enable_pay_object()); mBuyBtn->setEnabled(enable_buy_object()); @@ -1145,6 +1156,11 @@ void LLSidepanelTaskInfo::onBuyButtonClicked() doClickAction(CLICK_ACTION_BUY); } +void LLSidepanelTaskInfo::onDetailsButtonClicked() +{ + LLFloaterReg::showInstance("inspect", LLSD()); +} + // virtual void LLSidepanelTaskInfo::save() { diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index cf36c20767..e41627435f 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -109,10 +109,12 @@ protected: void onOpenButtonClicked(); void onPayButtonClicked(); void onBuyButtonClicked(); + void onDetailsButtonClicked(); private: LLButton* mOpenBtn; LLButton* mPayBtn; LLButton* mBuyBtn; + LLButton* mDetailsBtn; protected: LLViewerObject* getObject(); diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index d2c9e56bc3..6588663bac 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -549,5 +549,16 @@ name="buy_btn" top="0" width="100" /> +