diff options
author | andreykproductengine <akleshchev@productengine.com> | 2014-08-19 15:02:36 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2014-08-19 15:02:36 +0300 |
commit | c64544afe9cfc8204137fc7a68f2d70e4830c056 (patch) | |
tree | 390e6a8f6b32e6aa162d479b98a53c0729e21456 /indra/newview/llinventorybridge.cpp | |
parent | 55fa4b1c37ced0a3f0b38cb17bd6da5dfbc0b69c (diff) |
MAINT-3391 FIXED Sounds no longer play directly when double clicking in inventory.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8e6ac20eaa..d6f2803fc2 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -87,6 +87,8 @@ void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; +const F32 SOUND_GAIN = 1.0f; + struct LLMoveInv { LLUUID mObjectID; @@ -4523,6 +4525,23 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +void LLSoundBridge::performAction(LLInventoryModel* model, std::string action) +{ + if ("sound_play" == action) + { + LLViewerInventoryItem* item = getItem(); + if(item) + { + send_sound_trigger(item->getAssetUUID(), SOUND_GAIN); + } + } + else if ("open" == action) + { + openSoundPreview((void*)this); + } + else LLItemBridge::performAction(model, action); +} + // +=================================================+ // | LLLandmarkBridge | // +=================================================+ @@ -6135,7 +6154,7 @@ public: LLViewerInventoryItem* item = getItem(); if (item) { - LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES); + send_sound_trigger(item->getAssetUUID(), SOUND_GAIN); } LLInvFVBridgeAction::doIt(); } |