diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index eddcf28021..6490d6f809 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -128,6 +128,7 @@ set(viewer_SOURCE_FILES fsexport.cpp fsfloaterblocklist.cpp fsfloatergroup.cpp + fsfloatergrouptitles.cpp fsfloaterimport.cpp fsfloaterim.cpp fsfloaterimcontainer.cpp @@ -141,7 +142,6 @@ set(viewer_SOURCE_FILES fsfloatervoicecontrols.cpp fsfloatervolumecontrols.cpp fsfloaterwsassetblacklist.cpp - fsgrouptitles.cpp fskeywords.cpp fslightshare.cpp fslslbridge.cpp @@ -794,6 +794,7 @@ set(viewer_HEADER_FILES fsexport.h fsfloaterblocklist.h fsfloatergroup.h + fsfloatergrouptitles.h fsfloaterimport.h fsfloaterim.h fsfloaterimcontainer.h @@ -808,7 +809,6 @@ set(viewer_HEADER_FILES fsfloatervolumecontrols.h fsfloaterwsassetblacklist.h fsgridhandler.h - fsgrouptitles.h fskeywords.h fslightshare.h fslslbridge.h diff --git a/indra/newview/fscontactsfloater.cpp b/indra/newview/fscontactsfloater.cpp index 275c1d379a..ace55b34b9 100644 --- a/indra/newview/fscontactsfloater.cpp +++ b/indra/newview/fscontactsfloater.cpp @@ -422,7 +422,7 @@ void FSFloaterContacts::onGroupSearchButtonClicked() void FSFloaterContacts::onGroupTitlesButtonClicked() { - LLFloaterReg::toggleInstance("group_titles"); + LLFloaterReg::toggleInstance("fs_group_titles"); } void FSFloaterContacts::onGroupInviteButtonClicked() diff --git a/indra/newview/fsgrouptitles.cpp b/indra/newview/fsfloatergrouptitles.cpp similarity index 83% rename from indra/newview/fsgrouptitles.cpp rename to indra/newview/fsfloatergrouptitles.cpp index 0637964a8d..1f1bdb2598 100644 --- a/indra/newview/fsgrouptitles.cpp +++ b/indra/newview/fsfloatergrouptitles.cpp @@ -1,5 +1,5 @@ /** - * @file fsgrouptitles.cpp + * @file fsfloatergrouptitles.cpp * @brief Group title overview and changer * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ @@ -26,7 +26,7 @@ #include "llviewerprecompiledheaders.h" -#include "fsgrouptitles.h" +#include "fsfloatergrouptitles.h" #include "llgroupactions.h" #include "llscrolllistitem.h" #include "llviewermessage.h" @@ -35,7 +35,7 @@ ///////////////////////////////////////////////////// // FSGroupTitlesObserver class // -FSGroupTitlesObserver::FSGroupTitlesObserver(const LLGroupData& group_data, FSGroupTitles* parent) : +FSGroupTitlesObserver::FSGroupTitlesObserver(const LLGroupData& group_data, FSFloaterGroupTitles* parent) : LLGroupMgrObserver(group_data.mID), mGroupData(group_data), mParent(parent) @@ -60,7 +60,7 @@ void FSGroupTitlesObserver::changed(LLGroupChange gc) ///////////////////////////////////////////////////// // FSGroupTitles class // -FSGroupTitles::FSGroupTitles(const LLSD& key) : +FSFloaterGroupTitles::FSFloaterGroupTitles(const LLSD& key) : LLFloater(key) { // Register observer and event listener @@ -71,7 +71,7 @@ FSGroupTitles::FSGroupTitles(const LLSD& key) : gAgent.addListener(this, "update grouptitle list"); } -FSGroupTitles::~FSGroupTitles() +FSFloaterGroupTitles::~FSFloaterGroupTitles() { gAgent.removeListener(this); LLGroupMgr::getInstance()->removeObserver(this); @@ -80,18 +80,18 @@ FSGroupTitles::~FSGroupTitles() clearObservers(); } -BOOL FSGroupTitles::postBuild() +BOOL FSFloaterGroupTitles::postBuild() { mActivateButton = getChild("btnActivate"); mRefreshButton = getChild("btnRefresh"); mInfoButton = getChild("btnInfo"); mTitleList = getChild("title_list"); - mActivateButton->setCommitCallback(boost::bind(&FSGroupTitles::activateGroupTitle, this)); - mRefreshButton->setCommitCallback(boost::bind(&FSGroupTitles::refreshGroupTitles, this)); - mInfoButton->setCommitCallback(boost::bind(&FSGroupTitles::openGroupInfo, this)); - mTitleList->setDoubleClickCallback(boost::bind(&FSGroupTitles::activateGroupTitle, this)); - mTitleList->setCommitCallback(boost::bind(&FSGroupTitles::selectedTitleChanged, this)); + mActivateButton->setCommitCallback(boost::bind(&FSFloaterGroupTitles::activateGroupTitle, this)); + mRefreshButton->setCommitCallback(boost::bind(&FSFloaterGroupTitles::refreshGroupTitles, this)); + mInfoButton->setCommitCallback(boost::bind(&FSFloaterGroupTitles::openGroupInfo, this)); + mTitleList->setDoubleClickCallback(boost::bind(&FSFloaterGroupTitles::activateGroupTitle, this)); + mTitleList->setCommitCallback(boost::bind(&FSFloaterGroupTitles::selectedTitleChanged, this)); mTitleList->sortByColumn("grouptitle", TRUE); @@ -100,7 +100,7 @@ BOOL FSGroupTitles::postBuild() return TRUE; } -void FSGroupTitles::changed(LLGroupChange gc) +void FSFloaterGroupTitles::changed(LLGroupChange gc) { switch (gc) { @@ -114,7 +114,7 @@ void FSGroupTitles::changed(LLGroupChange gc) } } -bool FSGroupTitles::handleEvent(LLPointer event, const LLSD& userdata) +bool FSFloaterGroupTitles::handleEvent(LLPointer event, const LLSD& userdata) { if (event->desc() == "update grouptitle list") { @@ -125,7 +125,7 @@ bool FSGroupTitles::handleEvent(LLPointer event, const LLS } -void FSGroupTitles::clearObservers() +void FSFloaterGroupTitles::clearObservers() { for (observer_map_t::iterator it = mGroupTitleObserverMap.begin(); it != mGroupTitleObserverMap.end(); ++it) { @@ -134,7 +134,7 @@ void FSGroupTitles::clearObservers() mGroupTitleObserverMap.clear(); } -void FSGroupTitles::addListItem(const LLUUID& group_id, const LLUUID& role_id, const std::string& title, +void FSFloaterGroupTitles::addListItem(const LLUUID& group_id, const LLUUID& role_id, const std::string& title, const std::string& group_name, bool is_active, EAddPosition position) { std::string font_style = (is_active ? "BOLD" : "NORMAL"); @@ -166,7 +166,7 @@ void FSGroupTitles::addListItem(const LLUUID& group_id, const LLUUID& role_id, c } } -void FSGroupTitles::processGroupTitleResults(const LLGroupData& group_data) +void FSFloaterGroupTitles::processGroupTitleResults(const LLGroupData& group_data) { // Save the group name std::string group_name(group_data.mName); @@ -193,7 +193,7 @@ void FSGroupTitles::processGroupTitleResults(const LLGroupData& group_data) } } -void FSGroupTitles::activateGroupTitle() +void FSFloaterGroupTitles::activateGroupTitle() { LLScrollListItem* selected_item = mTitleList->getFirstSelected(); if (selected_item) @@ -215,7 +215,7 @@ void FSGroupTitles::activateGroupTitle() } } -void FSGroupTitles::refreshGroupTitles() +void FSFloaterGroupTitles::refreshGroupTitles() { clearObservers(); mTitleList->clearRows(); @@ -232,7 +232,7 @@ void FSGroupTitles::refreshGroupTitles() } } -void FSGroupTitles::selectedTitleChanged() +void FSFloaterGroupTitles::selectedTitleChanged() { LLScrollListItem* selected_item = mTitleList->getFirstSelected(); if (selected_item) @@ -242,7 +242,7 @@ void FSGroupTitles::selectedTitleChanged() } } -void FSGroupTitles::openGroupInfo() +void FSFloaterGroupTitles::openGroupInfo() { LLScrollListItem* selected_item = mTitleList->getFirstSelected(); if (selected_item) diff --git a/indra/newview/fsgrouptitles.h b/indra/newview/fsfloatergrouptitles.h similarity index 81% rename from indra/newview/fsgrouptitles.h rename to indra/newview/fsfloatergrouptitles.h index ebe9d301eb..5ca1e1b9cf 100644 --- a/indra/newview/fsgrouptitles.h +++ b/indra/newview/fsfloatergrouptitles.h @@ -1,5 +1,5 @@ /** - * @file fsgrouptitles.h + * @file fsfloatergrouptitles.h * @brief Group title overview and changer * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ @@ -24,8 +24,8 @@ * $/LicenseInfo$ */ -#ifndef FS_GROUPTITLES_H -#define FS_GROUPTITLES_H +#ifndef FS_FLOATERGROUPTITLES_H +#define FS_FLOATERGROUPTITLES_H #include "llsingleton.h" @@ -35,28 +35,28 @@ #include "llagent.h" #include "llgroupmgr.h" -class FSGroupTitles; +class FSFloaterGroupTitles; class FSGroupTitlesObserver : LLGroupMgrObserver { public: - FSGroupTitlesObserver(const LLGroupData& group_data, FSGroupTitles* parent); + FSGroupTitlesObserver(const LLGroupData& group_data, FSFloaterGroupTitles* parent); virtual ~FSGroupTitlesObserver(); virtual void changed(LLGroupChange gc); protected: - FSGroupTitles* mParent; + FSFloaterGroupTitles* mParent; LLGroupData mGroupData; }; -class FSGroupTitles : public LLSingleton, public LLFloater, public LLGroupMgrObserver, public LLOldEvents::LLSimpleListener +class FSFloaterGroupTitles : public LLSingleton, public LLFloater, public LLGroupMgrObserver, public LLOldEvents::LLSimpleListener { public: - FSGroupTitles(const LLSD &); - virtual ~FSGroupTitles(); + FSFloaterGroupTitles(const LLSD &); + virtual ~FSFloaterGroupTitles(); /*virtual*/ BOOL postBuild(); @@ -85,4 +85,4 @@ private: observer_map_t mGroupTitleObserverMap; }; -#endif // FS_GROUPTITLES_H +#endif // FS_FLOATERGROUPTITLES_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 5f069b679c..dcb86c3c3e 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -156,6 +156,7 @@ #include "fscontactsfloater.h" #include "fsfloaterblocklist.h" #include "fsfloatergroup.h" +#include "fsfloatergrouptitles.h" #include "fsfloaterimport.h" #include "fsfloaterim.h" #include "fsfloaterimcontainer.h" @@ -167,7 +168,6 @@ #include "fsfloaterteleporthistory.h" #include "fsfloatervolumecontrols.h" #include "fsfloaterwsassetblacklist.h" -#include "fsgrouptitles.h" #include "fsmoneytracker.h" #include "fspanelclassified.h" #include "lggbeamcolormapfloater.h" @@ -393,13 +393,13 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("floater_profile", "floater_profile_view.xml",&LLFloaterReg::build); LLFloaterReg::add("fs_blocklist", "floater_fs_blocklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_group", "floater_fs_group.xml",&LLFloaterReg::build); + LLFloaterReg::add("fs_group_titles", "floater_fs_group_titles.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_import", "floater_fs_import.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_posestand", "floater_fs_posestand.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_placedetails", "floater_fs_placedetails.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_radar", "floater_fs_radar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_teleporthistory", "floater_fs_teleporthistory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_volume_controls", "floater_fs_volume_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("group_titles", "floater_fs_group_titles.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("imcontacts", "floater_fs_contacts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("lgg_beamcolormap", "floater_beamcolor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("lgg_beamshape", "floater_beamshape.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);