From b127dd514d97eb0fa52169d965fb0dc278a5c470 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 7 Sep 2014 12:40:46 -0400 Subject: [PATCH 1/6] Stylistic changes and such. --- indra/newview/llagent.cpp | 2 ++ indra/newview/llvieweraudio.cpp | 7 +++---- indra/newview/llviewermenu.cpp | 12 +----------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 013c45c14..a8fa1568b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -812,6 +812,8 @@ void LLAgent::toggleFlying() bool LLAgent::enableFlying() { BOOL sitting = FALSE; + static LLCachedControl continue_flying_on_unsit(gSavedSettings, "LiruContinueFlyingOnUnsit", false); + if (!continue_flying_on_unsit) if (isAgentAvatarValid()) { sitting = gAgentAvatarp->isSitting(); diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 8f7a0ed65..164419dce 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -243,12 +243,11 @@ void audio_update_wind(bool fade) volume_delta = (LLFrameTimer::getFrameDeltaTimeF32() / WIND_SOUND_TRANSITION_TIME) * max_wind_volume; } - static LLCachedControl MuteWind("MuteWind"); - static LLCachedControl ContinueFlying("LiruContinueFlyingOnUnsit"); + static LLCachedControl MuteWind(gSavedSettings, "MuteWind", false); + static LLCachedControl ContinueFlying(gSavedSettings, "LiruContinueFlyingOnUnsit", false); // mute wind entirely when the user asked or when the user is seated, but flying - if (MuteWind || (ContinueFlying && gAgentAvatarp&& gAgentAvatarp->isSitting())) + if (MuteWind || (ContinueFlying && gAgentAvatarp && gAgentAvatarp->isSitting())) { - // volume decreases by itself gAudiop->mMaxWindGain = 0.f; } // mute wind when not /*flying*/ in air diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d9c88d91e..1c671f314 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3981,17 +3981,7 @@ class LLWorldEnableFly : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - BOOL sitting = FALSE; - static LLCachedControl continue_flying_on_unsit("LiruContinueFlyingOnUnsit"); - if (continue_flying_on_unsit) - { - sitting = false; - } - else if (gAgentAvatarp) - { - sitting = gAgentAvatarp->isSitting(); - } - gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting); + gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.enableFlying()); return true; } }; From 724ea77befe6236c61c4fb2831310418314b2d52 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 7 Sep 2014 12:43:18 -0400 Subject: [PATCH 2/6] Translate Render muted avatars to francais --- .../skins/default/xui/en-us/panel_preferences_ascent_system.xml | 2 +- .../skins/default/xui/fr/panel_preferences_ascent_system.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index 55962a81f..188f6569e 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -99,7 +99,7 @@ - + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml index eab807607..11d25e01a 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml @@ -79,6 +79,7 @@ + From b198e296cb805f99b93d5b212c5dd288975cef30 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sun, 7 Sep 2014 17:32:08 -0400 Subject: [PATCH 3/6] Allow right clicking avatar lists with multiple avatars selected to invite to group. --- indra/newview/llavataractions.cpp | 14 ++++++++------ indra/newview/llavataractions.h | 3 ++- indra/newview/llpanelavatar.cpp | 2 +- indra/newview/llviewermenu.cpp | 2 +- .../skins/default/xui/en-us/menu_avs_list.xml | 2 +- .../newview/skins/default/xui/en-us/menu_radar.xml | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index fae1b7c3d..2af9ee120 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -687,13 +687,18 @@ bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) void LLAvatarActions::inviteToGroup(const LLUUID& id) { - LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(id)); + inviteToGroup(uuid_vec_t(1, id)); +} + +void LLAvatarActions::inviteToGroup(const uuid_vec_t& ids) +{ + LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(ids.front())); if (widget) { widget->center(); widget->setPowersMask(GP_MEMBER_INVITE); widget->removeNoneOption(); - widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id)); + widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, ids)); } } @@ -767,11 +772,8 @@ void ban_from_group(const uuid_vec_t& ids) // // static -void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id) +void LLAvatarActions::callback_invite_to_group(LLUUID group_id, uuid_vec_t& agent_ids) { - uuid_vec_t agent_ids; - agent_ids.push_back(id); - LLFloaterGroupInvite::showForGroup(group_id, &agent_ids); } diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 3bb613185..5488c34c2 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -155,6 +155,7 @@ public: * Invite avatar to a group. */ static void inviteToGroup(const LLUUID& id); + static void inviteToGroup(const uuid_vec_t& ids); /** * Kick avatar off grid @@ -217,7 +218,7 @@ private: static bool handleKick(const LLSD& notification, const LLSD& response); static bool handleFreeze(const LLSD& notification, const LLSD& response); static bool handleUnfreeze(const LLSD& notification, const LLSD& response); - static void callback_invite_to_group(LLUUID group_id, LLUUID id); + static void callback_invite_to_group(LLUUID group_id, uuid_vec_t& ids); static void on_avatar_name_cache_teleport_request(const LLUUID& id, const LLAvatarName& av_name); public: diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 60e6768e9..f8cecab8c 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -473,7 +473,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void) getChild("Find on Map")->setCommitCallback(boost::bind(LLAvatarActions::showOnMap, boost::bind(&LLPanelAvatar::getAvatarID, pa))); getChild("Instant Message...")->setCommitCallback(boost::bind(LLAvatarActions::startIM, boost::bind(&LLPanelAvatar::getAvatarID, pa))); - getChild("GroupInvite_Button")->setCommitCallback(boost::bind(LLAvatarActions::inviteToGroup, boost::bind(&LLPanelAvatar::getAvatarID, pa))); + getChild("GroupInvite_Button")->setCommitCallback(boost::bind(static_cast(LLAvatarActions::inviteToGroup), boost::bind(&LLPanelAvatar::getAvatarID, pa))); getChild("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa))); getChild("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa))); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1c671f314..2961a1745 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9052,7 +9052,7 @@ class ListInviteToGroup : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLAvatarActions::inviteToGroup(get_focused_list_id_selected()); + LLAvatarActions::inviteToGroup(get_focused_list_ids_selected()); return true; } }; diff --git a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml index 2ba08eaaa..feb47745d 100644 --- a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml @@ -42,7 +42,7 @@ - + diff --git a/indra/newview/skins/default/xui/en-us/menu_radar.xml b/indra/newview/skins/default/xui/en-us/menu_radar.xml index 0a9e734aa..2f06bbf3c 100644 --- a/indra/newview/skins/default/xui/en-us/menu_radar.xml +++ b/indra/newview/skins/default/xui/en-us/menu_radar.xml @@ -43,7 +43,7 @@ - + From 2db2c963295506bc3af9b762a1f3ce7c45a90ade Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Sun, 7 Sep 2014 20:16:22 -0600 Subject: [PATCH 4/6] Fix find evaluation on newer versions of clang (and 64-bit macs) --- indra/llvfs/lldir_mac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 114dc0c47..b6ba5e308 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,7 +150,7 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 build_dir_pos = mExecutableDir.rfind("/indra/build-darwin-"); + size_t build_dir_pos = mExecutableDir.rfind("/indra/build-darwin-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout From 1c7772e73132a8d7e4eeb352bb5d2a59419f362c Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 8 Sep 2014 21:25:12 -0400 Subject: [PATCH 5/6] Sync with Alchemy, fixes not being able to send calling cards to people. --- .../app_settings/settings_per_account.xml | 37 +++------- indra/newview/llgiveinventory.cpp | 74 ++++++++++--------- indra/newview/llviewermessage.cpp | 6 +- 3 files changed, 55 insertions(+), 62 deletions(-) diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index d5c721237..7e369cf26 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -216,31 +216,18 @@ - AscentInstantMessageResponseRepeat - - Comment - Whether to keep on resending the autoresponse every line they send - Persist - 1 - Type - Boolean - Value - 0 - - - AscentInstantMessageShowOnTyping - - Comment - Whether to perform the autorespond the moment they begin to type instead of waiting for an actual message - Persist - 1 - Type - Boolean - Value - 0 - - + AscentInstantMessageResponseRepeat + + Comment + Whether to keep on resending the autoresponse every line they send + Persist + 1 + Type + Boolean + Value + 0 + AutoresponseAnyone Comment @@ -438,7 +425,7 @@ Boolean Value 0 - + BusyModeResponseItemID Comment diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 25885e68f..8cdcf5589 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -128,36 +128,31 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item) { return false; } - - + bool acceptable = true; switch(item->getType()) { - case LLAssetType::AT_CALLINGCARD: - acceptable = false; - break; case LLAssetType::AT_OBJECT: - // - /*if(my_avatar->isWearingAttachment(item->getUUID())) + /* + if (get_is_item_worn(item->getUUID())) { acceptable = false; - }*/ - // + } + */ break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: { // /*bool copyable = false; - if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = true; + if(item->getPermissions().allowCopyBy(gAgentID)) copyable = true; - if(!copyable && gAgentWearables.isWearingItem(item->getUUID())) + if (!copyable || get_is_item_worn(item->getUUID())) { acceptable = false; }*/ // } - break; default: break; @@ -185,20 +180,16 @@ bool LLGiveInventory::isInventoryGroupGiveAcceptable(const LLInventoryItem* item bool acceptable = true; - switch(item->getType()) { - case LLAssetType::AT_CALLINGCARD: - acceptable = false; - break; - // - /*case LLAssetType::AT_OBJECT: + case LLAssetType::AT_OBJECT: + /* if(gAgentAvatarp->isWearingAttachment(item->getUUID())) { acceptable = false; - }* - break;*/ - // + } + */ + break; default: break; } @@ -245,11 +236,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { - if (!cat) return; + if (!cat) + { + return; + } llinfos << "LLGiveInventory::giveInventoryCategory() - " << cat->getUUID() << llendl; - if (!isAgentAvatarValid()) return; + if (!isAgentAvatarValid()) + { + return; + } // Test out how many items are being given. LLViewerInventoryCategory::cat_array_t cats; @@ -275,17 +272,17 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, LLNotificationsUtil::add("IncompleteInventory"); return; } - count = items.count() + cats.count(); - if(count > MAX_ITEMS) - { + count = items.count() + cats.count(); + if(count > MAX_ITEMS) + { LLNotificationsUtil::add("TooManyItems"); - return; - } - else if(count == 0) - { + return; + } + else if(count == 0) + { LLNotificationsUtil::add("NoItems"); - return; - } + return; + } else { if(0 == giveable.countNoCopy()) @@ -358,6 +355,7 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLSD itmes = notification["payload"]["items"]; LLInventoryItem* item = NULL; + bool give_successful = true; switch(option) { case 0: // "Yes" @@ -376,15 +374,17 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL else { LLNotificationsUtil::add("CannotGiveItem"); + give_successful = false; } } break; default: // no, cancel, whatever, who cares, not yes. LLNotificationsUtil::add("TransactionCancelled"); + give_successful = false; break; } - return false; + return give_successful; } // static @@ -419,6 +419,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, bucket, BUCKET_SIZE); gAgent.sendReliableMessage(); + // if (gSavedSettings.getBOOL("BroadcastViewerEffects")) { @@ -486,7 +487,10 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { -if(!cat) return; + if(!cat) + { + return; + } llinfos << "LLGiveInventory::commitGiveInventoryCategory() - " << cat->getUUID() << llendl; @@ -565,6 +569,7 @@ if(!cat) return; bucket_size); gAgent.sendReliableMessage(); delete[] bucket; + // if (gSavedSettings.getBOOL("BroadcastViewerEffects")) { @@ -585,4 +590,5 @@ if(!cat) return; logInventoryOffer(to_agent, im_session_id); } } + // EOF diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 37ed70519..1eb6244f6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2464,8 +2464,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id); if (show_autoresponded) { - gIMMgr->addMessage(computed_session_id, from_id, name, - llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); + gIMMgr->addMessage(computed_session_id, from_id, name, + llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); } } } @@ -2636,7 +2636,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (show_autoresponded) { gIMMgr->addMessage(computed_session_id, from_id, name, - llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); + llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str())); } } } From a5ac768540834cd10d2a0fae565245cf2538e56b Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 9 Sep 2014 12:38:29 -0400 Subject: [PATCH 6/6] Don't play empty audio urls. --- indra/newview/llmediafilter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llmediafilter.cpp b/indra/newview/llmediafilter.cpp index 56d01e422..528dfc86f 100644 --- a/indra/newview/llmediafilter.cpp +++ b/indra/newview/llmediafilter.cpp @@ -101,7 +101,6 @@ void LLMediaFilter::filterAudioUrl(const std::string& url) { if (url.empty()) { - gAudiop->startInternetStream(url); return; } if (url == mCurrentAudioURL) return;