From 42319d1ab89bd3d6ba193cc2c374ddc1571f2bdf Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 13 Nov 2009 18:22:00 -0500 Subject: Header file cleanup Moved LLInventoryPanelObserver to be private to LLInventoryPanel --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 10 ---------- indra/newview/llinventorybridge.h | 16 ---------------- indra/newview/llinventorypanel.cpp | 26 ++++++++++++++++++++++++-- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d7be09efa9..2a1fdb081e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -162,16 +162,6 @@ std::string ICON_NAME[ICON_NAME_COUNT] = "inv_item_linkfolder.tga" }; - -// +=================================================+ -// | LLInventoryPanelObserver | -// +=================================================+ -void LLInventoryPanelObserver::changed(U32 mask) -{ - mIP->modelChanged(mask); -} - - // +=================================================+ // | LLInvFVBridge | // +=================================================+ diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 4c7b0a0517..56cb0f93ed 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -107,22 +107,6 @@ struct LLAttachmentRezAction S32 mAttachPt; }; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryPanelObserver -// -// Bridge to support knowing when the inventory has changed. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryPanelObserver : public LLInventoryObserver -{ -public: - LLInventoryPanelObserver(LLInventoryPanel* ip) : mIP(ip) {} - virtual ~LLInventoryPanelObserver() {} - virtual void changed(U32 mask); -protected: - LLInventoryPanel* mIP; -}; - const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type); void hide_context_entries(LLMenuGL& menu, const std::vector &entries_to_show, diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6b1f7313dd..dc704f2b82 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -36,8 +36,6 @@ #include "llinventorypanel.h" -// Seraph TODO: Remove unnecessary headers - #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" @@ -56,6 +54,22 @@ const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("Recent const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); static const LLInventoryFVBridgeBuilder INVENTORY_BRIDGE_BUILDER; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryPanelObserver +// +// Bridge to support knowing when the inventory has changed. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryPanelObserver : public LLInventoryObserver +{ +public: + LLInventoryPanelObserver(LLInventoryPanel* ip) : mIP(ip) {} + virtual ~LLInventoryPanelObserver() {} + virtual void changed(U32 mask); +protected: + LLInventoryPanel* mIP; +}; + LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : LLPanel(p), mInventoryObserver(NULL), @@ -872,3 +886,11 @@ void example_param_block_usage() LLUICtrlFactory::create(param_block); } + +// +=================================================+ +// | LLInventoryPanelObserver | +// +=================================================+ +void LLInventoryPanelObserver::changed(U32 mask) +{ + mIP->modelChanged(mask); +} -- cgit v1.2.3 From 2128df33ec894d1b5ac1a0e0ad7023fe483abfe3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 16 Nov 2009 17:13:02 +0000 Subject: Be more generous with the voicechannel states that trigger the Calling popup. Huh, the voicechannel state machine isn't much of a state machine. --- indra/newview/llvoicechannel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index ae32ec7d11..871f302c3d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -873,6 +873,8 @@ void LLVoiceChannelP2P::setState(EState state) // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); + llinfos << "CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + if (mReceivedCall) // incoming call { // you only "answer" voice invites in p2p mode @@ -889,7 +891,8 @@ void LLVoiceChannelP2P::setState(EState state) mCallDialogPayload["session_id"] = mSessionID; mCallDialogPayload["session_name"] = mSessionName; mCallDialogPayload["other_user_id"] = mOtherUserID; - if (state == STATE_RINGING) + if (state == STATE_RINGING || + state == STATE_CALL_STARTED) { // *HACK: open outgoing call floater if needed, might be better done elsewhere. // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself -- cgit v1.2.3 From 85e142b949c83c674d316493ddaed71661e73066 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 16 Nov 2009 12:23:39 -0500 Subject: Header file cleanup Removed unnecessary headers from llagent.cpp. Alphabetized headers in llagent.h and llagent.cpp. Trivial whitespace addition to llcallingcard.h --HG-- branch : avatar-pipeline --- indra/newview/llagent.cpp | 56 ++++++++++--------------------------------- indra/newview/llagent.h | 9 ++++--- indra/newview/llcallingcard.h | 1 + 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ca1688ad1f..a093c1d434 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -31,83 +31,53 @@ */ #include "llviewerprecompiledheaders.h" - #include "llagent.h" -#include "llagentwearables.h" + +#include "pipeline.h" #include "llagentlistener.h" +#include "llagentwearables.h" +#include "llagentui.h" + #include "llanimationstates.h" +#include "llbottomtray.h" #include "llcallingcard.h" #include "llconsole.h" -#include "lldrawable.h" #include "llfirstuse.h" -#include "llfloaterreg.h" -#include "llspeakers.h" #include "llfloatercamera.h" #include "llfloatercustomize.h" - -#include "llfloaterland.h" -#include "llfloatersnapshot.h" +#include "llfloaterreg.h" #include "llfloatertools.h" -#include "llfloaterworldmap.h" - #include "llgroupactions.h" - -#include "llfocusmgr.h" #include "llgroupmgr.h" #include "llhomelocationresponder.h" -#include "llimview.h" #include "llhudmanager.h" #include "lljoystickbutton.h" -#include "llmenugl.h" #include "llmorphview.h" #include "llmoveview.h" +#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state +#include "llnearbychatbar.h" #include "llparcel.h" -#include "llquantize.h" -#include "llrand.h" -#include "llregionhandle.h" #include "llsdutil.h" -#include "llselectmgr.h" +#include "llsidetray.h" #include "llsky.h" -#include "llslurl.h" #include "llsmoothstep.h" -#include "llsidetray.h" #include "llstatusbar.h" -#include "llteleportflags.h" -#include "llteleporthistory.h" -#include "lltexturestats.h" -#include "lltexturestats.h" #include "lltool.h" -#include "lltoolcomp.h" #include "lltoolmgr.h" -#include "lluictrlfactory.h" -#include "llurldispatcher.h" - -#include "llviewercamera.h" +#include "lltrans.h" +#include "llviewercontrol.h" #include "llviewerdisplay.h" +#include "llviewerjoystick.h" #include "llviewermediafocus.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" -#include "llviewerwindow.h" -#include "llviewercontrol.h" -#include "llviewerjoystick.h" - #include "llvoavatarself.h" #include "llwindow.h" #include "llworld.h" #include "llworldmap.h" -#include "pipeline.h" -#include "lltrans.h" -#include "llbottomtray.h" -#include "llnearbychatbar.h" -#include "stringize.h" -#include "llcapabilitylistener.h" - -#include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state -#include "llagentui.h" - using namespace LLVOAvatarDefines; extern LLMenuBarGL* gMenuBarView; diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 99a9bdd8e6..4162dfce1e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -36,14 +36,13 @@ #include "indra_constants.h" #include "llevent.h" // LLObservable base class #include "llagentaccess.h" -#include "llagentaccess.h" #include "llagentconstants.h" -#include "llhudeffectpointat.h" // ELookAtType -#include "llhudeffectlookat.h" // EPointAtType -#include "llpointer.h" +#include "llagentdata.h" // gAgentID, gAgentSessionID #include "llcharacter.h" // LLAnimPauseRequest #include "llfollowcam.h" // Ventrella -#include "llagentdata.h" // gAgentID, gAgentSessionID +#include "llhudeffectlookat.h" // EPointAtType +#include "llhudeffectpointat.h" // ELookAtType +#include "llpointer.h" #include "lluicolor.h" #include "llvoavatardefines.h" diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index bd58b2fbe6..47b0dcb903 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -45,6 +45,7 @@ //class LLInventoryObserver; class LLMessageSystem; class LLTrackingData; + class LLFriendObserver { public: -- cgit v1.2.3 From e12126bf89ee862603f02f709f69bb013c8a8635 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Mon, 16 Nov 2009 19:27:35 +0200 Subject: implemented task EXT-1899 Add button to Gestures floater which activates/deactivates --HG-- branch : product-engine --- indra/newview/llfloatergesture.cpp | 30 +++++++++++++++++----- indra/newview/llfloatergesture.h | 6 ++++- .../skins/default/xui/en/floater_gesture.xml | 15 ++++++++++- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 854d02873a..af86274472 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -161,6 +161,7 @@ BOOL LLFloaterGesture::postBuild() getChild("play_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild("stop_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); + getChild("activate_btn")->setClickedCallback(boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); getChild("new_gesture_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickNew, this)); @@ -179,7 +180,7 @@ BOOL LLFloaterGesture::postBuild() childSetFocus("gesture_list"); - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); if (list) { const BOOL ascending = TRUE; @@ -198,7 +199,7 @@ void LLFloaterGesture::refreshAll() { buildGestureList(); - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); if (!list) return; if (mSelectedID.isNull()) @@ -219,7 +220,7 @@ void LLFloaterGesture::refreshAll() void LLFloaterGesture::buildGestureList() { - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); LLCtrlScrollInterface *scroll = childGetScrollInterface("gesture_list"); if (! (list && scroll)) return; @@ -347,7 +348,7 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur void LLFloaterGesture::onClickInventory() { - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); if (!list) return; const LLUUID& item_id = list->getCurrentID(); @@ -358,7 +359,7 @@ void LLFloaterGesture::onClickInventory() void LLFloaterGesture::onClickPlay() { - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); if (!list) return; const LLUUID& item_id = list->getCurrentID(); if(item_id.isNull()) return; @@ -396,10 +397,27 @@ void LLFloaterGesture::onClickNew() LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); } +void LLFloaterGesture::onActivateBtnClick() +{ + LLCtrlListInterface* list = getGestureList(); + + LLUUID gesture_inv_id = list->getSelectedValue(); + LLGestureManager* gm = LLGestureManager::getInstance(); + + if(gm->isGestureActive(gesture_inv_id)) + { + gm->deactivateGesture(gesture_inv_id); + } + else + { + gm->activateGesture(gesture_inv_id); + } +} + void LLFloaterGesture::onClickEdit() { - LLCtrlListInterface *list = childGetListInterface("gesture_list"); + LLCtrlListInterface *list = getGestureList(); if (!list) return; const LLUUID& item_id = list->getCurrentID(); diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index e7819d2a03..50bef818da 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -77,7 +77,11 @@ protected: void onClickNew(); void onCommitList(); void playGesture(LLUUID item_id); - + LLCtrlListInterface* getGestureList() const + { + return childGetListInterface("gesture_list"); + } + void onActivateBtnClick(); protected: LLUUID mSelectedID; LLUUID mGestureFolderID; diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index a3ac878202..21d292847a 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -83,7 +83,20 @@ tool_tip="Make new gesture" top_delta="0" width="18" /> -