diff --git a/indra/newview/fsradarlistctrl.cpp b/indra/newview/fsradarlistctrl.cpp index ea980d12a1..46b85292ab 100644 --- a/indra/newview/fsradarlistctrl.cpp +++ b/indra/newview/fsradarlistctrl.cpp @@ -1,10 +1,10 @@ /** - * @file llradarlistctrl.cpp + * @file fsradarlistctrl.cpp * @brief A radar-specific implementation of scrolllist * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2011 Arrehn Oberlander * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,62 +20,50 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org * $/LicenseInfo$ */ #include "llviewerprecompiledheaders.h" + #include "fsradarlistctrl.h" #include "lllistcontextmenu.h" +#include "llscrolllistitem.h" #include "rlvhandler.h" +static LLDefaultChildRegistry::Register r("radar_list"); -#include - -#include "llavatarnamecache.h" -#include "llcachename.h" -#include "llfloaterreg.h" -#include "llinventory.h" -#include "llscrolllistitem.h" -#include "llscrolllistcell.h" -#include "llscrolllistcolumn.h" -#include "llsdparam.h" -#include "lltooltip.h" -#include "lltrans.h" - - -static LLDefaultChildRegistry::Register r("radar_list"); - - -LLRadarListCtrl::Params::Params() +FSRadarListCtrl::Params::Params() { name = "radar_list"; } - -LLRadarListCtrl::LLRadarListCtrl(const LLRadarListCtrl::Params& p) +FSRadarListCtrl::FSRadarListCtrl(const FSRadarListCtrl::Params& p) : LLScrollListCtrl(p), mContextMenu(NULL) { } -BOOL LLRadarListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) +BOOL FSRadarListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) { - llinfos << "handleRightMouseDown" << llendl; + //llinfos << "handleRightMouseDown" << llendl; BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); // if ( mContextMenu ) // [RLVa:KB-FS] - Checked: 2011-06-11 (RLVa-1.3.1) | Added: RLVa-1.3.1 if ( (mContextMenu) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) // [/RLVa:KB-FS] { - if(getAllSelected().size() > 1) + S32 uuid_column_index = getColumn("uuid")->mIndex; + std::vector selected_items = getAllSelected(); + if (selected_items.size() > 1) { //llinfos << "Right-click select by value: (multi-select)" << llendl; uuid_vec_t selected_uuids; - for(size_t i=0;igetColumn(getColumn("uuid")->mIndex)->getValue().asUUID() << llendl; - selected_uuids.push_back(getAllSelected().at(i)->getColumn(getColumn("uuid")->mIndex)->getValue().asUUID()); + //llinfos << "Right-click select by value: " << selected_items.at(i)->getColumn(uuid_column_index)->getValue().asUUID() << llendl; + selected_uuids.push_back(selected_items.at(i)->getColumn(uuid_column_index)->getValue().asUUID()); } mContextMenu->show(this, selected_uuids, x, y); } @@ -84,7 +72,7 @@ BOOL LLRadarListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) LLScrollListItem* hit_item = hitItem(x, y); if (hit_item) { - llinfos << "Right-click select by value: " << hit_item->getValue() << llendl; + //llinfos << "Right-click select by value: " << hit_item->getValue() << llendl; selectByID(hit_item->getValue()); LLUUID av = hit_item->getValue(); uuid_vec_t selected_uuids; diff --git a/indra/newview/fsradarlistctrl.h b/indra/newview/fsradarlistctrl.h index 2c3bdabb0e..1e2cf11000 100644 --- a/indra/newview/fsradarlistctrl.h +++ b/indra/newview/fsradarlistctrl.h @@ -1,10 +1,10 @@ /** - * @file fs_radarlistctr.h + * @file fsradarlistctrl.h * @brief A radar-specific scrolllist implementation, so we can subclass custom methods. * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2011 Arrehn Oberlander * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,19 +20,20 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org * $/LicenseInfo$ */ #ifndef FS_RADARLISTCTRL_H #define FS_RADARLISTCTRL_H -#include #include "llscrolllistctrl.h" -#include "lllistcontextmenu.h" -class LLRadarListCtrl -: public LLScrollListCtrl, public LLInstanceTracker +class LLListContextMenu; + +class FSRadarListCtrl +: public LLScrollListCtrl, public LLInstanceTracker { public: @@ -84,7 +85,7 @@ public: protected: - LLRadarListCtrl(const Params&); + FSRadarListCtrl(const Params&); friend class LLUICtrlFactory; private: diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2175213033..3c64c90d8c 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -607,7 +607,7 @@ BOOL LLPanelPeople::postBuild() nearby_tab->getChildView("NearMeRange")->setVisible(gSavedSettings.getBOOL("LimitRadarByRange")); // AO: radarlist takes over for nearbylist for presentation. - mRadarList = nearby_tab->getChild("radar_list"); + mRadarList = nearby_tab->getChild("radar_list"); mRadarList->sortByColumn("range",TRUE); // sort by range mRadarList->setFilterColumn(0); mRadarFrameCount = 0; diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 2c76a6f1a6..26521162ea 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -184,7 +184,7 @@ private: LLAvatarList* mNearbyList; LLAvatarList* mRecentList; LLGroupList* mGroupList; - LLRadarListCtrl* mRadarList; + FSRadarListCtrl* mRadarList; LLNetMap* mMiniMap; LLHandle mGroupPlusMenuHandle;