summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrew Polunin <apolunin@productengine.com>2010-06-15 21:52:15 +0300
committerAndrew Polunin <apolunin@productengine.com>2010-06-15 21:52:15 +0300
commite460985ddf0d427aba268c8746efd4fad2419c8d (patch)
tree05e40d010c514b658a3fb000a8fa354b081b4b24 /indra/llui
parent33c3064639d95b75e41a4d83b14620e74802d4f7 (diff)
EXT-7639 FIXED added shop button which reacts according to the ticket description
- Added method LLAccordionCtrl::getExpandedTab() which search for the first expanded accordion tab. This method is a bit of hacking, but I discussed it with Vadim Savchuk. - LLAccordionCtrlTab::isExpanded() is made 'const'. This is necessary to call it from getExpandedTab() which is also 'const'. - Added all provided Marketplace URLs (taken from EXT-7257) to the settings.xml. So URLs can be configured without recompilation. - Added method LLCOFWearables::getSelectedItems() which can be used to get ALL selected items (not only one). - Class LLShopURLDispatcher is implemented in the llpaneloutfitedit.cpp. - Added callback LLPanelOutfitEdit::onShopButtonClicked() which calls LLShopURLDispatcher to send user to the correct URL. - Added shop button (shop_btn) widget in panel_outfit_edit.xml. It has invalid icon for now. After review I'm going to reassign the ticket to someone who will provide correct icons. Reviewed by Vadim Savchuk and Mike Antipov at https://codereview.productengine.com/secondlife/r/569/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llaccordionctrl.cpp18
-rw-r--r--indra/llui/llaccordionctrl.h7
-rw-r--r--indra/llui/llaccordionctrltab.h2
3 files changed, 26 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index fc93793ed8..3a1e9f19fa 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -826,6 +826,24 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
mNoVisibleTabsHelpText->setValue(text);
}
+const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const
+{
+ typedef std::vector<LLAccordionCtrlTab*>::const_iterator tabs_const_iterator;
+
+ const LLAccordionCtrlTab* result = 0;
+
+ for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i)
+ {
+ if ((*i)->isExpanded())
+ {
+ result = *i;
+ break;
+ }
+ }
+
+ return result;
+}
+
S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */)
{
if(tab_index < 0)
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index fc6f2d896c..677b598a32 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -129,6 +129,13 @@ public:
*/
void setFilterSubString(const std::string& filter_string);
+ /**
+ * This method returns the first expanded accordion tab.
+ * It is expected to be called for accordion which doesn't allow multiple
+ * tabs to be expanded. Use with care.
+ */
+ const LLAccordionCtrlTab* getExpandedTab() const;
+
private:
void initNoTabsWidget(const LLTextBox::Params& tb_params);
void updateNoTabsHelpTextVisibility();
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 19d4ec0a1c..7bf7eeef8f 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -171,7 +171,7 @@ public:
virtual bool addChild(LLView* child, S32 tab_group);
- bool isExpanded() { return mDisplayChildren; }
+ bool isExpanded() const { return mDisplayChildren; }
S32 getHeaderHeight();