Merge DRTVWR-481

master
Ansariel 2020-02-08 18:43:22 +01:00
commit 90cbec4a54
95 changed files with 1903 additions and 674 deletions

View File

@ -1 +1,4 @@

View File

@ -23,7 +23,7 @@ include_directories(SYSTEM
set(llinventory_SOURCE_FILES
llcategory.cpp
lleconomy.cpp
lleconomy.cpp #<FS:Ansariel> OpenSim legacy economy
llfoldertype.cpp
llinventory.cpp
llinventorydefines.cpp
@ -41,7 +41,7 @@ set(llinventory_HEADER_FILES
CMakeLists.txt
llcategory.h
lleconomy.h
lleconomy.h #<FS:Ansariel> OpenSim legacy economy
llfoldertype.h
llinventory.h
llinventorydefines.h

View File

@ -141,6 +141,7 @@ LLScrollListCtrl::Params::Params()
background_visible("background_visible"),
draw_stripes("draw_stripes"),
column_padding("column_padding"),
row_padding("row_padding", 2),
fg_unselected_color("fg_unselected_color"),
fg_selected_color("fg_selected_color"),
bg_selected_color("bg_selected_color"),
@ -203,6 +204,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mHoveredColor(p.hovered_color()),
mSearchColumn(p.search_column),
mColumnPadding(p.column_padding),
mRowPadding(p.row_padding),
mContextMenuType(MENU_NONE),
mIsFriendSignal(NULL),
// <FS:Ansariel> Fix for FS-specific people list (radar)
@ -773,8 +775,6 @@ bool LLScrollListCtrl::updateColumnWidths()
return width_changed;
}
const S32 SCROLL_LIST_ROW_PAD = 2;
// Line height is the max height of all the cells in all the items.
void LLScrollListCtrl::updateLineHeight()
{
@ -787,7 +787,7 @@ void LLScrollListCtrl::updateLineHeight()
S32 i = 0;
for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
{
mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD );
mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding );
}
}
}
@ -799,7 +799,7 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp)
S32 i = 0;
for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
{
mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD );
mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding );
}
}

View File

@ -108,7 +108,8 @@ public:
// layout
Optional<S32> column_padding,
page_lines,
row_padding,
page_lines,
heading_height;
// sort and search behavior
@ -296,8 +297,10 @@ public:
void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; }
void setDrawStripes(BOOL b) { mDrawStripes = b; }
void setColumnPadding(const S32 c) { mColumnPadding = c; }
S32 getColumnPadding() { return mColumnPadding; }
void setColumnPadding(const S32 c) { mColumnPadding = c; }
S32 getColumnPadding() const { return mColumnPadding; }
void setRowPadding(const S32 c) { mColumnPadding = c; }
S32 getRowPadding() const { return mColumnPadding; }
void setCommitOnKeyboardMovement(BOOL b) { mCommitOnKeyboardMovement = b; }
void setCommitOnSelectionChange(BOOL b) { mCommitOnSelectionChange = b; }
void setAllowKeyboardMovement(BOOL b) { mAllowKeyboardMovement = b; }
@ -499,6 +502,7 @@ private:
LLRect mItemListRect;
S32 mColumnPadding;
S32 mRowPadding;
BOOL mBackgroundVisible;
BOOL mDrawStripes;

View File

@ -171,6 +171,7 @@ LLTextBase::Params::Params()
plain_text("plain_text",false),
track_end("track_end", false),
read_only("read_only", false),
skip_link_underline("skip_link_underline", false),
spellcheck("spellcheck", false),
v_pad("v_pad", 0),
h_pad("h_pad", 0),
@ -205,6 +206,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
mFontShadow(p.font_shadow),
mPopupMenuHandle(),
mReadOnly(p.read_only),
mSkipLinkUnderline(p.skip_link_underline),
mSpellCheck(p.spellcheck),
mSpellCheckStart(-1),
mSpellCheckEnd(-1),
@ -2457,7 +2459,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
S32 cur_length = getLength();
LLStyleConstSP sp(new LLStyle(highlight_params));
LLTextSegmentPtr segmentp;
if(underline_on_hover_only)
if (underline_on_hover_only || mSkipLinkUnderline)
{
highlight_params.font.style("NORMAL");
LLStyleConstSP normal_sp(new LLStyle(highlight_params));
@ -2481,7 +2483,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
S32 segment_start = old_length;
S32 segment_end = old_length + wide_text.size();
LLStyleConstSP sp(new LLStyle(style_params));
if (underline_on_hover_only)
if (underline_on_hover_only || mSkipLinkUnderline)
{
LLStyle::Params normal_style_params(style_params);
normal_style_params.font.style("NORMAL");
@ -3727,7 +3729,7 @@ F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start
/*virtual*/
BOOL LLOnHoverChangeableTextSegment::handleHover(S32 x, S32 y, MASK mask)
{
mStyle = mHoveredStyle;
mStyle = mEditor.getSkipLinkUnderline() ? mNormalStyle : mHoveredStyle;
return LLNormalTextSegment::handleHover(x, y, mask);
}

View File

@ -334,6 +334,7 @@ public:
border_visible,
track_end,
read_only,
skip_link_underline,
spellcheck,
allow_scroll,
plain_text,
@ -484,6 +485,9 @@ public:
void setReadOnly(bool read_only) { mReadOnly = read_only; }
bool getReadOnly() { return mReadOnly; }
void setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; }
bool getSkipLinkUnderline() { return mSkipLinkUnderline; }
void setPlainText(bool value) { mPlainText = value;}
bool getPlainText() const { return mPlainText; }
@ -758,6 +762,8 @@ protected:
bool mAutoIndent;
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
bool mSkipLinkUnderline;
// support widgets
LLHandle<LLContextMenu> mPopupMenuHandle;
LLView* mDocumentView;

View File

@ -229,6 +229,7 @@ set(viewer_SOURCE_FILES
llaisapi.cpp
llagent.cpp
llagentaccess.cpp
llagentbenefits.cpp
llagentcamera.cpp
llagentdata.cpp
llagentlanguage.cpp
@ -555,6 +556,7 @@ set(viewer_SOURCE_FILES
llpanelface.cpp
llpanelgenerictip.cpp
llpanelgroup.cpp
llpanelgroupcreate.cpp
llpanelgroupbulk.cpp
llpanelgroupbulkban.cpp
llpanelgroupexperiences.cpp
@ -986,6 +988,7 @@ set(viewer_HEADER_FILES
llaisapi.h
llagent.h
llagentaccess.h
llagentbenefits.h
llagentcamera.h
llagentdata.h
llagentlanguage.h
@ -1306,6 +1309,7 @@ set(viewer_HEADER_FILES
llpanelface.h
llpanelgenerictip.h
llpanelgroup.h
llpanelgroupcreate.h
llpanelgroupbulk.h
llpanelgroupbulkimpl.h
llpanelgroupbulkban.h

View File

@ -30,6 +30,7 @@
#include "fscommon.h"
#include "fsradar.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llavataractions.h"
#include "llavatarnamecache.h"
#include "llfloaterperms.h"
@ -369,9 +370,10 @@ LLSD FSCommon::populateGroupCount()
{
LLStringUtil::format_map_t args;
S32 groupcount = gAgent.mGroups.size();
S32 maxgroup = LLAgentBenefitsMgr::current().getGroupMembershipLimit();
args["[COUNT]"] = llformat("%d", groupcount);
args["[REMAINING]"] = llformat("%d", gMaxAgentGroups > groupcount ? gMaxAgentGroups - groupcount : 0);
LLUIString groupcountstring = LLTrans::getString((gMaxAgentGroups ? "groupcountstring" : "groupcountunlimitedstring"), args);
args["[REMAINING]"] = llformat("%d", maxgroup > groupcount ? maxgroup - groupcount : 0);
LLUIString groupcountstring = LLTrans::getString((maxgroup ? "groupcountstring" : "groupcountunlimitedstring"), args);
return LLSD(groupcountstring);
}

View File

@ -31,10 +31,12 @@
#include "llfloaterreg.h"
#include "llpanelgroup.h"
#include "llpanelgroupcreate.h"
FSFloaterGroup::FSFloaterGroup(const LLSD& seed)
: LLFloater(seed),
mGroupPanel(NULL),
mGroupPanel(nullptr),
mGroupCreatePanel(nullptr),
mIsCreateGroup(false)
{
}
@ -46,7 +48,8 @@ FSFloaterGroup::~FSFloaterGroup()
BOOL FSFloaterGroup::postBuild()
{
mGroupPanel = findChild<LLPanelGroup>("panel_group_info_sidetray");
if (!mGroupPanel)
mGroupCreatePanel = findChild<LLPanelGroupCreate>("panel_group_creation_sidetray");
if (!mGroupPanel || !mGroupCreatePanel)
{
return FALSE;
}
@ -59,15 +62,18 @@ void FSFloaterGroup::onOpen(const LLSD& key)
// openFloater() sets the key again - we only want the group id as key, so set it again!
setKey(LLSD().with("group_id", key.get("group_id").asUUID()));
mIsCreateGroup = (key.has("action") && key.get("action").asString() == "create");
mGroupPanel->onOpen(key);
if (mIsCreateGroup)
{
mGroupPanel->getChildView("header_container")->setVisible(TRUE);
mGroupPanel->getChildView("back")->setVisible(FALSE);
mGroupCreatePanel->onOpen(key);
mGroupCreatePanel->setVisible(TRUE);
mGroupPanel->setVisible(FALSE);
}
else
{
mGroupPanel->onOpen(key);
mGroupPanel->setVisible(TRUE);
mGroupCreatePanel->setVisible(FALSE);
mGroupPanel->getChildView("header_container")->setVisible(FALSE);
}
}

View File

@ -31,6 +31,7 @@
#include "llfloater.h"
class LLPanelGroup;
class LLPanelGroupCreate;
class FSFloaterGroup : public LLFloater
{
@ -54,8 +55,9 @@ public:
static FSFloaterGroup* findInstance(const LLUUID& group_id);
private:
LLPanelGroup* mGroupPanel;
bool mIsCreateGroup;
LLPanelGroup* mGroupPanel;
LLPanelGroupCreate* mGroupCreatePanel;
bool mIsCreateGroup;
};
#endif // FS_FLOATERGROUP_H

View File

@ -30,13 +30,13 @@
#include "fscommon.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llappviewer.h"
#include "llbuycurrencyhtml.h"
#include "llcallbacklist.h"
#include "llcheckboxctrl.h"
#include "lldatapacker.h"
#include "lldir.h"
#include "lleconomy.h"
#include "llfloaterperms.h"
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
@ -126,7 +126,7 @@ FSFloaterImport::~FSFloaterImport()
BOOL FSFloaterImport::postBuild()
{
if (LLGlobalEconomy::getInstance()->getPriceUpload() == 0
if (LLAgentBenefitsMgr::current().getTextureUploadCost() == 0
|| gAgent.getRegion()->getCentralBakeVersion() > 0)
{
getChild<LLCheckBoxCtrl>("temp_asset")->setVisible(FALSE);
@ -520,7 +520,7 @@ void FSFloaterImport::onClickBtnImport()
if (!getChild<LLCheckBoxCtrl>("temp_asset")->get())
{
U32 expected_upload_cost = mTexturesTotal * (U32)LLGlobalEconomy::getInstance()->getPriceUpload();
U32 expected_upload_cost = mTexturesTotal * (U32)LLAgentBenefitsMgr::current().getTextureUploadCost();
if(!(can_afford_transaction(expected_upload_cost)))
{
LLStringUtil::format_map_t args;
@ -590,7 +590,7 @@ void FSFloaterImport::onClickCheckBoxUploadAsset()
{
getChild<LLCheckBoxCtrl>("temp_asset")->setEnabled(TRUE);
LLUIString stats = getString("upload_cost");
stats.setArg("[COST]", llformat("%u", (mTexturesTotal + mSoundsTotal + mAnimsTotal) * (U32)LLGlobalEconomy::getInstance()->getPriceUpload()));
stats.setArg("[COST]", llformat("%u", (mTexturesTotal * LLAgentBenefitsMgr::current().getTextureUploadCost() + mSoundsTotal * LLAgentBenefitsMgr::current().getSoundUploadCost() + mAnimsTotal * LLAgentBenefitsMgr::current().getAnimationUploadCost())));
getChild<LLTextBox>("file_status_text")->setText(stats.getString());
}
else
@ -613,7 +613,7 @@ void FSFloaterImport::onClickCheckBoxTempAsset()
else
{
LLUIString stats = getString("upload_cost");
stats.setArg("[COST]", llformat("%u", (mTexturesTotal + mSoundsTotal + mAnimsTotal) * (U32)LLGlobalEconomy::getInstance()->getPriceUpload()));
stats.setArg("[COST]", llformat("%u", (mTexturesTotal * LLAgentBenefitsMgr::current().getTextureUploadCost() + mSoundsTotal * LLAgentBenefitsMgr::current().getSoundUploadCost() + mAnimsTotal * LLAgentBenefitsMgr::current().getAnimationUploadCost())));
getChild<LLTextBox>("file_status_text")->setText(stats.getString());
}
}
@ -1468,7 +1468,21 @@ void FSFloaterImport::uploadAsset(LLUUID asset_id, LLUUID inventory_item)
data->mAssetInfo.mCreatorID = gAgentID;
data->mInventoryType = inventory_type;
data->mNextOwnerPerm = LLFloaterPerms::getNextOwnerPerms(perms_prefix);
data->mExpectedUploadCost = LLGlobalEconomy::getInstance()->getPriceUpload();
switch (asset_type)
{
case LLAssetType::AT_TEXTURE:
data->mExpectedUploadCost = LLAgentBenefitsMgr::current().getTextureUploadCost();
break;
case LLAssetType::AT_ANIMATION:
data->mExpectedUploadCost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
break;
case LLAssetType::AT_SOUND:
data->mExpectedUploadCost = LLAgentBenefitsMgr::current().getSoundUploadCost();
break;
default:
data->mExpectedUploadCost = 0;
break;
}
FSResourceData* fs_data = new FSResourceData;
fs_data->uuid = asset_id;
fs_data->mFloater = this;
@ -1960,7 +1974,23 @@ void uploadCoroutine( LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &a_httpAdapter
{
LLAssetType::EType asset_type = LLAssetType::lookup( aBody[ "asset_type" ].asString() );
LLInventoryType::EType inventory_type = LLInventoryType::lookup( aBody[ "inventory_type" ].asString() );
S32 upload_price = LLGlobalEconomy::getInstance()->getPriceUpload();
S32 upload_price;
switch (asset_type)
{
case LLAssetType::AT_TEXTURE:
upload_price = LLAgentBenefitsMgr::current().getTextureUploadCost();
break;
case LLAssetType::AT_ANIMATION:
upload_price = LLAgentBenefitsMgr::current().getAnimationUploadCost();
break;
case LLAssetType::AT_SOUND:
upload_price = LLAgentBenefitsMgr::current().getSoundUploadCost();
break;
default:
upload_price = 0;
break;
}
const std::string inventory_type_string = aBody[ "asset_type" ].asString();
const LLUUID& item_folder_id = aBody[ "folder_id" ].asUUID();

View File

@ -32,6 +32,7 @@
#include "pipeline.h"
#include "llagentaccess.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llagentlistener.h"
#include "llagentwearables.h"
@ -3565,10 +3566,17 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
BOOL LLAgent::canJoinGroups() const
{
// [CR] FIRE-12229
//return (S32)mGroups.size() < gMaxAgentGroups;
return ((!gMaxAgentGroups) || ((S32)mGroups.size() < gMaxAgentGroups));
// [/CR]
// <FS:CR> FIRE-12229
//return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit();
if (LLGridManager::instance().isInSecondLife())
{
return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit();
}
else
{
return ((!gMaxAgentGroups) || ((S32)mGroups.size() < gMaxAgentGroups));
}
// </FS:CR>
}
LLQuaternion LLAgent::getHeadRotation()

View File

@ -0,0 +1,314 @@
/**
* @file llagentbenefits.cpp
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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 "llagentbenefits.h"
// <FS:Ansariel> OpenSim legacy economy
#include "llagent.h"
#include "lleconomy.h"
#include "llstartup.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
#include "llviewerregion.h"
// </FS:Ansariel>
LLAgentBenefits::LLAgentBenefits():
m_initalized(false),
m_animated_object_limit(-1),
m_animation_upload_cost(-1),
m_attachment_limit(-1),
m_group_membership_limit(-1),
m_picks_limit(-1),
m_sound_upload_cost(-1),
m_texture_upload_cost(-1),
m_create_group_cost(-1)
{
}
LLAgentBenefits::~LLAgentBenefits()
{
}
// This could be extended to a template scheme or otherwise modified
// to support other types, if and when needed. Currently all fields
// the viewer cares about are integer.
bool get_required_S32(const LLSD& sd, const LLSD::String& key, S32& value)
{
value = -1;
if (sd.has(key))
{
value = sd[key].asInteger();
return true;
}
LL_WARNS("Benefits") << "Missing required benefit field " << key << LL_ENDL;
return false;
}
bool LLAgentBenefits::init(const LLSD& benefits_sd)
{
LL_DEBUGS("Benefits") << "initializing benefits from " << benefits_sd << LL_ENDL;
if (!get_required_S32(benefits_sd, "animated_object_limit", m_animated_object_limit))
{
return false;
}
if (!get_required_S32(benefits_sd, "animation_upload_cost", m_animation_upload_cost))
{
return false;
}
if (!get_required_S32(benefits_sd, "attachment_limit", m_attachment_limit))
{
return false;
}
if (!get_required_S32(benefits_sd, "create_group_cost", m_create_group_cost))
{
return false;
}
if (!get_required_S32(benefits_sd, "group_membership_limit", m_group_membership_limit))
{
return false;
}
if (!get_required_S32(benefits_sd, "picks_limit", m_picks_limit))
{
return false;
}
if (!get_required_S32(benefits_sd, "sound_upload_cost", m_sound_upload_cost))
{
return false;
}
if (!get_required_S32(benefits_sd, "texture_upload_cost", m_texture_upload_cost))
{
return false;
}
// FIXME PREMIUM - either use this field or get rid of it
m_initalized = true;
return true;
}
S32 LLAgentBenefits::getAnimatedObjectLimit() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_animated_object_limit;
if (LLGridManager::instance().isInSecondLife())
{
return m_animated_object_limit;
}
else
{
S32 max_attach = 0;
if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
{
max_attach = getAttachmentLimit();
}
else
{
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("AnimatedObjects"))
{
max_attach = features["AnimatedObjects"]["MaxAgentAnimatedObjectAttachments"].asInteger();
}
}
}
return max_attach;
}
// </FS:Ansariel>
}
S32 LLAgentBenefits::getAnimationUploadCost() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_animation_upload_cost;
return LLGridManager::instance().isInSecondLife() ? m_animation_upload_cost : LLGlobalEconomy::instance().getPriceUpload();
// </FS:Ansariel>
}
S32 LLAgentBenefits::getAttachmentLimit() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_attachment_limit;
if (LLGridManager::instance().isInSecondLife())
{
return m_attachment_limit;
}
else
{
const S32 MAX_AGENT_ATTACHMENTS = 38;
S32 max_attach = MAX_AGENT_ATTACHMENTS;
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("MaxAgentAttachments"))
{
max_attach = features["MaxAgentAttachments"].asInteger();
}
}
return max_attach;
}
// </FS:Ansariel>
}
S32 LLAgentBenefits::getCreateGroupCost() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_create_group_cost;
return LLGridManager::instance().isInSecondLife() ? m_create_group_cost : 0;
// </FS:Ansariel>
}
S32 LLAgentBenefits::getGroupMembershipLimit() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_group_membership_limit;
return LLGridManager::instance().isInSecondLife() ? m_group_membership_limit : gMaxAgentGroups;
// </FS:Ansariel>
}
S32 LLAgentBenefits::getPicksLimit() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_picks_limit;
return LLGridManager::instance().isInSecondLife() ? m_picks_limit : 10;
// </FS:Ansariel>
}
S32 LLAgentBenefits::getSoundUploadCost() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_sound_upload_cost;
return LLGridManager::instance().isInSecondLife() ? m_sound_upload_cost : LLGlobalEconomy::instance().getPriceUpload();
// </FS:Ansariel>
}
S32 LLAgentBenefits::getTextureUploadCost() const
{
// <FS:Ansariel> OpenSim legacy economy
//return m_texture_upload_cost;
return LLGridManager::instance().isInSecondLife() ? m_texture_upload_cost : LLGlobalEconomy::instance().getPriceUpload();
// </FS:Ansariel>
}
bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) const
{
bool succ = false;
if (asset_type == LLAssetType::AT_TEXTURE)
{
cost = getTextureUploadCost();
succ = true;
}
else if (asset_type == LLAssetType::AT_SOUND)
{
cost = getSoundUploadCost();
succ = true;
}
else if (asset_type == LLAssetType::AT_ANIMATION)
{
cost = getAnimationUploadCost();
succ = true;
}
return succ;
}
LLAgentBenefitsMgr::LLAgentBenefitsMgr()
{
}
LLAgentBenefitsMgr::~LLAgentBenefitsMgr()
{
}
// static
const LLAgentBenefits& LLAgentBenefitsMgr::current()
{
return instance().mCurrent;
}
// static
const LLAgentBenefits& LLAgentBenefitsMgr::get(const std::string& package)
{
if (instance().mPackageMap.find(package) != instance().mPackageMap.end())
{
return instance().mPackageMap[package];
}
else
{
return instance().mDefault;
}
}
// static
bool LLAgentBenefitsMgr::init(const std::string& package, const LLSD& benefits_sd)
{
LLAgentBenefits benefits;
if (!benefits.init(benefits_sd))
{
LL_WARNS("Benefits") << "Unable to initialize package " << package << " from sd " << benefits_sd << LL_ENDL;
return false;
}
else
{
instance().mPackageMap[package] = benefits;
}
return true;
}
// static
bool LLAgentBenefitsMgr::initCurrent(const std::string& package, const LLSD& benefits_sd)
{
LLAgentBenefits benefits;
if (!benefits.init(benefits_sd))
{
LL_WARNS("Benefits") << "Unable to initialize package " << package << " from sd " << benefits_sd << LL_ENDL;
return false;
}
else
{
instance().mCurrent = benefits;
instance().mCurrentName = package;
}
return true;
}
// static
bool LLAgentBenefitsMgr::has(const std::string& package)
{
return instance().mPackageMap.find(package) != instance().mPackageMap.end();
}
//static
bool LLAgentBenefitsMgr::isCurrent(const std::string& package)
{
return instance().mCurrentName == package;
}

View File

@ -0,0 +1,88 @@
/**
* @file llagentbenefits.h
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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$
*/
#ifndef LL_AGENTBENEFITS_H
#define LL_AGENTBENEFITS_H
#include "llsingleton.h"
#include "llsd.h"
#include "llassettype.h"
class LLAgentBenefits
{
public:
LLAgentBenefits();
~LLAgentBenefits();
LOG_CLASS(LLAgentBenefits);
bool init(const LLSD& benefits_sd);
S32 getAnimatedObjectLimit() const;
S32 getAnimationUploadCost() const;
S32 getAttachmentLimit() const;
S32 getCreateGroupCost() const;
S32 getGroupMembershipLimit() const;
S32 getPicksLimit() const;
S32 getSoundUploadCost() const;
S32 getTextureUploadCost() const;
bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const;
private:
S32 m_animated_object_limit;
S32 m_animation_upload_cost;
S32 m_attachment_limit;
S32 m_create_group_cost;
S32 m_group_membership_limit;
S32 m_picks_limit;
S32 m_sound_upload_cost;
S32 m_texture_upload_cost;
bool m_initalized;
};
class LLAgentBenefitsMgr: public LLSingleton<LLAgentBenefitsMgr>
{
LLSINGLETON(LLAgentBenefitsMgr);
~LLAgentBenefitsMgr();
LOG_CLASS(LLAgentBenefitsMgr);
public:
static const LLAgentBenefits& current();
static const LLAgentBenefits& get(const std::string& package);
static bool init(const std::string& package, const LLSD& benefits_sd);
static bool initCurrent(const std::string& package, const LLSD& benefits_sd);
static bool has(const std::string& package);
static bool isCurrent(const std::string& package);
private:
std::string mCurrentName;
LLAgentBenefits mCurrent;
LLAgentBenefits mDefault;
std::map<std::string, LLAgentBenefits> mPackageMap;
};
#endif

View File

@ -31,13 +31,13 @@
#include "llbvhloader.h"
#include "lldatapacker.h"
#include "lldir.h"
#include "lleconomy.h"
#include "llnotificationsutil.h"
#include "llvfile.h"
#include "llapr.h"
#include "llstring.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llanimationstates.h"
#include "llbbox.h"
#include "llbutton.h"
@ -72,7 +72,12 @@ S32 LLFloaterBvhPreview::sOwnAvatarInstanceCount = 0; // <FS> Preview on own ava
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREF_BUTTON_HEIGHT = 16;
// <FS:Ansariel> Fix preview window location
//const S32 PREVIEW_VPAD = 35;
//const S32 PREF_BUTTON_HEIGHT = 16 + 35;
const S32 PREVIEW_VPAD = 70;
const S32 PREF_BUTTON_HEIGHT = 16 + PREVIEW_VPAD;
// </FS:Ansariel>
const S32 PREVIEW_TEXTURE_HEIGHT = 300;
const F32 PREVIEW_CAMERA_DISTANCE = 4.f;
@ -244,7 +249,7 @@ BOOL LLFloaterBvhPreview::postBuild()
reshape(rect.getWidth(), rect.getHeight() + PREVIEW_TEXTURE_HEIGHT-30);
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT,
PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
@ -556,30 +561,30 @@ void LLFloaterBvhPreview::draw()
//gGL.begin( LLRender::QUADS );
//{
// gGL.texCoord2f(0.f, 1.f);
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
// gGL.texCoord2f(0.f, 0.f);
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
// gGL.texCoord2f(1.f, 0.f);
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
// gGL.texCoord2f(1.f, 1.f);
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
//}
//gGL.end();
gGL.begin( LLRender::TRIANGLES );
{
gGL.texCoord2f(0.f, 1.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
gGL.texCoord2f(0.f, 0.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 0.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(0.f, 1.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
gGL.texCoord2f(1.f, 0.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 1.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
}
gGL.end();
// </FS:Ansariel>
@ -1419,16 +1424,18 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
{
std::string name = floaterp->getChild<LLUICtrl>("name_form")->getValue().asString();
std::string desc = floaterp->getChild<LLUICtrl>("description_form")->getValue().asString();
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
LLResourceUploadInfo::ptr_t assetUpdloadInfo(new LLResourceUploadInfo(
LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
floaterp->mTransactionID, LLAssetType::AT_ANIMATION,
name, desc, 0,
LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION,
LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"),
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
expected_upload_cost));
upload_new_resource(assetUpdloadInfo);
upload_new_resource(assetUploadInfo);
}
else
{

View File

@ -38,6 +38,7 @@
#include "roles_constants.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llbutton.h"
#include "llgroupactions.h"
#include "llscrolllistctrl.h"
@ -175,7 +176,7 @@ void LLPanelGroups::reset()
}
// [CR] FIRE-12229
//getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefitsMgr::current().getGroupMembershipLimit()));
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
// [/CR]
@ -189,7 +190,7 @@ BOOL LLPanelGroups::postBuild()
// [CR] FIRE-12229
//getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefitsMgr::current().getGroupMembershipLimit()));
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
// [/CR]

View File

@ -53,7 +53,6 @@
#include "llviewershadermgr.h"
#include "llviewertexturelist.h"
#include "llviewercontrol.h"
#include "lleconomy.h"
#include "llstring.h"
#include "llendianswizzle.h"
@ -63,12 +62,13 @@
#include "llimagedimensionsinfo.h"
#include "llviewerregion.h" // <FS:CR> getCentralBakeVersion()
#include "llcheckboxctrl.h"
#include "llagentbenefits.h"
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREVIEW_VPAD = -24; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_VPAD = -24 + 35; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16 + 35;
const S32 PREVIEW_TEXTURE_HEIGHT = 320;
//-----------------------------------------------------------------------------
@ -122,15 +122,15 @@ BOOL LLFloaterImagePreview::postBuild()
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
getChildView("lossless_check")->setEnabled(TRUE);
// <FS:CR> Temporary texture uploads
BOOL enable_temp_uploads = (LLGlobalEconomy::getInstance()->getPriceUpload() != 0
// <FS:CR> Temporary texture uploads
BOOL enable_temp_uploads = (LLAgentBenefitsMgr::current().getTextureUploadCost() != 0
&& gAgent.getRegion()->getCentralBakeVersion() == 0);
if (!enable_temp_uploads)
{
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
}
getChild<LLCheckBoxCtrl>("temp_check")->setVisible(enable_temp_uploads);
// </FS:CR>
// </FS:CR>
}
else
{

View File

@ -44,7 +44,6 @@
#include "lldrawable.h"
#include "llrender.h"
#include "llface.h"
#include "lleconomy.h"
#include "llfocusmgr.h"
#include "llfloaterperms.h"
#include "lliconctrl.h"

View File

@ -46,12 +46,13 @@
#include "llnotificationsutil.h"
#include "lluictrlfactory.h"
#include "llstring.h"
#include "lleconomy.h"
#include "llpermissions.h"
#include "lltrans.h"
// linden includes
#include "llassetstorage.h"
#include "llinventorytype.h"
#include "llagentbenefits.h"
const S32 PREVIEW_LINE_HEIGHT = 19;
const S32 PREVIEW_BORDER_WIDTH = 2;
@ -63,7 +64,7 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
//-----------------------------------------------------------------------------
LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename )
: LLFloater(filename),
mIsAudio(FALSE)
mIsAudio(FALSE)
{
mFilenameAndPath = filename.asString();
mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false);
@ -123,13 +124,39 @@ BOOL LLFloaterNameDesc::postBuild()
// Cancel button
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnCancel, this));
getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload() ));
S32 expected_upload_cost = getExpectedUploadCost();
getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", expected_upload_cost));
LLTextBox* info_text = getChild<LLTextBox>("info_text");
if (info_text)
{
info_text->setValue(LLTrans::getString("UploadFeeInfo"));
}
setDefaultBtn("ok_btn");
return TRUE;
}
S32 LLFloaterNameDesc::getExpectedUploadCost() const
{
std::string exten = gDirUtilp->getExtension(mFilename);
LLAssetType::EType asset_type;
S32 upload_cost = -1;
if (LLResourceUploadInfo::findAssetTypeOfExtension(exten, asset_type))
{
if (!LLAgentBenefitsMgr::current().findUploadCost(asset_type, upload_cost))
{
LL_WARNS() << "Unable to find upload cost for asset type " << asset_type << LL_ENDL;
}
}
else
{
LL_WARNS() << "Unable to find upload cost for " << mFilename << LL_ENDL;
}
return upload_cost;
}
//-----------------------------------------------------------------------------
// LLFloaterNameDesc()
//-----------------------------------------------------------------------------
@ -162,8 +189,7 @@ void LLFloaterNameDesc::onBtnOK( )
getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads
LLAssetStorage::LLStoreAssetCallback callback = NULL;
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
S32 expected_upload_cost = getExpectedUploadCost();
if (can_afford_transaction(expected_upload_cost))
{
void *nruserdata = NULL;
@ -185,7 +211,7 @@ void LLFloaterNameDesc::onBtnOK( )
{
LLSD args;
args["COST"] = llformat("%d", expected_upload_cost);
LLNotificationsUtil::add("ErrorTextureCannotAfford", args);
LLNotificationsUtil::add("ErrorCannotAffordUpload", args);
}
closeFloater(false);

View File

@ -30,6 +30,7 @@
#include "llfloater.h"
#include "llresizehandle.h"
#include "llstring.h"
#include "llassettype.h"
class LLLineEditor;
class LLButton;
@ -45,6 +46,8 @@ public:
void onBtnOK();
void onBtnCancel();
void doCommit();
S32 getExpectedUploadCost() const;
protected:
virtual void onCommit();

View File

@ -102,7 +102,6 @@ public:
virtual LLSD prepareUpload();
virtual LLSD generatePostBody();
virtual S32 getEconomyUploadCost();
virtual LLUUID finishUpload(LLSD &result);
virtual bool showInventoryPanel() const { return false; }
@ -129,11 +128,6 @@ LLSD LLARScreenShotUploader::generatePostBody()
return mReport;
}
S32 LLARScreenShotUploader::getEconomyUploadCost()
{ // Abuse report screen shots do not cost anything to upload.
return 0;
}
LLUUID LLARScreenShotUploader::finishUpload(LLSD &result)
{
/* *TODO$: Report success or failure. Carried over from previous todo on responder*/

View File

@ -573,18 +573,18 @@ void LLGroupActions::createGroup()
{
LLSD params;
params["group_id"] = LLUUID::null;
params["open_tab_name"] = "panel_group_info_sidetray";
params["open_tab_name"] = "panel_group_creation_sidetray";
params["action"] = "create";
// <FS:Ansariel> Standalone group floaters
//LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
//LLFloaterSidePanelContainer::showPanel("people", "panel_group_creation_sidetray", params);
if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater"))
{
FSFloaterGroup::openGroupFloater(params);
}
else
{
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
LLFloaterSidePanelContainer::showPanel("people", "panel_group_creation_sidetray", params);
}
// </FS:Ansariel>
}

View File

@ -55,9 +55,8 @@
#include "roles_constants.h"
#include "lltransactiontypes.h"
#include "llstatusbar.h"
#include "lleconomy.h"
#include "llviewerwindow.h"
#include "llpanelgroup.h"
#include "llpanelgroupcreate.h"
#include "llgroupactions.h"
#include "llnotificationsutil.h"
#include "lluictrlfactory.h"
@ -1480,7 +1479,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
gAgent.mGroups.push_back(gd);
LLPanelGroup::refreshCreatedGroup(group_id);
LLPanelGroupCreate::refreshCreatedGroup(group_id);
//FIXME
//LLFloaterGroupInfo::closeCreateGroup();
//LLFloaterGroupInfo::showFromUUID(group_id,"roles_tab");

View File

@ -41,7 +41,6 @@
#include "lldeadmantimer.h"
#include "llfloatermodelpreview.h"
#include "llfloaterperms.h"
#include "lleconomy.h"
#include "llimagej2c.h"
#include "llhost.h"
#include "llmath.h"

View File

@ -36,7 +36,7 @@
#include "llaccordionctrltab.h"
#include "llappearancemgr.h"
#include "lleconomy.h"
#include "llagentbenefits.h"
#include "llerror.h"
#include "llfilepicker.h"
#include "llfloaterperms.h"
@ -838,16 +838,7 @@ LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitGalleryContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitGalleryContextMenu::onVisible, this, _2));
// </FS:Ansariel> Show correct upload fee in context menu
//return createFromFile("menu_gallery_outfit_tab.xml");
LLContextMenu* menu = createFromFile("menu_gallery_outfit_tab.xml");
LLMenuItemCallGL* upload_item = menu->findChild<LLMenuItemCallGL>("upload_photo");
if (upload_item)
{
upload_item->setLabelArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
}
return menu;
// </FS:Ansariel>
return createFromFile("menu_gallery_outfit_tab.xml");
}
void LLOutfitGalleryContextMenu::onUploadPhoto(const LLUUID& outfit_cat_id)
@ -922,6 +913,7 @@ bool LLOutfitGalleryContextMenu::onEnable(LLSD::String param)
bool LLOutfitGalleryContextMenu::onVisible(LLSD::String param)
{
mMenuHandle.get()->getChild<LLUICtrl>("upload_photo")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
if ("remove_photo" == param)
{
LLOutfitGallery* gallery = dynamic_cast<LLOutfitGallery*>(mOutfitList);
@ -1217,7 +1209,7 @@ void LLOutfitGallery::uploadOutfitImage(const std::vector<std::string>& filename
return;
}
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
void *nruserdata = NULL;
nruserdata = (void *)&outfit_id;

View File

@ -35,6 +35,7 @@
#include "llaccordionctrltab.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
#include "llagentbenefits.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
@ -1270,14 +1271,6 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(mMenu);
// </FS:Ansariel> Show correct upload fee in context menu
LLMenuItemCallGL* upload_item = mMenu->findChild<LLMenuItemCallGL>("upload_photo");
if (upload_item)
{
upload_item->setLabelArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
}
// </FS:Ansariel>
}
LLOutfitListGearMenuBase::~LLOutfitListGearMenuBase()
@ -1386,6 +1379,7 @@ bool LLOutfitListGearMenuBase::onEnable(LLSD::String param)
bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
{
getMenu()->getChild<LLUICtrl>("upload_photo")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
const LLUUID& selected_outfit_id = getSelectedOutfitID();
if (selected_outfit_id.isNull()) // no selection or invalid outfit selected
{

View File

@ -30,7 +30,6 @@
#include "llpanelcontents.h"
// linden library includes
#include "lleconomy.h"
#include "llerror.h"
#include "llfloaterreg.h"
#include "llfontgl.h"

View File

@ -184,10 +184,6 @@ void LLPanelGroup::onOpen(const LLSD& key)
{
onBackBtnClick();
}
else if(str_action == "create")
{
setGroupID(LLUUID::null);
}
else if(str_action == "refresh_notices")
{
LLPanelGroupNotices* panel_notices = findChild<LLPanelGroupNotices>("group_notices_tab_panel");
@ -218,12 +214,8 @@ BOOL LLPanelGroup::postBuild()
button = getChild<LLButton>("btn_refresh");
button->setClickedCallback(onBtnRefresh, this);
getChild<LLButton>("btn_create")->setVisible(false);
childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
childSetCommitCallback("btn_create",boost::bind(&LLPanelGroup::onBtnCreate,this),NULL);
LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
LLPanelGroupTab* panel_roles = findChild<LLPanelGroupTab>("group_roles_tab_panel");
LLPanelGroupTab* panel_notices = findChild<LLPanelGroupTab>("group_notices_tab_panel");
@ -282,7 +274,6 @@ void LLPanelGroup::reposButtons()
}
reposButton("btn_apply");
reposButton("btn_create");
reposButton("btn_refresh");
reposButton("btn_cancel");
reposButton("btn_chat");
@ -305,23 +296,6 @@ void LLPanelGroup::onBackBtnClick()
}
}
void LLPanelGroup::onBtnCreate()
{
LLPanelGroupGeneral* panel_general = findChild<LLPanelGroupGeneral>("group_general_tab_panel");
if(!panel_general)
return;
std::string apply_mesg;
if(panel_general->apply(apply_mesg))//yes yes you need to call apply to create...
return;
if ( !apply_mesg.empty() )
{
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotificationsUtil::add("GenericAlert", args);
}
}
void LLPanelGroup::onBtnRefresh(void* user_data)
{
LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
@ -461,7 +435,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
LLButton* button_apply = findChild<LLButton>("btn_apply");
LLButton* button_refresh = findChild<LLButton>("btn_refresh");
LLButton* button_create = findChild<LLButton>("btn_create");
LLButton* button_cancel = findChild<LLButton>("btn_cancel");
LLButton* button_call = findChild<LLButton>("btn_call");
@ -474,8 +447,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
if(button_refresh)
button_refresh->setVisible(!is_null_group_id);
if(button_create)
button_create->setVisible(is_null_group_id);
if(button_cancel)
button_cancel->setVisible(!is_null_group_id);
@ -766,32 +737,6 @@ void LLPanelGroup::showNotice(const std::string& subject,
panel_notices->showNotice(subject,message,has_inventory,inventory_name,inventory_offer);
}
//static
void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id)
{
// <FS:Ansariel> Standalone group floaters
//LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
//if(!panel)
// return;
//panel->setGroupID(group_id);
if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater"))
{
FSFloaterGroup::closeGroupFloater(LLUUID::null);
FSFloaterGroup::openGroupFloater(group_id);
}
else
{
LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
if(!panel)
return;
panel->setGroupID(group_id);
}
// </FS:Ansariel>
}
//static
void LLPanelGroup::showNotice(const std::string& subject,

View File

@ -79,8 +79,6 @@ public:
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
static void refreshCreatedGroup(const LLUUID& group_id);
static void showNotice(const std::string& subject,
const std::string& message,
const LLUUID& group_id,
@ -97,7 +95,6 @@ public:
protected:
virtual void update(LLGroupChange gc);
void onBtnCreate();
void onBackBtnClick();
void onBtnJoin();

View File

@ -0,0 +1,270 @@
/**
* @file llpanelgroupcreate.cpp
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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 "llpanelgroupcreate.h"
// UI includes
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llfloatersidepanelcontainer.h"
#include "llsidetraypanelcontainer.h"
#include "llscrolllistctrl.h"
#include "llspinctrl.h"
#include "lltextbox.h"
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lluictrlfactory.h"
// Viewer includes
#include "llagentbenefits.h"
#include "llfloaterreg.h"
#include "llfloater.h"
#include "llgroupmgr.h"
#include "lltrans.h"
#include "llnotificationsutil.h"
#include "lluicolortable.h"
// <FS:Ansariel> Standalone group floaters
#include "fsfloatergroup.h"
#include "llviewercontrol.h"
// </FS:Ansariel>
const S32 MATURE_CONTENT = 1;
const S32 NON_MATURE_CONTENT = 2;
const S32 DECLINE_TO_STATE = 0;
static LLPanelInjector<LLPanelGroupCreate> t_panel_group_creation("panel_group_creation_sidetray");
LLPanelGroupCreate::LLPanelGroupCreate()
: LLPanel()
{
}
LLPanelGroupCreate::~LLPanelGroupCreate()
{
}
BOOL LLPanelGroupCreate::postBuild()
{
childSetCommitCallback("back", boost::bind(&LLPanelGroupCreate::onBackBtnClick, this), NULL);
mComboMature = getChild<LLComboBox>("group_mature_check", TRUE);
mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", TRUE);
mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", TRUE);
mEditCharter = getChild<LLTextEditor>("charter", TRUE);
mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", TRUE);
mMembershipList = getChild<LLScrollListCtrl>("membership_list", TRUE);
mCreateButton = getChild<LLButton>("btn_create", TRUE);
mCreateButton->setCommitCallback(boost::bind(&LLPanelGroupCreate::onBtnCreate, this));
mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", TRUE);
mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace);
mInsignia = getChild<LLTextureCtrl>("insignia", TRUE);
mInsignia->setAllowLocalTexture(FALSE);
mInsignia->setCanApplyImmediately(FALSE);
return TRUE;
}
void LLPanelGroupCreate::onOpen(const LLSD& key)
{
mInsignia->setImageAssetID(LLUUID::null);
mInsignia->setImageAssetName(mInsignia->getDefaultImageName());
mGroupNameEditor->clear();
mEditCharter->clear();
mSpinEnrollmentFee->set(0.f);
mCtrlEnrollmentFee->set(FALSE);
mCtrlOpenEnrollment->set(FALSE);
mMembershipList->clearRows();
// populate list
addMembershipRow("Base");
addMembershipRow("Premium");
addMembershipRow("Premium Plus");
addMembershipRow("Internal");// Present only if you are already in one, needed for testing
S32 cost = LLAgentBenefitsMgr::current().getCreateGroupCost();
mCreateButton->setLabelArg("[COST]", llformat("%d", cost));
}
//static
void LLPanelGroupCreate::refreshCreatedGroup(const LLUUID& group_id)
{
// <FS:Ansariel> Standalone group floaters
//LLSD params;
//params["group_id"] = group_id;
//params["open_tab_name"] = "panel_group_info_sidetray";
//LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater"))
{
FSFloaterGroup::closeGroupFloater(LLUUID::null);
FSFloaterGroup::openGroupFloater(group_id);
}
else
{
LLSD params;
params["group_id"] = group_id;
params["open_tab_name"] = "panel_group_info_sidetray";
LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
// </FS:Ansariel>
}
void LLPanelGroupCreate::addMembershipRow(const std::string &name)
{
if (LLAgentBenefitsMgr::has(name))
{
bool is_current = LLAgentBenefitsMgr::isCurrent(name);
LLScrollListItem::Params item_params;
LLScrollListCell::Params cell_params;
cell_params.font = LLFontGL::getFontSansSerif();
// Start out right justifying numeric displays
cell_params.font_halign = LLFontGL::LEFT;
if (is_current)
{
cell_params.color = LLUIColorTable::instance().getColor("DrYellow");
}
cell_params.column = "clmn_name";
std::string mem_str = name + "Membership";
if (is_current)
{
cell_params.value = LLTrans::getString(mem_str) + " " + getString("current_membership");
}
else
{
cell_params.value = LLTrans::getString(mem_str);
}
item_params.columns.add(cell_params);
cell_params.column = "clmn_price";
cell_params.value = llformat("L$ %d",LLAgentBenefitsMgr::get(name).getCreateGroupCost());
item_params.columns.add(cell_params);
mMembershipList->addRow(item_params);
}
}
void LLPanelGroupCreate::onBackBtnClick()
{
// <FS:Ansariel> Standalone group floaters
//LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
//if(parent)
//{
// parent->openPreviousPanel();
//}
if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater"))
{
FSFloaterGroup::closeGroupFloater(LLUUID::null);
}
else
{
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if(parent)
{
parent->openPreviousPanel();
}
}
// </FS:Ansariel>
}
bool LLPanelGroupCreate::confirmMatureApply(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// 0 == Yes
// 1 == No
// 2 == Cancel
switch (option)
{
case 0:
mComboMature->setCurrentByIndex(MATURE_CONTENT);
createGroup();
break;
case 1:
mComboMature->setCurrentByIndex(NON_MATURE_CONTENT);
createGroup();
break;
default:
break;
}
return true;
}
void LLPanelGroupCreate::onBtnCreate()
{
LL_INFOS() << "Validating group creation" << LL_ENDL;
// Validate the group name length.
std::string gr_name = mGroupNameEditor->getText();
LLStringUtil::trim(gr_name);
S32 group_name_len = gr_name.size();
if (group_name_len < DB_GROUP_NAME_MIN_LEN
|| group_name_len > DB_GROUP_NAME_STR_LEN)
{
LLSD args;
args["MIN_LEN"] = DB_GROUP_NAME_MIN_LEN;
args["MAX_LEN"] = DB_GROUP_NAME_STR_LEN;
LLNotificationsUtil::add("GroupNameLengthWarning", args);
}
else
// Check to make sure mature has been set
if (mComboMature &&
mComboMature->getCurrentIndex() == DECLINE_TO_STATE)
{
LLNotificationsUtil::add("SetGroupMature", LLSD(), LLSD(),
boost::bind(&LLPanelGroupCreate::confirmMatureApply, this, _1, _2));
}
else
{
createGroup();
}
}
void LLPanelGroupCreate::createGroup()
{
LL_INFOS() << "Creating group" << LL_ENDL;
U32 enrollment_fee = (mCtrlEnrollmentFee->get() ?
(U32)mSpinEnrollmentFee->get() : 0);
LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID();
std::string gr_name = mGroupNameEditor->getText();
LLStringUtil::trim(gr_name);
LLGroupMgr::getInstance()->sendCreateGroupRequest(gr_name,
mEditCharter->getText(),
true,
insignia_id,
enrollment_fee,
mCtrlOpenEnrollment->get(),
false,
mComboMature->getCurrentIndex() == MATURE_CONTENT);
}

View File

@ -0,0 +1,73 @@
/**
* @file llpanelgroupcreate.h
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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$
*/
#ifndef LL_LLPANELGROUPCREATE_H
#define LL_LLPANELGROUPCREATE_H
#include "llpanel.h"
// Forward declares
class LLButton;
class LLCheckBoxCtrl;
class LLComboBox;
class LLLineEditor;
class LLTextEditor;
class LLTextureCtrl;
class LLScrollListCtrl;
class LLSpinCtrl;
class LLPanelGroupCreate : public LLPanel
{
public:
LLPanelGroupCreate();
virtual ~LLPanelGroupCreate();
virtual BOOL postBuild();
void onOpen(const LLSD& key);
static void refreshCreatedGroup(const LLUUID& group_id);
private:
void addMembershipRow(const std::string &name);
bool confirmMatureApply(const LLSD& notification, const LLSD& response);
void onBtnCreate();
void onBackBtnClick();
void createGroup();
LLComboBox *mComboMature;
LLButton *mCreateButton;
LLCheckBoxCtrl *mCtrlOpenEnrollment;
LLCheckBoxCtrl *mCtrlEnrollmentFee;
LLTextEditor *mEditCharter;
LLTextureCtrl *mInsignia;
LLLineEditor *mGroupNameEditor;
LLScrollListCtrl *mMembershipList;
LLSpinCtrl *mSpinEnrollmentFee;
};
#endif // LL_LLPANELGROUPCREATE_H

View File

@ -30,6 +30,7 @@
#include "llavatarnamecache.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llsdparam.h"
#include "lluictrlfactory.h"
#include "roles_constants.h"
@ -380,6 +381,11 @@ void LLPanelGroupGeneral::draw()
bool LLPanelGroupGeneral::apply(std::string& mesg)
{
if (mGroupID.isNull())
{
return false;
}
if (!mGroupID.isNull() && mAllowEdit && mComboActiveTitle && mComboActiveTitle->isDirty())
{
LLGroupMgr::getInstance()->sendGroupTitleUpdate(mGroupID,mComboActiveTitle->getCurrentID());
@ -389,7 +395,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY);
if (has_power_in_group || mGroupID.isNull())
if (has_power_in_group)
{
LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL;
@ -402,31 +408,6 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
return false;
}
if (mGroupID.isNull())
{
// Validate the group name length.
S32 group_name_len = mGroupNameEditor->getText().size();
if ( group_name_len < DB_GROUP_NAME_MIN_LEN
|| group_name_len > DB_GROUP_NAME_STR_LEN)
{
std::ostringstream temp_error;
temp_error << "A group name must be between " << DB_GROUP_NAME_MIN_LEN
<< " and " << DB_GROUP_NAME_STR_LEN << " characters.";
mesg = temp_error.str();
return false;
}
// <FS:AW> FIRE-7091 group creation cost inaccurate on opensim>
//LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
LLSD args;
S32 cost = LLGlobalEconomy::getInstance()->getPriceGroupCreate();
args["[COST]"] = llformat("%d", cost);
LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
// </FS:AW> FIRE-7091 group creation cost inaccurate on opensim>
return false;
}
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
@ -547,37 +528,6 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS
return ret;
}
// static
bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
{
// Yay! We are making a new group!
U32 enrollment_fee = (mCtrlEnrollmentFee->get() ?
(U32) mSpinEnrollmentFee->get() : 0);
LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID();
LLGroupMgr::getInstance()->sendCreateGroupRequest(mGroupNameEditor->getText(),
mEditCharter->getText(),
mCtrlShowInGroupList->get(),
insignia_id,
enrollment_fee,
mCtrlOpenEnrollment->get(),
false,
mComboMature->getCurrentIndex() == MATURE_CONTENT);
}
break;
case 1:
default:
break;
}
return false;
}
// virtual
void LLPanelGroupGeneral::update(LLGroupChange gc)
{

View File

@ -53,7 +53,6 @@ public:
virtual bool needsApply(std::string& mesg);
virtual bool apply(std::string& mesg);
virtual void cancel();
bool createGroupCallback(const LLSD& notification, const LLSD& response);
virtual void update(LLGroupChange gc);

View File

@ -28,12 +28,12 @@
#include "llpanelmaininventory.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llavataractions.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "lldndbutton.h"
#include "lleconomy.h"
#include "llfilepicker.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@ -324,19 +324,28 @@ BOOL LLPanelMainInventory::postBuild()
initListCommandsHandlers();
// <FS:AW opensim currency support>
// // *TODO:Get the cost info from the server
// const std::string upload_cost("10");
S32 cost = LLGlobalEconomy::getInstance()->getPriceUpload();
std::string upload_cost;
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free");
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
upload_cost = "L$" + (cost > 0 ? llformat("%d", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")));
texture_upload_cost_str = "L$" + llformat("%d", texture_upload_cost);
sound_upload_cost_str = "L$" + llformat("%d", sound_upload_cost);
animation_upload_cost_str = "L$" + llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
@ -344,10 +353,9 @@ BOOL LLPanelMainInventory::postBuild()
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if (menu)
{
menu->getChild<LLMenuItemGL>("Upload Image")->setLabelArg("[COST]", upload_cost);
menu->getChild<LLMenuItemGL>("Upload Sound")->setLabelArg("[COST]", upload_cost);
menu->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", upload_cost);
menu->getChild<LLMenuItemGL>("Bulk Upload")->setLabelArg("[COST]", upload_cost);
menu->getChild<LLMenuItemGL>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
menu->getChild<LLMenuItemGL>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
menu->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
// Trigger callback for focus received so we can deselect items in inbox/outbox
@ -2051,47 +2059,37 @@ bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType
void LLPanelMainInventory::setUploadCostIfNeeded()
{
// *NOTE dzaporozhan
// Upload cost is set in process_economy_data() (llviewermessage.cpp). But since we
// have two instances of Inventory panel at the moment(and two instances of context menu),
// call to gMenuHolder->childSetLabelArg() sets upload cost only for one of the instances.
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
if(mNeedUploadCost && menu)
{
LLMenuItemBranchGL* upload_menu = menu->findChild<LLMenuItemBranchGL>("upload");
if(upload_menu)
{
S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
std::string cost_str;
// getPriceUpload() returns -1 if no data available yet.
// <FS:AW opensim currency support>
// if(upload_cost >= 0)
// {
// mNeedUploadCost = false;
// cost_str = llformat("%d", upload_cost);
// }
// else
// {
// cost_str = llformat("%d", gSavedSettings.getU32("DefaultUploadCost"));
// }
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
cost_str = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free");
}
else
#endif
{
cost_str = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")));
}
// </FS:AW opensim currency support>
upload_menu->getChild<LLView>("Upload Image")->setLabelArg("[COST]", cost_str);
upload_menu->getChild<LLView>("Upload Sound")->setLabelArg("[COST]", cost_str);
upload_menu->getChild<LLView>("Upload Animation")->setLabelArg("[COST]", cost_str);
upload_menu->getChild<LLView>("Bulk Upload")->setLabelArg("[COST]", cost_str);
if (LLGridManager::getInstance()->isInOpenSim())
{
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
texture_upload_cost_str = "L$" + llformat("%d", texture_upload_cost);
sound_upload_cost_str = "L$" + llformat("%d", sound_upload_cost);
animation_upload_cost_str = "L$" + llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
menu->getChild<LLView>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
menu->getChild<LLView>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
menu->getChild<LLView>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
}

View File

@ -30,7 +30,6 @@
#include "llpanelobject.h"
// linden library includes
#include "lleconomy.h"
#include "llerror.h"
#include "llfontgl.h"
#include "llpermissionsflags.h"

View File

@ -47,6 +47,7 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llavataractions.h"
#include "llavatarlist.h"
#include "llavatarlistitem.h"
@ -99,9 +100,6 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
static const std::string CONTACT_SETS_TAB_NAME = "contact_sets_panel"; // [FS:CR] Contact sets
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
const S32 BASE_MAX_AGENT_GROUPS = 42;
const S32 PREMIUM_MAX_AGENT_GROUPS = 60;
// [FS] FIRE-12229
//extern S32 gMaxAgentGroups;
@ -662,16 +660,7 @@ void LLPanelPeople::removePicker()
BOOL LLPanelPeople::postBuild()
{
// <FS:Ansariel> Don't bother with "want more?" advertisement
//S32 max_premium = PREMIUM_MAX_AGENT_GROUPS;
//if (gAgent.getRegion())
//{
// LLSD features;
// gAgent.getRegion()->getSimulatorFeatures(features);
// if (features.has("MaxAgentGroupsPremium"))
// {
// max_premium = features["MaxAgentGroupsPremium"].asInteger();
// }
//}
//S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit();
// </FS:Ansariel>
// <FS:Ansariel> Firestorm radar
@ -681,13 +670,12 @@ BOOL LLPanelPeople::postBuild()
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
// <FS:Ansariel> Don't bother with "want more?" advertisement
//if(gMaxAgentGroups <= max_premium)
//if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium)
//{
// getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
// getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
// getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
// getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
//}
// </FS:Ansariel>
mTabContainer = getChild<LLTabContainer>("tabs");
mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2));
mSavedFilters.resize(mTabContainer->getTabCount());
@ -1009,13 +997,14 @@ void LLPanelPeople::updateButtons()
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
// [CR] FIRE-12229
// <FS:CR> FIRE-12229
//U32 groups_count = gAgent.mGroups.size();
//U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0;
//S32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit();
//U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0;
//groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count));
//groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining));
//groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining));
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
// [/CR]
// </FS:CR>
}
else
{
@ -1260,25 +1249,22 @@ void LLPanelPeople::onGroupLimitInfo()
{
LLSD args;
S32 max_basic = BASE_MAX_AGENT_GROUPS;
S32 max_premium = PREMIUM_MAX_AGENT_GROUPS;
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("MaxAgentGroupsBasic"))
{
max_basic = features["MaxAgentGroupsBasic"].asInteger();
}
if (features.has("MaxAgentGroupsPremium"))
{
max_premium = features["MaxAgentGroupsPremium"].asInteger();
}
}
args["MAX_BASIC"] = max_basic;
args["MAX_PREMIUM"] = max_premium;
S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit();
S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit();
args["MAX_BASIC"] = max_basic;
args["MAX_PREMIUM"] = max_premium;
LLNotificationsUtil::add("GroupLimitInfo", args);
if (LLAgentBenefitsMgr::has("Premium Plus"))
{
S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium Plus").getGroupMembershipLimit();
args["MAX_PREMIUM_PLUS"] = max_premium_plus;
LLNotificationsUtil::add("GroupLimitInfoPlus", args);
}
else
{
LLNotificationsUtil::add("GroupLimitInfo", args);
}
}
void LLPanelPeople::onTabSelected(const LLSD& param)

View File

@ -39,6 +39,8 @@
#include "llsidetraypanelcontainer.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llagentbenefits.h"
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
S32 power_of_two(S32 sz, S32 upper)
@ -59,6 +61,7 @@ LLPanelSnapshot::LLPanelSnapshot()
// virtual
BOOL LLPanelSnapshot::postBuild()
{
getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
if (!getWidthSpinnerName().empty())
{

View File

@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "llcombobox.h"
#include "lleconomy.h"
#include "llsidetraypanelcontainer.h"
#include "llspinctrl.h"
@ -38,6 +37,8 @@
#include "llstatusbar.h" // can_afford_transaction()
#include "llnotificationsutil.h"
#include "llagentbenefits.h"
// <FS:CR> FIRE-10537 - Temp texture uploads aren't functional on SSB regions
#include "llagent.h"
#include "llviewerregion.h"
@ -150,14 +151,14 @@ BOOL LLPanelSnapshotInventory::postBuild()
// virtual
void LLPanelSnapshotInventory::onOpen(const LLSD& key)
{
getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost()));
// <FS:CR> FIRE-10537 - Temp texture uploads aren't functional on SSB regions
if (LLGlobalEconomy::getInstance()->getPriceUpload() == 0
if (LLAgentBenefitsMgr::current().getTextureUploadCost() == 0
|| gAgent.getRegion()->getCentralBakeVersion() > 0)
{
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
}
getChild<LLCheckBoxCtrl>("inventory_temp_upload")->setVisible(LLGlobalEconomy::getInstance()->getPriceUpload() > 0 && gAgent.getRegion()->getCentralBakeVersion() == 0);
getChild<LLCheckBoxCtrl>("inventory_temp_upload")->setVisible(LLAgentBenefitsMgr::current().getTextureUploadCost() > 0 && gAgent.getRegion()->getCentralBakeVersion() == 0);
// </FS:CR>
LLPanelSnapshot::onOpen(key);
}
@ -187,7 +188,7 @@ LLPanelSnapshotInventory::~LLPanelSnapshotInventory()
void LLPanelSnapshotInventoryBase::onSend()
{
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
if (can_afford_transaction(expected_upload_cost))
{
if (mSnapshotFloater)
@ -223,7 +224,7 @@ BOOL LLPanelOutfitSnapshotInventory::postBuild()
// virtual
void LLPanelOutfitSnapshotInventory::onOpen(const LLSD& key)
{
getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload()));
getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost()));
LLPanelSnapshot::onOpen(key);
}

View File

@ -26,7 +26,6 @@
#include "llviewerprecompiledheaders.h"
#include "lleconomy.h"
#include "llpanel.h"
#include "llsidetraypanelcontainer.h"
@ -34,12 +33,14 @@
#include "llfloaterreg.h"
#include "llfloaterflickr.h" // <FS:Ansariel> Share to Flickr
#include "llagentbenefits.h"
/**
* Provides several ways to save a snapshot.
*/
class LLPanelSnapshotOptions
: public LLPanel
, public LLEconomyObserver
{
LOG_CLASS(LLPanelSnapshotOptions);
@ -48,7 +49,6 @@ public:
~LLPanelSnapshotOptions();
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onEconomyDataChange() { updateUploadCost(); }
private:
void updateUploadCost();
@ -71,13 +71,10 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions()
mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this));
mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
mCommitCallbackRegistrar.add("Snapshot.SendToFlickr", boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this)); // <FS:Ansariel> Share to Flickr
LLGlobalEconomy::getInstance()->addObserver(this);
}
LLPanelSnapshotOptions::~LLPanelSnapshotOptions()
{
LLGlobalEconomy::getInstance()->removeObserver(this);
}
// virtual
@ -95,7 +92,7 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key)
void LLPanelSnapshotOptions::updateUploadCost()
{
S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
}

View File

@ -31,7 +31,6 @@
// linden library includes
#include "llclickaction.h"
#include "lleconomy.h"
#include "llerror.h"
#include "llfontgl.h"
#include "llflexibleobject.h"

View File

@ -35,7 +35,6 @@
#include "llcachename.h"
#include "llavatarnamecache.h"
#include "lldbstrings.h"
#include "lleconomy.h"
#include "llgl.h"
#include "llmediaentry.h"
#include "llrender.h"

View File

@ -28,10 +28,10 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llagentui.h"
#include "llcombobox.h"
#include "lleconomy.h"
#include "llfloaterperms.h"
#include "llfloaterreg.h"
#include "llfloaterflickr.h" // <FS:Ansariel> Share to Flickr
@ -1122,7 +1122,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name)
LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL);
std::string who_took_it;
LLAgentUI::buildFullname(who_took_it);
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string;
std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string;
LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;

View File

@ -92,6 +92,7 @@
#include "v3math.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llagentpicksinfo.h"
#include "llagentwearables.h"
@ -255,7 +256,7 @@
// exported globals
//
bool gAgentMovementCompleted = false;
S32 gMaxAgentGroups;
S32 gMaxAgentGroups; // <FS:Ansariel> OpenSim legacy economy support
const std::string SCREEN_HOME_FILENAME = "screen_home%s.png";
const std::string SCREEN_LAST_FILENAME = "screen_last%s.png";
@ -294,9 +295,8 @@ static std::string gFirstSimSeedCap;
static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
static bool mLoginStatePastUI = false;
static bool mBenefitsSuccessfullyInit = false;
const S32 DEFAULT_MAX_AGENT_GROUPS = 42;
const S32 ALLOWED_MAX_AGENT_GROUPS = 500;
const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds
boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
@ -330,6 +330,7 @@ void apply_udp_blacklist(const std::string& csv);
//bool process_login_success_response();
bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y);
// </FS:CR> Aurora Sim
void on_benefits_failed_callback(const LLSD& notification, const LLSD& response);
void transition_back_to_login_panel(const std::string& emsg);
// <FS:KC> FIRE-18250: Option to disable default eye movement
void update_static_eyes();
@ -2309,8 +2310,15 @@ bool idle_startup()
send_complete_agent_movement(regionp->getHost());
gAssetStorage->setUpstream(regionp->getHost());
gCacheName->setUpstream(regionp->getHost());
msg->newMessageFast(_PREHASH_EconomyDataRequest);
gAgent.sendReliableMessage();
// <FS:Ansariel> OpenSim legacy economy support
#ifdef OPENSIM
if (!LLGridManager::instance().isInSecondLife())
{
msg->newMessageFast(_PREHASH_EconomyDataRequest);
gAgent.sendReliableMessage();
}
#endif
// </FS:Ansariel>
}
display_startup();
@ -3003,6 +3011,11 @@ bool idle_startup()
set_startup_status(1.0, "", "");
display_startup();
if (!mBenefitsSuccessfullyInit)
{
LLNotificationsUtil::add("FailedToGetBenefits", LLSD(), LLSD(), boost::bind(on_benefits_failed_callback, _1, _2));
}
// <FS:TT> Client LSL Bridge
if (gSavedSettings.getBOOL("UseLSLBridge"))
{
@ -4241,6 +4254,66 @@ void apply_udp_blacklist(const std::string& csv)
}
void on_benefits_failed_callback(const LLSD& notification, const LLSD& response)
{
LL_WARNS("Benefits") << "Failed to load benefits information" << LL_ENDL;
}
bool init_benefits(LLSD& response)
{
LL_DEBUGS("Benefits") << "login success response:" << response << LL_ENDL;
bool succ = true;
std::string package_name = response["account_type"].asString();
const LLSD& benefits_sd = response["account_level_benefits"];
if (!LLAgentBenefitsMgr::init(package_name, benefits_sd) ||
!LLAgentBenefitsMgr::initCurrent(package_name, benefits_sd))
{
succ = false;
}
else
{
LL_DEBUGS("Benefits") << "Initialized current benefits, level " << package_name << " from " << benefits_sd << LL_ENDL;
}
const LLSD& packages_sd = response["premium_packages"];
for(LLSD::map_const_iterator package_iter = packages_sd.beginMap();
package_iter != packages_sd.endMap();
++package_iter)
{
std::string package_name = package_iter->first;
const LLSD& benefits_sd = package_iter->second["benefits"];
if (LLAgentBenefitsMgr::init(package_name, benefits_sd))
{
LL_DEBUGS("Benefits") << "Initialized benefits for package " << package_name << " from " << benefits_sd << LL_ENDL;
}
else
{
LL_WARNS("Benefits") << "Failed init for package " << package_name << " from " << benefits_sd << LL_ENDL;
succ = false;
}
}
if (!LLAgentBenefitsMgr::has("Base"))
{
LL_WARNS("Benefits") << "Benefits info did not include required package Base" << LL_ENDL;
succ = false;
}
if (!LLAgentBenefitsMgr::has("Premium"))
{
LL_WARNS("Benefits") << "Benefits info did not include required package Premium" << LL_ENDL;
succ = false;
}
// FIXME PREMIUM - for testing if login does not yet provide Premium Plus. Should be removed thereafter.
//if (succ && !LLAgentBenefitsMgr::has("Premium Plus"))
//{
// LLAgentBenefitsMgr::init("Premium Plus", packages_sd["Premium"]["benefits"]);
// llassert(LLAgentBenefitsMgr::has("Premium Plus"));
//}
return succ;
}
// <FS:CR> Aurora Sim
//bool process_login_success_response()
bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y)
@ -4248,6 +4321,18 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
{
LLSD response = LLLoginInstance::getInstance()->getResponse();
// <FS:Ansariel> OpenSim legacy economy support
//mBenefitsSuccessfullyInit = init_benefits(response);
if (LLGridManager::instance().isInSecondLife())
{
mBenefitsSuccessfullyInit = init_benefits(response);
}
else
{
mBenefitsSuccessfullyInit = true;
}
// </FS:Ansariel>
std::string text(response["udp_blacklist"]);
if(!text.empty())
{
@ -4659,50 +4744,30 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
std::string openid_token = response["openid_token"];
LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token);
}
// <FS:AW> opensim max groups support
//gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
//if(response.has("max-agent-groups"))
//{
// S32 agent_groups = atoi(std::string(response["max-agent-groups"]).c_str());
// if (agent_groups > 0 && agent_groups <= ALLOWED_MAX_AGENT_GROUPS)
// {
// gMaxAgentGroups = agent_groups;
// LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: "
// << gMaxAgentGroups << LL_ENDL;
// }
// else
// {
// LL_INFOS("LLStartup") << "Invalid value received, using defaults for gMaxAgentGroups: "
// << gMaxAgentGroups << LL_ENDL;
// }
//}
//else {
// LL_INFOS("LLStartup") << "Missing max-agent-groups, using default value for gMaxAgentGroups: "
// << gMaxAgentGroups << LL_ENDL;
//}
if(response.has("max-agent-groups") || response.has("max_groups"))
{
std::string max_agent_groups;
response.has("max_groups") ?
max_agent_groups = response["max_groups"].asString()
: max_agent_groups = response["max-agent-groups"].asString();
gMaxAgentGroups = atoi(max_agent_groups.c_str());
LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: "
<< gMaxAgentGroups << LL_ENDL;
}
else
{
// <FS:Ansariel> OpenSim legacy economy support
#ifdef OPENSIM
gMaxAgentGroups = 0;
LL_INFOS("LLStartup") << "did not receive max-agent-groups. unlimited groups activated" << LL_ENDL;
#else
gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
LL_INFOS("LLStartup") << "using gMaxAgentGroups default: "
<< gMaxAgentGroups << LL_ENDL;
#endif
if (!LLGridManager::instance().isInSecondLife())
{
if (response.has("max-agent-groups") || response.has("max_groups"))
{
std::string max_agent_groups;
response.has("max_groups") ?
max_agent_groups = response["max_groups"].asString()
: max_agent_groups = response["max-agent-groups"].asString();
gMaxAgentGroups = atoi(max_agent_groups.c_str());
LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: "
<< gMaxAgentGroups << LL_ENDL;
}
else
{
gMaxAgentGroups = 0;
LL_INFOS("LLStartup") << "did not receive max-agent-groups. unlimited groups activated" << LL_ENDL;
}
}
// </FS:AW>
#endif
// </FS:Ansariel>
// <COLOSI opensim multi-currency support>
std::string prev_currency_symbol = Tea::getCurrency();

View File

@ -90,7 +90,7 @@ typedef enum {
// exported symbols
extern bool gAgentMovementCompleted;
extern S32 gMaxAgentGroups;
extern S32 gMaxAgentGroups; // <FS:Ansariel> OpenSim legacy economy support
extern LLPointer<LLViewerTexture> gStartTexture;
class LLStartUp

View File

@ -198,6 +198,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
- 3*VPAD - BTN_HEIGHT;
// reshape to calculate real text width and height
msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height );
if ("GroupLimitInfo" == mNotification->getName() || "GroupLimitInfoPlus" == mNotification->getName())
{
msg_box->setSkipLinkUnderline(true);
}
msg_box->setValue(msg);
S32 pixel_width = msg_box->getTextPixelWidth();

View File

@ -36,7 +36,6 @@
#include "lluploaddialog.h"
#include "llpreviewscript.h"
#include "llnotificationsutil.h"
#include "lleconomy.h"
#include "llagent.h"
#include "llfloaterreg.h"
#include "llfloatersnapshot.h"
@ -177,22 +176,6 @@ void LLResourceUploadInfo::logPreparedUpload()
"Asset Type: " << LLAssetType::lookup(mAssetType) << LL_ENDL;
}
S32 LLResourceUploadInfo::getEconomyUploadCost()
{
// Update L$ and ownership credit information
// since it probably changed on the server
if (getAssetType() == LLAssetType::AT_TEXTURE ||
getAssetType() == LLAssetType::AT_SOUND ||
getAssetType() == LLAssetType::AT_ANIMATION ||
getAssetType() == LLAssetType::AT_MESH)
{
return LLGlobalEconomy::instance().getPriceUpload();
}
return 0;
}
LLUUID LLResourceUploadInfo::finishUpload(LLSD &result)
{
if (getFolderId().isNull())
@ -329,6 +312,51 @@ std::string LLResourceUploadInfo::getDisplayName() const
return (mName.empty()) ? mAssetId.asString() : mName;
};
bool LLResourceUploadInfo::findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type)
{
U32 codec;
return findAssetTypeAndCodecOfExtension(exten, asset_type, codec, false);
}
// static
bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload)
{
bool succ = false;
codec = LLImageBase::getCodecFromExtension(exten);
if (codec != IMG_CODEC_INVALID)
{
asset_type = LLAssetType::AT_TEXTURE;
succ = true;
}
else if (exten == "wav")
{
asset_type = LLAssetType::AT_SOUND;
succ = true;
}
else if (exten == "anim")
{
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
}
else if (!bulk_upload && (exten == "bvh"))
{
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
}
else if (exten == "ogg")
{
asset_type = LLAssetType::AT_SOUND;
succ = true;
}
else if (exten == "j2k")
{
asset_type = LLAssetType::AT_TEXTURE;
succ = true;
}
return succ;
}
//=========================================================================
LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo(
std::string fileName,
@ -366,9 +394,11 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
std::string filename = gDirUtilp->getTempFilename();
std::string exten = gDirUtilp->getExtension(getFileName());
U32 codec = LLImageBase::getCodecFromExtension(exten);
LLAssetType::EType assetType = LLAssetType::AT_NONE;
U32 codec = IMG_CODEC_INVALID;
bool found_type = findAssetTypeAndCodecOfExtension(exten, assetType, codec);
std::string errorMessage;
std::string errorLabel;
@ -387,10 +417,16 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
errorLabel = "NoFileExtension";
error = true;
}
else if (codec != IMG_CODEC_INVALID)
else if (!found_type)
{
// Unknown extension
errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str());
errorLabel = "ErrorMessage";
error = TRUE;;
}
else if (assetType == LLAssetType::AT_TEXTURE)
{
// It's an image file, the upload procedure is the same for all
assetType = LLAssetType::AT_TEXTURE;
if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec))
{
// <FS:Ansariel> Duplicate error message output
@ -402,9 +438,8 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
error = true;
}
}
else if (exten == "wav")
else if (assetType == LLAssetType::AT_SOUND)
{
assetType = LLAssetType::AT_SOUND; // tag it as audio
S32 encodeResult = 0;
LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL;
@ -437,28 +472,10 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
errorLabel = "DoNotSupportBulkAnimationUpload";
error = true;
}
else if (exten == "anim")
else if (assetType == LLAssetType::AT_ANIMATION)
{
assetType = LLAssetType::AT_ANIMATION;
filename = getFileName();
}
else if (exten == "ogg")
{
assetType = LLAssetType::AT_SOUND;
filename = getFileName();
}
else if (exten == "j2k")
{
assetType = LLAssetType::AT_TEXTURE;
filename = getFileName();
}
else
{
// Unknown extension
errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str());
errorLabel = "ErrorMessage";
error = TRUE;;
}
if (error)
{
@ -774,7 +791,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
return;
}
S32 uploadPrice = result["upload_price"].asInteger();//uploadInfo->getEconomyUploadCost();
S32 uploadPrice = result["upload_price"].asInteger();
if (uploadPrice > 0)
{

View File

@ -62,7 +62,6 @@ public:
virtual LLSD prepareUpload();
virtual LLSD generatePostBody();
virtual void logPreparedUpload();
virtual S32 getEconomyUploadCost();
virtual LLUUID finishUpload(LLSD &result);
LLTransactionID getTransactionId() const { return mTransactionId; }
@ -88,6 +87,9 @@ public:
LLUUID getItemId() const { return mItemId; }
LLAssetID getAssetId() const { return mAssetId; }
static bool findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type);
static bool findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload = true);
protected:
LLResourceUploadInfo(
std::string name,

View File

@ -46,6 +46,7 @@
// newview includes
#include "llagent.h"
#include "llagentaccess.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llagentui.h"
#include "llagentwearables.h"
@ -131,13 +132,13 @@
#include "lluilistener.h"
#include "llappearancemgr.h"
#include "lltrans.h"
#include "lleconomy.h"
#include "lltoolgrab.h"
#include "llwindow.h"
#include "llpathfindingmanager.h"
#include "llstartup.h"
#include "boost/unordered_map.hpp"
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
#include "llcleanup.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "fsavatarrenderpersistence.h"
@ -630,28 +631,35 @@ void init_menus()
gViewerWindow->setMenuBackgroundColor(false,
!LLGridManager::getInstance()->isInSLBeta());
// <FS:AW opensim currency support>
// // Assume L$10 for now, the server will tell us the real cost at login
// // *TODO:Also fix cost in llfolderview.cpp for Inventory menus
// const std::string upload_cost("10");
// \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory
S32 cost = LLGlobalEconomy::getInstance()->getPriceUpload();
std::string upload_cost;
// *TODO:Also fix cost in llfolderview.cpp for Inventory menus
//const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost());
//const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost());
//const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free");
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
}
else
#endif
{
upload_cost = "L$" + (cost > 0 ? llformat("%d", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")));
texture_upload_cost_str = "L$" + llformat("%d", texture_upload_cost);
sound_upload_cost_str = "L$" + llformat("%d", sound_upload_cost);
animation_upload_cost_str = "L$" + llformat("%d", animation_upload_cost);
}
// </FS:AW opensim currency support>
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost);
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost);
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost);
gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost);
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str);
gAutorespondMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Autorespond", TRUE);
gAutorespondNonFriendsMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Autorespond to non-friends", TRUE);
gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
@ -10915,22 +10923,31 @@ class LLUploadCostCalculator : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string menu_name = userdata.asString();
// AW:this fights the update in llviewermessage
calculateCost();// <FS:AW opensim currency support>
std::vector<std::string> fields;
std::string str = userdata.asString();
boost::split(fields, str, boost::is_any_of(","));
if (fields.size()<1)
{
return false;
}
std::string menu_name = fields[0];
std::string asset_type_str = "texture";
if (fields.size()>1)
{
asset_type_str = fields[1];
}
LL_DEBUGS("Benefits") << "userdata " << userdata << " menu_name " << menu_name << " asset_type_str " << asset_type_str << LL_ENDL;
calculateCost(asset_type_str);
gMenuHolder->childSetLabelArg(menu_name, "[COST]", mCostStr);
return true;
}
void calculateCost();
void calculateCost(const std::string& asset_type_str);
public:
LLUploadCostCalculator()
{
// <FS:AW opensim currency support> we don't know the costs yet
// calculateCost();
// </FS:AW opensim currency support>
}
};
@ -10956,20 +10973,26 @@ class LLToggleUIHints : public view_listener_t
}
};
void LLUploadCostCalculator::calculateCost()
void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str)
{
S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
// getPriceUpload() returns -1 if no data available yet.
// <FS:AW opensim currency support>
// if(upload_cost >= 0)
// {
// mCostStr = llformat("%d", upload_cost);
// }
// else
// {
// mCostStr = llformat("%d", gSavedSettings.getU32("DefaultUploadCost"));
// }
S32 upload_cost = -1;
if (asset_type_str == "texture")
{
upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
}
else if (asset_type_str == "animation")
{
upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
}
else if (asset_type_str == "sound")
{
upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
}
if (upload_cost < 0)
{
LL_WARNS() << "Unable to find upload cost for asset_type_str " << asset_type_str << LL_ENDL;
}
#ifdef OPENSIM // <FS:AW optional opensim support>
if (LLGridManager::getInstance()->isInOpenSim())
{
@ -10977,10 +11000,7 @@ void LLUploadCostCalculator::calculateCost()
}
else
#endif // OPENSIM // <FS:AW optional opensim support>
{
mCostStr = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")));
}
// </FS:AW opensim currency support>
mCostStr = std::to_string(upload_cost);
}
void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y)

View File

@ -30,6 +30,7 @@
// project includes
#include "llagent.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llfilepicker.h"
#include "llfloaterreg.h"
@ -67,7 +68,6 @@
#include "llviewerassetupload.h"
// linden libraries
#include "lleconomy.h"
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "llsdutil.h"
@ -88,11 +88,7 @@ class LLFileEnableUpload : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
// <FS:Ansariel> Make asset upload balance check work again
//return true;
bool new_value = gStatusBar && LLGlobalEconomy::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::getInstance()->getPriceUpload());
return new_value;
// </FS:Ansariel>
return true;
}
};
@ -419,6 +415,77 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP
return;
}
void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
// Cancel upload
return;
}
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
std::string filename = (*in_iter);
std::string name = gDirUtilp->getBaseFileName(filename, true);
std::string asset_name = name;
LLStringUtil::replaceNonstandardASCII(asset_name, '?');
LLStringUtil::replaceChar(asset_name, '|', '?');
LLStringUtil::stripNonprintable(asset_name);
LLStringUtil::trim(asset_name);
std::string ext = gDirUtilp->getExtension(filename);
LLAssetType::EType asset_type;
U32 codec;
S32 expected_upload_cost;
if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) &&
LLAgentBenefitsMgr::current().findUploadCost(asset_type, expected_upload_cost))
{
LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo(
filename,
asset_name,
asset_name, 0,
LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
expected_upload_cost));
upload_new_resource(uploadInfo, NULL, NULL);
}
}
}
bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S32& total_cost, S32& file_count, S32& bvh_count)
{
total_cost = 0;
file_count = 0;
bvh_count = 0;
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
std::string filename = (*in_iter);
std::string ext = gDirUtilp->getExtension(filename);
if (ext == "bvh")
{
bvh_count++;
}
LLAssetType::EType asset_type;
U32 codec;
S32 cost;
if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) &&
LLAgentBenefitsMgr::current().findUploadCost(asset_type, cost))
{
total_cost += cost;
file_count++;
}
}
return file_count > 0;
}
const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type)
{
@ -430,31 +497,50 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::
//
// Also fix single upload to charge first, then refund
S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
// FIXME PREMIUM what about known types that can't be bulk uploaded
// (bvh)? These will fail in the item by item upload but won't be
// mentioned in the notification.
std::vector<std::string> filtered_filenames;
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
std::string filename = (*in_iter);
if (!check_file_extension(filename, type)) continue;
std::string name = gDirUtilp->getBaseFileName(filename, true);
std::string asset_name = name;
LLStringUtil::replaceNonstandardASCII(asset_name, '?');
LLStringUtil::replaceChar(asset_name, '|', '?');
LLStringUtil::stripNonprintable(asset_name);
LLStringUtil::trim(asset_name);
LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo(
filename,
asset_name,
asset_name, 0,
LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
expected_upload_cost));
upload_new_resource(uploadInfo, NULL, NULL);
const std::string& filename = *in_iter;
if (check_file_extension(filename, type))
{
filtered_filenames.push_back(filename);
}
}
S32 expected_upload_cost;
S32 expected_upload_count;
S32 bvh_count;
if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost, expected_upload_count, bvh_count))
{
LLSD args;
args["COST"] = expected_upload_cost;
args["COUNT"] = expected_upload_count;
LLNotificationsUtil::add("BulkUploadCostConfirmation", args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2));
if (filtered_filenames.size() > expected_upload_count)
{
if (bvh_count == filtered_filenames.size() - expected_upload_count)
{
LLNotificationsUtil::add("DoNotSupportBulkAnimationUpload");
}
else
{
LLNotificationsUtil::add("BulkUploadIncompatibleFiles");
}
}
}
else if (bvh_count == filtered_filenames.size())
{
LLNotificationsUtil::add("DoNotSupportBulkAnimationUpload");
}
else
{
LLNotificationsUtil::add("BulkUploadNoCompatibleFiles");
}
}
class LLFileUploadImage : public view_listener_t

View File

@ -32,7 +32,6 @@
#include "llaudioengine.h"
#include "llavataractions.h"
#include "llavatarnamecache.h" // IDEVO HACK
#include "lleconomy.h"
#include "lleventtimer.h"
#include "llfloaterreg.h"
#include "llfolderview.h"
@ -51,6 +50,7 @@
#include "mean_collision_data.h"
#include "llagent.h"
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llcallingcard.h"
#include "llbuycurrencyhtml.h"
@ -148,6 +148,7 @@
#include "fslslbridge.h"
#include "fsmoneytracker.h"
#include "llattachmentsmgr.h"
#include "lleconomy.h"
#include "llfloaterbump.h"
#include "llfloaterreg.h"
#include "llfriendcard.h"
@ -1003,7 +1004,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
if(option == 0 && !group_id.isNull())
{
// check for promotion or demotion.
S32 max_groups = gMaxAgentGroups;
S32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit();
if(gAgent.isInGroup(group_id)) ++max_groups;
// [CR] FIRE-12229
@ -6881,33 +6882,32 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data)
// do some extra stuff once we get our economy data
void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
{
LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance());
S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload();
// <FS:AW opensim currency support>
// AW: from this point anything is bogus because it's all replaced by the LLUploadCostCalculator in llviewermenu
// LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL;
// gMenuHolder->getChild<LLUICtrl>("Upload Image")->setLabelArg("[COST]", llformat("%d", upload_cost));
// gMenuHolder->getChild<LLUICtrl>("Upload Sound")->setLabelArg("[COST]", llformat("%d", upload_cost));
// gMenuHolder->getChild<LLUICtrl>("Upload Animation")->setLabelArg("[COST]", llformat("%d", upload_cost));
// gMenuHolder->getChild<LLUICtrl>("Bulk Upload")->setLabelArg("[COST]", llformat("%d", upload_cost));
std::string cost_str;
// <FS:AW opensim currency support>
//LL_DEBUGS("Benefits") << "Received economy data, not currently used" << LL_ENDL;
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
cost_str = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free");
LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance());
S32 texture_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
S32 sound_upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost();
S32 animation_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
std::string texture_upload_cost_str;
std::string sound_upload_cost_str;
std::string animation_upload_cost_str;
texture_upload_cost_str = texture_upload_cost > 0 ? llformat("%s%d", "L$", texture_upload_cost) : LLTrans::getString("free");
sound_upload_cost_str = sound_upload_cost > 0 ? llformat("%s%d", "L$", sound_upload_cost) : LLTrans::getString("free");
animation_upload_cost_str = animation_upload_cost > 0 ? llformat("%s%d", "L$", animation_upload_cost) : LLTrans::getString("free");
gMenuHolder->getChild<LLUICtrl>("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
else
#endif
{
cost_str = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")));
LL_DEBUGS("Benefits") << "Received economy data, not currently used" << LL_ENDL;
}
LL_INFOS_ONCE("Messaging") << Tea::wrapCurrency("EconomyData message arrived; upload cost is L$") << cost_str << LL_ENDL;
gMenuHolder->getChild<LLUICtrl>("Upload Image")->setLabelArg("[COST]", cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Sound")->setLabelArg("[COST]", cost_str);
gMenuHolder->getChild<LLUICtrl>("Upload Animation")->setLabelArg("[COST]", cost_str);
gMenuHolder->getChild<LLUICtrl>("Bulk Upload")->setLabelArg("[COST]", cost_str);
// <FS:AW opensim currency support>
// update L$ substitution for "Buy and Sell L$", it was set before we knew the currency

View File

@ -297,6 +297,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url
<< " region name " << regionp->getName()
<< " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL;
LL_DEBUGS("AppInit", "Capabilities") << "Capabilities requested: " << capabilityNames << LL_ENDL;
regionp = NULL;
result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames);
@ -3191,6 +3192,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("UploadBakedTexture");
capabilityNames.append("UserInfo");
capabilityNames.append("ViewerAsset");
capabilityNames.append("ViewerBenefits");
capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");

View File

@ -39,6 +39,7 @@
#include "aoengine.h" // ## Zi: Animation Overrider
#include "llagent.h" // Get state values from here
#include "llagentbenefits.h"
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llanimationstates.h"
@ -7909,20 +7910,7 @@ U32 LLVOAvatar::getNumAttachments() const
//-----------------------------------------------------------------------------
S32 LLVOAvatar::getMaxAttachments() const
{
const S32 MAX_AGENT_ATTACHMENTS = 38;
S32 max_attach = MAX_AGENT_ATTACHMENTS;
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("MaxAgentAttachments"))
{
max_attach = features["MaxAgentAttachments"].asInteger();
}
}
return max_attach;
return LLAgentBenefitsMgr::current().getAttachmentLimit();
}
//-----------------------------------------------------------------------------
@ -7956,24 +7944,7 @@ U32 LLVOAvatar::getNumAnimatedObjectAttachments() const
//-----------------------------------------------------------------------------
S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const
{
S32 max_attach = 0;
if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
{
max_attach = getMaxAttachments();
}
else
{
if (gAgent.getRegion())
{
LLSD features;
gAgent.getRegion()->getSimulatorFeatures(features);
if (features.has("AnimatedObjects"))
{
max_attach = features["AnimatedObjects"]["MaxAgentAnimatedObjectAttachments"].asInteger();
}
}
}
return max_attach;
return LLAgentBenefitsMgr::current().getAnimatedObjectLimit();
}
//-----------------------------------------------------------------------------

View File

@ -278,17 +278,6 @@ background_visible="false"
left="1"
top="0"
width="96" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="96" />
</layout_panel>
</layout_stack>

View File

@ -6,7 +6,7 @@
<menu_item_call label="Animation ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model..." name="Upload Model"/>
<menu_item_call label="Model Wizard..." name="Upload Model Wizard"/>
<menu_item_call label="Hent mange ([COST] pr. fil)..." name="Bulk Upload"/>
<menu_item_call label="Hent mange..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Ny mappe" name="New Folder"/>
<menu_item_call label="Nyt script" name="New Script"/>

View File

@ -118,7 +118,7 @@
<menu_item_call label="Animation ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model..." name="Upload Model"/>
<menu_item_call label="Model Wizard..." name="Upload Model Wizard"/>
<menu_item_call label="Mange ([COST] pr. fil)..." name="Bulk Upload"/>
<menu_item_call label="Mange..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Fortyd" name="Undo"/>
<menu_item_call label="Gendan" name="Redo"/>

View File

@ -6,7 +6,7 @@
<menu_item_call label="Animation ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modell..." name="Upload Model"/>
<menu_item_call label="Modellassistent..." name="Upload Model Wizard"/>
<menu_item_call label="Mehrfach-Upload ([COST] pro Datei)..." name="Bulk Upload"/>
<menu_item_call label="Mehrfach-Upload..." name="Bulk Upload"/>
<menu_item_call label="Linkset importieren..." name="import linkset"/>
</menu>
<menu_item_call label="Neuer Ordner" name="New Folder"/>

View File

@ -221,7 +221,7 @@
<menu_item_call label="Sound ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animation ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modell..." name="Upload Model"/>
<menu_item_call label="Mehrfach-Upload ([COST] pro Datei)..." name="Bulk Upload"/>
<menu_item_call label="Mehrfach-Upload..." name="Bulk Upload"/>
<menu_item_call label="Linkset importieren..." name="import linkset"/>
</menu>
<menu_item_call label="Rückgängig" name="Undo"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
height="190"
height="180"
layout="topleft"
name="Anim Preview"
help_topic="animation_anim_preview"
@ -60,9 +60,9 @@
height="22"
label="Upload (L$[AMOUNT])"
layout="topleft"
left="45"
left="35"
name="ok_btn"
top_pad="60"
top_pad="15"
width="150" />
<button
follows="right|bottom"
@ -73,4 +73,17 @@
name="cancel_btn"
left_pad="5"
width="90" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>

View File

@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
height="455"
height="490"
left="30"
layout="topleft"
name="Animation Preview"
@ -604,7 +604,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
We recommend BVH files exported from Poser 4.
</text>
<button
bottom="-32"
bottom="-77"
follows="bottom|left"
height="23"
label="Reload file"
@ -613,7 +613,7 @@ We recommend BVH files exported from Poser 4.
name="reload_btn"
width="128" />
<button
bottom="-5"
bottom="-50"
follows="bottom|left"
height="23"
label="Upload (L$[AMOUNT])"
@ -622,7 +622,7 @@ We recommend BVH files exported from Poser 4.
name="ok_btn"
width="128" />
<button
bottom="-5"
bottom="-50"
follows="bottom|left"
height="23"
label="Cancel"
@ -630,4 +630,17 @@ We recommend BVH files exported from Poser 4.
name="cancel_btn"
left="142"
width="128" />
<text
type="string"
length="1"
follows="left|bottom"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
bottom="-5"
width="270"/>
</floater>

View File

@ -30,4 +30,14 @@
name="panel_group_info_sidetray"
filename="panel_group_info_sidetray.xml"
/>
<panel
background_visible="false"
top="5"
height="560"
right="-3"
left="0"
class="panel_group_creation_sidetray"
name="panel_group_creation_sidetray"
filename="panel_group_creation_sidetray.xml"
/>
</floater>

View File

@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
height="460"
height="495"
layout="topleft"
name="Image Preview"
help_topic="image_preview"
@ -159,4 +159,17 @@ Try saving image as 24 bit Targa (.tga).
name="ok_btn"
top_delta="0"
width="125" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>

View File

@ -32,5 +32,11 @@
filename="panel_group_info_sidetray.xml"
label="Group Profile"
font="SansSerifBold"/>
<panel
class="panel_group_creation_sidetray"
name="panel_group_creation_sidetray"
filename="panel_group_creation_sidetray.xml"
label="Create Group"
font="SansSerifBold"/>
</panel_container>
</floater>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
height="190"
height="180"
layout="topleft"
name="Sound Preview"
help_topic="sound_preview"
@ -60,9 +60,9 @@
height="22"
label="Upload (L$[AMOUNT])"
layout="topleft"
left="45"
left="35"
name="ok_btn"
top_pad="60"
top_pad="15"
width="150" />
<button
follows="right|bottom"
@ -73,4 +73,17 @@
name="cancel_btn"
left_pad="5"
width="90" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>

View File

@ -56,7 +56,7 @@
function="File.VisibleUploadModel"/>
</menu_item_call>
<menu_item_call
label="Bulk ([COST] per file)..."
label="Bulk..."
layout="topleft"
name="Bulk Upload">
<menu_item_call.on_click
@ -261,4 +261,4 @@
parameter="eyes" />
</menu_item_call>
</menu>
</menu>
</menu>

View File

@ -1843,7 +1843,7 @@
function="File.EnableUpload" />
<menu_item_call.on_visible
function="Upload.CalculateCosts"
parameter="Upload Image" />
parameter="Upload Image,texture" />
</menu_item_call>
<menu_item_call
label="Sound ([COST])..."
@ -1856,7 +1856,7 @@
function="File.EnableUpload" />
<menu_item_call.on_visible
function="Upload.CalculateCosts"
parameter="Upload Sound" />
parameter="Upload Sound,sound" />
</menu_item_call>
<menu_item_call
label="Animation ([COST])..."
@ -1869,7 +1869,7 @@
function="File.EnableUpload" />
<menu_item_call.on_visible
function="Upload.CalculateCosts"
parameter="Upload Animation" />
parameter="Upload Animation,animation" />
</menu_item_call>
<menu_item_call
label="Mesh Model..."
@ -1884,9 +1884,12 @@
function="File.VisibleUploadModel"/>
</menu_item_call>
<menu_item_call
label="Bulk ([COST] per file)..."
labe="Bulk..."
layout="topleft"
name="Bulk Upload">
<menu_item_call.on_visible
function="Upload.CalculateCosts"
parameter="Bulk Upload,texture" />
<menu_item_call.on_click
function="File.UploadBulk"
parameter="" />

View File

@ -685,6 +685,18 @@ Do you want to revoke modify rights for the selected Residents?
yestext="Yes"/>
</notification>
<notification
icon="alertmodal.tga"
name="GroupNameLengthWarning"
type="alertmodal">
A group name must be between [MIN_LEN] and [MAX_LEN] characters.
<tag>group</tag>
<tag>fail</tag>
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="UnableToCreateGroup"
@ -1290,6 +1302,14 @@ Error encoding snapshot.
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="ErrorCannotAffordUpload"
type="alertmodal">
You need L$[COST] to upload this item.
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="ErrorTextureCannotAfford"
@ -4553,11 +4573,21 @@ You have reached your maximum number of groups. Please leave some group before j
icon="alert.tga"
name="GroupLimitInfo"
type="alert">
The group limit for base accounts is [MAX_BASIC], and for [https://secondlife.com/premium/ premium]
accounts is [MAX_PREMIUM].
If you downgraded your account, you will need to get below [MAX_BASIC] group limit before you can join more.
Residents with Basic memberships may join up to [MAX_BASIC] groups.
Premium memberships allow up to [MAX_PREMIUM]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade]
<tag>group</tag>
<usetemplate
name="okbutton"
yestext="Close"/>
</notification>
[https://secondlife.com/my/account/membership.php Upgrade today!]
<notification
icon="alert.tga"
name="GroupLimitInfoPlus"
type="alert">
Residents with Basic memberships may join up to [MAX_BASIC] groups.
Premium memberships allow up to [MAX_PREMIUM]. Premium Plus
memberships allow up to [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade]
<tag>group</tag>
<usetemplate
name="okbutton"
@ -9167,7 +9197,48 @@ Your voice has been muted by a moderator.
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="FailedToGetBenefits"
type="alertmodal">
Unfortunately, we were unable to get benefits information for this session. This should not happen in a normal production environment. Please contact support. This session will not work normally and we recommend that you restart.
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="BulkUploadCostConfirmation"
type="alertmodal">
This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to continue with the upload?
<usetemplate
name="okcancelbuttons"
notext="Cancel"
yestext="Upload"/>
</notification>
<notification
icon="alertmodal.tga"
name="BulkUploadNoCompatibleFiles"
type="alertmodal">
Selected files can not be bulk-uploaded.
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="BulkUploadIncompatibleFiles"
type="alertmodal">
Some of the selected files can not be bulk-uploaded.
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="UploadCostConfirmation"

View File

@ -0,0 +1,314 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
follows="all"
height="570"
label="Group Creation"
layout="topleft"
min_height="350"
left="0"
top="20"
name="GroupCreation"
width="313">
<panel.string
name="current_membership">
(your membership)
</panel.string>
<panel
name="group_info_top"
follows="top|left"
top="0"
left="0"
height="29"
width="313"
layout="topleft">
<line_editor
follows="left|top"
font="SansSerif"
label="Type your new group name here"
layout="topleft"
max_length_bytes="35"
name="group_name_editor"
left="12"
top="5"
width="270"
height="20"
visible="true" />
</panel>
<layout_stack
name="layout"
orientation="vertical"
follows="all"
left="8"
top_pad="0"
height="538"
width="300"
border_size="0">
<layout_panel
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
name="group_info"
follows="all"
layout="topleft"
auto_resize="false"
user_resize="false"
height="206"
width="313">
<panel
name="group_info_top"
follows="top|left|right"
top="0"
left="0"
height="99"
width="312"
layout="topleft">
<texture_picker
default_image_name="Generic_Group_Large"
follows="left|top"
name="insignia"
label=""
no_commit_on_selection="true"
tool_tip="Click to choose a picture"
layout="topleft"
height="110"
left="5"
top="5"
width="100" />
<text_editor
follows="left|top|right"
layout="topleft"
type="string"
name="charter"
left_pad="3"
height="86"
max_length="511"
top="6"
right="-4"
bg_readonly_color="DkGray2"
text_readonly_color="White"
word_wrap="true">
Group Charter
</text_editor>
</panel>
<panel
layout="topleft"
follows="left|top|right"
background_visible="false"
bevel_style="none"
border="false"
bg_alpha_color="FloaterUnfocusBorderColor"
height="100"
width="313"
left="0"
name="preferences_container"
top_pad="5">
<check_box
follows="right|top|left"
layout="topleft"
label="Anyone can join"
height="16"
left="10"
name="open_enrollement"
tool_tip="Sets whether this group allows new members to join without being invited."
width="90" />
<check_box
label="Cost to join"
layout="topleft"
name="check_enrollment_fee"
tool_tip="Sets whether to require an enrollment fee to join the group"
top_pad="5"
left_delta="0"
height="16"
width="300" />
<spinner
decimal_digits="0"
follows="left|top"
halign="left"
increment="1"
label_width="15"
label="L$"
layout="topleft"
max_val="99999"
height="23"
left="30"
name="spin_enrollment_fee"
tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."
width="170" />
<combo_box
follows="left|top"
layout="topleft"
name="group_mature_check"
tool_tip="Maturity ratings designate the type of content and behavior allowed in a group"
height="23"
left="10"
top_pad="4"
width="190">
<combo_item name="select_mature" value="Select">
- Select maturity rating -
</combo_item>
<combo_box.item
label="Moderate Content"
name="mature"
value="Mature" />
<combo_box.item
label="General Content"
name="pg"
value="Not Mature" />
</combo_box>
</panel>
</layout_panel>
<layout_panel
background_visible="false"
background_opaque="true"
name="create_info"
follows="all"
layout="topleft"
auto_resize="false"
user_resize="false"
height="200"
width="313">
<text
font="SansSerifSmall"
follows="top|left|right"
layout="topleft"
mouse_opaque="false"
type="string"
name="fee_information"
skip_link_underline="true"
height="26"
left="8"
right="-8"
top="5"
word_wrap="true">
The fee to create a group is based on your membership level. [https://secondlife.com/my/account/membership.php More info]
</text>
<scroll_list
draw_border="false"
background_visible="false"
follows="left|top|bottom|right"
layout="topleft"
multi_select="true"
name="membership_list"
row_padding="4"
enabled="false"
height="150"
left="2"
top_pad="8"
width="290">
<scroll_list.columns
dynamic_width="false"
name="clmn_name"
width="220"/>
<scroll_list.columns
dynamic_width="true"
name="clmn_price"/>
<scroll_list.rows
name="basic"
value="Basic (placeholder)"/>
<scroll_list.rows
name="plc2"
value="" />
<scroll_list.rows
name="premium"
value="Premium (placeholder)" />
</scroll_list>
</layout_panel>
<layout_panel
background_visible="false"
background_opaque="true"
name="create_actions"
follows="all"
layout="topleft"
auto_resize="true"
user_resize="true"
height="200"
width="313">
</layout_panel>
<layout_panel
background_visible="false"
background_opaque="true"
name="create_actions"
follows="all"
layout="topleft"
auto_resize="false"
user_resize="false"
height="75"
width="313">
<layout_stack
follows="bottom|left|right"
layout="topleft"
name="button_row_ls"
left="1"
right="-1"
orientation="horizontal"
height="25"
top="1">
<layout_panel
follows="bottom|left|right"
layout="bottomleft"
name="layout_crt"
auto_resize="true"
height="23"
width="91">
<!-- placeholder to autoadjust buttons (since they are of different sizes)-->
</layout_panel>
<layout_panel
follows="bottom|left|right"
layout="bottomleft"
name="layout_crt"
auto_resize="false"
height="23"
width="245">
<button
follows="bottom|left|right"
layout="topleft"
label="Create group for L$ [COST]"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
height="23"
left="1"
top="0"
width="160" />
<button
follows="bottom|left|right"
name="back"
label="Cancel"
layout="topleft"
tool_tip="Return to list of groups"
left_pad="13"
height="23"
top="0"
width="70" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
layout="bottomleft"
name="layout_crt"
auto_resize="true"
height="23"
width="91">
<!-- placeholder to autoadjust buttons-->
</layout_panel>
</layout_stack>
<text
font="SansSerifSmall"
follows="top|left|right"
layout="topleft"
mouse_opaque="false"
type="string"
height="26"
left="6"
right="-6"
name="info_deletion"
top_pad="8"
word_wrap="true"
halign="center">
Note: After 7 days, a group with no members (other than the creator) is deleted
</text>
</layout_panel>
</layout_stack>
</panel>

View File

@ -312,17 +312,6 @@ background_visible="false"
left="1"
top="0"
width="90" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="90" />
</layout_panel>
</layout_stack>

View File

@ -76,4 +76,4 @@
<button.commit_callback
function="Inventory.SaveOutfitPhoto" />
</button>
</panel>
</panel>

View File

@ -55,7 +55,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
value="[REGION] (Double-click to teleport, shift-drag to pan)"/>
<string
name="GroupCountWithInfo"
value="You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Want more?]"/>
value="You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Raise your limit]"/>
<panel.string
name="empty_list">
This contact set is empty.
@ -535,6 +535,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
top_pad="4"
left="3"
use_ellipses="true"
skip_link_underline="true"
name="groupcount">
You belong to [COUNT] groups ([REMAINING] remaining).
</text>

View File

@ -804,6 +804,8 @@ If you continue to receive this message, please contact Second Life support for
<string name="MarketplaceNoStock">out of stock</string>
<string name="MarketplaceUpdating">updating...</string>
<string name="UploadFeeInfo">Fee is based on your subscription level. Higher levels are charged lower fees. [https://secondlife.com/my/account/membership.php? Learn more]</string>
<string name="Open landmarks">Open landmarks</string>
<string name="Unconstrained">Unconstrained</string>
@ -2417,6 +2419,12 @@ If you continue to experience problems, please check your network and firewall s
<string name="Accounting">Accounting</string>
<string name="Notices">Notices</string>
<string name="Chat">Chat</string>
<!-- SL Membership -->
<string name="BaseMembership">Base</string>
<string name="PremiumMembership">Premium</string>
<string name="Premium PlusMembership">Premium Plus</string>
<string name="InternalMembership">Internal</string> <!-- No need to translate -->
<!-- Question strings for delete items notifications -->
<string name="DeleteItems">Delete selected items?</string>

View File

@ -6,7 +6,7 @@
<menu_item_call label="Animación ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modelo..." name="Upload Model"/>
<menu_item_call label="Asistente de modelo..." name="Upload Model Wizard"/>
<menu_item_call label="Masivo ([COST] por archivo)..." name="Bulk Upload"/>
<menu_item_call label="Masivo..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Carpeta nueva" name="New Folder"/>
<menu_item_call label="Script nuevo" name="New Script"/>

View File

@ -5,7 +5,7 @@
<menu_item_call label="Son ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animation ([COST])..." name="Upload Animation"/>
<menu_item_call label="Mesh..." name="Upload Model"/>
<menu_item_call label="En Bloc ([COST] par fichier)..." name="Bulk Upload"/>
<menu_item_call label="En Bloc..." name="Bulk Upload"/>
<menu_item_call label="Importer un ensemble lié..." name="import linkset"/>
</menu>
<menu_item_call label="Nouveau Dossier" name="New Folder"/>

View File

@ -168,7 +168,7 @@
<menu_item_call label="Son ([COST] L$)..." name="Upload Sound"/>
<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/>
<menu_item_call label="Modèle..." name="Upload Model"/>
<menu_item_call label="Lot ([COST] L$ par fichier)..." name="Bulk Upload"/>
<menu_item_call label="Lot..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Annuler" name="Undo"/>
<menu_item_call label="Refaire" name="Redo"/>

View File

@ -5,7 +5,7 @@
<menu_item_call label="Suono ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animazione ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modello..." name="Upload Model"/>
<menu_item_call label="In blocco ([COST] per file)..." name="Bulk Upload"/>
<menu_item_call label="In blocco..." name="Bulk Upload"/>
<menu_item_call label="Importa linkset..." name="import linkset"/>
</menu>
<menu_item_call label="Nuova cartella" name="New Folder"/>

View File

@ -218,7 +218,7 @@
<menu_item_call label="Suono ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animazione ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modello..." name="Upload Model"/>
<menu_item_call label="In blocco ([COST] per file)..." name="Bulk Upload"/>
<menu_item_call label="In blocco..." name="Bulk Upload"/>
<menu_item_call label="Importa linkset..." name="import linkset"/>
</menu>
<menu_item_call label="Annulla" name="Undo"/>

View File

@ -6,7 +6,7 @@
<menu_item_call label="アニメーション [COST] ..." name="Upload Animation"/>
<menu_item_call label="モデル" name="Upload Model"/>
<menu_item_call label="モデルウィザード" name="Upload Model Wizard"/>
<menu_item_call label="一括 (ファイルにつき [COST] ..." name="Bulk Upload"/>
<menu_item_call label="一括..." name="Bulk Upload"/>
<menu_item_call label="リンクセットをインポート..." name="import linkset" />
</menu>
<menu_item_call label="新規フォルダ" name="New Folder"/>

View File

@ -298,7 +298,7 @@
<menu_item_call label="サウンド([COST]..." name="Upload Sound"/>
<menu_item_call label="アニメーション([COST]..." name="Upload Animation"/>
<menu_item_call label="メッシュモデル" name="Upload Model"/>
<menu_item_call label="一括 (ファイルにつき[COST]..." name="Bulk Upload"/>
<menu_item_call label="一括..." name="Bulk Upload"/>
<menu_item_call label="リンクセットをインポート" name="import linkset" />
</menu>
<menu_item_call label="元に戻す" name="Undo"/>

View File

@ -5,7 +5,7 @@
<menu_item_call label="Dźwięk ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animację ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model meszowy..." name="Upload Model"/>
<menu_item_call label="Zbiór wielu plików ([COST] za plik)..." name="Bulk Upload"/>
<menu_item_call label="Zbiór wielu plików..." name="Bulk Upload"/>
<menu_item_call label="Importuj zbiór części..." name="import linkset"/>
</menu>
<menu_item_call label="Nowy folder" name="New Folder"/>

View File

@ -216,7 +216,7 @@
<menu_item_call label="Dźwięk ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animację ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model meszowy..." name="Upload Model"/>
<menu_item_call label="Zbiór wielu plików ([COST] za plik)..." name="Bulk Upload"/>
<menu_item_call label="Zbiór wielu plików..." name="Bulk Upload"/>
<menu_item_call label="Importuj zbiór części..." name="import linkset"/>
</menu>
<menu_item_call label="Cofnij" name="Undo"/>

View File

@ -6,7 +6,7 @@
<menu_item_call label="Animação ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modelar..." name="Upload Model"/>
<menu_item_call label="Assistente de modelagem..." name="Upload Model Wizard"/>
<menu_item_call label="Volume ([COST] per file)..." name="Bulk Upload"/>
<menu_item_call label="Volume..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Nova pasta" name="New Folder"/>
<menu_item_call label="Novo script" name="New Script"/>

View File

@ -169,7 +169,7 @@
<menu_item_call label="Som ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animação ([COST])..." name="Upload Animation"/>
<menu_item_call label="Modelar..." name="Upload Model"/>
<menu_item_call label="Volume ([COST] por arquivo)..." name="Bulk Upload"/>
<menu_item_call label="Volume..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Desfazer" name="Undo"/>
<menu_item_call label="Repetir" name="Redo"/>

View File

@ -5,7 +5,7 @@
<menu_item_call label="Звук ([COST])..." name="Upload Sound"/>
<menu_item_call label="Анимацию ([COST])..." name="Upload Animation"/>
<menu_item_call label="Меш модель..." name="Upload Model"/>
<menu_item_call label="Несколько файлов ([COST] за файл)..." name="Bulk Upload"/>
<menu_item_call label="Несколько файлов..." name="Bulk Upload"/>
<menu_item_call label="Импортировать набор связей..." name="import linkset"/>
</menu>
<menu_item_call label="Новая папка" name="New Folder"/>

View File

@ -211,7 +211,7 @@
<menu_item_call label="Звук ([COST])..." name="Upload Sound"/>
<menu_item_call label="Анимацию ([COST])..." name="Upload Animation"/>
<menu_item_call label="Меш модель..." name="Upload Model"/>
<menu_item_call label="Несколько ([COST] за файл)..." name="Bulk Upload"/>
<menu_item_call label="Несколько..." name="Bulk Upload"/>
<menu_item_call label="Импортировать группу каналов..." name="import linkset"/>
</menu>
<menu_item_call label="Отменить" name="Undo"/>

View File

@ -6,7 +6,7 @@
<menu_item_call label="Animasyon ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model..." name="Upload Model"/>
<menu_item_call label="Model Sihirbazı..." name="Upload Model Wizard"/>
<menu_item_call label="Toplu (dosya başına [COST])..." name="Bulk Upload"/>
<menu_item_call label="Toplu..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Yeni Klasör" name="New Folder"/>
<menu_item_call label="Yeni Komut Dosyası" name="New Script"/>

View File

@ -163,7 +163,7 @@
<menu_item_call label="Ses ([COST])..." name="Upload Sound"/>
<menu_item_call label="Animasyon ([COST])..." name="Upload Animation"/>
<menu_item_call label="Model..." name="Upload Model"/>
<menu_item_call label="Toplu (dosya başına [COST])..." name="Bulk Upload"/>
<menu_item_call label="Toplu..." name="Bulk Upload"/>
</menu>
<menu_item_call label="Geri Al" name="Undo"/>
<menu_item_call label="Yinele" name="Redo"/>

View File

@ -6,7 +6,7 @@
<menu_item_call label="動作([COST]..." name="Upload Animation"/>
<menu_item_call label="模型…" name="Upload Model"/>
<menu_item_call label="模型精靈…" name="Upload Model Wizard"/>
<menu_item_call label="批量(每檔案 [COST] ..." name="Bulk Upload"/>
<menu_item_call label="批量..." name="Bulk Upload"/>
</menu>
<menu_item_call label="新資料夾" name="New Folder"/>
<menu_item_call label="新腳本" name="New Script"/>

View File

@ -163,7 +163,7 @@
<menu_item_call label="聲音([COST]..." name="Upload Sound"/>
<menu_item_call label="動作([COST]..." name="Upload Animation"/>
<menu_item_call label="模型…" name="Upload Model"/>
<menu_item_call label="批量(每檔案 [COST] ..." name="Bulk Upload"/>
<menu_item_call label="批量..." name="Bulk Upload"/>
</menu>
<menu_item_call label="復原" name="Undo"/>
<menu_item_call label="重做" name="Redo"/>

View File

@ -278,17 +278,6 @@ background_visible="false"
left="1"
top="0"
width="96" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="96" />
</layout_panel>
</layout_stack>

View File

@ -267,17 +267,6 @@ background_visible="false"
left="1"
top="0"
width="90" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="90" />
</layout_panel>
</layout_stack>

View File

@ -267,17 +267,6 @@ background_visible="true"
left="1"
top="0"
width="90" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="90" />
</layout_panel>
</layout_stack>

View File

@ -325,27 +325,6 @@ background_visible="true"
top="0"
width="82" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_create_lp"
auto_resize="true"
width="125">
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="124" />
</layout_panel>
</layout_stack>
<!--<button
left_pad="3"

View File

@ -325,27 +325,6 @@ background_visible="true"
top="0"
width="82" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_create_lp"
auto_resize="true"
width="125">
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="124" />
</layout_panel>
</layout_stack>
<!--<button
left_pad="3"

View File

@ -38,5 +38,11 @@
filename="panel_block_list_sidetray.xml"
label="Blocked Residents &amp; Objects"
font="SansSerifBold"/>
<panel
class="panel_group_creation_sidetray"
name="panel_group_creation_sidetray"
filename="panel_group_creation_sidetray.xml"
label="Create Group"
font="SansSerifBold"/>
</panel_container>
</floater>

View File

@ -267,17 +267,6 @@ background_visible="true"
left="1"
top="0"
width="90" />
<button
follows="bottom|left|right"
height="23"
layout="topleft"
left="1"
top="0"
label="Create Group"
name="btn_create"
visible="true"
tool_tip="Create a new Group"
width="90" />
</layout_panel>
</layout_stack>