diff options
author | Leslie Linden <leslie@lindenlab.com> | 2012-01-30 15:54:39 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2012-01-30 15:54:39 -0800 |
commit | fd56967dea7e4c53080a1ef89cc550492baf3fc8 (patch) | |
tree | 2a7a7993a550afbd7e92975cc53d633e41404583 /indra/newview/llpanelmarketplaceinbox.cpp | |
parent | c4084c71386e34f6c28d4c10199eaf1155a2855b (diff) | |
parent | 56973912198ba3410d1ab32d1a8a63a1c8c3348e (diff) |
Merge with latest
Diffstat (limited to 'indra/newview/llpanelmarketplaceinbox.cpp')
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 7cb4bbf891..66c9c323cb 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -48,6 +48,8 @@ const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams // protected LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p) : LLPanel(p) + , mFreshCountCtrl(NULL) + , mInboxButton(NULL) , mInventoryPanel(NULL) { } @@ -60,6 +62,9 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() BOOL LLPanelMarketplaceInbox::postBuild() { LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this)); + + mFreshCountCtrl = getChild<LLUICtrl>("inbox_fresh_new_count"); + mInboxButton = getChild<LLButton>("inbox_btn"); return TRUE; } @@ -109,7 +114,7 @@ void LLPanelMarketplaceInbox::onFocusReceived() LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); if (sidepanel_inventory) { - sidepanel_inventory->clearSelections(true, false, true); + sidepanel_inventory->clearSelections(true, false); } gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); @@ -216,7 +221,7 @@ void LLPanelMarketplaceInbox::draw() { U32 item_count = getTotalItemCount(); - LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count"); + llassert(mFreshCountCtrl != NULL); if (item_count > 0) { @@ -224,26 +229,26 @@ void LLPanelMarketplaceInbox::draw() LLStringUtil::format_map_t args; args["[NUM]"] = item_count_str; - getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args)); + mInboxButton->setLabel(getString("InboxLabelWithArg", args)); #if SUPPORTING_FRESH_ITEM_COUNT // set green text to fresh item count U32 fresh_item_count = getFreshItemCount(); - fresh_new_count_view->setVisible((fresh_item_count > 0)); + mFreshCountCtrl->setVisible((fresh_item_count > 0)); if (fresh_item_count > 0) { - getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count)); + mFreshCountCtrl->setTextArg("[NUM]", llformat("%d", fresh_item_count)); } #else - fresh_new_count_view->setVisible(FALSE); + mFreshCountCtrl->setVisible(FALSE); #endif } else { - getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg")); + mInboxButton->setLabel(getString("InboxLabelNoArg")); - fresh_new_count_view->setVisible(FALSE); + mFreshCountCtrl->setVisible(FALSE); } LLPanel::draw(); |