summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp15
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/llui/llmultifloater.cpp7
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp50
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/llchathistory.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp13
-rw-r--r--indra/newview/llvovolume.cpp7
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml75
13 files changed, 165 insertions, 44 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index cb62e46271..bf0e19473e 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -696,6 +696,20 @@ void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
sendMessage(message);
}
+void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
LLPluginClassMedia::ETargetType getTargetTypeFromLLQtWebkit(int target_type)
{
// convert a LinkTargetType value from llqtwebkit to an ETargetType
@@ -1065,6 +1079,7 @@ void LLPluginClassMedia::clear_cookies()
void LLPluginClassMedia::enable_cookies(bool enable)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "enable_cookies");
+ message.setValueBoolean("enable", enable);
sendMessage(message);
}
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 6318c67f12..79356beb68 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -179,6 +179,8 @@ public:
// These can be called before init(), and they will be queued and sent before the media init message.
void setUserDataPath(const std::string &user_data_path);
void setLanguageCode(const std::string &language_code);
+ void setPluginsEnabled(const bool enabled);
+ void setJavascriptEnabled(const bool enabled);
///////////////////////////////////
// media browser class functions
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp
index 33d47a3f0e..4af9108329 100644
--- a/indra/llui/llmultifloater.cpp
+++ b/indra/llui/llmultifloater.cpp
@@ -352,6 +352,13 @@ BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
if (floater && floater->canClose() && floater->isCloseable())
{
floater->closeFloater();
+
+ // EXT-5695 (Tabbed IM window loses focus if close any tabs by Ctrl+W)
+ // bring back focus on tab container if there are any tab left
+ if(mTabContainer->getTabCount() > 0)
+ {
+ mTabContainer->setFocus(TRUE);
+ }
}
return TRUE;
}
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 24c53638d2..0462fce236 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -89,6 +89,9 @@ private:
std::string mProfileDir;
std::string mHostLanguage;
+ bool mCookiesEnabled;
+ bool mJavascriptEnabled;
+ bool mPluginsEnabled;
enum
{
@@ -277,21 +280,18 @@ private:
{
LLQtWebKit::getInstance()->setHostLanguage(mHostLanguage);
}
+
+ // turn on/off cookies based on what host app tells us
+ LLQtWebKit::getInstance()->enableCookies( mCookiesEnabled );
+
+ // turn on/off plugins based on what host app tells us
+ LLQtWebKit::getInstance()->enablePlugins( mPluginsEnabled );
+
+ // turn on/off Javascript based on what host app tells us
+ LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
// create single browser window
mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight );
-#if LL_WINDOWS
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
-#elif LL_DARWIN
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
-#elif LL_LINUX
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
-#endif
- // Enable cookies
- LLQtWebKit::getInstance()->enableCookies( true );
// tell LLQtWebKit about the size of the browser window
LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
@@ -671,6 +671,10 @@ MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_
mBackgroundR = 0.0f;
mBackgroundG = 0.0f;
mBackgroundB = 0.0f;
+
+ mHostLanguage = "en"; // default to english
+ mJavascriptEnabled = true; // default to on
+ mPluginsEnabled = true; // default to on
}
MediaPluginWebKit::~MediaPluginWebKit()
@@ -825,6 +829,14 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
// FIXME: Should we do anything with this if it comes in after the browser has been initialized?
}
+ else if(message_name == "plugins_enabled")
+ {
+ mPluginsEnabled = message_in.getValueBoolean("enable");
+ }
+ else if(message_name == "javascript_enabled")
+ {
+ mJavascriptEnabled = message_in.getValueBoolean("enable");
+ }
else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
@@ -1026,8 +1038,18 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
}
else if(message_name == "enable_cookies")
{
- bool val = message_in.getValueBoolean("enable");
- LLQtWebKit::getInstance()->enableCookies( val );
+ mCookiesEnabled = message_in.getValueBoolean("enable");
+ LLQtWebKit::getInstance()->enableCookies( mCookiesEnabled );
+ }
+ else if(message_name == "enable_plugins")
+ {
+ mPluginsEnabled = message_in.getValueBoolean("enable");
+ LLQtWebKit::getInstance()->enablePlugins( mPluginsEnabled );
+ }
+ else if(message_name == "enable_javascript")
+ {
+ mJavascriptEnabled = message_in.getValueBoolean("enable");
+ //LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
}
else if(message_name == "proxy_setup")
{
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 97c8cbfa7b..9f474a39bc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1563,6 +1563,28 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>BrowserJavascriptEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable Javascript in the built-in Web browser?</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>BrowserPluginsEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable Web plugins in the built-in Web browser?</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>CreateToolCopyCenters</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index ac60fe6ba6..ffa24a0c15 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -776,7 +776,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
button->getRect().mBottom));
button->setAutoResize(true);
button->autoResize();
- offset += 2 * HPAD + button->getRect().getWidth();
+ offset += HPAD + button->getRect().getWidth();
button->setFollowsNone();
}
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index af42ed0dc9..2fcd3f1114 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1373,6 +1373,19 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
media_source->setSize(default_width, default_height);
media_source->setUserDataPath(user_data_path);
media_source->setLanguageCode(LLUI::getLanguage());
+
+ // collect 'cookies enabled' setting from prefs and send to embedded browser
+ bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" );
+ media_source->enable_cookies( cookies_enabled );
+
+ // collect 'plugins enabled' setting from prefs and send to embedded browser
+ bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" );
+ media_source->setPluginsEnabled( plugins_enabled );
+
+ // collect 'javascript enabled' setting from prefs and send to embedded browser
+ bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" );
+ media_source->setJavascriptEnabled( javascript_enabled );
+
if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))
{
return media_source;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 86d8204473..cb362d557c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -962,8 +962,11 @@ void LLVOVolume::updateSculptTexture()
if (isSculpted())
{
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLUUID id = sculpt_params->getSculptTexture();
- mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LLUUID id = sculpt_params->getSculptTexture();
+ if (id.notNull())
+ {
+ mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ }
}
else
{
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index d45d6155dd..fcf5cfadb2 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -392,7 +392,7 @@
reference="Yellow" />
<color
name="HighlightInspectColor"
- value="1 0.5 0 1" />
+ value="1 0 1 1" />
<color
name="HighlightParentColor"
value="0.67 0.83 0.96 1" />
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 25016e0673..422e50f035 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -13,7 +13,7 @@
can_minimize="true"
can_close="true"
visible="false"
- width="360"
+ width="385"
can_resize="true"
min_width="250"
min_height="190">
@@ -22,7 +22,7 @@
default_tab_group="2"
follows="all"
height="320"
- width="360"
+ width="385"
layout="topleft"
orientation="horizontal"
name="im_panels"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index b5a3764e73..49361784ae 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -39,6 +39,7 @@
</button>
<tab_container
follows="all"
+ halign="left"
height="410"
layout="topleft"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index f232a69482..3d7f392404 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -69,15 +69,6 @@
name="auto_disengage_mic_check"
top_pad="10"
width="350" />
- <check_box
- control_name="CookiesEnabled"
- height="16"
- label="Accept cookies"
- layout="topleft"
- left="30"
- name="cookies_enabled"
- top_pad="10"
- width="350" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index fe882730f4..96b9b459dd 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -265,35 +265,80 @@
layout="topleft"
left_delta="50"
name="use_external_browser"
- top_pad="4"
+ top_pad="-2"
width="480">
<radio_item
height="20"
- label="Use built-in browser"
- layout="topleft"
- left="0"
- name="internal"
- value=""
- tool_tip="Use the built-in web browser for help, web links, etc. This browser opens as a new window inside [APP_NAME]."
- top="0"
- width="480" />
- <radio_item
- height="20"
label="Use my browser (IE, Firefox, Safari)"
layout="topleft"
left_delta="0"
name="external"
value="1"
+ top="0"
tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen."
+ width="480" />
+ <radio_item
+ height="20"
+ label="Use built-in browser"
+ layout="topleft"
+ left="0"
+ name="internal"
+ value=""
+ tool_tip="Use the built-in web browser for help, web links, etc. This browser opens as a new window inside [APP_NAME]."
top_delta="20"
width="480" />
</radio_group>
<check_box
+ top_delta="2"
+ enabled="true"
+ follows="left|top"
+ height="18"
+ initial_value="true"
+ control_name="BrowserPluginsEnabled"
+ label="Enable plugins"
+ left_delta="20"
+ mouse_opaque="true"
+ name="browser_plugins_enabled"
+ radio_style="false"
+ width="400"
+ top_pad="5"/>
+
+ <check_box
+ top_delta="4"
+ enabled="true"
+ follows="left|top"
+ height="14"
+ initial_value="true"
+ control_name="CookiesEnabled"
+ label="Accept cookies"
+ left_delta="0"
+ mouse_opaque="true"
+ name="cookies_enabled"
+ radio_style="false"
+ width="400"
+ top_pad="5"/>
+
+ <check_box
top_delta="4"
enabled="true"
follows="left|top"
- height="16"
+ height="14"
+ initial_value="true"
+ control_name="BrowserJavascriptEnabled"
+ label="Enable Javascript"
+ left_delta="0"
+ mouse_opaque="true"
+ name="browser_javascript_enabled"
+ radio_style="false"
+ width="400"
+ top_pad="5"/>
+
+ <check_box
+ top_delta="4"
+ enabled="true"
+ follows="left|top"
+ height="14"
initial_value="false"
control_name="BrowserProxyEnabled"
label="Enable Web Proxy"
@@ -308,9 +353,9 @@
follows="left|top"
height="10"
layout="topleft"
- left_delta="1"
+ left_delta="20"
name="Proxy location"
- top_delta="20"
+ top_delta="16"
width="300">
Proxy location:
</text>
@@ -335,7 +380,7 @@
increment="1"
initial_value="80"
label="Port number:"
- label_width="75"
+ label_width="70"
layout="topleft"
left_delta="230"
max_val="12000"