Ejemplo n.º 1
0
//---------------------------------------------------------------------------------
void LLNotificationWellWindow::addItem(LLSysWellItem::Params p)
{
	LLSD value = p.notification_id;
	// do not add clones
	if( mMessageList->getItemByValue(value))
		return;

	LLSysWellItem* new_item = new LLSysWellItem(p);
	if (mMessageList->addItem(new_item, value, ADD_TOP))
	{
		handleItemAdded(IT_NOTIFICATION);

		reshapeWindow();

		new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1));
		new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1));
	}
	else
	{
		llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id
			<< ", title: " << p.title
			<< llendl;

		new_item->die();
	}
}
Ejemplo n.º 2
0
void CMainFrame::LoadUser()
{ 
	auto rosterMgr=GetContext()->GetClient()->rosterManager();
	bool bFilled=false;
	for(auto iter=rosterMgr->roster()->begin();iter!=rosterMgr->roster()->end();
		++iter)
	{
		handleItemAdded(iter->second->jid());
		bFilled=true;
	}
	if(!bFilled)
		rosterMgr->fill();

}
Ejemplo n.º 3
0
void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/)
{
	if (mMessageList->getItemByValue(notification_id) == NULL)
	{
		ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message);
		if (mMessageList->insertItemAfter(mSeparator, item, notification_id))
		{
			handleItemAdded(IT_INSTANT_MESSAGE);
		}
		else
		{
			llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl;
			item->die();
		}
		reshapeWindow();
	}
}
Ejemplo n.º 4
0
//---------------------------------------------------------------------------------
void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter,
							   const std::string& name, const LLUUID& otherParticipantId)
{
	RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId);
	if (mMessageList->insertItemAfter(mSeparator, item, sessionId))
	{
		handleItemAdded(IT_INSTANT_MESSAGE);
	}
	else
	{
		llwarns << "Unable to add IM Row into the list, sessionID: " << sessionId
			<< ", name: " << name
			<< ", other participant ID: " << otherParticipantId
			<< llendl;

		item->die();
	}
}