[Group Bans] Fix Baker's NameListCtrl un-fix introduced with group bans
parent
e7466b0f06
commit
8484b613a8
|
|
@ -64,8 +64,9 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
|
|||
mNameColumnIndex(p.name_column.column_index),
|
||||
mNameColumn(p.name_column.column_name),
|
||||
mAllowCallingCardDrop(p.allow_calling_card_drop),
|
||||
mShortNames(p.short_names),
|
||||
mPendingLookupsRemaining(0)
|
||||
mShortNames(p.short_names)
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//mPendingLookupsRemaining(0)
|
||||
{}
|
||||
|
||||
// public
|
||||
|
|
@ -355,16 +356,18 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
|
|||
mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle()));
|
||||
// </FS:Ansariel>
|
||||
|
||||
if(mPendingLookupsRemaining <= 0)
|
||||
{
|
||||
// BAKER TODO:
|
||||
// We might get into a state where mPendingLookupsRemaining might
|
||||
// go negative. So just reset it right now and figure out if it's
|
||||
// possible later :)
|
||||
mPendingLookupsRemaining = 0;
|
||||
mNameListCompleteSignal(false);
|
||||
}
|
||||
mPendingLookupsRemaining++;
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//if(mPendingLookupsRemaining <= 0)
|
||||
//{
|
||||
// // BAKER TODO:
|
||||
// // We might get into a state where mPendingLookupsRemaining might
|
||||
// // go negative. So just reset it right now and figure out if it's
|
||||
// // possible later :)
|
||||
// mPendingLookupsRemaining = 0;
|
||||
// mNameListCompleteSignal(false);
|
||||
//}
|
||||
//mPendingLookupsRemaining++;
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -417,7 +420,8 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
|
|||
selectNthItem(idx); // not sure whether this is needed, taken from previous implementation
|
||||
deleteSingleItem(idx);
|
||||
|
||||
mPendingLookupsRemaining--;
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//mPendingLookupsRemaining--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -466,22 +470,24 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
|
|||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// BAKER - FIX NameListCtrl
|
||||
//if (mPendingLookupsRemaining <= 0)
|
||||
{
|
||||
// We might get into a state where mPendingLookupsRemaining might
|
||||
// go negative. So just reset it right now and figure out if it's
|
||||
// possible later :)
|
||||
//mPendingLookupsRemaining = 0;
|
||||
|
||||
mNameListCompleteSignal(true);
|
||||
}
|
||||
//else
|
||||
{
|
||||
// mPendingLookupsRemaining--;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// BAKER - FIX NameListCtrl
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
// //if (mPendingLookupsRemaining <= 0)
|
||||
// {
|
||||
// // We might get into a state where mPendingLookupsRemaining might
|
||||
// // go negative. So just reset it right now and figure out if it's
|
||||
// // possible later :)
|
||||
// //mPendingLookupsRemaining = 0;
|
||||
//
|
||||
// mNameListCompleteSignal(true);
|
||||
// }
|
||||
// //else
|
||||
// {
|
||||
// // mPendingLookupsRemaining--;
|
||||
// }
|
||||
// </FS:Ansariel>
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
dirtyColumns();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,14 +185,16 @@ private:
|
|||
avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
|
||||
// </FS:Ansariel>
|
||||
|
||||
S32 mPendingLookupsRemaining;
|
||||
namelist_complete_signal_t mNameListCompleteSignal;
|
||||
|
||||
public:
|
||||
boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback)
|
||||
{
|
||||
return mNameListCompleteSignal.connect(onNameListCompleteCallback);
|
||||
}
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
// S32 mPendingLookupsRemaining;
|
||||
// namelist_complete_signal_t mNameListCompleteSignal;
|
||||
//
|
||||
//public:
|
||||
// boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback)
|
||||
// {
|
||||
// return mNameListCompleteSignal.connect(onNameListCompleteCallback);
|
||||
// }
|
||||
// </FS:Ansariel>
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2971,7 +2971,8 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
|
|||
|
||||
setBanCount(0);
|
||||
|
||||
mBanList->setOnNameListCompleteCallback(boost::bind(&LLPanelGroupBanListSubTab::onBanListCompleted, this, _1));
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//mBanList->setOnNameListCompleteCallback(boost::bind(&LLPanelGroupBanListSubTab::onBanListCompleted, this, _1));
|
||||
|
||||
populateBanList();
|
||||
|
||||
|
|
@ -3138,14 +3139,16 @@ void LLPanelGroupBanListSubTab::handleRefreshBanList()
|
|||
LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID);
|
||||
}
|
||||
|
||||
void LLPanelGroupBanListSubTab::onBanListCompleted(bool isComplete)
|
||||
{
|
||||
if(isComplete)
|
||||
{
|
||||
mRefreshBanListButton->setEnabled(TRUE);
|
||||
populateBanList();
|
||||
}
|
||||
}
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//void LLPanelGroupBanListSubTab::onBanListCompleted(bool isComplete)
|
||||
//{
|
||||
// if(isComplete)
|
||||
// {
|
||||
// mRefreshBanListButton->setEnabled(TRUE);
|
||||
// populateBanList();
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLPanelGroupBanListSubTab::setBanCount(U32 ban_count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -355,7 +355,8 @@ public:
|
|||
static void onRefreshBanList(void* user_data);
|
||||
void handleRefreshBanList();
|
||||
|
||||
void onBanListCompleted(bool isComplete);
|
||||
// <FS:Ansariel> Fix Baker's NameListCtrl un-fix
|
||||
//void onBanListCompleted(bool isComplete);
|
||||
|
||||
protected:
|
||||
void setBanCount(U32 ban_count);
|
||||
|
|
|
|||
|
|
@ -362,6 +362,7 @@ things in this group. There's a broad variety of Abilities.
|
|||
multi_select="true"
|
||||
name="ban_list"
|
||||
short_names="false"
|
||||
name_column="name"
|
||||
top_pad="5">
|
||||
<name_list.columns
|
||||
label="Resident"
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ things in this group. There's a broad variety of Abilities.
|
|||
multi_select="true"
|
||||
name="ban_list"
|
||||
short_names="false"
|
||||
name_column="name"
|
||||
top_pad="5">
|
||||
<name_list.columns
|
||||
label="Resident"
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ things in this group. There's a broad variety of Abilities.
|
|||
multi_select="true"
|
||||
name="ban_list"
|
||||
short_names="false"
|
||||
name_column="name"
|
||||
top_pad="5">
|
||||
<name_list.columns
|
||||
label="Resident"
|
||||
|
|
|
|||
Loading…
Reference in New Issue