summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-10-14 13:49:48 -0700
committerRichard Nelson <richard@lindenlab.com>2011-10-14 13:49:48 -0700
commit172662ce2a456b76d5c748ea9c5f3f2b4c6f3b2b (patch)
treebb0d4aae7a574bdcce73540dd8e00df74981fb9c /indra/newview
parentc8fdc936b4144b828bb88acf3d87cfb82a6a1c26 (diff)
EXP-1272 FIX Move "How To" to a separate web floater
fixed title of how to window to always say "How To" instead of showing url
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterwebcontent.cpp17
-rw-r--r--indra/newview/llfloaterwebcontent.h18
2 files changed, 21 insertions, 14 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index c76aeb0498..f410c31f44 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -48,13 +48,15 @@ LLFloaterWebContent::_Params::_Params()
show_chrome("show_chrome", true),
allow_address_entry("allow_address_entry", true),
preferred_media_size("preferred_media_size"),
- trusted_content("trusted_content", false)
+ trusted_content("trusted_content", false),
+ show_page_title("show_page_title", true)
{}
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
- mUUID(params.id())
+ mUUID(params.id()),
+ mShowPageTitle(params.show_page_title)
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
@@ -359,10 +361,13 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
{
std::string page_title = self->getMediaName();
// simulate browser behavior - title is empty, use the current URL
- if ( page_title.length() > 0 )
- setTitle( page_title );
- else
- setTitle( mCurrentURL );
+ if (mShowPageTitle)
+ {
+ if ( page_title.length() > 0 )
+ setTitle( page_title );
+ else
+ setTitle( mCurrentURL );
+ }
}
else if(event == MEDIA_EVENT_LINK_HOVERED )
{
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 36e214b7a9..6fc66d1ad8 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -53,7 +53,8 @@ public:
id;
Optional<bool> show_chrome,
allow_address_entry,
- trusted_content;
+ trusted_content,
+ show_page_title;
Optional<LLRect> preferred_media_size;
_Params();
@@ -91,13 +92,14 @@ protected:
void open_media(const Params& );
void set_current_url(const std::string& url);
- LLMediaCtrl* mWebBrowser;
- LLComboBox* mAddressCombo;
- LLIconCtrl *mSecureLockIcon;
- LLTextBox* mStatusBarText;
- LLProgressBar* mStatusBarProgress;
- std::string mCurrentURL;
- std::string mUUID;
+ LLMediaCtrl* mWebBrowser;
+ LLComboBox* mAddressCombo;
+ LLIconCtrl* mSecureLockIcon;
+ LLTextBox* mStatusBarText;
+ LLProgressBar* mStatusBarProgress;
+ std::string mCurrentURL;
+ std::string mUUID;
+ bool mShowPageTitle;
};
#endif // LL_LLFLOATERWEBCONTENT_H