From 8332550c6dc2a159c9c5812819e167578eda1269 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 8 Feb 2010 18:37:35 -0500 Subject: Temporary diagnostics --- indra/newview/llappearancemgr.cpp | 27 +++++++++++++++++++++++++++ indra/newview/llstartup.cpp | 2 ++ 2 files changed, 29 insertions(+) (limited to 'indra') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0cceba6cb0..aad39854e4 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -113,6 +113,8 @@ public: protected: ~LLWearInventoryCategoryCallback() { + llinfos << "BAP done all inventory callbacks" << llendl; + // Is the destructor called by ordinary dereference, or because the app's shutting down? // If the inventory callback manager goes away, we're shutting down, no longer want the callback. if( LLInventoryCallbackManager::is_instantiated() ) @@ -150,12 +152,15 @@ protected: void LLOutfitObserver::done() { + llinfos << "BAP done 2nd stage fetch" << llendl; gInventory.removeObserver(this); doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this)); } void LLOutfitObserver::doWearCategory() { + llinfos << "BAP start" << llendl; + // We now have an outfit ready to be copied to agent inventory. Do // it, and wear that outfit normally. if(mCopyItems) @@ -244,6 +249,8 @@ void LLOutfitFetch::done() // What we do here is get the complete information on the items in // the library, and set up an observer that will wait for that to // happen. + llinfos << "BAP done first stage fetch" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(mCompleteFolders.front(), @@ -304,6 +311,8 @@ public: virtual ~LLUpdateAppearanceOnDestroy() { + llinfos << "BAP done update appearance on destroy" << llendl; + if (!LLApp::isExiting()) { LLAppearanceManager::instance().updateAppearanceFromCOF(); @@ -312,6 +321,7 @@ public: /* virtual */ void fire(const LLUUID& inv_item) { + llinfos << "BAP fire" << llendl; mFireCount++; } private: @@ -703,6 +713,8 @@ void LLAppearanceManager::linkAll(const LLUUID& category, void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { + llinfos << "BAP updating cof" << llendl; + const LLUUID cof = getCOF(); // Deactivate currently active gestures in the COF, if replacing outfit @@ -760,18 +772,26 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) gInventory.notifyObservers(); // Create links to new COF contents. + llinfos << "BAP creating LLUpdateAppearanceOnDestroy" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; linkAll(cof, body_items, link_waiter); + llinfos << "BAP submitted all body_items link requests" << llendl; linkAll(cof, wear_items, link_waiter); + llinfos << "BAP submitted all wear_items link requests" << llendl; linkAll(cof, obj_items, link_waiter); + llinfos << "BAP submitted all obj link requests" << llendl; linkAll(cof, gest_items, link_waiter); + llinfos << "BAP submitted all gest link requests" << llendl; + // Add link to outfit if category is an outfit. if (!append) { createBaseOutfitLink(category, link_waiter); } + llinfos << "BAP submitted all link requests" << llendl; + llinfos << "BAP waiting for LLUpdateAppearanceOnDestroy" << llendl; } void LLAppearanceManager::updatePanelOutfitName(const std::string& name) @@ -843,6 +863,8 @@ void LLAppearanceManager::updateAppearanceFromCOF() { // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link + llinfos << "BAP update appearance starts" << llendl; + updateIsDirty(); dumpCat(getCOF(),"COF, start"); @@ -973,8 +995,11 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b { if(!category) return; + llinfos << "BAP wearInventoryCategory" << llendl; + lldebugs << "wearInventoryCategory( " << category->getName() << " )" << llendl; + // What we do here is get the complete information on the items in // the inventory, and set up an observer that will wait for that to // happen. @@ -1003,6 +1028,8 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca // this up front to avoid having to deal with the case of multiple // wearables being dirty. if(!category) return; + llinfos << "BAP wearInventoryCategoryOnAvatar( " << category->getName() + << " )" << llendl; lldebugs << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d1b91df6e9..171b441b2b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2544,6 +2544,8 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { + llinfos << "BAP load initial outfit start" << llendl; + // Not going through the processAgentInitialWearables path, so need to set this here. LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); // Initiate creation of COF, since we're also bypassing that. -- cgit v1.2.3 From 662ce9b1fd6fcdf817e8fd825ce2c35e4fa52ca3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Wed, 10 Feb 2010 16:08:15 -0500 Subject: More temporary log messages --- indra/newview/llvoavatar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4235f97eab..5252e11a51 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2532,6 +2532,10 @@ void LLVOAvatar::idleUpdateLoadingEffect() // update visibility when avatar is partially loaded if (updateIsFullyLoaded()) // changed? { + if (isFullyLoaded() && isSelf()) + { + llwarns << "BAP self isFullyLoaded" << llendl; + } if (isFullyLoaded()) { deleteParticleSource(); -- cgit v1.2.3 From de1cf42eb631b1254193e1f9e6e1236da3c4cfda Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Thu, 11 Feb 2010 12:41:10 -0800 Subject: EXT-5044 substasks: turning the event panel into an event floater. reviewed by Richard. --- indra/newview/CMakeLists.txt | 4 +- indra/newview/llfloaterevent.cpp | 331 +++++++++++++++++++++ indra/newview/llfloaterevent.h | 94 ++++++ indra/newview/llstartup.cpp | 4 +- indra/newview/llviewerfloaterreg.cpp | 3 + .../newview/skins/default/xui/en/floater_event.xml | 230 ++++++++++++++ 6 files changed, 662 insertions(+), 4 deletions(-) create mode 100644 indra/newview/llfloaterevent.cpp create mode 100644 indra/newview/llfloaterevent.h create mode 100644 indra/newview/skins/default/xui/en/floater_event.xml (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cd7c002096..b74530e49a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -161,6 +161,7 @@ set(viewer_SOURCE_FILES llfloatercustomize.cpp llfloaterdaycycle.cpp llfloaterenvsettings.cpp + llfloaterevent.cpp llfloaterfonttest.cpp llfloatergesture.cpp llfloatergodtools.cpp @@ -300,7 +301,6 @@ set(viewer_SOURCE_FILES llpanelclassified.cpp llpanelcontents.cpp llpaneleditwearable.cpp - llpanelevent.cpp llpanelface.cpp llpanelgroup.cpp llpanelgroupgeneral.cpp @@ -661,6 +661,7 @@ set(viewer_HEADER_FILES llfloatercustomize.h llfloaterdaycycle.h llfloaterenvsettings.h + llfloaterevent.h llfloaterfonttest.h llfloatergesture.h llfloatergodtools.h @@ -795,7 +796,6 @@ set(viewer_HEADER_FILES llpanelclassified.h llpanelcontents.h llpaneleditwearable.h - llpanelevent.h llpanelface.h llpanelgroup.h llpanelgroupgeneral.h diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp new file mode 100644 index 0000000000..91c2810026 --- /dev/null +++ b/indra/newview/llfloaterevent.cpp @@ -0,0 +1,331 @@ +/** + * @file llfloaterevent.cpp + * @brief Display for events in the finder + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterevent.h" + +#include "message.h" +#include "llnotificationsutil.h" +#include "llui.h" + +#include "llagent.h" +#include "llviewerwindow.h" +#include "llbutton.h" +#include "llcachename.h" +#include "llcommandhandler.h" // secondlife:///app/chat/ support +#include "lleventflags.h" +#include "lleventnotifier.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "llfloaterworldmap.h" +#include "llinventorymodel.h" +#include "llsecondlifeurls.h" +#include "lltextbox.h" +#include "lltexteditor.h" +#include "lluiconstants.h" +#include "llviewercontrol.h" +#include "llweb.h" +#include "llworldmap.h" +#include "lluictrlfactory.h" +#include "lltrans.h" + + +class LLEventHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLEventHandler() : LLCommandHandler("event", UNTRUSTED_THROTTLE) { } + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 1) + { + return false; + } + + LLFloaterEvent* floater = LLFloaterReg::getTypedInstance<LLFloaterEvent>("event"); + if (floater) + { + floater->setEventID(params[0].asInteger()); + LLFloaterReg::showTypedInstance<LLFloaterEvent>("event"); + return true; + } + + return false; + } +}; +LLEventHandler gEventHandler; + +LLFloaterEvent::LLFloaterEvent(const LLSD& key) + : LLFloater(key), + + mEventID(0) +{ +} + + +LLFloaterEvent::~LLFloaterEvent() +{ +} + + +BOOL LLFloaterEvent::postBuild() +{ + mTBName = getChild<LLTextBox>("event_name"); + + mTBCategory = getChild<LLTextBox>("event_category"); + + mTBDate = getChild<LLTextBox>("event_date"); + + mTBDuration = getChild<LLTextBox>("event_duration"); + + mTBDesc = getChild<LLTextEditor>("event_desc"); + mTBDesc->setEnabled(FALSE); + + mTBRunBy = getChild<LLTextBox>("event_runby"); + mTBLocation = getChild<LLTextBox>("event_location"); + mTBCover = getChild<LLTextBox>("event_cover"); + + mTeleportBtn = getChild<LLButton>( "teleport_btn"); + mTeleportBtn->setClickedCallback(onClickTeleport, this); + + mMapBtn = getChild<LLButton>( "map_btn"); + mMapBtn->setClickedCallback(onClickMap, this); + + mNotifyBtn = getChild<LLButton>( "notify_btn"); + mNotifyBtn->setClickedCallback(onClickNotify, this); + + mCreateEventBtn = getChild<LLButton>( "create_event_btn"); + mCreateEventBtn->setClickedCallback(onClickCreateEvent, this); + + return TRUE; +} + +void LLFloaterEvent::setEventID(const U32 event_id) +{ + mEventID = event_id; + // Should reset all of the panel state here + resetInfo(); + + if (event_id != 0) + { + sendEventInfoRequest(); + } +} + + +void LLFloaterEvent::sendEventInfoRequest() +{ + LLMessageSystem *msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventInfoRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, mEventID); + gAgent.sendReliableMessage(); +} + + +//static +void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) +{ + // extract the agent id + LLUUID agent_id; + msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); + + LLFloaterEvent* floater = LLFloaterReg::getTypedInstance<LLFloaterEvent>("event"); + + if(floater) + { + floater->mEventInfo.unpack(msg); + floater->mTBName->setText(floater->mEventInfo.mName); + floater->mTBCategory->setText(floater->mEventInfo.mCategoryStr); + floater->mTBDate->setText(floater->mEventInfo.mTimeStr); + floater->mTBDesc->setText(floater->mEventInfo.mDesc); + + floater->mTBDuration->setText(llformat("%d:%.2d", floater->mEventInfo.mDuration / 60, floater->mEventInfo.mDuration % 60)); + + if (!floater->mEventInfo.mHasCover) + { + floater->mTBCover->setText(floater->getString("none")); + } + else + { + floater->mTBCover->setText(llformat("%d", floater->mEventInfo.mCover)); + } + + F32 global_x = (F32)floater->mEventInfo.mPosGlobal.mdV[VX]; + F32 global_y = (F32)floater->mEventInfo.mPosGlobal.mdV[VY]; + + S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; + S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; + S32 region_z = llround((F32)floater->mEventInfo.mPosGlobal.mdV[VZ]); + + std::string desc = floater->mEventInfo.mSimName + llformat(" (%d, %d, %d)", region_x, region_y, region_z); + floater->mTBLocation->setText(desc); + + if (floater->mEventInfo.mEventFlags & EVENT_FLAG_MATURE) + { + floater->childSetVisible("event_mature_yes", TRUE); + floater->childSetVisible("event_mature_no", FALSE); + } + else + { + floater->childSetVisible("event_mature_yes", FALSE); + floater->childSetVisible("event_mature_no", TRUE); + } + + if (floater->mEventInfo.mUnixTime < time_corrected()) + { + floater->mNotifyBtn->setEnabled(FALSE); + } + else + { + floater->mNotifyBtn->setEnabled(TRUE); + } + + if (gEventNotifier.hasNotification(floater->mEventInfo.mID)) + { + floater->mNotifyBtn->setLabel(floater->getString("dont_notify")); + } + else + { + floater->mNotifyBtn->setLabel(floater->getString("notify")); + } + } +} + + +void LLFloaterEvent::draw() +{ + std::string name; + gCacheName->getFullName(mEventInfo.mRunByID, name); + + mTBRunBy->setText(name); + + LLPanel::draw(); +} + +void LLFloaterEvent::resetInfo() +{ + // Clear all of the text fields. +} + +// static +void LLFloaterEvent::onClickTeleport(void* data) +{ + LLFloaterEvent* self = (LLFloaterEvent*)data; + LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); + if (!self->mEventInfo.mPosGlobal.isExactlyZero()&&worldmap_instance) + { + gAgent.teleportViaLocation(self->mEventInfo.mPosGlobal); + worldmap_instance->trackLocation(self->mEventInfo.mPosGlobal); + } +} + + +// static +void LLFloaterEvent::onClickMap(void* data) +{ + LLFloaterEvent* self = (LLFloaterEvent*)data; + LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); + + if (!self->mEventInfo.mPosGlobal.isExactlyZero()&&worldmap_instance) + { + worldmap_instance->trackLocation(self->mEventInfo.mPosGlobal); + LLFloaterReg::showInstance("world_map", "center"); + } +} + + +// static +/* +void LLPanelEvent::onClickLandmark(void* data) +{ + LLPanelEvent* self = (LLPanelEvent*)data; + //create_landmark(self->mTBName->getText(), "", self->mEventInfo.mPosGlobal); + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("CreateLandmarkForEvent"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, self->mEventID); + msg->nextBlockFast(_PREHASH_InventoryBlock); + LLUUID folder_id; + folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); + msg->addUUIDFast(_PREHASH_FolderID, folder_id); + msg->addStringFast(_PREHASH_Name, self->mTBName->getText()); + gAgent.sendReliableMessage(); +} +*/ + +// static +void LLFloaterEvent::onClickCreateEvent(void* data) +{ + LLNotificationsUtil::add("PromptGoToEventsPage");//, LLSD(), LLSD(), callbackCreateEventWebPage); +} + +// static +void LLFloaterEvent::onClickNotify(void *data) +{ + LLFloaterEvent* self = (LLFloaterEvent*)data; + + if (!gEventNotifier.hasNotification(self->mEventID)) + { + gEventNotifier.add(self->mEventInfo); + self->mNotifyBtn->setLabel(self->getString("dont_notify")); + } + else + { + gEventNotifier.remove(self->mEventInfo.mID); + self->mNotifyBtn->setLabel(self->getString("notify")); + } +} +/* +// static +bool LLPanelEvent::callbackCreateEventWebPage(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + llinfos << "Loading events page " << LLNotifications::instance().getGlobalString("EVENTS_URL") << llendl; + + LLWeb::loadURL( LLNotifications::instance().getGlobalString("EVENTS_URL")); + } + return false; +} +*/ + diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h new file mode 100644 index 0000000000..c93e3f73ca --- /dev/null +++ b/indra/newview/llfloaterevent.h @@ -0,0 +1,94 @@ +/** + * @file llfloaterevent.h + * @brief Display for events in the finder + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATEREVENT_H +#define LL_LLFLOATEREVENT_H + +#include "llfloater.h" + +#include "lleventinfo.h" +#include "lluuid.h" +#include "v3dmath.h" + +class LLTextBox; +class LLTextEditor; +class LLButton; +class LLMessageSystem; + +class LLFloaterEvent : public LLFloater +{ +public: + LLFloaterEvent(const LLSD& key); + /*virtual*/ ~LLFloaterEvent(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + + void setEventID(const U32 event_id); + void sendEventInfoRequest(); + + static void processEventInfoReply(LLMessageSystem *msg, void **); + + U32 getEventID() { return mEventID; } + +protected: + void resetInfo(); + + static void onClickTeleport(void*); + static void onClickMap(void*); + //static void onClickLandmark(void*); + static void onClickCreateEvent(void*); + static void onClickNotify(void*); + +// static bool callbackCreateEventWebPage(const LLSD& notification, const LLSD& response); + +protected: + U32 mEventID; + LLEventInfo mEventInfo; + + LLTextBox* mTBName; + LLTextBox* mTBCategory; + LLTextBox* mTBDate; + LLTextBox* mTBDuration; + LLTextEditor* mTBDesc; + + LLTextBox* mTBRunBy; + LLTextBox* mTBLocation; + LLTextBox* mTBCover; + + LLButton* mTeleportBtn; + LLButton* mMapBtn; + LLButton* mCreateEventBtn; + LLButton* mNotifyBtn; +}; + +#endif // LL_LLFLOATEREVENT_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d1b91df6e9..63f5883a70 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -123,7 +123,7 @@ #include "llmutelist.h" #include "llpanelavatar.h" #include "llavatarpropertiesprocessor.h" -#include "llpanelevent.h" +#include "llfloaterevent.h" #include "llpanelclassified.h" #include "llpanelpick.h" #include "llpanelplace.h" @@ -2484,7 +2484,7 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFunc("MapBlockReply", LLWorldMapMessage::processMapBlockReply); msg->setHandlerFunc("MapItemReply", LLWorldMapMessage::processMapItemReply); - msg->setHandlerFunc("EventInfoReply", LLPanelEvent::processEventInfoReply); + msg->setHandlerFunc("EventInfoReply", LLFloaterEvent::processEventInfoReply); msg->setHandlerFunc("PickInfoReply", &LLAvatarPropertiesProcessor::processPickInfoReply); // msg->setHandlerFunc("ClassifiedInfoReply", LLPanelClassified::processClassifiedInfoReply); msg->setHandlerFunc("ClassifiedInfoReply", LLAvatarPropertiesProcessor::processClassifiedInfoReply); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 29114c33c5..eb070fb3ef 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -55,6 +55,7 @@ #include "llfloaterbump.h" #include "llfloatercamera.h" #include "llfloaterdaycycle.h" +#include "llfloaterevent.h" #include "llfloatersearch.h" #include "llfloaterenvsettings.h" #include "llfloaterfonttest.h" @@ -160,6 +161,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("env_settings", "floater_env_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvSettings>); LLFloaterReg::add("env_water", "floater_water.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWater>); LLFloaterReg::add("env_windlight", "floater_windlight_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWindLight>); + + LLFloaterReg::add("event", "floater_event.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEvent>); LLFloaterReg::add("font_test", "floater_font_test.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFontTest>); diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml new file mode 100644 index 0000000000..3d579f56be --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_event.xml @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + follows="all" + height="350" + label="Event" + layout="topleft" + name="Event" + width="330"> + <floater.string + name="none"> + none + </floater.string> + <floater.string + name="notify"> + Notify + </floater.string> + <floater.string + name="dont_notify"> + Don't Notify + </floater.string> + <layout_stack + name="layout" + orientation="vertical" + follows="all" + layout="topleft" + left="0" + top="0" + height="350" + width="330" + border_size="0"> + <layout_panel + name="profile_stack" + follows="all" + layout="topleft" + top="0" + left="0" + height="305" + width="330"> + <text + follows="top|left|right" + font="SansSerifLarge" + text_color="white" + height="17" + layout="topleft" + left="10" + name="event_name" + top="5" + use_ellipses="true" + width="310"> + Nameless Event...of Doom! De doom! Doom doom. + </text> + <text + type="string" + length="1" + follows="top|left" + height="13" + text_color="LtGray_50" + layout="topleft" + left="25" + name="event_category" + width="300"> + (no category) + </text> + + <text + type="string" + length="1" + follows="top|left" + layout="topleft" + left="10" + top_pad="7" + name="event_runby_label" + width="310"> + Run by: + </text> + <name_box + follows="left|top" + height="20" + initial_value="(retrieving)" + layout="topleft" + left="10" + link="true" + name="event_runby" + top_pad="2" + use_ellipses="true" + width="310" /> + <text + type="string" + length="1" + left="10" + height="17" + font="SansSerifMedium" + text_color="EmphasisColor" + top_pad="5" + follows="top|left" + layout="topleft" + name="event_date" + width="310"> + 10/10/2010 + </text> + <text + type="string" + height="14" + length="1" + left="10" + follows="top|left" + layout="topleft" + name="event_duration" + width="310"> + 1 hour + </text> + <text + font="SansSerifMedium" + text_color="EmphasisColor" + type="string" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="event_cover" + visible="true" + width="310"> + Free + </text> + <text + type="string" + length="1" + follows="top|left" + layout="topleft" + left="10" + top_pad="5" + name="event_location_label"> + Location: + </text> + <text + type="string" + length="1" + height="20" + left="10" + follows="top|left" + layout="topleft" + name="event_location" + use_ellipses="true" + value="SampleParcel, Name Long (145, 228, 26)" + width="310" /> + <icon + follows="top|left" + height="16" + image_name="Parcel_PG_Dark" + layout="topleft" + left="10" + name="rating_icon" + width="18" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="12" + name="rating_label" + top_delta="3" + value="Rating:" + width="60" /> + <text + follows="left|right|top" + height="16" + layout="topleft" + left_pad="0" + name="rating_value" + top_delta="0" + value="unknown" + width="200" /> + <expandable_text + follows="left|top|right" + height="106" + layout="topleft" + left="6" + name="event_desc" + value="Du waltz die spritz" + width="313" /> + </layout_panel> + <layout_panel + follows="left|right" + height="24" + layout="topleft" + mouse_opaque="false" + name="button_panel" + top="0" + left="0" + user_resize="false"> + <button + follows="left|top" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" + layout="topleft" + left="6" + name="create_event_btn" + picture_style="true" + tool_tip="Create Event" + width="18" /> + <button + follows="left|top" + height="23" + label="Notify Me" + layout="topleft" + left_pad="3" + top_delta="-1" + name="notify_btn" + width="100" /> + <button + follows="left|top" + height="23" + label="Teleport" + layout="topleft" + left_pad="5" + name="teleport_btn" + width="100" /> + <button + follows="left|top" + height="23" + label="Map" + layout="topleft" + left_pad="5" + name="map_btn" + width="85" /> + </layout_panel> + </layout_stack> + </floater> + -- cgit v1.2.3 From 8b609519ea46b785e529c83067ede3656fc10828 Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Fri, 12 Feb 2010 15:15:49 +0200 Subject: fixed reopened EXT-926 System notification toast has avatar's icon --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 7a5d8be84a..9368d9cb7c 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -259,7 +259,9 @@ public: mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4)); - if(chat.mFromID.isNull()) + + //*TODO overly defensive thing, source type should be maintained out there + if(chat.mFromID.isNull() || chat.mFromName == SYSTEM_FROM) { mSourceType = CHAT_SOURCE_SYSTEM; } @@ -269,17 +271,13 @@ public: userName->setReadOnlyColor(style_params.readonly_color()); userName->setColor(style_params.color()); - if(!chat.mFromName.empty()) - { - userName->setValue(chat.mFromName); - mFrom = chat.mFromName; - } - else + userName->setValue(chat.mFromName); + if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType) { - std::string SL = LLTrans::getString("SECOND_LIFE"); - userName->setValue(SL); + userName->setValue(LLTrans::getString("SECOND_LIFE")); } + mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING; setTimeField(chat); @@ -289,20 +287,17 @@ public: if(mSourceType != CHAT_SOURCE_AGENT) icon->setDrawTooltip(false); - if(!chat.mFromID.isNull()) + switch (mSourceType) { - if(mSourceType != CHAT_SOURCE_AGENT) - icon->setValue(LLSD("OBJECT_Icon")); - else + case CHAT_SOURCE_AGENT: icon->setValue(chat.mFromID); - - - } - else if (userName->getValue().asString()==LLTrans::getString("SECOND_LIFE")) - { - icon->setValue(LLSD("SL_Logo")); + break; + case CHAT_SOURCE_OBJECT: + icon->setValue(LLSD("OBJECT_Icon")); + break; + case CHAT_SOURCE_SYSTEM: + icon->setValue(LLSD("SL_Logo")); } - } /*virtual*/ void draw() -- cgit v1.2.3 From c06742b231b9e7b108f5e3dce6b72d9b9a639537 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Fri, 12 Feb 2010 16:09:18 +0200 Subject: fixed Bug Low EXT-4732 Group invitation is broken for offline avatars Cause: gObjectList does contain offline avatars and panel could get avatar name and fill the list Solution: This situation is possible only for offline friend, therefore extra avatartracker search has been added. --HG-- branch : product-engine --- indra/newview/llpanelgroupinvite.cpp | 40 ++++++++++++++++++++++++++++++++---- indra/newview/llpanelgroupinvite.h | 4 ++++ indra/newview/llviewerobjectlist.h | 4 ++++ 3 files changed, 44 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 06a682c905..05261a65de 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -36,6 +36,7 @@ #include "llagent.h" #include "llfloateravatarpicker.h" #include "llbutton.h" +#include "llcallingcard.h" #include "llcombobox.h" #include "llgroupactions.h" #include "llgroupmgr.h" @@ -405,16 +406,13 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) { LLUUID agent_id = agent_ids[i]; LLViewerObject* dest = gObjectList.findObject(agent_id); + std::string fullname; if(dest && dest->isAvatar()) { - std::string fullname; - LLSD args; LLNameValue* nvfirst = dest->getNVPair("FirstName"); LLNameValue* nvlast = dest->getNVPair("LastName"); if(nvfirst && nvlast) { - args["FIRST"] = std::string(nvfirst->getString()); - args["LAST"] = std::string(nvlast->getString()); fullname = std::string(nvfirst->getString()) + " " + std::string(nvlast->getString()); } if (!fullname.empty()) @@ -427,10 +425,44 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) names.push_back("(Unknown)"); } } + else + { + //looks like user try to invite offline friend + //for offline avatar_id gObjectList.findObject() will return null + //so we need to do this additional search in avatar tracker, see EXT-4732 + if (LLAvatarTracker::instance().isBuddy(agent_id)) + { + if (!gCacheName->getFullName(agent_id, fullname)) + { + // actually it should happen, just in case + gCacheName->get(LLUUID(agent_id), false, boost::bind( + &LLPanelGroupInvite::addUserCallback, this, _1, _2, + _3)); + // for this special case! + //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence + // removed id will be added in callback + agent_ids.erase(agent_ids.begin() + i); + } + else + { + names.push_back(fullname); + } + } + } } mImplementation->addUsers(names, agent_ids); } +void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name) +{ + std::vector<std::string> names; + std::vector<LLUUID> agent_ids; + std::string full_name = first_name + " " + last_name; + agent_ids.push_back(id); + names.push_back(first_name + " " + last_name); + + mImplementation->addUsers(names, agent_ids); +} void LLPanelGroupInvite::draw() { LLPanel::draw(); diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index 37135b488a..b095dd2395 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -43,6 +43,10 @@ public: ~LLPanelGroupInvite(); void addUsers(std::vector<LLUUID>& agent_ids); + /** + * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers(). + */ + void addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name); void clear(); void update(); diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index ace5c5038e..2858081dc9 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -233,6 +233,10 @@ public: extern LLViewerObjectList gObjectList; // Inlines +/** + * Note: + * it will return NULL for offline avatar_id + */ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) { std::map<LLUUID, LLPointer<LLViewerObject> >::iterator iter = mUUIDObjectMap.find(id); -- cgit v1.2.3 From 5a5262bbdc72f5040cd681b452417c29c86cfafe Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Fri, 12 Feb 2010 16:24:24 +0200 Subject: Fixed normal bug EXT - 5248 (Default group icon for IM sessions in multifloater). The problem was in LLAgent::isInGroup() logic. In God Mode it always returned true, even if it was not so. Added ability to ignore God Mode in LLAgent::isInGroup(). --HG-- branch : product-engine --- indra/newview/llagent.cpp | 4 ++-- indra/newview/llagent.h | 2 +- indra/newview/llimfloatercontainer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 59f61dfdfb..7929946620 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5027,9 +5027,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const } } -BOOL LLAgent::isInGroup(const LLUUID& group_id) const +BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod /* FALSE */) const { - if (isGodlike()) + if (!ingnore_God_mod && isGodlike()) return true; S32 count = mGroups.count(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index beede7fbe3..1573fd7131 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -982,7 +982,7 @@ private: //-------------------------------------------------------------------- public: // Checks against all groups in the entire agent group list. - BOOL isInGroup(const LLUUID& group_id) const; + BOOL isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod = FALSE) const; protected: // Only used for building titles. BOOL isGroupMember() const { return !mGroupID.isNull(); } diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 7162386d08..49521b5987 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -93,7 +93,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLIconCtrl* icon = 0; - if(gAgent.isInGroup(session_id)) + if(gAgent.isInGroup(session_id, TRUE)) { LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); icon_params.group_id = session_id; -- cgit v1.2.3 From 951fd66000a22d65c76d44f5de5e38a76513b528 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Fri, 12 Feb 2010 16:26:52 +0200 Subject: Completed normal task EXT-3410 (Liberate filter_editor clear_button height width parameters - art is distorted) - improved calculation of clear_button position (to be xml driven) - replaced clear_button art with suggested Icon_Close_Toast in filter_editor widget --HG-- branch : product-engine --- indra/llui/llsearcheditor.cpp | 6 ++++-- indra/newview/skins/default/xui/en/widgets/filter_editor.xml | 4 ++-- indra/newview/skins/default/xui/en/widgets/search_editor.xml | 8 ++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 838dbbd135..491eeeab54 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -80,10 +80,12 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) if (p.clear_button_visible) { // Set up clear button. - S32 clr_btn_width = getRect().getHeight(); // button is square, and as tall as search editor - LLRect clear_btn_rect(getRect().getWidth() - clr_btn_width, getRect().getHeight(), getRect().getWidth(), 0); LLButton::Params clr_btn_params(p.clear_button); clr_btn_params.name(std::string("clear button")); + S32 clr_btn_top = clr_btn_params.rect.bottom + clr_btn_params.rect.height; + S32 clr_btn_right = getRect().getWidth() - clr_btn_params.pad_right; + S32 clr_btn_left = clr_btn_right - clr_btn_params.rect.width; + LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom); clr_btn_params.rect(clear_btn_rect) ; clr_btn_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP); clr_btn_params.tab_stop(false); diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml index 1228f6be3d..0720621f0b 100644 --- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml @@ -16,6 +16,6 @@ image_unselected="Search" image_selected="Search" /> <clear_button label="" - image_unselected="Icon_Close_Foreground" - image_selected="Icon_Close_Press" /> + image_unselected="Icon_Close_Toast" + image_selected="Icon_Close_Toast" /> </filter_editor> diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml index 1616e4c3f7..a9a760b3a4 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml @@ -15,7 +15,11 @@ height="13" image_unselected="Search" image_selected="Search" /> - <clear_button + <clear_button + bottom="4" + height="16" image_unselected="Icon_Close_Foreground" - image_selected="Icon_Close_Press" /> + image_selected="Icon_Close_Press" + pad_right="4" + width="16" /> </search_editor> -- cgit v1.2.3 From 6ead0d131fa442d51c1cd9c9d022bf1844138e46 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan <dzaporozhan@productengine.com> Date: Fri, 12 Feb 2010 16:56:29 +0200 Subject: Fixed normal bug EXT-1093 - Dialog boxes should be centered in the viewport(game area). --HG-- branch : product-engine --- indra/newview/llnotificationalerthandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 52de8355e9..60e41b64ac 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -36,6 +36,7 @@ #include "llnotificationhandler.h" #include "llnotifications.h" +#include "llprogressview.h" #include "lltoastnotifypanel.h" #include "llviewercontrol.h" #include "llviewerwindow.h" @@ -116,6 +117,11 @@ bool LLAlertHandler::processNotification(const LLSD& notify) p.is_modal = mIsModal; p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1); + // Show alert in middle of progress view (during teleport) (EXT-1093) + LLProgressView* progress = gViewerWindow->getProgressView(); + LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); + mChannel->updatePositionAndSize(rc, rc); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); if(channel) channel->addToast(p); -- cgit v1.2.3 From 713eb289b0128cae540866f38e0baff187ef3392 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Fri, 12 Feb 2010 17:54:57 +0200 Subject: Fixed normal bug EXT-5117 (Voice Control Panel sorting should default to by Recent speaker). - Changed sort order of participant list in VCP to by Recent speaker after it's creation. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 0aaaa8e705..3c4f791d91 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -333,6 +333,7 @@ void LLCallFloater::refreshParticipantList() { mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT); mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); + mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS); if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) { -- cgit v1.2.3 From df6af052e0e8810b0ba82245a970091be8c1eb6b Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:37:08 +0000 Subject: CID-428 Checker: FORWARD_NULL Function: LLCallFloater::updateSession() File: /indra/newview/llcallfloater.cpp --- indra/newview/llcallfloater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 3c4f791d91..76e058a1c3 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -304,7 +304,9 @@ void LLCallFloater::updateSession() updateAgentModeratorState(); //show floater for voice calls & only in CONNECTED to voice channel state - if (!is_local_chat && LLVoiceChannel::STATE_CONNECTED == voice_channel->getState()) + if (!is_local_chat && + voice_channel && + LLVoiceChannel::STATE_CONNECTED == voice_channel->getState()) { LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); bool show_me = !(im_floater && im_floater->getVisible()); -- cgit v1.2.3 From 4fa10e35965341e5fde3991c0f38f048a5885645 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:38:19 +0000 Subject: CID-427 Checker: FORWARD_NULL Function: LLFolderBridge::pasteFromClipboard() File: /indra/newview/llinventorybridge.cpp --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index da95eaefca..019a4b22c3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2434,7 +2434,10 @@ void LLFolderBridge::pasteFromClipboard() //we have to update inventory locally too LLViewerInventoryItem* viitem = dynamic_cast<LLViewerInventoryItem*>(item); llassert(viitem); - changeItemParent(model, viitem, parent_id, FALSE); + if (viitem) + { + changeItemParent(model, viitem, parent_id, FALSE); + } } else { -- cgit v1.2.3 From 947aeb19153edafa82561dc440cf72d4f80583a4 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:40:39 +0000 Subject: CID-413 Checker: UNUSED_VALUE Function: LLFloaterWater::deleteAlertCallback(const LLSD &, const LLSD &) File: /indra/newview/llfloaterwater.cpp dead code. --- indra/newview/llfloaterwater.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 66a1f6701f..1bbee2625c 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -574,12 +574,10 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r LLComboBox* combo_box = getChild<LLComboBox>("WaterPresetsCombo"); LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle"); LLComboBox* key_combo = NULL; - LLMultiSliderCtrl* mult_sldr = NULL; if (day_cycle) { key_combo = day_cycle->getChild<LLComboBox>("WaterKeyPresets"); - mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WaterDayCycleKeys"); } std::string name = combo_box->getSelectedValue().asString(); -- cgit v1.2.3 From 6d80e75e0bdebdd960c7ad2ff3f7ea87812a87ba Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:41:55 +0000 Subject: CID-412 Checker: UNUSED_VALUE Function: LLFloaterWindLight::deleteAlertCallback(const LLSD &, const LLSD &) File: /indra/newview/llfloaterwindlight.cpp dead code. --- indra/newview/llfloaterwindlight.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index ea6fda7303..c1b15c578c 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -749,12 +749,10 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS LLComboBox* combo_box = getChild<LLComboBox>("WLPresetsCombo"); LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle"); LLComboBox* key_combo = NULL; - LLMultiSliderCtrl* mult_sldr = NULL; if (day_cycle) { key_combo = day_cycle->getChild<LLComboBox>("WLKeyPresets"); - mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys"); } std::string name(combo_box->getSelectedValue().asString()); -- cgit v1.2.3 From 69aa73656e739f4fc8085bd5347fe081e2df9510 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:43:47 +0000 Subject: CID-287 Checker: UNINIT_CTOR Function: LLScriptScript::LLScriptScript(LLScritpGlobalStorage *, LLScriptState *) File: /indra/lscript/lscript_compile/lscript_tree.cpp --- indra/lscript/lscript_compile/lscript_tree.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp index 3b8bbbe805..4ba41db2fc 100644 --- a/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/indra/lscript/lscript_compile/lscript_tree.cpp @@ -10626,6 +10626,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals, } temp = temp->mNextp; } + + mClassName[0] = '\0'; } void LLScriptScript::setBytecodeDest(const char* dst_filename) -- cgit v1.2.3 From 23b1c3d16f2597b20f9c6d123dd306c6a1fa8eac Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:46:34 +0000 Subject: CID-286 Checker: UNINIT_CTOR Function: LLScriptStateChange::LLScriptStateChange(int, int, LLScriptIdentifier *) File: /indra/lscript/lscript_compile/lscript_tree.h --- indra/lscript/lscript_compile/lscript_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h index a667e1eb5b..5d7f7e25b2 100644 --- a/indra/lscript/lscript_compile/lscript_tree.h +++ b/indra/lscript/lscript_compile/lscript_tree.h @@ -1876,7 +1876,7 @@ class LLScriptStateChange : public LLScriptStatement { public: LLScriptStateChange(S32 line, S32 col, LLScriptIdentifier *identifier) - : LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier) + : LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier), mReturnType(LST_NULL) { } -- cgit v1.2.3 From 41bd792032f651faa61917b7136edf32c79fc64d Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:47:21 +0000 Subject: CID-285 Checker: UNINIT_CTOR Function: LLScriptState::LLScriptState(int, int, e_lscript_state_type, LLScriptIdentifier *, LLScriptEventHandler *) File: /indra/lscript/lscript_compile/lscript_tree.h --- indra/lscript/lscript_compile/lscript_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h index 5d7f7e25b2..7de9606dfc 100644 --- a/indra/lscript/lscript_compile/lscript_tree.h +++ b/indra/lscript/lscript_compile/lscript_tree.h @@ -2210,7 +2210,7 @@ class LLScriptState : public LLScriptFilePosition { public: LLScriptState(S32 line, S32 col, LSCRIPTStateType type, LLScriptIdentifier *identifier, LLScriptEventHandler *event) - : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL) + : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL), mStateScope(NULL) { } -- cgit v1.2.3 From 290a5846fc56046e7d8d65755250c49da25c9a46 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:49:55 +0000 Subject: CID-218 Checker: REVERSE_INULL Function: LLAgentWearables::setWearableOutfit(const LLDynamicArray<LLPointer<LLInventoryItem>, (int)32> &, LLDynamicArray<LLWearable *, (int)32>&, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index a439720dcf..5d6e88a833 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1605,6 +1605,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it LLWearable* new_wearable = wearables[i]; LLPointer<LLInventoryItem> new_item = items[i]; + llassert(new_wearable); + if (!new_wearable) continue; + const EWearableType type = new_wearable->getType(); wearables_to_remove[type] = FALSE; -- cgit v1.2.3 From 21e86251c0e328a491ffe78d0f34c39646bbf447 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:51:23 +0000 Subject: CID-218 Checker: REVERSE_INULL Function: LLAgentWearables::setWearableOutfit(const LLDynamicArray<LLPointer<LLInventoryItem>, (int)32> &, LLDynamicArray<LLWearable *, (int)32>&, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 5d6e88a833..def6e60abd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1606,33 +1606,31 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it LLPointer<LLInventoryItem> new_item = items[i]; llassert(new_wearable); - if (!new_wearable) continue; - - const EWearableType type = new_wearable->getType(); - wearables_to_remove[type] = FALSE; - - // MULTI_WEARABLE: using 0th - LLWearable* old_wearable = getWearable(type, 0); - if (old_wearable) + if (new_wearable) { - const LLUUID& old_item_id = getWearableItemID(type, 0); - if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && - (old_item_id == new_item->getUUID())) - { - lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; - continue; - } + const EWearableType type = new_wearable->getType(); + wearables_to_remove[type] = FALSE; - // Assumes existing wearables are not dirty. - if (old_wearable->isDirty()) + // MULTI_WEARABLE: using 0th + LLWearable* old_wearable = getWearable(type, 0); + if (old_wearable) { - llassert(0); - continue; + const LLUUID& old_item_id = getWearableItemID(type, 0); + if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && + (old_item_id == new_item->getUUID())) + { + lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; + continue; + } + + // Assumes existing wearables are not dirty. + if (old_wearable->isDirty()) + { + llassert(0); + continue; + } } - } - if (new_wearable) - { new_wearable->setItemID(new_item->getUUID()); setWearable(type,0,new_wearable); } -- cgit v1.2.3 From a80fdcd8f2163ef98ff9eba9319e17ccafc05f9a Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:53:02 +0000 Subject: CID-217 Checker: REVERSE_INULL Function: LLFloaterGesture::postBuild() File: /indra/newview/llfloatergesture.cpp --- indra/newview/llfloatergesture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 90617a337a..b02247781d 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -203,12 +203,12 @@ BOOL LLFloaterGesture::postBuild() gInventory.addObserver(this); fetchDescendents(folders); - buildGestureList(); - - mGestureList->setFocus(TRUE); - if (mGestureList) { + buildGestureList(); + + mGestureList->setFocus(TRUE); + const BOOL ascending = TRUE; mGestureList->sortByColumn(std::string("name"), ascending); mGestureList->selectFirstItem(); -- cgit v1.2.3 From 6e0ebfe18c431465f6d1bc52e079c7a745419de5 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 17:55:39 +0000 Subject: CID-215 Checker: REVERSE_INULL File: /indra/newview/llfloatergesture.cpp --- indra/newview/llfloatergesture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index b02247781d..9c1ac2631d 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -223,10 +223,10 @@ BOOL LLFloaterGesture::postBuild() void LLFloaterGesture::refreshAll() { - buildGestureList(); - if (!mGestureList) return; + buildGestureList(); + if (mSelectedID.isNull()) { mGestureList->selectFirstItem(); -- cgit v1.2.3 From a3d8338cdcf73b17f6cec4f07916560477d933a6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Fri, 12 Feb 2010 13:12:26 -0500 Subject: For EXT-5259: Major regression in load time for new users from 1.23 to 2.0. Moved autopopulate to after avatar appearance resolves --- indra/newview/llagentwearables.cpp | 2 ++ indra/newview/llappearancemgr.cpp | 14 ++++++++++++++ indra/newview/llappearancemgr.h | 3 +++ indra/newview/llstartup.cpp | 11 ----------- indra/newview/llvoavatar.cpp | 7 +++++++ 5 files changed, 26 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6620780b27..e8e347c82a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2143,6 +2143,8 @@ void LLAgentWearables::updateServer() void LLAgentWearables::populateMyOutfitsFolder(void) { + llinfos << "BAP starting populate" << llendl; + LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); // Get the complete information on the items in the inventory and diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index aad39854e4..8a646bd626 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1307,6 +1307,20 @@ void LLAppearanceManager::updateIsDirty() } } +void LLAppearanceManager::onFirstFullyVisible() +{ + // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) + // then auto-populate outfits from the library into the My Outfits folder. + static bool check_populate_my_outfits = true; + if (check_populate_my_outfits && + (LLInventoryModel::getIsFirstTimeInViewer2() + || gSavedSettings.getBOOL("MyOutfitsAutofill"))) + { + gAgentWearables.populateMyOutfitsFolder(); + } + check_populate_my_outfits = false; +} + //#define DUMP_CAT_VERBOSE void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5fdff45735..28b51ee0f6 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -113,6 +113,9 @@ public: // should only be necessary to do on initial login. void updateIsDirty(); + // Called when self avatar is first fully visible. + void onFirstFullyVisible(); + protected: LLAppearanceManager(); ~LLAppearanceManager(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 171b441b2b..cbcd9640dd 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1891,17 +1891,6 @@ bool idle_startup() } } - // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) - // then auto-populate outfits from the library into the My Outfits folder. - static bool check_populate_my_outfits = true; - if (check_populate_my_outfits && - (LLInventoryModel::getIsFirstTimeInViewer2() - || gSavedSettings.getBOOL("MyOutfitsAutofill"))) - { - gAgentWearables.populateMyOutfitsFolder(); - } - check_populate_my_outfits = false; - return TRUE; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9b91d5abfa..bcf5cf3f6c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2535,6 +2535,13 @@ void LLVOAvatar::idleUpdateLoadingEffect() if (isFullyLoaded() && isSelf()) { llwarns << "BAP self isFullyLoaded" << llendl; + + static bool first_fully_visible = true; + if (first_fully_visible) + { + first_fully_visible = false; + LLAppearanceManager::instance().onFirstFullyVisible(); + } } if (isFullyLoaded()) { -- cgit v1.2.3 From 1e76fc2b1f4e735105f2d45d73ea5a92dbad4e05 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Fri, 12 Feb 2010 13:44:32 -0500 Subject: Log spam cleanup --- indra/newview/llagentwearables.cpp | 2 +- indra/newview/llappearancemgr.cpp | 38 ++++++++++++++++---------------------- indra/newview/llstartup.cpp | 2 +- indra/newview/llvoavatar.cpp | 2 +- 4 files changed, 19 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e8e347c82a..9ff5de29c3 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2143,7 +2143,7 @@ void LLAgentWearables::updateServer() void LLAgentWearables::populateMyOutfitsFolder(void) { - llinfos << "BAP starting populate" << llendl; + llinfos << "starting outfit populate" << llendl; LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8a646bd626..062e291161 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -113,7 +113,7 @@ public: protected: ~LLWearInventoryCategoryCallback() { - llinfos << "BAP done all inventory callbacks" << llendl; + llinfos << "done all inventory callbacks" << llendl; // Is the destructor called by ordinary dereference, or because the app's shutting down? // If the inventory callback manager goes away, we're shutting down, no longer want the callback. @@ -152,14 +152,14 @@ protected: void LLOutfitObserver::done() { - llinfos << "BAP done 2nd stage fetch" << llendl; + llinfos << "done 2nd stage fetch" << llendl; gInventory.removeObserver(this); doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this)); } void LLOutfitObserver::doWearCategory() { - llinfos << "BAP start" << llendl; + llinfos << "starting" << llendl; // We now have an outfit ready to be copied to agent inventory. Do // it, and wear that outfit normally. @@ -249,7 +249,7 @@ void LLOutfitFetch::done() // What we do here is get the complete information on the items in // the library, and set up an observer that will wait for that to // happen. - llinfos << "BAP done first stage fetch" << llendl; + llinfos << "done first stage fetch" << llendl; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; @@ -311,7 +311,7 @@ public: virtual ~LLUpdateAppearanceOnDestroy() { - llinfos << "BAP done update appearance on destroy" << llendl; + llinfos << "done update appearance on destroy" << llendl; if (!LLApp::isExiting()) { @@ -321,7 +321,7 @@ public: /* virtual */ void fire(const LLUUID& inv_item) { - llinfos << "BAP fire" << llendl; + llinfos << "callback fired" << llendl; mFireCount++; } private: @@ -713,7 +713,7 @@ void LLAppearanceManager::linkAll(const LLUUID& category, void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { - llinfos << "BAP updating cof" << llendl; + llinfos << "starting" << llendl; const LLUUID cof = getCOF(); @@ -772,26 +772,20 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) gInventory.notifyObservers(); // Create links to new COF contents. - llinfos << "BAP creating LLUpdateAppearanceOnDestroy" << llendl; + llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; linkAll(cof, body_items, link_waiter); - llinfos << "BAP submitted all body_items link requests" << llendl; linkAll(cof, wear_items, link_waiter); - llinfos << "BAP submitted all wear_items link requests" << llendl; linkAll(cof, obj_items, link_waiter); - llinfos << "BAP submitted all obj link requests" << llendl; linkAll(cof, gest_items, link_waiter); - llinfos << "BAP submitted all gest link requests" << llendl; - // Add link to outfit if category is an outfit. if (!append) { createBaseOutfitLink(category, link_waiter); } - llinfos << "BAP submitted all link requests" << llendl; - llinfos << "BAP waiting for LLUpdateAppearanceOnDestroy" << llendl; + llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl; } void LLAppearanceManager::updatePanelOutfitName(const std::string& name) @@ -863,7 +857,7 @@ void LLAppearanceManager::updateAppearanceFromCOF() { // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link - llinfos << "BAP update appearance starts" << llendl; + llinfos << "starting" << llendl; updateIsDirty(); @@ -995,9 +989,7 @@ void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, b { if(!category) return; - llinfos << "BAP wearInventoryCategory" << llendl; - - lldebugs << "wearInventoryCategory( " << category->getName() + llinfos << "wearInventoryCategory( " << category->getName() << " )" << llendl; // What we do here is get the complete information on the items in @@ -1028,9 +1020,8 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca // this up front to avoid having to deal with the case of multiple // wearables being dirty. if(!category) return; - llinfos << "BAP wearInventoryCategoryOnAvatar( " << category->getName() - << " )" << llendl; - lldebugs << "wearInventoryCategoryOnAvatar( " << category->getName() + + llinfos << "wearInventoryCategoryOnAvatar( " << category->getName() << " )" << llendl; if( gFloaterCustomize ) @@ -1311,6 +1302,9 @@ void LLAppearanceManager::onFirstFullyVisible() { // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) // then auto-populate outfits from the library into the My Outfits folder. + + llinfos << "avatar fully visible" << llendl; + static bool check_populate_my_outfits = true; if (check_populate_my_outfits && (LLInventoryModel::getIsFirstTimeInViewer2() diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cbcd9640dd..af96629547 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2533,7 +2533,7 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { - llinfos << "BAP load initial outfit start" << llendl; + llinfos << "starting" << llendl; // Not going through the processAgentInitialWearables path, so need to set this here. LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bcf5cf3f6c..f2f769980b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2534,7 +2534,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() { if (isFullyLoaded() && isSelf()) { - llwarns << "BAP self isFullyLoaded" << llendl; + llinfos << "self isFullyLoaded" << llendl; static bool first_fully_visible = true; if (first_fully_visible) -- cgit v1.2.3 From c61cb61ecc6beca1560a93cdad4ed1bc055c57f9 Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Fri, 12 Feb 2010 11:09:39 -0800 Subject: EXT-5050 Make sure there is a Delete button in God Mode and that it works reviewed by Monore CC# 108 --- indra/newview/llfloaterevent.cpp | 81 ++++++++++------------ indra/newview/llfloaterevent.h | 6 +- .../newview/skins/default/xui/en/floater_event.xml | 21 ++++-- 3 files changed, 58 insertions(+), 50 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index 91c2810026..a51c613c37 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -45,11 +45,13 @@ #include "llcommandhandler.h" // secondlife:///app/chat/ support #include "lleventflags.h" #include "lleventnotifier.h" +#include "llexpandabletextbox.h" #include "llfloater.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llinventorymodel.h" #include "llsecondlifeurls.h" +#include "llslurl.h" #include "lltextbox.h" #include "lltexteditor.h" #include "lluiconstants.h" @@ -109,7 +111,7 @@ BOOL LLFloaterEvent::postBuild() mTBDuration = getChild<LLTextBox>("event_duration"); - mTBDesc = getChild<LLTextEditor>("event_desc"); + mTBDesc = getChild<LLExpandableTextBox>("event_desc"); mTBDesc->setEnabled(FALSE); mTBRunBy = getChild<LLTextBox>("event_runby"); @@ -128,6 +130,9 @@ BOOL LLFloaterEvent::postBuild() mCreateEventBtn = getChild<LLButton>( "create_event_btn"); mCreateEventBtn->setClickedCallback(onClickCreateEvent, this); + mGodDeleteEventBtn = getChild<LLButton>( "god_delete_event_btn"); + mGodDeleteEventBtn->setClickedCallback(boost::bind(&LLFloaterEvent::onClickDeleteEvent, this)); + return TRUE; } @@ -143,6 +148,20 @@ void LLFloaterEvent::setEventID(const U32 event_id) } } +void LLFloaterEvent::onClickDeleteEvent() +{ + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventGodDelete); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, mEventID); + + gAgent.sendReliableMessage(); +} void LLFloaterEvent::sendEventInfoRequest() { @@ -157,7 +176,6 @@ void LLFloaterEvent::sendEventInfoRequest() gAgent.sendReliableMessage(); } - //static void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) { @@ -174,6 +192,7 @@ void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) floater->mTBCategory->setText(floater->mEventInfo.mCategoryStr); floater->mTBDate->setText(floater->mEventInfo.mTimeStr); floater->mTBDesc->setText(floater->mEventInfo.mDesc); + floater->mTBRunBy->setText(LLSLURL::buildCommand("agent", floater->mEventInfo.mRunByID, "inspect")); floater->mTBDuration->setText(llformat("%d:%.2d", floater->mEventInfo.mDuration / 60, floater->mEventInfo.mDuration % 60)); @@ -224,23 +243,33 @@ void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) { floater->mNotifyBtn->setLabel(floater->getString("notify")); } + + floater->mMapBtn->setEnabled(TRUE); + floater->mTeleportBtn->setEnabled(TRUE); } } void LLFloaterEvent::draw() { - std::string name; - gCacheName->getFullName(mEventInfo.mRunByID, name); - - mTBRunBy->setText(name); + mGodDeleteEventBtn->setVisible(gAgent.isGodlike()); LLPanel::draw(); } void LLFloaterEvent::resetInfo() { - // Clear all of the text fields. + mTBName->setText(LLStringUtil::null); + mTBCategory->setText(LLStringUtil::null); + mTBDate->setText(LLStringUtil::null); + mTBDesc->setText(LLStringUtil::null); + mTBDuration->setText(LLStringUtil::null); + mTBCover->setText(LLStringUtil::null); + mTBLocation->setText(LLStringUtil::null); + mTBRunBy->setText(LLStringUtil::null); + mNotifyBtn->setEnabled(FALSE); + mMapBtn->setEnabled(FALSE); + mTeleportBtn->setEnabled(FALSE); } // static @@ -270,34 +299,13 @@ void LLFloaterEvent::onClickMap(void* data) } -// static -/* -void LLPanelEvent::onClickLandmark(void* data) -{ - LLPanelEvent* self = (LLPanelEvent*)data; - //create_landmark(self->mTBName->getText(), "", self->mEventInfo.mPosGlobal); - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("CreateLandmarkForEvent"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_EventData); - msg->addU32Fast(_PREHASH_EventID, self->mEventID); - msg->nextBlockFast(_PREHASH_InventoryBlock); - LLUUID folder_id; - folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - msg->addUUIDFast(_PREHASH_FolderID, folder_id); - msg->addStringFast(_PREHASH_Name, self->mTBName->getText()); - gAgent.sendReliableMessage(); -} -*/ - // static void LLFloaterEvent::onClickCreateEvent(void* data) { LLNotificationsUtil::add("PromptGoToEventsPage");//, LLSD(), LLSD(), callbackCreateEventWebPage); } + // static void LLFloaterEvent::onClickNotify(void *data) { @@ -314,18 +322,3 @@ void LLFloaterEvent::onClickNotify(void *data) self->mNotifyBtn->setLabel(self->getString("notify")); } } -/* -// static -bool LLPanelEvent::callbackCreateEventWebPage(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option) - { - llinfos << "Loading events page " << LLNotifications::instance().getGlobalString("EVENTS_URL") << llendl; - - LLWeb::loadURL( LLNotifications::instance().getGlobalString("EVENTS_URL")); - } - return false; -} -*/ - diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h index c93e3f73ca..54aaaf6a0f 100644 --- a/indra/newview/llfloaterevent.h +++ b/indra/newview/llfloaterevent.h @@ -34,7 +34,6 @@ #define LL_LLFLOATEREVENT_H #include "llfloater.h" - #include "lleventinfo.h" #include "lluuid.h" #include "v3dmath.h" @@ -42,6 +41,7 @@ class LLTextBox; class LLTextEditor; class LLButton; +class LLExpandableTextBox; class LLMessageSystem; class LLFloaterEvent : public LLFloater @@ -68,6 +68,7 @@ protected: //static void onClickLandmark(void*); static void onClickCreateEvent(void*); static void onClickNotify(void*); + void onClickDeleteEvent(); // static bool callbackCreateEventWebPage(const LLSD& notification, const LLSD& response); @@ -79,7 +80,7 @@ protected: LLTextBox* mTBCategory; LLTextBox* mTBDate; LLTextBox* mTBDuration; - LLTextEditor* mTBDesc; + LLExpandableTextBox* mTBDesc; LLTextBox* mTBRunBy; LLTextBox* mTBLocation; @@ -88,6 +89,7 @@ protected: LLButton* mTeleportBtn; LLButton* mMapBtn; LLButton* mCreateEventBtn; + LLButton* mGodDeleteEventBtn; LLButton* mNotifyBtn; }; diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml index 3d579f56be..9ce0c9c86d 100644 --- a/indra/newview/skins/default/xui/en/floater_event.xml +++ b/indra/newview/skins/default/xui/en/floater_event.xml @@ -73,7 +73,7 @@ width="310"> Run by: </text> - <name_box + <text follows="left|top" height="20" initial_value="(retrieving)" @@ -174,8 +174,7 @@ height="106" layout="topleft" left="6" - name="event_desc" - value="Du waltz die spritz" + name="event_desc" width="313" /> </layout_panel> <layout_panel @@ -200,12 +199,26 @@ tool_tip="Create Event" width="18" /> <button + follows="left|top" + height="18" + image_selected="MinusItem_Press" + image_unselected="MinusItem_Off" + image_disabled="MinusItem_Disabled" + layout="topleft" + visible="false" + left="6" + top_pad="-7" + name="god_delete_event_btn" + picture_style="true" + tool_tip="Delete Event" + width="18" /> + <button follows="left|top" height="23" label="Notify Me" layout="topleft" left_pad="3" - top_delta="-1" + top_delta="-12" name="notify_btn" width="100" /> <button -- cgit v1.2.3 From 318a88f57b1d07f69193d1b8b45a18774f39ff38 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 12 Feb 2010 19:32:26 +0000 Subject: fix typos in EXT-5248 / d6fd7b96d638 --- indra/newview/llagent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7929946620..3675be16e9 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5027,9 +5027,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const } } -BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod /* FALSE */) const +BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */) const { - if (!ingnore_God_mod && isGodlike()) + if (!ignore_god_mode && isGodlike()) return true; S32 count = mGroups.count(); -- cgit v1.2.3 From 5d199b220bda4e42f544c8a04eba8000c438abf2 Mon Sep 17 00:00:00 2001 From: Erica <erica@lindenlab.com> Date: Fri, 12 Feb 2010 11:37:58 -0800 Subject: EXT-4996 Master volume slider blends into other UI chrome, nearly impossible to see --- indra/newview/skins/default/textures/textures.xml | 7 +++++-- .../skins/default/textures/windows/Volume_Background.png | Bin 0 -> 589 bytes .../skins/default/xui/en/panel_volume_pulldown.xml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/textures/windows/Volume_Background.png (limited to 'indra') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 18d1779702..0065d824d2 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -633,8 +633,8 @@ with the same filename but different name <texture name="Unread_Msg" file_name="bottomtray/Unread_Msg.png" preload="false" /> <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="false" /> - <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="Volume_Background" file_name="windows/Volume_Background.png" preload="false" + scale.left="6" scale.top="33" scale.right="63" scale.bottom="10" /> <texture name="VoicePTT_Lvl1" file_name="bottomtray/VoicePTT_Lvl1.png" preload="false" /> <texture name="VoicePTT_Lvl2" file_name="bottomtray/VoicePTT_Lvl2.png" preload="false" /> @@ -642,6 +642,9 @@ with the same filename but different name <texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" /> <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="WebBasedMediaBackground" file_name="windows/WebBasedMediaBackground.png" preload="false" /> <texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" /> diff --git a/indra/newview/skins/default/textures/windows/Volume_Background.png b/indra/newview/skins/default/textures/windows/Volume_Background.png new file mode 100644 index 0000000000..43aaa441f5 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Volume_Background.png differ diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 60d4a7e00b..55ab95bfe9 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -4,7 +4,7 @@ background_visible="false" border_visible="false" border="false" - chrome="true" + chrome="true" follows="bottom" height="150" layout="topleft" @@ -13,7 +13,7 @@ <!-- floater background image --> <icon height="150" - image_name="Inspector_Background" + image_name="Volume_Background" layout="topleft" left="0" name="normal_background" -- cgit v1.2.3 From 21be0916a4b707654e99a8c6c734d24e4bb5da7c Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Fri, 12 Feb 2010 12:07:16 -0800 Subject: fixing windows eol --- indra/newview/llfloaterevent.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index a51c613c37..64efa10ef9 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -150,16 +150,16 @@ void LLFloaterEvent::setEventID(const U32 event_id) void LLFloaterEvent::onClickDeleteEvent() { - LLMessageSystem* msg = gMessageSystem; - - msg->newMessageFast(_PREHASH_EventGodDelete); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - - msg->nextBlockFast(_PREHASH_EventData); - msg->addU32Fast(_PREHASH_EventID, mEventID); - + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventGodDelete); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, mEventID); + gAgent.sendReliableMessage(); } -- cgit v1.2.3