summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmediaowner.h1
-rw-r--r--indra/llui/llnotifications.cpp17
-rw-r--r--indra/llxuixml/lltrans.h10
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp9
-rw-r--r--indra/newview/llfirstuse.cpp6
-rw-r--r--indra/newview/llfirstuse.h2
-rw-r--r--indra/newview/llfloaterbuycontents.cpp5
-rw-r--r--indra/newview/llfloatermediabrowser.cpp5
-rw-r--r--indra/newview/llmediactrl.cpp6
-rw-r--r--indra/newview/llsidepanelinventory.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp13
-rw-r--r--indra/newview/llviewerparcelmedia.cpp6
-rw-r--r--indra/newview/llweb.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/widgets/text_editor.xml1
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp4
-rw-r--r--install.xml4
17 files changed, 87 insertions, 15 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 41ace62964..6209a09bbd 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1010,6 +1010,10 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mOwner->handleCookieSet(this, message.getValue("cookie"));
}
}
+ else if(message_name == "close_request")
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLOSE_REQUEST);
+ }
else
{
LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h
index 5669b81fd1..ac4fdd9ada 100644
--- a/indra/llplugin/llpluginclassmediaowner.h
+++ b/indra/llplugin/llpluginclassmediaowner.h
@@ -59,6 +59,7 @@ public:
MEDIA_EVENT_LOCATION_CHANGED, // browser location (URL) has changed (maybe due to internal navagation/frames/etc)
MEDIA_EVENT_CLICK_LINK_HREF, // I'm not entirely sure what the semantics of these two are
MEDIA_EVENT_CLICK_LINK_NOFOLLOW,
+ MEDIA_EVENT_CLOSE_REQUEST, // The plugin requested its window be closed (currently hooked up to javascript window.close in webkit)
MEDIA_EVENT_PLUGIN_FAILED_LAUNCH, // The plugin failed to launch
MEDIA_EVENT_PLUGIN_FAILED // The plugin died unexpectedly
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 2da8f1eb1b..7cc6e8e8f6 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1425,17 +1425,26 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
void LLNotifications::cancelByName(const std::string& name)
{
- for (LLNotificationSet::iterator it=mItems.begin(), end_it = mItems.end(), next_it = it;
+ std::vector<LLNotificationPtr> notifs_to_cancel;
+ for (LLNotificationSet::iterator it=mItems.begin(), end_it = mItems.end();
it != end_it;
- it = next_it, ++next_it)
+ ++it)
{
LLNotificationPtr pNotif = *it;
if (pNotif->getName() == name)
{
- pNotif->cancel();
- updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);
+ notifs_to_cancel.push_back(pNotif);
}
}
+
+ for (std::vector<LLNotificationPtr>::iterator it = notifs_to_cancel.begin(), end_it = notifs_to_cancel.end();
+ it != end_it;
+ ++it)
+ {
+ LLNotificationPtr pNotif = *it;
+ pNotif->cancel();
+ updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);
+ }
}
void LLNotifications::update(const LLNotificationPtr pNotif)
diff --git a/indra/llxuixml/lltrans.h b/indra/llxuixml/lltrans.h
index 6c8d28b346..4a99c5e0e2 100644
--- a/indra/llxuixml/lltrans.h
+++ b/indra/llxuixml/lltrans.h
@@ -107,7 +107,15 @@ public:
{
std::string key_str(keystring);
std::string trans_str;
- return findString(trans_str, "Key_" + key_str) ? trans_str : key_str;
+ if (findString(trans_str, "Key_" + key_str))
+ {
+ return trans_str;
+ }
+ else if (findString(trans_str, key_str))
+ {
+ return trans_str;
+ }
+ return key_str;
}
// get the default args
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 3b00edec4e..2dc0c93521 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -539,6 +539,15 @@ private:
// message.setValueBoolean("dead", (event.getIntValue() != 0))
sendMessage(message);
}
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onWindowCloseRequested(const EventType& event)
+ {
+ llwarns << "onWindowCloseRequested " << llendl;
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "close_request");
+ sendMessage(message);
+ }
LLQtWebKit::EKeyboardModifier decodeModifiers(std::string &modifiers)
{
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 038579c0bd..c153f8b787 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -90,7 +90,7 @@ void LLFirstUse::sit(bool enable)
}
// static
-void LLFirstUse::inventoryOffer(bool enable)
+void LLFirstUse::newInventory(bool enable)
{
firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left"));
}
@@ -147,6 +147,8 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
{
LL_DEBUGS("LLFirstUse") << "Disabling first use notification " << notification_name << LL_ENDL;
LLNotifications::instance().cancelByName(notification_name);
+ // redundantly clear settings var here, in case there are no notifications to cancel
+ gWarningSettings.setBOOL(control_var, FALSE);
}
}
@@ -157,7 +159,7 @@ void LLFirstUse::init()
static bool initialized = false;
if (!initialized)
{
- LLNotifications::instance().getChannel("Hints")->connectChanged(processNotification);
+ LLNotifications::instance().getChannel("Hints")->connectChanged(&processNotification);
}
initialized = true;
}
diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h
index 9c4ab14006..174706f1f4 100644
--- a/indra/newview/llfirstuse.h
+++ b/indra/newview/llfirstuse.h
@@ -95,7 +95,7 @@ public:
static void notUsingDestinationGuide(bool enable = true);
static void notUsingSidePanel(bool enable = true);
static void notMoving(bool enable = true);
- static void inventoryOffer(bool enable = true);
+ static void newInventory(bool enable = true);
static void receiveLindens(bool enable = true);
static void useSandbox();
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 3cdd7b801b..8e93a6bf03 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -47,6 +47,7 @@
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h" // for gInventory
+#include "llfirstuse.h"
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for LLInventoryIcon::getIcon
#include "llnotificationsutil.h"
@@ -289,6 +290,10 @@ void LLFloaterBuyContents::onClickBuy()
// it doesn't match region info then sale is canceled.
LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, mSaleInfo);
+ // NOTE: do this here instead of on receipt of object, since contents are transfered
+ // via a generic BulkUpdateInventory message with no way of distinguishing it from
+ // other inventory operations
+ LLFirstUse::newInventory();
closeFloater();
}
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
index ad996b5dc8..bf797fdc95 100644
--- a/indra/newview/llfloatermediabrowser.cpp
+++ b/indra/newview/llfloatermediabrowser.cpp
@@ -223,6 +223,11 @@ void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEve
getChildView("back")->setEnabled(self->getHistoryBackAvailable());
getChildView("forward")->setEnabled(self->getHistoryForwardAvailable());
}
+ else if(event == MEDIA_EVENT_CLOSE_REQUEST)
+ {
+ // The browser instance wants its window closed.
+ closeFloater();
+ }
}
void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
{
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index d6d128eb29..0739125081 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -956,6 +956,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL;
};
break;
+
+ case MEDIA_EVENT_CLOSE_REQUEST:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL;
+ }
+ break;
};
// chain all events to any potential observers of this object.
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index cdd2761024..1316bf0c57 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -129,7 +129,7 @@ BOOL LLSidepanelInventory::postBuild()
void LLSidepanelInventory::onOpen(const LLSD& key)
{
- LLFirstUse::inventoryOffer(false);
+ LLFirstUse::newInventory(false);
if(key.size() == 0)
return;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9bb734a3d3..71dff61f41 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -937,6 +937,15 @@ protected:
//one global instance to bind them
LLOpenTaskOffer* gNewInventoryObserver=NULL;
+class LLNewInventoryHintObserver : public LLInventoryAddedObserver
+{
+protected:
+ /*virtual*/ void done()
+ {
+ LLFirstUse::newInventory();
+ }
+};
+
void start_new_inventory_observer()
{
if (!gNewInventoryObserver) //task offer observer
@@ -952,6 +961,8 @@ void start_new_inventory_observer()
gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver;
gInventory.addObserver(gInventoryMoveObserver);
}
+
+ gInventory.addObserver(new LLNewInventoryHintObserver());
}
class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
@@ -1764,8 +1775,6 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
- LLFirstUse::inventoryOffer();
-
// Avoid the Accept/Discard dialog if the user so desires. JC
if (gSavedSettings.getBOOL("AutoAcceptNewInventory")
&& (info->mType == LLAssetType::AT_NOTECARD
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 202f8822e3..e1d88c799b 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -574,6 +574,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL;
};
break;
+
+ case MEDIA_EVENT_CLOSE_REQUEST:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL;
+ }
+ break;
};
}
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index b61109d490..c6219334f4 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -86,7 +86,12 @@ void LLWeb::initClass()
// static
void LLWeb::loadURL(const std::string& url, const std::string& target)
{
- if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
+ if(target == "_internal")
+ {
+ // Force load in the internal browser, as if with a blank target.
+ loadURLInternal(url);
+ }
+ else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
{
loadURLExternal(url);
}
diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
index 180120ec89..0f7f50b312 100644
--- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
@@ -2,5 +2,4 @@
<!-- Core parameters are in simple_text_editor.xml -->
<text_editor
parse_urls="false"
- text_readonly_color="LabelDisabledColor"
show_context_menu="true"/>
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index 166905c37c..4e39f1ccd1 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -2213,6 +2213,10 @@ void LLMediaPluginTest::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH:
std::cerr << "Media event: MEDIA_EVENT_PLUGIN_FAILED_LAUNCH" << std::endl;
break;
+
+ case MEDIA_EVENT_CLOSE_REQUEST:
+ std::cerr << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << std::endl;
+ break;
}
}
diff --git a/install.xml b/install.xml
index a3f5b5c7bc..19905fc1f7 100644
--- a/install.xml
+++ b/install.xml
@@ -981,9 +981,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>darwin</key>
<map>
<key>md5sum</key>
- <string>093c977ef0ef2396cc235b3620329a87</string>
+ <string>9f4243cf304366030d02f2881357a928</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100805.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20100817.tar.bz2</uri>
</map>
<key>linux</key>
<map>