Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Archive
Alchemy Viewer
Commits
00fc2d5a
Commit
00fc2d5a
authored
13 years ago
by
Leslie Linden
Browse files
Options
Downloads
Patches
Plain Diff
* Added member variables to avoid several per-frame getChild calls.
parent
bb79bbf3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llpanelmarketplaceinbox.cpp
+12
-7
12 additions, 7 deletions
indra/newview/llpanelmarketplaceinbox.cpp
indra/newview/llpanelmarketplaceinbox.h
+5
-2
5 additions, 2 deletions
indra/newview/llpanelmarketplaceinbox.h
with
17 additions
and
9 deletions
indra/newview/llpanelmarketplaceinbox.cpp
+
12
−
7
View file @
00fc2d5a
...
...
@@ -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
;
}
...
...
@@ -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
();
f
resh
_new_count_view
->
setVisible
((
fresh_item_count
>
0
));
mF
resh
CountCtrl
->
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
f
resh
_new_count_view
->
setVisible
(
FALSE
);
mF
resh
CountCtrl
->
setVisible
(
FALSE
);
#endif
}
else
{
getChild
<
LLButton
>
(
"inbox_btn"
)
->
setLabel
(
getString
(
"InboxLabelNoArg"
));
mInboxButton
->
setLabel
(
getString
(
"InboxLabelNoArg"
));
f
resh
_new_count_view
->
setVisible
(
FALSE
);
mF
resh
CountCtrl
->
setVisible
(
FALSE
);
}
LLPanel
::
draw
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llpanelmarketplaceinbox.h
+
5
−
2
View file @
00fc2d5a
...
...
@@ -29,7 +29,9 @@
#include
"llpanel.h"
class
LLButton
;
class
LLInventoryPanel
;
class
LLUICtrl
;
class
LLPanelMarketplaceInbox
:
public
LLPanel
{
...
...
@@ -66,9 +68,10 @@ private:
void
onFocusReceived
();
private
:
LLInventoryPanel
*
mInventoryPanel
;
LLUICtrl
*
mFreshCountCtrl
;
LLButton
*
mInboxButton
;
LLInventoryPanel
*
mInventoryPanel
;
};
#endif //LL_LLPANELMARKETPLACEINBOX_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment