UI cleanup.
-Added ui-local transformation matrix. -Gutted legacy commitcallbacks throughout ui widget ctors. -Created filter_editor ui widget which issues commit on keypress -search_editor commits on focus loss/enter press -search_editor and filter_editor now have a built in 'x' button to clear text. -LLComboBox::setPrearrangeCallback now uses boost::function -LLComboBox::setTextEntryCallback now uses boost::function -LLLineEditor::setKeystrokeCallback now uses boost::function -LLLineEditor::setPrevalidate now uses boost::function -LLPanel::childSetKeystrokeCallback removed -LLPanel::childSetPrevalidate removed -LLPanel::childSetActionTextbox now uses boost::function -LLTextBox::setClickedCallback now uses boost::function -LLTextEditor::setKeystrokeCallback added. -Cleaned up JCFloaterAreaSearch
This commit is contained in:
@@ -568,7 +568,7 @@ void LLPanelGroupGeneral::cancel()
|
||||
// invoked from callbackConfirmMature
|
||||
bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
// 0 == Yes
|
||||
// 1 == No
|
||||
// 2 == Cancel
|
||||
@@ -593,7 +593,7 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS
|
||||
// static
|
||||
bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch(option)
|
||||
{
|
||||
case 0:
|
||||
@@ -684,6 +684,11 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
|
||||
mComboActiveTitle->resetDirty();
|
||||
}
|
||||
|
||||
// After role member data was changed in Roles->Members
|
||||
// need to update role titles. See STORM-918.
|
||||
if (gc == GC_ROLE_MEMBER_DATA)
|
||||
LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
|
||||
|
||||
// If this was just a titles update, we are done.
|
||||
if (gc == GC_TITLES) return;
|
||||
|
||||
@@ -867,71 +872,45 @@ void LLPanelGroupGeneral::updateMembers()
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!mListVisibleMembers || !gdatap
|
||||
|| !gdatap->isMemberDataComplete())
|
||||
if (!mListVisibleMembers
|
||||
|| !gdatap
|
||||
|| !gdatap->isMemberDataComplete()
|
||||
|| gdatap->mMembers.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static LLTimer all_timer;
|
||||
static LLTimer sd_timer;
|
||||
static LLTimer element_timer;
|
||||
LLTimer update_time;
|
||||
update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME);
|
||||
|
||||
all_timer.reset();
|
||||
S32 i = 0;
|
||||
LLAvatarName av_name;
|
||||
|
||||
for( ; mMemberProgress != gdatap->mMembers.end() && i<UPDATE_MEMBERS_PER_FRAME;
|
||||
++mMemberProgress, ++i)
|
||||
for( ; mMemberProgress != gdatap->mMembers.end() && !update_time.hasExpired();
|
||||
++mMemberProgress)
|
||||
{
|
||||
lldebugs << "Adding " << mMemberProgress->first << ", " << mMemberProgress->second->getTitle() << llendl;
|
||||
LLGroupMemberData* member = mMemberProgress->second;
|
||||
if (!member)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Owners show up in bold.
|
||||
std::string style = "NORMAL";
|
||||
if ( member->isOwner() )
|
||||
|
||||
if (LLAvatarNameCache::get(mMemberProgress->first, &av_name))
|
||||
{
|
||||
style = "BOLD";
|
||||
addMember(mMemberProgress->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
|
||||
LLAvatarNameCache::get(mMemberProgress->first,
|
||||
boost::bind(&LLPanelGroupGeneral::onNameCache,
|
||||
this, gdatap->getMemberVersion(), member, _2));
|
||||
}
|
||||
|
||||
sd_timer.reset();
|
||||
LLSD row;
|
||||
row["id"] = member->getID();
|
||||
|
||||
row["columns"][0]["column"] = "name";
|
||||
row["columns"][0]["font-style"] = style;
|
||||
|
||||
// value is filled in by name list control
|
||||
|
||||
row["columns"][1]["column"] = "title";
|
||||
row["columns"][1]["value"] = member->getTitle();
|
||||
row["columns"][1]["font-style"] = style;
|
||||
|
||||
|
||||
row["columns"][2]["column"] = "online";
|
||||
row["columns"][2]["value"] = member->getOnlineStatus();
|
||||
row["columns"][2]["font-style"] = style;
|
||||
|
||||
|
||||
sSDTime += sd_timer.getElapsedTimeF32();
|
||||
|
||||
element_timer.reset();
|
||||
mListVisibleMembers->addNameItem(row);
|
||||
sElementTime += element_timer.getElapsedTimeF32();
|
||||
}
|
||||
sAllTime += all_timer.getElapsedTimeF32();
|
||||
|
||||
lldebugs << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl;
|
||||
if (mMemberProgress == gdatap->mMembers.end())
|
||||
{
|
||||
lldebugs << " member list completed." << llendl;
|
||||
mListVisibleMembers->setEnabled(TRUE);
|
||||
|
||||
lldebugs << "All Time: " << sAllTime << llendl;
|
||||
lldebugs << "SD Time: " << sSDTime << llendl;
|
||||
lldebugs << "Element Time: " << sElementTime << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -940,6 +919,48 @@ void LLPanelGroupGeneral::updateMembers()
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
|
||||
{
|
||||
// Owners show up in bold.
|
||||
std::string style = "NORMAL";
|
||||
if ( member->isOwner() )
|
||||
{
|
||||
style = "BOLD";
|
||||
}
|
||||
LLSD row;
|
||||
row["id"] = member->getID();
|
||||
|
||||
row["columns"][0]["column"] = "name";
|
||||
row["columns"][0]["font-style"] = style;
|
||||
row["columns"][0]["font"] = "SANSSERIF_SMALL";
|
||||
row["columns"][1]["column"] = "title";
|
||||
row["columns"][1]["value"] = member->getTitle();
|
||||
row["columns"][1]["font-style"] = style;
|
||||
row["columns"][1]["font"] = "SANSSERIF_SMALL";
|
||||
|
||||
row["columns"][2]["column"] = "online";
|
||||
row["columns"][2]["value"] = member->getOnlineStatus();
|
||||
row["columns"][2]["font-style"] = style;
|
||||
row["columns"][1]["font"] = "SANSSERIF_SMALL";
|
||||
|
||||
mListVisibleMembers->addNameItemRow(row);
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
|
||||
{
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!gdatap
|
||||
|| !gdatap->isMemberDataComplete()
|
||||
|| gdatap->getMemberVersion() != update_id)
|
||||
{
|
||||
// Stale data
|
||||
return;
|
||||
}
|
||||
|
||||
addMember(member);
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::updateChanged()
|
||||
{
|
||||
// List all the controls we want to check for changes...
|
||||
|
||||
Reference in New Issue
Block a user