From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llpanelgroupexperiences.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelgroupexperiences.cpp') diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp index 6c40499208..d5fa4d1a73 100644 --- a/indra/newview/llpanelgroupexperiences.cpp +++ b/indra/newview/llpanelgroupexperiences.cpp @@ -50,7 +50,7 @@ LLPanelGroupExperiences::~LLPanelGroupExperiences() { } -BOOL LLPanelGroupExperiences::postBuild() +bool LLPanelGroupExperiences::postBuild() { mExperiencesList = getChild("experiences_list"); if (hasString("loading_experiences")) -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/newview/llpanelgroupexperiences.cpp | 248 +++++++++++++++--------------- 1 file changed, 124 insertions(+), 124 deletions(-) (limited to 'indra/newview/llpanelgroupexperiences.cpp') diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp index 2f06794e65..99c40984a5 100644 --- a/indra/newview/llpanelgroupexperiences.cpp +++ b/indra/newview/llpanelgroupexperiences.cpp @@ -1,124 +1,124 @@ -/** - * @file llpanelgroupexperiences.cpp - * @brief List of experiences owned by a group. - * - * $LicenseInfo:firstyear=2006&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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 - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llpanelgroupexperiences.h" - -#include "lluictrlfactory.h" -#include "roles_constants.h" -#include "llappviewer.h" -#include "llagent.h" -#include "llviewerregion.h" -#include "llflatlistview.h" -#include "llpanelexperiences.h" -#include "llsd.h" -#include "llexperiencecache.h" - -static LLPanelInjector t_panel_group_experiences("panel_group_experiences"); - - -LLPanelGroupExperiences::LLPanelGroupExperiences() -: LLPanelGroupTab(), mExperiencesList(NULL) -{ -} - -LLPanelGroupExperiences::~LLPanelGroupExperiences() -{ -} - -bool LLPanelGroupExperiences::postBuild() -{ - mExperiencesList = getChild("experiences_list"); - if (hasString("loading_experiences")) - { - mExperiencesList->setNoItemsCommentText(getString("loading_experiences")); - } - else if (hasString("no_experiences")) - { - mExperiencesList->setNoItemsCommentText(getString("no_experiences")); - } - - return LLPanelGroupTab::postBuild(); -} - -void LLPanelGroupExperiences::activate() -{ - if ((getGroupID() == LLUUID::null) || gDisconnected) - { - return; - } - - LLExperienceCache::instance().getGroupExperiences(getGroupID(), - boost::bind(&LLPanelGroupExperiences::groupExperiencesResults, getDerivedHandle(), _1)); -} - -void LLPanelGroupExperiences::setGroupID(const LLUUID& id) -{ - LLPanelGroupTab::setGroupID(id); - - if(id == LLUUID::null) - { - return; - } - - activate(); -} - -void LLPanelGroupExperiences::setExperienceList(const LLSD& experiences) -{ - if (hasString("no_experiences")) - { - mExperiencesList->setNoItemsCommentText(getString("no_experiences")); - } - mExperiencesList->clear(); - - LLSD::array_const_iterator it = experiences.beginArray(); - for ( /**/ ; it != experiences.endArray(); ++it) - { - LLUUID public_key = it->asUUID(); - LLExperienceItem* item = new LLExperienceItem(); - - item->init(public_key); - mExperiencesList->addItem(item, public_key); - } -} - -/*static*/ -void LLPanelGroupExperiences::groupExperiencesResults(LLHandle handle, const LLSD &experiences) -{ - if (handle.isDead()) - { - return; - } - - LLPanelGroupExperiences* panel = handle.get(); - if (panel) - { - panel->setExperienceList(experiences); - } - -} +/** + * @file llpanelgroupexperiences.cpp + * @brief List of experiences owned by a group. + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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 + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelgroupexperiences.h" + +#include "lluictrlfactory.h" +#include "roles_constants.h" +#include "llappviewer.h" +#include "llagent.h" +#include "llviewerregion.h" +#include "llflatlistview.h" +#include "llpanelexperiences.h" +#include "llsd.h" +#include "llexperiencecache.h" + +static LLPanelInjector t_panel_group_experiences("panel_group_experiences"); + + +LLPanelGroupExperiences::LLPanelGroupExperiences() +: LLPanelGroupTab(), mExperiencesList(NULL) +{ +} + +LLPanelGroupExperiences::~LLPanelGroupExperiences() +{ +} + +bool LLPanelGroupExperiences::postBuild() +{ + mExperiencesList = getChild("experiences_list"); + if (hasString("loading_experiences")) + { + mExperiencesList->setNoItemsCommentText(getString("loading_experiences")); + } + else if (hasString("no_experiences")) + { + mExperiencesList->setNoItemsCommentText(getString("no_experiences")); + } + + return LLPanelGroupTab::postBuild(); +} + +void LLPanelGroupExperiences::activate() +{ + if ((getGroupID() == LLUUID::null) || gDisconnected) + { + return; + } + + LLExperienceCache::instance().getGroupExperiences(getGroupID(), + boost::bind(&LLPanelGroupExperiences::groupExperiencesResults, getDerivedHandle(), _1)); +} + +void LLPanelGroupExperiences::setGroupID(const LLUUID& id) +{ + LLPanelGroupTab::setGroupID(id); + + if(id == LLUUID::null) + { + return; + } + + activate(); +} + +void LLPanelGroupExperiences::setExperienceList(const LLSD& experiences) +{ + if (hasString("no_experiences")) + { + mExperiencesList->setNoItemsCommentText(getString("no_experiences")); + } + mExperiencesList->clear(); + + LLSD::array_const_iterator it = experiences.beginArray(); + for ( /**/ ; it != experiences.endArray(); ++it) + { + LLUUID public_key = it->asUUID(); + LLExperienceItem* item = new LLExperienceItem(); + + item->init(public_key); + mExperiencesList->addItem(item, public_key); + } +} + +/*static*/ +void LLPanelGroupExperiences::groupExperiencesResults(LLHandle handle, const LLSD &experiences) +{ + if (handle.isDead()) + { + return; + } + + LLPanelGroupExperiences* panel = handle.get(); + if (panel) + { + panel->setExperienceList(experiences); + } + +} -- cgit v1.2.3