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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
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 Viewer
Alchemy Viewer
Commits
0c84313a
Commit
0c84313a
authored
5 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
SL-11321 Do not crash floater if capability is missing
parent
c338d337
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/llfloatermyscripts.cpp
+19
-6
19 additions, 6 deletions
indra/newview/llfloatermyscripts.cpp
indra/newview/llfloatermyscripts.h
+3
-1
3 additions, 1 deletion
indra/newview/llfloatermyscripts.h
with
22 additions
and
7 deletions
indra/newview/llfloatermyscripts.cpp
+
19
−
6
View file @
0c84313a
...
...
@@ -41,6 +41,7 @@ const S32 SIZE_OF_ONE_KB = 1024;
LLFloaterMyScripts
::
LLFloaterMyScripts
(
const
LLSD
&
seed
)
:
LLFloater
(
seed
),
mGotAttachmentMemoryUsed
(
false
),
mAttachmentDetailsRequested
(
false
),
mAttachmentMemoryMax
(
0
),
mAttachmentMemoryUsed
(
0
),
mGotAttachmentURLsUsed
(
false
),
...
...
@@ -55,12 +56,24 @@ BOOL LLFloaterMyScripts::postBuild()
std
::
string
msg_waiting
=
LLTrans
::
getString
(
"ScriptLimitsRequestWaiting"
);
getChild
<
LLUICtrl
>
(
"loading_text"
)
->
setValue
(
LLSD
(
msg_waiting
));
return
requestAttachmentDetails
();
mAttachmentDetailsRequested
=
requestAttachmentDetails
();
return
TRUE
;
}
BOOL
LLFloaterMyScripts
::
requestAttachmentDetails
()
// virtual
void
LLFloaterMyScripts
::
onOpen
(
const
LLSD
&
key
)
{
if
(
!
gAgent
.
getRegion
())
return
FALSE
;
if
(
!
mAttachmentDetailsRequested
)
{
mAttachmentDetailsRequested
=
requestAttachmentDetails
();
}
LLFloater
::
onOpen
(
key
);
}
bool
LLFloaterMyScripts
::
requestAttachmentDetails
()
{
if
(
!
gAgent
.
getRegion
())
return
false
;
LLSD
body
;
std
::
string
url
=
gAgent
.
getRegion
()
->
getCapability
(
"AttachmentResources"
);
...
...
@@ -68,11 +81,11 @@ BOOL LLFloaterMyScripts::requestAttachmentDetails()
{
LLCoros
::
instance
().
launch
(
"LLFloaterMyScripts::getAttachmentLimitsCoro"
,
boost
::
bind
(
&
LLFloaterMyScripts
::
getAttachmentLimitsCoro
,
this
,
url
));
return
TRUE
;
return
true
;
}
else
{
return
FALSE
;
return
false
;
}
}
...
...
@@ -284,7 +297,7 @@ void LLFloaterMyScripts::onClickRefresh(void* userdata)
btn
->
setEnabled
(
false
);
}
instance
->
clearList
();
instance
->
requestAttachmentDetails
();
instance
->
mAttachmentDetailsRequested
=
instance
->
requestAttachmentDetails
();
}
else
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfloatermyscripts.h
+
3
−
1
View file @
0c84313a
...
...
@@ -36,15 +36,17 @@ class LLFloaterMyScripts : public LLFloater
LLFloaterMyScripts
(
const
LLSD
&
seed
);
BOOL
postBuild
();
/*virtual*/
void
onOpen
(
const
LLSD
&
key
);
void
setAttachmentDetails
(
LLSD
content
);
void
setAttachmentSummary
(
LLSD
content
);
BOOL
requestAttachmentDetails
();
bool
requestAttachmentDetails
();
void
clearList
();
private:
void
getAttachmentLimitsCoro
(
std
::
string
url
);
bool
mGotAttachmentMemoryUsed
;
bool
mAttachmentDetailsRequested
;
S32
mAttachmentMemoryMax
;
S32
mAttachmentMemoryUsed
;
...
...
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