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
cf98cdf6
Commit
cf98cdf6
authored
13 years ago
by
Richard Nelson
Browse files
Options
Downloads
Patches
Plain Diff
fix for crash on exit
parent
4413ea12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llchannelmanager.cpp
+16
-7
16 additions, 7 deletions
indra/newview/llchannelmanager.cpp
indra/newview/llchannelmanager.h
+3
-3
3 additions, 3 deletions
indra/newview/llchannelmanager.h
indra/newview/llscreenchannel.h
+2
-0
2 additions, 0 deletions
indra/newview/llscreenchannel.h
with
21 additions
and
10 deletions
indra/newview/llchannelmanager.cpp
+
16
−
7
View file @
cf98cdf6
...
...
@@ -58,7 +58,10 @@ LLChannelManager::~LLChannelManager()
{
for
(
std
::
vector
<
ChannelElem
>::
iterator
it
=
mChannelList
.
begin
();
it
!=
mChannelList
.
end
();
++
it
)
{
delete
(
*
it
).
channel
;
LLScreenChannelBase
*
channel
=
it
->
channel
.
get
();
if
(
!
channel
)
continue
;
delete
channel
;
}
mChannelList
.
clear
();
...
...
@@ -84,16 +87,19 @@ void LLChannelManager::onLoginCompleted()
// calc a number of all offline notifications
for
(
std
::
vector
<
ChannelElem
>::
iterator
it
=
mChannelList
.
begin
();
it
!=
mChannelList
.
end
();
++
it
)
{
LLScreenChannelBase
*
channel
=
it
->
channel
.
get
();
if
(
!
channel
)
continue
;
// don't calc notifications for Nearby Chat
if
(
(
*
it
).
channel
->
getChannelID
()
==
LLUUID
(
gSavedSettings
.
getString
(
"NearByChatChannelUUID"
)))
if
(
channel
->
getChannelID
()
==
LLUUID
(
gSavedSettings
.
getString
(
"NearByChatChannelUUID"
)))
{
continue
;
}
// don't calc notifications for channels that always show their notifications
if
(
!
(
*
it
).
channel
->
getDisplayToastsAlways
())
if
(
!
channel
->
getDisplayToastsAlways
())
{
away_notifications
+=
(
*
it
).
channel
->
getNumberOfHiddenToasts
();
away_notifications
+=
channel
->
getNumberOfHiddenToasts
();
}
}
...
...
@@ -157,7 +163,7 @@ LLScreenChannelBase* LLChannelManager::addChannel(LLScreenChannelBase* channel)
ChannelElem
new_elem
;
new_elem
.
id
=
channel
->
getChannelID
();
new_elem
.
channel
=
channel
;
new_elem
.
channel
=
channel
->
getHandle
()
;
mChannelList
.
push_back
(
new_elem
);
...
...
@@ -189,7 +195,7 @@ LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID& id)
std
::
vector
<
ChannelElem
>::
iterator
it
=
find
(
mChannelList
.
begin
(),
mChannelList
.
end
(),
id
);
if
(
it
!=
mChannelList
.
end
())
{
return
(
*
it
).
channel
;
return
(
*
it
).
channel
.
get
()
;
}
return
NULL
;
...
...
@@ -211,7 +217,10 @@ void LLChannelManager::muteAllChannels(bool mute)
for
(
std
::
vector
<
ChannelElem
>::
iterator
it
=
mChannelList
.
begin
();
it
!=
mChannelList
.
end
();
it
++
)
{
it
->
channel
->
setShowToasts
(
!
mute
);
if
(
it
->
channel
.
get
())
{
it
->
channel
.
get
()
->
setShowToasts
(
!
mute
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llchannelmanager.h
+
3
−
3
View file @
cf98cdf6
...
...
@@ -48,10 +48,10 @@ class LLChannelManager : public LLSingleton<LLChannelManager>
struct
ChannelElem
{
LLUUID
id
;
LLScreenChannelBase
*
channel
;
LLUUID
id
;
LLHandle
<
LLScreenChannelBase
>
channel
;
ChannelElem
()
:
id
(
LLUUID
(
""
)),
channel
(
NULL
)
{
}
ChannelElem
()
{
}
ChannelElem
(
const
ChannelElem
&
elem
)
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llscreenchannel.h
+
2
−
0
View file @
cf98cdf6
...
...
@@ -113,6 +113,7 @@ class LLScreenChannelBase : public LLUICtrl
// get ID of a channel
LLUUID
getChannelID
()
{
return
mID
;
}
LLHandle
<
LLScreenChannelBase
>
getHandle
()
{
mRootHandle
.
bind
(
this
);
return
mRootHandle
;
}
protected
:
void
updateBottom
();
...
...
@@ -124,6 +125,7 @@ class LLScreenChannelBase : public LLUICtrl
bool
mDisplayToastsAlways
;
// controls whether a channel shows toasts or not
bool
mShowToasts
;
LLRootHandle
<
LLScreenChannelBase
>
mRootHandle
;
//
EToastAlignment
mToastAlignment
;
EChannelAlignment
mChannelAlignment
;
...
...
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