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
250a0396
Commit
250a0396
authored
6 years ago
by
maxim_productengine
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-8635 Don't allow using 'close all windows' if modal toast is open
parent
7fc86d1a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/lltoast.cpp
+15
-0
15 additions, 0 deletions
indra/newview/lltoast.cpp
indra/newview/lltoast.h
+4
-0
4 additions, 0 deletions
indra/newview/lltoast.h
indra/newview/llviewermenufile.cpp
+3
-2
3 additions, 2 deletions
indra/newview/llviewermenufile.cpp
with
22 additions
and
2 deletions
indra/newview/lltoast.cpp
+
15
−
0
View file @
250a0396
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include
"llviewercontrol.h"
#include
"llviewercontrol.h"
using
namespace
LLNotificationsUI
;
using
namespace
LLNotificationsUI
;
std
::
list
<
LLToast
*>
LLToast
::
sModalToastsList
;
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
LLToastLifeTimer
::
LLToastLifeTimer
(
LLToast
*
toast
,
F32
period
)
LLToastLifeTimer
::
LLToastLifeTimer
(
LLToast
*
toast
,
F32
period
)
...
@@ -143,6 +144,11 @@ LLToast::LLToast(const LLToast::Params& p)
...
@@ -143,6 +144,11 @@ LLToast::LLToast(const LLToast::Params& p)
{
{
mOnDeleteToastSignal
.
connect
(
p
.
on_delete_toast
());
mOnDeleteToastSignal
.
connect
(
p
.
on_delete_toast
());
}
}
if
(
isModal
())
{
sModalToastsList
.
push_front
(
this
);
}
}
}
void
LLToast
::
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
)
void
LLToast
::
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
)
...
@@ -187,6 +193,15 @@ LLToast::~LLToast()
...
@@ -187,6 +193,15 @@ LLToast::~LLToast()
{
{
mOnToastDestroyedSignal
(
this
);
mOnToastDestroyedSignal
(
this
);
}
}
if
(
isModal
())
{
std
::
list
<
LLToast
*>::
iterator
iter
=
std
::
find
(
sModalToastsList
.
begin
(),
sModalToastsList
.
end
(),
this
);
if
(
iter
!=
sModalToastsList
.
end
())
{
sModalToastsList
.
erase
(
iter
);
}
}
}
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lltoast.h
+
4
−
0
View file @
250a0396
...
@@ -108,6 +108,8 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
...
@@ -108,6 +108,8 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
static
void
updateClass
();
static
void
updateClass
();
static
void
cleanupToasts
();
static
void
cleanupToasts
();
static
BOOL
isAlertToastShown
()
{
return
sModalToastsList
.
size
()
>
0
;
}
LLToast
(
const
LLToast
::
Params
&
p
);
LLToast
(
const
LLToast
::
Params
&
p
);
virtual
~
LLToast
();
virtual
~
LLToast
();
BOOL
postBuild
();
BOOL
postBuild
();
...
@@ -245,6 +247,8 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
...
@@ -245,6 +247,8 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
commit_signal_t
mToastMouseEnterSignal
;
commit_signal_t
mToastMouseEnterSignal
;
commit_signal_t
mToastMouseLeaveSignal
;
commit_signal_t
mToastMouseLeaveSignal
;
static
std
::
list
<
LLToast
*>
sModalToastsList
;
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewermenufile.cpp
+
3
−
2
View file @
250a0396
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
#include
"llimagetga.h"
#include
"llimagetga.h"
#include
"llinventorymodel.h"
// gInventory
#include
"llinventorymodel.h"
// gInventory
#include
"llresourcedata.h"
#include
"llresourcedata.h"
#include
"lltoast.h"
#include
"llfloaterperms.h"
#include
"llfloaterperms.h"
#include
"llstatusbar.h"
#include
"llstatusbar.h"
#include
"llviewercontrol.h"
// gSavedSettings
#include
"llviewercontrol.h"
// gSavedSettings
...
@@ -482,7 +483,7 @@ class LLFileEnableCloseWindow : public view_listener_t
...
@@ -482,7 +483,7 @@ class LLFileEnableCloseWindow : public view_listener_t
bool
frontmost_fl_exists
=
(
NULL
!=
gFloaterView
->
getFrontmostClosableFloater
());
bool
frontmost_fl_exists
=
(
NULL
!=
gFloaterView
->
getFrontmostClosableFloater
());
bool
frontmost_snapshot_fl_exists
=
(
NULL
!=
gSnapshotFloaterView
->
getFrontmostClosableFloater
());
bool
frontmost_snapshot_fl_exists
=
(
NULL
!=
gSnapshotFloaterView
->
getFrontmostClosableFloater
());
return
frontmost_fl_exists
||
frontmost_snapshot_fl_exists
;
return
!
LLNotificationsUI
::
LLToast
::
isAlertToastShown
()
&&
(
frontmost_fl_exists
||
frontmost_snapshot_fl_exists
)
;
}
}
};
};
...
@@ -519,7 +520,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t
...
@@ -519,7 +520,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t
bool
is_floaters_snapshot_opened
=
(
floater_snapshot
&&
floater_snapshot
->
isInVisibleChain
())
bool
is_floaters_snapshot_opened
=
(
floater_snapshot
&&
floater_snapshot
->
isInVisibleChain
())
||
(
floater_outfit_snapshot
&&
floater_outfit_snapshot
->
isInVisibleChain
());
||
(
floater_outfit_snapshot
&&
floater_outfit_snapshot
->
isInVisibleChain
());
bool
open_children
=
gFloaterView
->
allChildrenClosed
()
&&
!
is_floaters_snapshot_opened
;
bool
open_children
=
gFloaterView
->
allChildrenClosed
()
&&
!
is_floaters_snapshot_opened
;
return
!
open_children
;
return
!
open_children
&&
!
LLNotificationsUI
::
LLToast
::
isAlertToastShown
()
;
}
}
};
};
...
...
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