diff options
-rw-r--r-- | indra/llui/llfloater.cpp | 12 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 2 | ||||
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 13 | ||||
-rw-r--r-- | indra/llui/llfloaterreg.h | 1 | ||||
-rw-r--r-- | indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | 40 | ||||
-rw-r--r-- | indra/newview/llagentwearables.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llagentwearables.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterbeacons.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 60 |
10 files changed, 95 insertions, 50 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4cb336f7ea..33895ac22a 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2811,3 +2811,15 @@ bool LLFloater::isShown(const LLFloater* floater) { return floater && floater->isShown(); } + +/* static */ +bool LLFloater::isMinimized(const LLFloater* floater) +{ + return floater && floater->isMinimized(); +} + +/* static */ +bool LLFloater::isVisible(const LLFloater* floater) +{ + return floater && floater->getVisible(); +} diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index c1e8813f87..97d2bda594 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -194,6 +194,8 @@ public: /// The static isShown() can accept a NULL pointer (which of course /// returns false). When non-NULL, it calls the non-static isShown(). static bool isShown(const LLFloater* floater); + static bool isVisible(const LLFloater* floater); + static bool isMinimized(const LLFloater* floater); BOOL isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts BOOL isFrontmost(); BOOL isDependent() { return !mDependeeHandle.isDead(); } diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 5de3934c8a..7588d8ab7a 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -272,11 +272,11 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) } //static -// returns true if the instance exists and is visible +// returns true if the instance exists and is visible (doesnt matter minimized or not) bool LLFloaterReg::instanceVisible(const std::string& name, const LLSD& key) { LLFloater* instance = findInstance(name, key); - return LLFloater::isShown(instance); + return LLFloater::isVisible(instance); } //static @@ -463,3 +463,12 @@ bool LLFloaterReg::floaterInstanceVisible(const LLSD& sdname) return instanceVisible(name, key); } +//static +bool LLFloaterReg::floaterInstanceMinimized(const LLSD& sdname) +{ + LLSD key; + std::string name = sdname.asString(); + parse_name_key(name, key); + LLFloater* instance = findInstance(name, key); + return LLFloater::isShown(instance); +} diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 8a11d5c3f2..5cacf76771 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -134,6 +134,7 @@ public: static void hideFloaterInstance(const LLSD& sdname); static void toggleFloaterInstance(const LLSD& sdname); static bool floaterInstanceVisible(const LLSD& sdname); + static bool floaterInstanceMinimized(const LLSD& sdname); // Typed find / get / show template <class T> diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 26173314a7..4c2dd64bb6 100644 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -141,6 +141,7 @@ private: // Very GStreamer-specific GMainLoop *mPump; // event pump for this media GstElement *mPlaybin; + GstElement *mVisualizer; GstSLVideo *mVideoSink; }; @@ -159,6 +160,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010( mSeekDestination(0.0), mPump ( NULL ), mPlaybin ( NULL ), + mVisualizer ( NULL ), mVideoSink ( NULL ), mCommand ( COMMAND_NONE ) { @@ -686,6 +688,33 @@ MediaPluginGStreamer010::load() this); llgst_object_unref (bus); + // get a visualizer element (bonus feature!) + char* vis_name = getenv("LL_GST_VIS_NAME"); + if (!vis_name || + (vis_name && std::string(vis_name)!="none")) + { + if (vis_name) + { + mVisualizer = llgst_element_factory_make (vis_name, "vis"); + } + if (!mVisualizer) + { + mVisualizer = llgst_element_factory_make ("libvisual_jess", "vis"); + if (!mVisualizer) + { + mVisualizer = llgst_element_factory_make ("goom", "vis"); + if (!mVisualizer) + { + mVisualizer = llgst_element_factory_make ("libvisual_lv_scope", "vis"); + if (!mVisualizer) + { + // That's okay, we don't NEED this. + } + } + } + } + } + if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { // instantiate a custom video sink mVideoSink = @@ -702,6 +731,11 @@ MediaPluginGStreamer010::load() g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); } + if (mVisualizer) + { + g_object_set(mPlaybin, "vis-plugin", mVisualizer, NULL); + } + return true; } @@ -724,6 +758,12 @@ MediaPluginGStreamer010::unload () mPlaybin = NULL; } + if (mVisualizer) + { + llgst_object_unref (GST_OBJECT (mVisualizer)); + mVisualizer = NULL; + } + if (mPump) { g_main_loop_quit(mPump); diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index ea10917901..1187455971 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -676,13 +676,13 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) return NULL; } -const LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) const +LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { for (S32 i=0; i < WT_COUNT; i++) { for (U32 j=0; j < getWearableCount((EWearableType)i); j++) { - const LLWearable * curr_wearable = getWearable((EWearableType)i, j); + LLWearable * curr_wearable = getWearable((EWearableType)i, j); if (curr_wearable && (curr_wearable->getAssetID() == asset_id)) { return curr_wearable; diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 858540a5f5..a6b73997a6 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -89,7 +89,7 @@ public: const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const; const LLUUID getWearableAssetID(EWearableType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; - const LLWearable* getWearableFromAssetID(const LLUUID& asset_id) const; + LLWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/); // MULTI-WEARABLE: assuming one per type. static BOOL selfHasWearable(EWearableType type); diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 13a7888f60..975c888a2b 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -71,7 +71,7 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; std::string name = check->getName(); - if( name == "touch_only") + if(name == "touch_only") { LLPipeline::toggleRenderScriptedTouchBeacons(NULL); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. @@ -81,7 +81,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderScriptedBeacons(FALSE); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE)); + getChild<LLCheckBoxCtrl>("scripted")->setValue(FALSE); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("touch_only")->setValue(TRUE); } } else if(name == "scripted") @@ -94,7 +96,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderScriptedTouchBeacons(FALSE); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE)); + getChild<LLCheckBoxCtrl>("touch_only")->setValue(FALSE); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("scripted")->setValue(TRUE); } } else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); @@ -110,7 +114,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderBeacons(TRUE); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE)); + getChild<LLCheckBoxCtrl>("beacons")->setValue(TRUE); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("highlights")->setValue(FALSE); } } else if(name == "beacons") @@ -123,7 +129,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderHighlights(TRUE); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE)); + getChild<LLCheckBoxCtrl>("highlights")->setValue(TRUE); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("beacons")->setValue(FALSE); } } } diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index cd4a821774..4a24a5dec5 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -297,6 +297,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we } mEditWearable->setVisible(visible); + mEditWearable->setWearable(wearable); mFilterEditor->setVisible(!visible); mPanelOutfitsInventory->setVisible(!visible); } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 0b6bd4b401..b88069cd48 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -180,6 +180,16 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous return false; } + std::string sim_string = LLSLURL::stripProtocol(url); + std::string region_name; + S32 x = 128; + S32 y = 128; + S32 z = 0; + if (! LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) + { + return false; + } + // Before we're logged in, need to update the startup screen // to tell the user where they are going. if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) @@ -194,22 +204,15 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous return true; } - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); //if(url_displayp) url_displayp->setName(region_name); // Request a region handle by name LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, - LLURLDispatcherImpl::regionNameCallback, - url, - false); // don't teleport + LLURLDispatcherImpl::regionNameCallback, + url, + false); // don't teleport return true; } @@ -221,34 +224,11 @@ void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::strin S32 x = 128; S32 y = 128; S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - - LLVector3 local_pos; - local_pos.mV[VX] = (F32)x; - local_pos.mV[VY] = (F32)y; - local_pos.mV[VZ] = (F32)z; - - // determine whether the point is in this region - if ((x >= 0) && (x < REGION_WIDTH_UNITS) && - (y >= 0) && (y < REGION_WIDTH_UNITS)) + if (LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) { - // if so, we're done regionHandleCallback(region_handle, url, snapshot_id, teleport); } - - else - { - // otherwise find the new region from the location - - // add the position to get the new region - LLVector3d global_pos = from_region_handle(region_handle) + LLVector3d(local_pos); - - U64 new_region_handle = to_region_handle(global_pos); - LLWorldMapMessage::getInstance()->sendHandleRegionRequest(new_region_handle, - LLURLDispatcherImpl::regionHandleCallback, - url, teleport); - } } /* static */ @@ -261,17 +241,9 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str S32 z = 0; LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - // remap x and y to local coordinates - S32 local_x = x % REGION_WIDTH_UNITS; - S32 local_y = y % REGION_WIDTH_UNITS; - if (local_x < 0) - local_x += REGION_WIDTH_UNITS; - if (local_y < 0) - local_y += REGION_WIDTH_UNITS; - LLVector3 local_pos; - local_pos.mV[VX] = (F32)local_x; - local_pos.mV[VY] = (F32)local_y; + local_pos.mV[VX] = (F32)x; + local_pos.mV[VY] = (F32)y; local_pos.mV[VZ] = (F32)z; LLVector3d global_pos = from_region_handle(region_handle); |