diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-30 17:37:19 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-30 17:37:19 -0400 |
commit | a71e0b1862cc184f40d0f893cc62b1e636d3b0a5 (patch) | |
tree | 5841eb481a1e791bd0cd11158660c91f3f9968c0 /indra | |
parent | 45433246d4daebd8a849be9de947881026c5d095 (diff) | |
parent | f633aef1af5a1a695df655080d3a20c033a31e18 (diff) |
pull latest changes from viewer-development
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/ignorable_dialogs.xml | 12 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llbottomtray.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llcallfloater.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfirstuse.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfirstuse.h | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterbeacons.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfriendcard.cpp | 52 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llspeakbutton.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 22 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 60 | ||||
-rw-r--r-- | indra/newview/pipeline.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_beacons.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_bottomtray.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 12 |
17 files changed, 198 insertions, 30 deletions
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml index 89fd4e5935..17d3d3c9c5 100644 --- a/indra/newview/app_settings/ignorable_dialogs.xml +++ b/indra/newview/app_settings/ignorable_dialogs.xml @@ -122,7 +122,17 @@ <key>Value</key> <integer>1</integer> </map> - + <key>FirstSpeak</key> + <map> + <key>Comment</key> + <string>Shows hint for Speak button</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>FirstSit</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f0e28d4ae3..14f1b3c4ba 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12102,6 +12102,17 @@ <key>Value</key> <real>0.40000000596</real> </map> + <key>moapbeacon</key> + <map> + <key>Comment</key> + <string>Beacon / Highlight media on a prim sources</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>particlesbeacon</key> <map> <key>Comment</key> diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 1fb83fe567..0371b7be71 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -55,6 +55,7 @@ #include "llviewerwindow.h" #include "llsdserialize.h" +#include "llfirstuse.h" // Distance from mouse down on which drag'n'drop should be started. #define DRAG_START_DISTANCE 3 @@ -381,7 +382,12 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { - mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); + bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); + mSpeakBtn->setFlyoutBtnEnabled(voice_status); + if (voice_status) + { + LLFirstUse::speak(true); + } } } @@ -561,6 +567,7 @@ BOOL LLBottomTray::postBuild() mSpeakPanel = getChild<LLPanel>("speak_panel"); mSpeakBtn = getChild<LLSpeakButton>("talk"); + LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); // Both parts of speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 328c326278..945a760d05 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -50,6 +50,7 @@ #include "llviewerwindow.h" #include "llvoicechannel.h" #include "llviewerparcelmgr.h" +#include "llfirstuse.h" static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids); void reshape_floater(LLCallFloater* floater, S32 delta_height); @@ -170,13 +171,13 @@ BOOL LLCallFloater::postBuild() updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); - return TRUE; } // virtual void LLCallFloater::onOpen(const LLSD& /*key*/) { + LLFirstUse::speak(false); } // virtual diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index e319418def..d63685e1af 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -78,6 +78,12 @@ void LLFirstUse::otherAvatarChatFirst(bool enable) } // static +void LLFirstUse::speak(bool enable) +{ + firstUseNotification("FirstSpeak", enable, "HintSpeak", LLSD(), LLSD().with("target", "speak_btn").with("direction", "top")); +} + +// static void LLFirstUse::sit(bool enable) { firstUseNotification("FirstSit", enable, "HintSit", LLSD(), LLSD().with("target", "stand_btn").with("direction", "top")); diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index 42b2ec0c60..4c8c9d3cde 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -68,6 +68,8 @@ object or from inventory. 13. First time you open the debug menus (ctrl-alt-shift D) 14. First time you create/edit a sculpted prim. + +15. Explanation of Speak&flyout buttons. */ class LLNotification; @@ -85,6 +87,7 @@ public: static void resetFirstUse(); static void otherAvatarChatFirst(bool enable = true); + static void speak(bool enable = true); static void sit(bool enable = true); static void notUsingDestinationGuide(bool enable = true); static void notUsingSidePanel(bool enable = true); diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index e24df948c4..316294a477 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -48,6 +48,7 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) LLPipeline::setRenderParticleBeacons( gSavedSettings.getBOOL("particlesbeacon")); LLPipeline::setRenderHighlights( gSavedSettings.getBOOL("renderhighlights")); LLPipeline::setRenderBeacons( gSavedSettings.getBOOL("renderbeacons")); + LLPipeline::setRenderMOAPBeacons( gSavedSettings.getBOOL("moapbeacon")); mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1)); } @@ -96,6 +97,7 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); else if(name == "sounds") LLPipeline::setRenderSoundBeacons(check->get()); else if(name == "particles") LLPipeline::setRenderParticleBeacons(check->get()); + else if(name == "moapbeacon") LLPipeline::setRenderMOAPBeacons(check->get()); else if(name == "highlights") { LLPipeline::toggleRenderHighlights(NULL); diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 70e789f490..11401d6c68 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -96,6 +96,36 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect } /** + * Class LLFindAgentCallingCard + * + * An inventory collector functor for checking that agent's own calling card + * exists within the Calling Cards category and its sub-folders. + */ +class LLFindAgentCallingCard : public LLInventoryCollectFunctor +{ +public: + LLFindAgentCallingCard() : mIsAgentCallingCardFound(false) {} + virtual ~LLFindAgentCallingCard() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + bool isAgentCallingCardFound() { return mIsAgentCallingCardFound; } + +private: + bool mIsAgentCallingCardFound; +}; + +bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if (mIsAgentCallingCardFound) return true; + + if (item && item->getType() == LLAssetType::AT_CALLINGCARD && item->getCreatorUUID() == gAgentID) + { + mIsAgentCallingCardFound = true; + } + + return mIsAgentCallingCardFound; +} + +/** * Class for fetching initial friend cards data * * Implemented to fix an issue when Inventory folders are in incomplete state. @@ -449,32 +479,22 @@ void LLFriendCardsManager::syncFriendsFolder() LLAvatarTracker::instance().copyBuddyList(all_buddies); // 1. Check if own calling card exists + const LLUUID calling_cards_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - - LLUUID friends_all_folder_id = findFriendAllSubfolderUUIDImpl(); - gInventory.collectDescendents(friends_all_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - - bool own_callingcard_found = false; - LLInventoryModel::item_array_t::const_iterator it; - for (it = items.begin(); it != items.end(); ++it) - { - if ((*it)->getCreatorUUID() == gAgentID) - { - own_callingcard_found = true; - break; - } - } + LLFindAgentCallingCard collector; + gInventory.collectDescendentsIf(calling_cards_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, collector); // Create own calling card if it was not found in Friends/All folder - if (!own_callingcard_found) + if (!collector.isAgentCallingCardFound()) { LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); create_inventory_item(gAgentID, gAgent.getSessionID(), - friends_all_folder_id, + calling_cards_folder_id, LLTransactionID::tnull, av_name.getCompleteName(), gAgentID.asString(), diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a9bb01ac70..fcd200d24a 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -686,7 +686,7 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return NULL; - floater_tab->openFloater(panel_name); + floater_tab->openFloater(tab_name); } LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent()); diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index c76ecae4a2..d52e0a6c86 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -38,6 +38,7 @@ #include "llspeakbutton.h" #include "llbottomtray.h" +#include "llfirstuse.h" static LLDefaultChildRegistry::Register<LLSpeakButton> t1("talk_button"); @@ -176,6 +177,7 @@ void LLSpeakButton::onMouseDown_SpeakBtn() { bool down = true; LLVoiceClient::getInstance()->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk + LLFirstUse::speak(false); } void LLSpeakButton::onMouseUp_SpeakBtn() { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ec72df79d1..7c8f363f11 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7338,6 +7338,11 @@ class LLViewToggleBeacon : public view_listener_t LLPipeline::toggleRenderPhysicalBeacons(NULL); gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); } + else if (beacon == "moapbeacon") + { + LLPipeline::toggleRenderMOAPBeacons(NULL); + gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons(NULL) ); + } else if (beacon == "soundsbeacon") { LLPipeline::toggleRenderSoundBeacons(NULL); @@ -7397,6 +7402,11 @@ class LLViewCheckBeaconEnabled : public view_listener_t new_value = gSavedSettings.getBOOL( "scriptsbeacon"); LLPipeline::setRenderScriptedBeacons(new_value); } + else if (beacon == "moapbeacon") + { + new_value = gSavedSettings.getBOOL( "moapbeacon"); + LLPipeline::setRenderMOAPBeacons(new_value); + } else if (beacon == "physicalbeacon") { new_value = gSavedSettings.getBOOL( "physicalbeacon"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index aa83bcb68b..8e049e76df 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -572,21 +572,30 @@ public: // only display these messages if we are actually rendering beacons at this moment if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons")) { - if (LLPipeline::getRenderParticleBeacons(NULL)) + if (LLPipeline::getRenderMOAPBeacons(NULL)) { - addText(xpos, ypos, beacon_particle); + addText(xpos, ypos, "Viewing media beacons (white)"); ypos += y_inc; } + if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) { addText(xpos, ypos, particle_hiding); ypos += y_inc; } - if (LLPipeline::getRenderPhysicalBeacons(NULL)) + + if (LLPipeline::getRenderParticleBeacons(NULL)) + { + addText(xpos, ypos, "Viewing particle beacons (blue)"); + ypos += y_inc; + } + + if (LLPipeline::getRenderSoundBeacons(NULL)) { - addText(xpos, ypos, beacon_physical); + addText(xpos, ypos, "Viewing sound beacons (yellow)"); ypos += y_inc; } + if (LLPipeline::getRenderScriptedBeacons(NULL)) { addText(xpos, ypos, beacon_scripted); @@ -598,9 +607,10 @@ public: addText(xpos, ypos, beacon_scripted_touch); ypos += y_inc; } - if (LLPipeline::getRenderSoundBeacons(NULL)) + + if (LLPipeline::getRenderPhysicalBeacons(NULL)) { - addText(xpos, ypos, beacon_sound); + addText(xpos, ypos, "Viewing physical object beacons (green)"); ypos += y_inc; } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 65fdc12f0a..58dc90ccd9 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -253,6 +253,7 @@ S32 LLPipeline::sCompiles = 0; BOOL LLPipeline::sPickAvatar = TRUE; BOOL LLPipeline::sDynamicLOD = TRUE; BOOL LLPipeline::sShowHUDAttachments = TRUE; +BOOL LLPipeline::sRenderMOAPBeacons = FALSE; BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; BOOL LLPipeline::sRenderScriptedBeacons = FALSE; BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; @@ -2510,6 +2511,42 @@ void renderPhysicalBeacons(LLDrawable* drawablep) } } +void renderMOAPBeacons(LLDrawable* drawablep) +{ + LLViewerObject *vobj = drawablep->getVObj(); + + if(!vobj || vobj->isAvatar()) + return; + + BOOL beacon=FALSE; + U8 tecount=vobj->getNumTEs(); + for(int x=0;x<tecount;x++) + { + if(vobj->getTE(x)->hasMedia()) + { + beacon=TRUE; + break; + } + } + if(beacon==TRUE) + { + if (gPipeline.sRenderBeacons) + { + gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth")); + } + + if (gPipeline.sRenderHighlight) + { + S32 face_id; + S32 count = drawablep->getNumFaces(); + for (face_id = 0; face_id < count; face_id++) + { + gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) ); + } + } + } +} + void renderParticleBeacons(LLDrawable* drawablep) { // Look for attachments, objects, etc. @@ -2715,6 +2752,11 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderPhysicalBeacons); } + if(sRenderMOAPBeacons) + { + forAllVisibleDrawables(renderMOAPBeacons); + } + if (sRenderParticleBeacons) { forAllVisibleDrawables(renderParticleBeacons); @@ -4938,6 +4980,24 @@ BOOL LLPipeline::getRenderScriptedTouchBeacons(void*) } // static +void LLPipeline::setRenderMOAPBeacons(BOOL val) +{ + sRenderMOAPBeacons = val; +} + +// static +void LLPipeline::toggleRenderMOAPBeacons(void*) +{ + sRenderMOAPBeacons = !sRenderMOAPBeacons; +} + +// static +BOOL LLPipeline::getRenderMOAPBeacons(void*) +{ + return sRenderMOAPBeacons; +} + +// static void LLPipeline::setRenderPhysicalBeacons(BOOL val) { sRenderPhysicalBeacons = val; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index e99b0d71e3..92ae40ebb0 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -312,6 +312,10 @@ public: static void toggleRenderSoundBeacons(void* data); static BOOL getRenderSoundBeacons(void* data); + static void setRenderMOAPBeacons(BOOL val); + static void toggleRenderMOAPBeacons(void * data); + static BOOL getRenderMOAPBeacons(void * data); + static void setRenderPhysicalBeacons(BOOL val); static void toggleRenderPhysicalBeacons(void* data); static BOOL getRenderPhysicalBeacons(void* data); @@ -698,6 +702,7 @@ protected: S32 mLightingDetail; static BOOL sRenderPhysicalBeacons; + static BOOL sRenderMOAPBeacons; static BOOL sRenderScriptedTouchBeacons; static BOOL sRenderScriptedBeacons; static BOOL sRenderParticleBeacons; diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml index 4fc2b698d8..3d29356b22 100644 --- a/indra/newview/skins/default/xui/en/floater_beacons.xml +++ b/indra/newview/skins/default/xui/en/floater_beacons.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="225" + height="245" layout="topleft" name="beacons" help_topic="beacons" @@ -12,7 +12,7 @@ width="240"> <panel follows="left|top|right|bottom" - height="200" + height="240" layout="topleft" left="10" name="beacons_panel" @@ -133,6 +133,16 @@ <check_box.commit_callback function="Beacons.UICheck" /> </check_box> + <check_box + control_name="moapbeacon" + height="16" + left="0" + label="Media sources" + layout="topleft" + name="moapbeacon" > + <check_box.commit_callback + function="Beacons.UICheck" /> + </check_box> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 1b55fa4fd3..07dabe1909 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -9,7 +9,7 @@ visible="false" width="128"> <menu_item_check - label="Voice Enabled" + label="Speak Button" layout="topleft" name="EnableVoiceChat"> <menu_item_check.on_click @@ -19,7 +19,6 @@ function="CheckControl" parameter="EnableVoiceChat" /> </menu_item_check> - <menu_item_separator/> <menu_item_check label="Gesture button" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ba13479860..433f623273 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6986,6 +6986,18 @@ Mute everyone? </notification> <notification + name="HintSpeak" + label="Speak" + type="hint" + unique="true"> +Click the Speak button to turn your microphone on and off. + +Click on the up arrow to see the voice control panel. + +Hiding the Speak button will disable the voice feature. + </notification> + + <notification name="HintDestinationGuide" label="Explore the World" type="hint" |