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
c6205504
Commit
c6205504
authored
14 years ago
by
Kent Quirk
Browse files
Options
Downloads
Patches
Plain Diff
VWR-22024 -- apply Bao's patch to beta
parent
a9d023a4
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/llfirstuse.cpp
+33
-25
33 additions, 25 deletions
indra/newview/llfirstuse.cpp
indra/newview/llfirstuse.h
+5
-4
5 additions, 4 deletions
indra/newview/llfirstuse.h
with
38 additions
and
29 deletions
indra/newview/llfirstuse.cpp
+
33
−
25
View file @
c6205504
...
...
@@ -41,35 +41,36 @@
// static
std
::
set
<
std
::
string
>
LLFirstUse
::
sConfigVariables
;
//std::set<std::string> LLFirstUse::sConfigVariables;
std
::
set
<
std
::
string
>
LLFirstUse
::
sConfigVariablesEnabled
;
// static
void
LLFirstUse
::
addConfigVariable
(
const
std
::
string
&
var
)
{
sConfigVariables
.
insert
(
var
);
}
//
void LLFirstUse::addConfigVariable(const std::string& var)
//
{
//
sConfigVariables.insert(var);
//
}
// static
void
LLFirstUse
::
disableFirstUse
()
{
// Set all first-use warnings to disabled
for
(
std
::
set
<
std
::
string
>::
iterator
iter
=
sConfigVariables
.
begin
();
iter
!=
sConfigVariables
.
end
();
++
iter
)
{
gWarningSettings
.
setBOOL
(
*
iter
,
FALSE
);
}
}
//
void LLFirstUse::disableFirstUse()
//
{
//
// Set all first-use warnings to disabled
//
for (std::set<std::string>::iterator iter = sConfigVariables.begin();
//
iter != sConfigVariables.end(); ++iter)
//
{
//
gWarningSettings.setBOOL(*iter, FALSE);
//
}
//
}
// static
void
LLFirstUse
::
resetFirstUse
()
{
// Set all first-use warnings to disabled
for
(
std
::
set
<
std
::
string
>::
iterator
iter
=
sConfigVariables
.
begin
();
iter
!=
sConfigVariables
.
end
();
++
iter
)
{
gWarningSettings
.
setBOOL
(
*
iter
,
TRUE
);
}
}
//
void LLFirstUse::resetFirstUse()
//
{
//
// Set all first-use warnings to disabled
//
for (std::set<std::string>::iterator iter = sConfigVariables.begin();
//
iter != sConfigVariables.end(); ++iter)
//
{
//
gWarningSettings.setBOOL(*iter, TRUE);
//
}
//
}
// static
void
LLFirstUse
::
otherAvatarChatFirst
(
bool
enable
)
...
...
@@ -151,13 +152,21 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
if
(
enable
)
{
if
(
sConfigVariablesEnabled
.
find
(
control_var
)
!=
sConfigVariablesEnabled
.
end
())
{
return
;
//already added
}
if
(
gSavedSettings
.
getBOOL
(
"EnableUIHints"
))
{
LL_DEBUGS
(
"LLFirstUse"
)
<<
"Trigger first use notification "
<<
notification_name
<<
LL_ENDL
;
// if notification doesn't already exist and this notification hasn't been disabled...
if
(
gWarningSettings
.
getBOOL
(
control_var
))
{
// create new notification
{
sConfigVariablesEnabled
.
insert
(
control_var
)
;
// create new notification
LLNotifications
::
instance
().
add
(
LLNotification
::
Params
().
name
(
notification_name
).
substitutions
(
args
).
payload
(
payload
.
with
(
"control_var"
,
control_var
)));
}
}
...
...
@@ -169,7 +178,6 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
// redundantly clear settings var here, in case there are no notifications to cancel
gWarningSettings
.
setBOOL
(
control_var
,
FALSE
);
}
}
// static
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfirstuse.h
+
5
−
4
View file @
c6205504
...
...
@@ -78,11 +78,11 @@ class LLFirstUse
public:
// Add a config variable to be reset on resetFirstUse()
static
void
addConfigVariable
(
const
std
::
string
&
var
);
//
static void addConfigVariable(const std::string& var);
// Sets all controls back to show the dialogs.
static
void
disableFirstUse
();
static
void
resetFirstUse
();
//
static void disableFirstUse();
//
static void resetFirstUse();
static
void
otherAvatarChatFirst
(
bool
enable
=
true
);
static
void
sit
(
bool
enable
=
true
);
...
...
@@ -98,7 +98,8 @@ public:
protected:
static
void
firstUseNotification
(
const
std
::
string
&
control_var
,
bool
enable
,
const
std
::
string
&
notification_name
,
LLSD
args
=
LLSD
(),
LLSD
payload
=
LLSD
());
static
std
::
set
<
std
::
string
>
sConfigVariables
;
//static std::set<std::string> sConfigVariables;
static
std
::
set
<
std
::
string
>
sConfigVariablesEnabled
;
static
void
init
();
static
bool
processNotification
(
const
LLSD
&
notify
);
...
...
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