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
4a2a9ba8
Commit
4a2a9ba8
authored
14 years ago
by
callum
Browse files
Options
Downloads
Patches
Plain Diff
SOCIAL-392 FIX Web Content Panel does not save location history between sessions
parent
179b434d
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/llfloaterwebcontent.cpp
+42
-11
42 additions, 11 deletions
indra/newview/llfloaterwebcontent.cpp
indra/newview/llfloaterwebcontent.h
+2
-0
2 additions, 0 deletions
indra/newview/llfloaterwebcontent.h
with
44 additions
and
11 deletions
indra/newview/llfloaterwebcontent.cpp
+
42
−
11
View file @
4a2a9ba8
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include
"llpluginclassmedia.h"
#include
"llpluginclassmedia.h"
#include
"llprogressbar.h"
#include
"llprogressbar.h"
#include
"lltextbox.h"
#include
"lltextbox.h"
#include
"llurlhistory.h"
#include
"llviewercontrol.h"
#include
"llviewercontrol.h"
#include
"llweb.h"
#include
"llweb.h"
#include
"llwindow.h"
#include
"llwindow.h"
...
@@ -68,9 +69,35 @@ BOOL LLFloaterWebContent::postBuild()
...
@@ -68,9 +69,35 @@ BOOL LLFloaterWebContent::postBuild()
// cache image for secure browsing
// cache image for secure browsing
mSecureLockIcon
=
getChild
<
LLIconCtrl
>
(
"media_secure_lock_flag"
);
mSecureLockIcon
=
getChild
<
LLIconCtrl
>
(
"media_secure_lock_flag"
);
// initialize the URL history using the system URL History manager
initializeURLHistory
();
return
TRUE
;
return
TRUE
;
}
}
void
LLFloaterWebContent
::
initializeURLHistory
()
{
// start with an empty list
LLCtrlListInterface
*
url_list
=
childGetListInterface
(
"address"
);
if
(
url_list
)
{
url_list
->
operateOnAll
(
LLCtrlListInterface
::
OP_DELETE
);
}
// Get all of the entries in the "browser" collection
LLSD
browser_history
=
LLURLHistory
::
getURLHistory
(
"browser"
);
LLSD
::
array_iterator
iter_history
=
browser_history
.
beginArray
();
LLSD
::
array_iterator
end_history
=
browser_history
.
endArray
();
for
(;
iter_history
!=
end_history
;
++
iter_history
)
{
std
::
string
url
=
(
*
iter_history
).
asString
();
if
(
!
url
.
empty
())
url_list
->
addSimpleElement
(
url
);
}
}
//static
//static
void
LLFloaterWebContent
::
create
(
const
std
::
string
&
url
,
const
std
::
string
&
target
,
const
std
::
string
&
uuid
)
void
LLFloaterWebContent
::
create
(
const
std
::
string
&
url
,
const
std
::
string
&
target
,
const
std
::
string
&
uuid
)
{
{
...
@@ -255,17 +282,17 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
...
@@ -255,17 +282,17 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
mStatusBarText
->
setText
(
end_str
);
mStatusBarText
->
setText
(
end_str
);
// decide if secure browsing icon should be displayed
// decide if secure browsing icon should be displayed
std
::
string
prefix
=
std
::
string
(
"https://"
);
std
::
string
prefix
=
std
::
string
(
"https://"
);
std
::
string
test_prefix
=
mCurrentURL
.
substr
(
0
,
prefix
.
length
());
std
::
string
test_prefix
=
mCurrentURL
.
substr
(
0
,
prefix
.
length
());
LLStringUtil
::
toLower
(
test_prefix
);
LLStringUtil
::
toLower
(
test_prefix
);
if
(
test_prefix
==
prefix
)
if
(
test_prefix
==
prefix
)
{
{
mSecureLockIcon
->
setVisible
(
true
);
mSecureLockIcon
->
setVisible
(
true
);
}
}
else
else
{
{
mSecureLockIcon
->
setVisible
(
false
);
mSecureLockIcon
->
setVisible
(
false
);
}
}
}
}
else
if
(
event
==
MEDIA_EVENT_CLOSE_REQUEST
)
else
if
(
event
==
MEDIA_EVENT_CLOSE_REQUEST
)
{
{
...
@@ -307,6 +334,10 @@ void LLFloaterWebContent::set_current_url(const std::string& url)
...
@@ -307,6 +334,10 @@ void LLFloaterWebContent::set_current_url(const std::string& url)
{
{
mCurrentURL
=
url
;
mCurrentURL
=
url
;
// serialize url history into the system URL History manager
LLURLHistory
::
removeURL
(
"browser"
,
mCurrentURL
);
LLURLHistory
::
addURL
(
"browser"
,
mCurrentURL
);
mAddressCombo
->
remove
(
mCurrentURL
);
mAddressCombo
->
remove
(
mCurrentURL
);
mAddressCombo
->
add
(
mCurrentURL
);
mAddressCombo
->
add
(
mCurrentURL
);
mAddressCombo
->
selectByValue
(
mCurrentURL
);
mAddressCombo
->
selectByValue
(
mCurrentURL
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfloaterwebcontent.h
+
2
−
0
View file @
4a2a9ba8
...
@@ -44,6 +44,8 @@ class LLFloaterWebContent :
...
@@ -44,6 +44,8 @@ class LLFloaterWebContent :
LOG_CLASS
(
LLFloaterWebContent
);
LOG_CLASS
(
LLFloaterWebContent
);
LLFloaterWebContent
(
const
LLSD
&
key
);
LLFloaterWebContent
(
const
LLSD
&
key
);
void
initializeURLHistory
();
static
void
create
(
const
std
::
string
&
url
,
const
std
::
string
&
target
,
const
std
::
string
&
uuid
=
LLStringUtil
::
null
);
static
void
create
(
const
std
::
string
&
url
,
const
std
::
string
&
target
,
const
std
::
string
&
uuid
=
LLStringUtil
::
null
);
static
void
closeRequest
(
const
std
::
string
&
uuid
);
static
void
closeRequest
(
const
std
::
string
&
uuid
);
...
...
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