Sync more stuff with upstream! (Mainly updates stuff involving LLFloaterGroupPicker)

Updates llfloatergroups to be a lot similar to upstream
- Adds LLFLoaterGroupPicker::removeNoneOption and changes LLFloaterGroupPicker to use modern style callback
- Switched from using per ui xml string for the none entry in groups to the strings.xml one, updated and cleaned existing translations to use this.
- Changes LLFLoaterGroupPicker into an instance tracker by id, because it was already acting like one.
Updates llpanelpermissions RLVa bits and fixes last owner label never enabled
This commit is contained in:
Lirusaito
2013-07-13 17:28:09 -04:00
parent ffe403e0f0
commit 4ef32a3805
26 changed files with 199 additions and 225 deletions

View File

@@ -31,7 +31,7 @@
#include "llavatarnamecache.h" // IDEVO
#include "llnotifications.h"
#include "llnotificationsutil.h" // for LLNotificationsUtil
#include "llnotificationsutil.h"
#include "roles_constants.h" // for GP_MEMBER_INVITE
#include "llagent.h"
@@ -75,6 +75,9 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
payload["name"] = name;
LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
// add friend to recent people list
//LLRecentPeople::instance().add(id);
}
void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
@@ -218,7 +221,6 @@ static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
make_ui_sound("UISndStartIM");
}
// static
void LLAvatarActions::startCall(const LLUUID& id)
{
@@ -240,8 +242,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
}
// [/RLVa:KB]
LLAvatarNameCache::get(id,
boost::bind(&on_avatar_name_cache_start_call, _1, _2));
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_call, _1, _2));
}
// static
@@ -568,8 +569,8 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id)
{
widget->center();
widget->setPowersMask(GP_MEMBER_INVITE);
//widget->removeNoneOption();
widget->setSelectCallback(callback_invite_to_group, (void*)&id);
widget->removeNoneOption();
widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id));
}
}
@@ -625,10 +626,10 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
}
// static
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, void* id)
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
{
uuid_vec_t agent_ids;
agent_ids.push_back(*static_cast<const LLUUID*>(id));
agent_ids.push_back(id);
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
}
@@ -725,7 +726,6 @@ void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::stri
LLSD payload;
payload["from_id"] = target_id;
//payload["SUPPRESS_TOAST"] = true;
LLNotificationsUtil::add("FriendshipOffered", args, payload);
}
@@ -754,4 +754,3 @@ bool LLAvatarActions::canBlock(const LLUUID& id)
bool is_self = id == gAgentID;
return !is_self && !is_linden;
}

View File

@@ -187,7 +187,7 @@ private:
static bool handleKick(const LLSD& notification, const LLSD& response);
static bool handleFreeze(const LLSD& notification, const LLSD& response);
static bool handleUnfreeze(const LLSD& notification, const LLSD& response);
static void callback_invite_to_group(LLUUID group_id, void* id);
static void callback_invite_to_group(LLUUID group_id, LLUUID id);
public:
// Just request friendship, no dialog.

View File

@@ -40,94 +40,68 @@
#include "llviewerprecompiledheaders.h"
#include "llfloatergroups.h"
#include "llfloatergroupinvite.h"
#include "message.h"
#include "roles_constants.h"
#include "hbfloatergrouptitles.h"
#include "llagent.h"
#include "llbutton.h"
#include "llfloatergroupinfo.h"
#include "llfloaterdirectory.h"
#include "llfocusmgr.h"
#include "llfloatergroupinvite.h"
#include "llgroupactions.h"
#include "llselectmgr.h"
#include "llimview.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
#include "llimview.h"
#include "lltrans.h"
#include "hippolimits.h"
using namespace LLOldEvents;
// static
std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
// helper functions
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
///----------------------------------------------------------------------------
/// Class LLFloaterGroupPicker
///----------------------------------------------------------------------------
// static
LLFloaterGroupPicker* LLFloaterGroupPicker::findInstance(const LLSD& seed)
LLFloaterGroupPicker* LLFloaterGroupPicker::showInstance(const LLSD& seed)
{
instance_map_t::iterator found_it = sInstances.find(seed.asUUID());
if (found_it != sInstances.end())
{
return found_it->second;
}
return NULL;
}
// static
LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
{
LLFloaterGroupPicker* pickerp = new LLFloaterGroupPicker(seed);
LLUICtrlFactory::getInstance()->buildFloater(pickerp, "floater_choose_group.xml");
LLFloaterGroupPicker* pickerp = getInstance(seed);
if (pickerp) pickerp->open();
else pickerp = new LLFloaterGroupPicker(seed);
return pickerp;
}
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
mSelectCallback(NULL),
mCallbackUserdata(NULL),
mPowersMask(GP_ALL_POWERS)
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed)
: LLFloater(), LLInstanceTracker<LLFloaterGroupPicker, LLUUID>(seed.asUUID()),
mPowersMask(GP_ALL_POWERS),
mID(seed.asUUID())
{
mID = seed.asUUID();
sInstances.insert(std::make_pair(mID, this));
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_choose_group.xml");
}
LLFloaterGroupPicker::~LLFloaterGroupPicker()
{
sInstances.erase(mID);
}
void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
void* userdata)
{
mSelectCallback = callback;
mCallbackUserdata = userdata;
}
void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
{
mPowersMask = powers_mask;
postBuild();
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask);
}
BOOL LLFloaterGroupPicker::postBuild()
{
const std::string none_text = getString("none");
LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("group list");
init_group_list(group_list, gAgent.getGroupID(), none_text, mPowersMask);
LLScrollListCtrl* list_ctrl = getChild<LLScrollListCtrl>("group list");
if (list_ctrl)
{
init_group_list(list_ctrl, gAgent.getGroupID(), mPowersMask);
list_ctrl->setDoubleClickCallback(onBtnOK, this);
}
childSetAction("OK", onBtnOK, this);
@@ -135,13 +109,25 @@ BOOL LLFloaterGroupPicker::postBuild()
setDefaultBtn("OK");
group_list->setDoubleClickCallback(boost::bind(&LLFloaterGroupPicker::onBtnOK,this));
childEnable("OK");
getChildView("OK")->setEnabled(TRUE);
return TRUE;
}
void LLFloaterGroupPicker::removeNoneOption()
{
// Remove group "none" from list. Group "none" is added in init_group_list().
// Some UI elements use group "none", we need to manually delete it here.
// Group "none" ID is LLUUID:null.
LLCtrlListInterface* group_list = getChild<LLScrollListCtrl>("group list")->getListInterface();
if(group_list)
{
group_list->selectByValue(LLUUID::null);
group_list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
}
void LLFloaterGroupPicker::onBtnOK(void* userdata)
{
LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata;
@@ -163,10 +149,7 @@ void LLFloaterGroupPicker::ok()
{
group_id = group_list->getCurrentID();
}
if(mSelectCallback)
{
mSelectCallback(group_id, mCallbackUserdata);
}
mGroupSelectSignal(group_id);
close();
}
@@ -202,38 +185,39 @@ LLPanelGroups::~LLPanelGroups()
// clear the group list, and get a fresh set of info.
void LLPanelGroups::reset()
{
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
enableButtons();
}
BOOL LLPanelGroups::postBuild()
{
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
LLScrollListCtrl *group_list = getChild<LLScrollListCtrl>("group list");
init_group_list(group_list, gAgent.getGroupID(), none_text);
group_list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList,this));
group_list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
group_list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
if (list)
{
init_group_list(list, gAgent.getGroupID());
list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList, this));
list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
}
getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
getChild<LLUICtrl>("Create")->setCommitCallback(boost::bind(LLGroupActions::createGroup));
getChild<LLUICtrl>("Search...")->setCommitCallback(boost::bind(LLGroupActions::search));
childSetAction("Invite...", onBtnInvite, this);
getChild<LLUICtrl>("Titles...")->setCommitCallback(boost::bind(HBFloaterGroupTitles::toggle));
@@ -256,40 +240,26 @@ void LLPanelGroups::enableButtons()
if(group_id != gAgent.getGroupID())
{
childEnable("Activate");
getChildView("Activate")->setEnabled(TRUE);
}
else
{
childDisable("Activate");
getChildView("Activate")->setEnabled(FALSE);
}
if (group_id.notNull())
{
childEnable("Info");
childEnable("IM");
childEnable("Leave");
getChildView("Info")->setEnabled(TRUE);
getChildView("IM")->setEnabled(TRUE);
getChildView("Leave")->setEnabled(TRUE);
}
else
{
childDisable("Info");
childDisable("IM");
childDisable("Leave");
}
if(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups())
{
childEnable("Create");
}
else
{
childDisable("Create");
}
if (group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE))
{
LLPanelGroups::childEnable("Invite...");
}
else
{
LLPanelGroups::childDisable("Invite...");
getChildView("Info")->setEnabled(FALSE);
getChildView("IM")->setEnabled(FALSE);
getChildView("Leave")->setEnabled(FALSE);
}
getChildView("Create")->setEnabled(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups());
getChildView("Invite...")->setEnabled(group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE));
}
@@ -303,15 +273,11 @@ void LLPanelGroups::invite()
{
LLCtrlListInterface *group_list = childGetListInterface("group list");
LLUUID group_id;
//if (group_list && (group_id = group_list->getCurrentID()).notNull())
if (group_list)
{
group_id = group_list->getCurrentID();
}
LLFloaterGroupInvite::showForGroup(group_id);
LLFloaterGroupInvite::showForGroup(group_id);
}
void LLPanelGroups::onGroupSortChanged()
@@ -335,7 +301,7 @@ void LLPanelGroups::onGroupList()
if(!item)
return;
const LLUUID group_id = item->getValue().asUUID();
const LLUUID group_id = item->getValue().asUUID();
if(group_id.isNull())
return;
@@ -361,13 +327,13 @@ void LLPanelGroups::onGroupList()
update_group_floaters(group_id);
}
LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_group, const std::string& none_text, const U64 &powers_mask)
LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_group, const U64 &powers_mask)
{
if(group_datap && !((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0)))
return LLSD();
const LLUUID &id = group_datap ? group_datap->mID : LLUUID::null;
const bool enabled = !!group_datap;
std::string style = (group_datap && group_datap->mListInProfile) ? "BOLD" : "NORMAL";
if(active_group == id)
{
@@ -377,7 +343,7 @@ LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_g
element["id"] = id;
LLSD& name_column = element["columns"][0];
name_column["column"] = "name";
name_column["value"] = group_datap ? group_datap->mName : none_text;
name_column["value"] = group_datap ? group_datap->mName : LLTrans::getString("GroupsNone");
name_column["font"] = "SANSSERIF";
name_column["font-style"] = style;
@@ -402,7 +368,7 @@ LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_g
return element;
}
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask)
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
{
S32 count = gAgent.mGroups.count();
LLUUID id;
@@ -417,13 +383,13 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const s
for(S32 i = 0; i < count; ++i)
{
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, none_text, powers_mask);
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, powers_mask);
if(element.size())
group_list->addElement(element, ADD_SORTED);
}
// add "none" to list at top
group_list->addElement(create_group_element(NULL, highlight_id, none_text, powers_mask), ADD_TOP);
group_list->addElement(create_group_element(NULL, highlight_id, powers_mask), ADD_TOP);
if(selected_id.notNull())
group_list->selectByValue(selected_id);

View File

@@ -46,20 +46,26 @@
#include "lluuid.h"
#include "llfloater.h"
#include "llinstancetracker.h"
#include <map>
#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLUICtrl;
class LLTextBox;
class LLScrollListCtrl;
class LLButton;
class LLFloaterGroupPicker : public LLFloater, public LLUIFactory<LLFloaterGroupPicker, LLFloaterGroupPicker, VisibilityPolicy<LLFloater> >
class LLFloaterGroupPicker : public LLFloater, public LLInstanceTracker<LLFloaterGroupPicker, LLUUID>
{
friend class LLUIFactory<LLFloaterGroupPicker>;
public:
static LLFloaterGroupPicker* showInstance(const LLSD& seed);
LLFloaterGroupPicker(const LLSD& seed);
~LLFloaterGroupPicker();
void setSelectCallback( void (*callback)(LLUUID, void*),
void* userdata);
// Note: Don't return connection; use boost::bind + boost::signals2::trackable to disconnect slots
typedef boost::signals2::signal<void (LLUUID id)> signal_t;
void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
void setPowersMask(U64 powers_mask);
BOOL postBuild();
@@ -67,8 +73,10 @@ public:
static LLFloaterGroupPicker* findInstance(const LLSD& seed);
static LLFloaterGroupPicker* createInstance(const LLSD& seed);
// for cases like inviting avatar to group we don't want the none option
void removeNoneOption();
protected:
LLFloaterGroupPicker(const LLSD& seed);
void ok();
static void onBtnOK(void* userdata);
static void onBtnCancel(void* userdata);
@@ -76,8 +84,7 @@ protected:
protected:
LLUUID mID;
U64 mPowersMask;
void (*mSelectCallback)(LLUUID id, void* userdata);
void* mCallbackUserdata;
signal_t mGroupSelectSignal;
typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t;
static instance_map_t sInstances;

View File

@@ -43,25 +43,20 @@
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "message.h"
#include "lluserauth.h"
#include "llagent.h"
#include "llagentaccess.h"
#include "llavataractions.h"
#include "llavatarconstants.h" //For new Online check - HgB
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llradiogroup.h"
#include "llcombobox.h"
#include "llfloaterauction.h"
#include "llfloateravatarpicker.h"
#include "llfloatergroups.h"
#include "llfloatergroupinfo.h"
#include "llfloaterscriptlimits.h"
#include "llgroupactions.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
#include "llnotify.h"
#include "llpanellandaudio.h"
#include "llpanellandmedia.h"
#include "llradiogroup.h"
@@ -222,16 +217,15 @@ void LLFloaterLand::onClose(bool app_quitting)
LLFloaterLand::LLFloaterLand(const LLSD& seed)
: LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land"))
{
LLCallbackMap::map_t factory_map;
factory_map["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
factory_map["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
factory_map["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
factory_map["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
factory_map["land_audio_panel"] = LLCallbackMap(createPanelLandAudio, this);
factory_map["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
factory_map["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
mFactoryMap["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
mFactoryMap["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
mFactoryMap["land_audio_panel"] = LLCallbackMap(createPanelLandAudio, this);
mFactoryMap["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
mFactoryMap["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &factory_map, false);
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &getFactoryMap(), false);
sObserver = new LLParcelSelectionObserver();
LLViewerParcelMgr::getInstance()->addObserver( sObserver );
@@ -797,7 +791,7 @@ void LLPanelLandGeneral::refreshNames()
mTextOwner->setText(owner);
std::string group;
if(!parcel->getGroupID().isNull())
if (!parcel->getGroupID().isNull())
{
gCacheName->getGroupName(parcel->getGroupID(), group);
}
@@ -823,7 +817,6 @@ void LLPanelLandGeneral::refreshNames()
// virtual
void LLPanelLandGeneral::draw()
{
//refreshNames();
LLPanel::draw();
}
@@ -834,7 +827,7 @@ void LLPanelLandGeneral::onClickSetGroup()
LLFloaterGroupPicker* fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
if (fg)
{
fg->setSelectCallback( cbGroupID, this);
fg->setSelectGroupCallback( boost::bind(&LLPanelLandGeneral::setGroup, this, _1 ));
if (parent_floater)
{
LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, fg);
@@ -868,13 +861,6 @@ void LLPanelLandGeneral::onClickProfile()
}
}
// static
void LLPanelLandGeneral::cbGroupID(LLUUID group_id, void* userdata)
{
LLPanelLandGeneral* self = (LLPanelLandGeneral*)userdata;
self->setGroup(group_id);
}
// public
void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
{
@@ -1129,7 +1115,6 @@ BOOL LLPanelLandObjects::postBuild()
mCleanOtherObjectsTime->setFocusLostCallback(boost::bind(&LLPanelLandObjects::onLostFocus, _1, this));
mCleanOtherObjectsTime->setCommitCallback(onCommitClean, this);
mCleanOtherObjectsTime->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
mBtnRefresh = getChild<LLButton>("Refresh List");
@@ -1887,7 +1872,6 @@ BOOL LLPanelLandOptions::postBuild()
childSetCommitCallback("check landmark", onCommitAny, this);
mCheckLandmark->setVisible(!gHippoGridManager->getConnectedGrid()->isSecondLife());
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
childSetCommitCallback("check group scripts", onCommitAny, this);
@@ -2453,11 +2437,15 @@ BOOL LLPanelLandAccess::postBuild()
mListAccess = getChild<LLNameListCtrl>("AccessList");
if (mListAccess)
{
mListAccess->sortByColumnIndex(0, TRUE); // ascending
}
mListBanned = getChild<LLNameListCtrl>("BannedList");
if (mListBanned)
{
mListBanned->sortByColumnIndex(0, TRUE); // ascending
}
return TRUE;
}
@@ -2970,10 +2958,7 @@ void LLPanelLandCovenant::refresh()
}
LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
if (region_landtype)
{
region_landtype->setText(region->getLocalizedSimProductName());
}
region_landtype->setText(region->getLocalizedSimProductName());
LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
if (region_maturity)
@@ -3023,11 +3008,8 @@ void LLPanelLandCovenant::updateCovenantText(const std::string &string)
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("covenant_editor");
if (editor)
{
editor->setHandleEditKeysDirectly(TRUE);
editor->setText(string);
}
editor->setHandleEditKeysDirectly(TRUE);
editor->setText(string);
}
}

View File

@@ -152,7 +152,6 @@ public:
void onClickProfile();
void onClickSetGroup();
static void onClickInfoGroup(void*);
static void cbGroupID(LLUUID group_id, void* userdata);
static void onClickDeed(void*);
static void onClickBuyLand(void* data);
static void onClickScriptLimits(void* data);

View File

@@ -355,7 +355,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
// extract message
std::string sim_name;
std::string sim_type = LLTrans::getString("land_type_unknown");
U32 region_flags;
U64 region_flags;
U8 agent_limit;
F32 object_bonus_factor;
U8 sim_access;
@@ -365,7 +365,6 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
BOOL use_estate_sun;
F32 sun_hour;
msg->getString("RegionInfo", "SimName", sim_name);
msg->getU32("RegionInfo", "RegionFlags", region_flags);
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
msg->getU8("RegionInfo", "SimAccess", sim_access);
@@ -384,6 +383,17 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
LLTrans::findString(sim_type, sim_type); // try localizing sim product name
}
if (msg->has(_PREHASH_RegionInfo3))
{
msg->getU64("RegionInfo3", "RegionFlagsExtended", region_flags);
}
else
{
U32 flags = 0;
msg->getU32("RegionInfo", "RegionFlags", flags);
region_flags = flags;
}
// Disable Environment Tab when not supported
if (region)
{
@@ -1497,7 +1507,8 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re
LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
if (widget)
{
widget->setSelectCallback(addAllowedGroup2, NULL);
widget->removeNoneOption();
widget->setSelectGroupCallback(boost::bind(&LLPanelEstateInfo::addAllowedGroup2, this, _1));
if (parent_floater)
{
LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
@@ -1687,9 +1698,8 @@ struct LLEstateAccessChangeInfo
uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change
};
// static
// Special case callback for groups, since it has different callback format than names
void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void*)
void LLPanelEstateInfo::addAllowedGroup2(LLUUID id)
{
LLSD payload;
payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
@@ -2343,8 +2353,8 @@ public:
// if we get an error response
/*virtual*/ void error(U32 status, const std::string& reason)
{
llinfos << "LLEstateChangeInfoResponder::error "
<< status << ": " << reason << llendl;
llinfos << "LLEstateChangeInfoResponder::error [status:"
<< status << "]: " << reason << llendl;
}
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return estateChangeInfoResponder_timeout; }
@@ -2702,7 +2712,7 @@ BOOL LLPanelEstateCovenant::sendUpdate()
return TRUE;
}
const std::string& LLPanelEstateCovenant::getEstateName() const
std::string LLPanelEstateCovenant::getEstateName() const
{
return mEstateNameText->getText();
}
@@ -2753,7 +2763,7 @@ void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name)
}
}
const std::string& LLPanelEstateCovenant::getOwnerName() const
std::string LLPanelEstateCovenant::getOwnerName() const
{
return mEstateOwnerText->getText();
}

View File

@@ -229,7 +229,7 @@ public:
virtual BOOL postBuild(); // LLPanel
virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator
BOOL validateTextureSizes();
protected:
@@ -273,7 +273,7 @@ public:
// Group picker callback is different, can't use core methods below
bool addAllowedGroup(const LLSD& notification, const LLSD& response);
static void addAllowedGroup2(LLUUID id, void*);
void addAllowedGroup2(LLUUID id);
// Core methods for all above add/remove button clicks
static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
@@ -309,7 +309,7 @@ public:
virtual BOOL postBuild();
virtual void updateChild(LLUICtrl* child_ctrl);
virtual void refresh();
void refreshFromEstate();
static bool isLindenEstate();
@@ -369,9 +369,9 @@ public:
const LLUUID& getCovenantID() const { return mCovenantID; }
void setCovenantID(const LLUUID& id) { mCovenantID = id; }
const std::string& getEstateName() const;
std::string getEstateName() const;
void setEstateName(const std::string& name);
const std::string& getOwnerName() const;
std::string getOwnerName() const;
void setOwnerName(const std::string& name);
void setCovenantTextEditor(const std::string& text);

View File

@@ -381,16 +381,25 @@ void LLPanelPermissions::refresh()
// Update creator text field
getChildView("Creator:")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
BOOL creators_identical = FALSE;
// [/RLVa:KB]
std::string creator_name;
bool creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name);
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name);
// [/RLVa:KB]
// LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name);
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChildView("button creator profile")->setEnabled(creators_identical && mCreatorID.notNull());
// getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
// getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// Update owner text field
getChildView("Owner:")->setEnabled(TRUE);
// Update last owner text field
getChildView("Last Owner:")->setEnabled(TRUE);
std::string owner_name;
const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name);
@@ -419,31 +428,52 @@ void LLPanelPermissions::refresh()
}
}
}
// getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvEnableOwner = true;
if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
bool fRlvEnableCreator = true;
bool fRlvEnableLastOwner = true;
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// Only filter the owner name if: the selection is all owned by the same avie and not group owned
if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) )
// Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
{
creator_name = RlvStrings::getAnonym(creator_name);
fRlvEnableOwner = false;
}
// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
{
owner_name = RlvStrings::getAnonym(owner_name);
fRlvEnableOwner = false;
fRlvEnableCreator = false;
}
if (RlvUtil::isNearbyAgent(mLastOwnerID))
{
creator_name = RlvStrings::getAnonym(creator_name);
fRlvEnableLastOwner = false;
}
}
// [/RLVa:KB]
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
getChildView("Owner Name")->setEnabled(TRUE);
// childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
// getChildView("button last owner profile")->setEnabled(owners_identical && mLastOwnerID.notNull());
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
childSetEnabled("button owner profile",
fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
getChildView("button owner profile")->setEnabled(fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
getChildView("button creator profile")->setEnabled(fRlvEnableCreator && creators_identical && mCreatorID.notNull());
getChildView("button last owner profile")->setEnabled(fRlvEnableLastOwner && owners_identical && mLastOwnerID.notNull());
// [/RLVa:KB]
getChild<LLUICtrl>("Last Owner Name")->setValue(last_owner_name);
getChildView("Last Owner Name")->setEnabled(TRUE);
getChildView("button last owner profile")->setEnabled(owners_identical && mLastOwnerID.notNull());
// update group text field
getChildView("Group:")->setEnabled(TRUE);
@@ -620,12 +650,10 @@ void LLPanelPermissions::refresh()
BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
&base_mask_on,
&base_mask_off);
//BOOL valid_owner_perms =//
LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
&owner_mask_on,
&owner_mask_off);
BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
&group_mask_on,
&group_mask_off);
@@ -1037,10 +1065,9 @@ void LLPanelPermissions::onClickGroup()
if(owners_identical && (owner_id == gAgent.getID()))
{
LLFloaterGroupPicker* fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
if (fg)
{
fg->setSelectCallback( cbGroupID, this );
fg->setSelectGroupCallback( boost::bind(&LLPanelPermissions::cbGroupID, this, _1) );
if (parent_floater)
{
@@ -1059,13 +1086,11 @@ void LLPanelPermissions::onClickOpenGroup()
LLGroupActions::show(group_id);
}
// static
void LLPanelPermissions::cbGroupID(LLUUID group_id, void* userdata)
void LLPanelPermissions::cbGroupID(LLUUID group_id)
{
LLPanelPermissions* self = (LLPanelPermissions*)userdata;
if(self->mLabelGroupName)
if(mLabelGroupName)
{
self->mLabelGroupName->setNameID(group_id, TRUE);
mLabelGroupName->setNameID(group_id, TRUE);
}
LLSelectMgr::getInstance()->sendGroup(group_id);
}

View File

@@ -63,7 +63,7 @@ protected:
void onClickLastOwner();
void onClickGroup();
static void onClickOpenGroup();
static void cbGroupID(LLUUID group_id, void* userdata);
void cbGroupID(LLUUID group_id);
static void onClickDeedToGroup(void*);
static void onClickCopyObjKey();

View File

@@ -4,5 +4,4 @@
<button label="OK" label_selected="OK" name="OK"/>
<button label="Abbrechen" label_selected="Abbrechen" name="Cancel"/>
<string name="none">keine</string>
</floater>

View File

@@ -19,5 +19,4 @@
<button label="Suchen..." name="Search..."/>
<button label="Invite..." name="Invite..."/>
<button label="Titles..." name="Titles..."/>
<string name="none">keine</string>
</panel>

View File

@@ -18,5 +18,4 @@
<button label="Suchen..." name="Search..."/>
<button label="Invite..." name="Invite..."/>
<button label="Titles..." name="Titles..."/>
<string name="none">keine</string>
</panel>

View File

@@ -1972,7 +1972,9 @@ Where tag = tag string to match. Removes bot's matching the tag.
<string name="GodToolsObjectOwnedBy">Objekt [OBJECT], Besitzer [OWNER]</string>
<!-- groups -->
<string name="GroupsNone">
keine
</string>
<string name="Unknown">(unbekannt)</string>

View File

@@ -18,7 +18,4 @@
<button bottom="-236" font="SansSerif" halign="center" height="20" label="Cancel"
label_selected="Cancel" left_delta="88" mouse_opaque="true" name="Cancel"
width="80" />
<string name="none">
none
</string>
</floater>

View File

@@ -46,7 +46,4 @@
label="Invite..." name="Invite..." width="80" />
<button bottom_delta="-25" follows="top|right" font="SansSerif" height="22"
label="Titles..." name="Titles..." width="80" />
<string name="none">
none
</string>
</panel>

View File

@@ -45,7 +45,4 @@
label="Invite..." name="Invite..." width="80" />
<button bottom_delta="0" left_delta="82" follows="left|bottom" font="SansSerif" height="22"
label="Titles..." name="Titles..." width="80" />
<string name="none">
none
</string>
</panel>

View File

@@ -3208,6 +3208,7 @@ The
<string name="GodToolsObjectOwnedBy">Object [OBJECT] owned by [OWNER]</string>
<!-- groups -->
<string name="GroupsNone">none</string>
<string name="Group" value=" (group)" />
<string name="Unknown">(Unknown)</string>
<string name="SummaryForTheWeek" value="Summary for this week, beginning on " />

View File

@@ -5,7 +5,4 @@
</text>
<button label="OK" label_selected="OK" name="OK"/>
<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
<string name="none">
ninguno
</string>
</floater>

View File

@@ -22,7 +22,4 @@
<button label="Buscar..." name="Search..."/>
<button label="Invitar..." name="Invite..."/>
<button label="Títulos..." name="Titles..."/>
<string name="none">
ninguno
</string>
</panel>

View File

@@ -22,7 +22,4 @@
<button label="Buscar..." left_delta="87" name="Search..." width="85"/>
<button label="Invitar..." name="Invite..." width="85"/>
<button label="Títulos..." left_delta="87" name="Titles..." width="85"/>
<string name="none">
ninguno
</string>
</panel>

View File

@@ -3125,6 +3125,9 @@ La
<string name="GodToolsObjectOwnedBy">Objeto [OBJECT] propiedad de [OWNER]</string>
<!-- groups -->
<string name="GroupsNone">
ninguno
</string>
<string name="Group" value=" (grupo)" />
<string name="Unknown">(Desconocido)</string>
<string name="SummaryForTheWeek" value="Sumario para esta semana, comenzada el " />

View File

@@ -5,7 +5,4 @@
</text>
<button label="OK" label_selected="OK" name="OK"/>
<button label="Annuler" label_selected="Annuler" name="Cancel"/>
<string name="none">
aucun
</string>
</floater>

View File

@@ -44,8 +44,5 @@
label="Inviter" name="Invite..." width="80" />
<button bottom_delta="-25" follows="top|right" font="SansSerif" height="22"
label="Titres" name="Titles..." width="80" />
<string name="none">
Aucun
</string>
</panel>

View File

@@ -458,6 +458,9 @@
<string name="InventoryNoTexture">
Vous n&apos;avez pas de copie de cette texture dans votre inventaire
</string>
<string name="GroupsNone">
aucun
</string>
<string name="conference-title">
Chat à plusieurs
</string>

View File

@@ -209,6 +209,10 @@
Você não possui uma cópia desta textura no seu inventário
</string>
<string name="GroupsNone">
nenhum
</string>
<string name="conference-title">
Bate-papo com várias pessoas
</string>