Exemplo n.º 1
0
void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}
	LLWorldMap::getInstance()->cancelTracking();
	mCompletingRegionName = "";
}
Exemplo n.º 2
0
// Checked: 2010-04-18 (RLVa-1.1.3b) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviour::refreshAll()
{
    LLCtrlListInterface* pBhvrList = childGetListInterface("behaviour_list");
    if (!pBhvrList)
        return;
    pBhvrList->operateOnAll(LLCtrlListInterface::OP_DELETE);

    if (!gAgentAvatarp)
        return;

    //
    // Set-up a row we can just reuse
    //
    LLSD sdRow;
    LLSD& sdColumns = sdRow["columns"];
    sdColumns[0]["column"] = "behaviour";
    sdColumns[0]["type"] = "text";
    sdColumns[1]["column"] = "name";
    sdColumns[1]["type"] = "text";

    //
    // List behaviours
    //
    const RlvHandler::rlv_object_map_t* pRlvObjects = gRlvHandler.getObjectMap();
    for (RlvHandler::rlv_object_map_t::const_iterator itObj = pRlvObjects->begin(), endObj = pRlvObjects->end(); itObj != endObj; ++itObj)
    {
        sdColumns[1]["value"] = rlvGetItemNameFromObjID(itObj->first);

        const rlv_command_list_t* pCommands = itObj->second.getCommandList();
        for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
        {
            std::string strBhvr = itCmd->asString();

            LLUUID idOption(itCmd->getOption());
            if (idOption.notNull())
            {
                std::string strLookup;
                if ( (gCacheName->getFullName(idOption, strLookup)) || (gCacheName->getGroupName(idOption, strLookup)) )
                {
                    if (strLookup.find("???") == std::string::npos)
                        strBhvr.assign(itCmd->getBehaviour()).append(":").append(strLookup);
                }
                else if (m_PendingLookup.end() == m_PendingLookup.find(idOption))
                {
                    m_PendingLookup[idOption] = gCacheName->get(idOption, false, boost::bind(&RlvFloaterBehaviour::onAvatarNameLookup,this,_1));
                }
            }

            sdColumns[0]["value"] = strBhvr;

            pBhvrList->addElement(sdRow, ADD_BOTTOM);
        }
    }
}
Exemplo n.º 3
0
void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
{
	if (clear_ui || !childHasKeyboardFocus("landmark combo"))
	{
		LLCtrlListInterface *list = childGetListInterface("landmark combo");
		if (list)
		{
			list->selectByValue( "None" );
		}
	}
}
Exemplo n.º 4
0
// static
void LLFloaterGesture::onClickInventory(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	LLInventoryView* inv = LLInventoryView::showAgentInventory();
	if (!inv) return;
	inv->getPanel()->setSelection(item_id, TRUE);
}
Exemplo n.º 5
0
void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui)
{
	if (clear_ui || !childHasKeyboardFocus("friend combo"))
	{
		mTrackedStatus = LLTracker::TRACKING_NOTHING;
		LLCtrlListInterface *list = childGetListInterface("friend combo");
		if (list)
		{
			list->selectByValue( "None" );
		}
	}
}
void LLPanelScriptLimitsAttachment::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("scripts_list");

	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting");
	childSetValue("loading_text", LLSD(msg_waiting));
}
Exemplo n.º 7
0
void LLFloaterTopObjects::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("objects_list");
	
	if (list) 
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	mObjectListData.clear();
	mObjectListIDs.clear();
	mtotalScore = 0.f;
}
Exemplo n.º 8
0
// No longer really builds a list.  Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
	LLCtrlListInterface *list = childGetListInterface("friend combo");
	if (!list) return;

    // Delete all but the "None" entry
	S32 list_size = list->getItemCount();
	while (list_size > 1)
	{
		list->selectNthItem(1);
		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
		--list_size;
	}

	LLSD default_column;
	default_column["name"] = "friend name";
	default_column["label"] = "Friend Name";
	default_column["width"] = 500;
	list->addColumn(default_column);

	// Get all of the calling cards for avatar that are currently online
	LLCollectMappableBuddies collector;
	LLAvatarTracker::instance().applyFunctor(collector);
	LLCollectMappableBuddies::buddy_map_t::iterator it;
	LLCollectMappableBuddies::buddy_map_t::iterator end;
	it = collector.mMappable.begin();
	end = collector.mMappable.end();
	for( ; it != end; ++it)
	{
		list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
	}

	list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
	list->selectFirstItem();
}
Exemplo n.º 9
0
// static 
void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
{
	LLFloaterWorldMap* self = gFloaterWorldMap;

	if( !self || self->mIsClosing )
	{
		return;
	}

	LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID asset_id;
	LLUUID item_id = list->getCurrentID();

	LLTracker::stopTracking(NULL);

	//RN: stopTracking() clears current combobox selection, need to reassert it here
	list->setCurrentByID(item_id);

	if( item_id.isNull() )
	{
	}
	else if( item_id == sHomeID )
	{
		asset_id = sHomeID;
	}
	else
	{
		LLInventoryItem* item = gInventory.getItem( item_id );
		if( item )
		{
			asset_id = item->getAssetUUID();
		}
		else
		{
			// Something went wrong, so revert to a safe value.
			item_id.setNull();
		}
	}
	
	self->trackLandmark( item_id);
	onShowTargetBtn(self);

	// Reset to user postion if nothing is tracked
	self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
Exemplo n.º 10
0
// static
void LLFloaterGesture::onClickPlay(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	if (gGestureManager.isGesturePlaying(item_id))
	{
		gGestureManager.stopGesture(item_id);
	}
	else
	{
		gGestureManager.playGesture(item_id);
	}
}
Exemplo n.º 11
0
// No longer really builds a list.  Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
	LLCtrlListInterface *list = mListFriendCombo;
	if (!list) return;
	
    // Delete all but the "None" entry
	S32 list_size = list->getItemCount();
	if (list_size > 1)
	{
		list->selectItemRange(1, -1);
		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
	}
	
	// Get all of the calling cards for avatar that are currently online
	LLCollectMappableBuddies collector;
	LLAvatarTracker::instance().applyFunctor(collector);
	LLCollectMappableBuddies::buddy_map_t::iterator it;
	LLCollectMappableBuddies::buddy_map_t::iterator end;
	it = collector.mMappable.begin();
	end = collector.mMappable.end();
	for( ; it != end; ++it)
	{
		list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
	}
	
	list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
	list->selectFirstItem();
}
Exemplo n.º 12
0
void LLPanelRequestTools::refresh()
{
	std::string buffer = childGetValue("destination");
	LLCtrlListInterface *list = childGetListInterface("destination");
	if (!list) return;

	list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	list->addSimpleElement(SELECTION);
	list->addSimpleElement(AGENT_REGION);
	for (LLWorld::region_list_t::iterator iter = gWorldp->mActiveRegionList.begin();
		 iter != gWorldp->mActiveRegionList.end(); ++iter)
	{
		LLViewerRegion* regionp = *iter;
		LLString name = regionp->getName();
//MK
		if (RRenabled && gAgent.mRRInterface.mContainsShowloc)
		{
			name = "(Hidden)";
		}
//mk
		if (!name.empty())
		{
			list->addSimpleElement(name);
		}
	}
	if(!buffer.empty())
	{
		list->selectByValue(buffer);
	}
	else
	{
		list->selectByValue(SELECTION);
	}
}
void LLGestureComboList::onCommitGesture()
{
	LLCtrlListInterface* gestures = getListInterface();
	if (gestures)
	{
		S32 sel_index = gestures->getFirstSelectedIndex();
		if (sel_index == 0)
		{
			return;
		}

		S32 index = gestures->getSelectedValue().asInteger();

		if (mViewAllItemIndex == index)
		{
			// The same behavior as Ctrl+G. EXT-823
			LLFloaterReg::toggleInstance("gestures");
			gestures->selectFirstItem();
			return;
		}

		if (mGetMoreItemIndex == index)
		{
			LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL"));
			return;
		}

		if (index<0 || index >= (S32)mGestures.size())
		{
			llwarns << "out of range gesture index" << llendl;
		}
		else
		{
			LLMultiGesture* gesture = mGestures.at(index);
			if(gesture)
			{
				LLGestureMgr::instance().playGesture(gesture);
				if(!gesture->mReplaceText.empty())
				{
					LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE);
				}
			}
		}
	}
}
Exemplo n.º 14
0
void LLPanelRequestTools::refresh()
{
	std::string buffer = childGetValue("destination");
	LLCtrlListInterface *list = childGetListInterface("destination");
	if (!list) return;

	list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	list->addSimpleElement(SELECTION);
	list->addSimpleElement(AGENT_REGION);
	for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin();
		 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter)
	{
		LLViewerRegion* regionp = *iter;
		std::string name = regionp->getName();
		if (!name.empty())
		{
			list->addSimpleElement(name);
		}
	}
	if(!buffer.empty())
	{
		list->selectByValue(buffer);
	}
	else
	{
		list->selectByValue(SELECTION);
	}
}
Exemplo n.º 15
0
void LLPanelRequestTools::refresh()
{
	std::string buffer = getChild<LLUICtrl>("destination")->getValue();
	LLCtrlListInterface *list = childGetListInterface("destination");
	if (!list) return;

	S32 last_item = list->getItemCount();

	if (last_item >=3)
	{
	list->selectItemRange(2,last_item);
	list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
	}
	for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
		 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
	{
		LLViewerRegion* regionp = *iter;
		std::string name = regionp->getName();
		if (!name.empty())
		{
			list->addSimpleElement(name);
		}
	}
	if(!buffer.empty())
	{
		list->selectByValue(buffer);
	}
	else
	{
		list->operateOnSelection(LLCtrlListInterface::OP_DESELECT);
	}
}
Exemplo n.º 16
0
void LLFloaterWorldMap::onCommitSearchResult()
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (!list) return;

	LLSD selected_value = list->getSelectedValue();
	std::string sim_name = selected_value.asString();
	if (sim_name.empty())
	{
		return;
	}
	LLStringUtil::toLower(sim_name);

	std::map<U64, LLSimInfo*>::const_iterator it;
	for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
	{
		LLSimInfo* info = it->second;

		if (info->isName(sim_name))
		{
			LLVector3d pos_global = info->getGlobalOrigin();

			const F64 SIM_COORD_DEFAULT = 128.0;
			LLVector3 pos_local(SIM_COORD_DEFAULT, SIM_COORD_DEFAULT, 0.0f);

			// Did this value come from a trackURL() request?
			if (!mCompletingRegionPos.isExactlyZero())
			{
				pos_local = mCompletingRegionPos;
				mCompletingRegionPos.clear();
			}
			pos_global.mdV[VX] += (F64)pos_local.mV[VX];
			pos_global.mdV[VY] += (F64)pos_local.mV[VY];
			pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];

			childSetValue("location", sim_name);
			trackLocation(pos_global);
			setDefaultBtn("Teleport");
			break;
		}
	}

	onShowTargetBtn();
}
Exemplo n.º 17
0
void LLChatBar::refresh()
{
	// HACK: Leave the name of the gesture in place for a few seconds.
	const F32 SHOW_GESTURE_NAME_TIME = 2.f;
	if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
	{
		LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
		if (gestures) gestures->selectFirstItem();
		mGestureLabelTimer.stop();
	}

	if ((gAgent.getTypingTime() > AGENT_TYPING_TIMEOUT) && (gAgent.getRenderState() & AGENT_STATE_TYPING))
	{
		gAgent.stopTyping();
	}

	childSetEnabled("Say", mInputEditor->getText().size() > 0);

}
Exemplo n.º 18
0
void LLPanelDirBrowser::selectByUUID(const LLUUID& id)
{
	LLCtrlListInterface *list = childGetListInterface("results");
	if (!list) return;
	BOOL found = list->setCurrentByID(id);
	if (found)
	{
		// we got it, don't wait for network
		// Don't bother looking for this in the draw loop.
		mWantSelectID.setNull();
		// Make sure UI updates.
		onCommitList(NULL, this);
	}
	else
	{
		// waiting for this item from the network
		mWantSelectID = id;
	}
}
Exemplo n.º 19
0
// static
void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data)
{
	LLPanelDirBrowser* self = (LLPanelDirBrowser*)data;
	LLCtrlListInterface *list = self->childGetListInterface("results");
	if (!list) return;

	// Start with everyone invisible
	if (self->mFloaterDirectory)
	{
		self->mFloaterDirectory->hideAllDetailPanels();
	}
	
	if (FALSE == list->getCanSelect())
	{
		return;
	}

	std::string id_str = self->childGetValue("results").asString();
	if (id_str.empty())
	{
		return;
	}

	LLSD item_id = list->getCurrentID();
	S32 type = self->mResultsContents[id_str]["type"];
	if (type == EVENT_CODE)
	{
		// all but events use the UUID above
		item_id = self->mResultsContents[id_str]["event_id"];
	}
	//std::string name = self->mResultsContents[id_str]["name"].asString();
	self->showDetailPanel(type, item_id);

	if (type == FOR_SALE_CODE)
	{
		std::string land_type = self->mResultsContents[id_str]["landtype"].asString();
		if (self->mFloaterDirectory && self->mFloaterDirectory->mPanelPlaceSmallp)
		{
			self->mFloaterDirectory->mPanelPlaceSmallp->setLandTypeString(land_type);
		}	
	}
}
Exemplo n.º 20
0
// static
void LLFloaterGesture::onClickEdit(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	LLInventoryItem* item = gInventory.getItem(item_id);
	if (!item) return;

	std::string title("Gesture: ");
	title.append(item->getName());

	LLPreviewGesture* previewp = LLPreviewGesture::show(title, item_id, LLUUID::null);
	if (!previewp->getHost())
	{
		previewp->setRect(gFloaterView->findNeighboringPosition(self, previewp));
	}
}
Exemplo n.º 21
0
// static 
void LLFloaterWorldMap::onLandmarkComboPrearrange(LLUICtrl* ctrl, void* userdata)
{
	LLFloaterWorldMap* self = gFloaterWorldMap;
	if (!self || self->mIsClosing)
	{
		return;
	}

	LLCtrlListInterface *list = self->childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID current_choice = list->getCurrentID();

	gFloaterWorldMap->buildLandmarkIDLists();

	if (current_choice.isNull() || !list->setCurrentByID(current_choice))
	{
		LLTracker::stopTracking(NULL);
	}
}
Exemplo n.º 22
0
void LLFloaterWorldMap::onLandmarkComboPrearrange( )
{
	if( mIsClosing )
	{
		return;
	}

	LLCtrlListInterface *list = childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID current_choice = list->getCurrentID();

	buildLandmarkIDLists();

	if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
	{
		LLTracker::stopTracking(NULL);
	}

}
Exemplo n.º 23
0
// static
void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata)
{
	LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata;

	LLCtrlListInterface *list = self->childGetListInterface("search_results");
	if (!list) return;

	LLSD selected_value = list->getSelectedValue();
	std::string sim_name = selected_value.asString();
	if (sim_name.empty())
	{
		return;
	}
	LLStringUtil::toLower(sim_name);

	std::map<U64, LLSimInfo*>::const_iterator it;
	for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it)
	{
		LLSimInfo* info = (*it).second;
		std::string info_sim_name = info->mName;
		LLStringUtil::toLower(info_sim_name);

		if (sim_name == info_sim_name)
		{
			LLVector3d pos_global = from_region_handle( info->mHandle );
			F64 local_x = self->childGetValue("spin x");
			F64 local_y = self->childGetValue("spin y");
			F64 local_z = self->childGetValue("spin z");
			pos_global.mdV[VX] += local_x;
			pos_global.mdV[VY] += local_y;
			pos_global.mdV[VZ] = local_z;

			self->childSetValue("location", sim_name);
			self->trackLocation(pos_global);
			self->setDefaultBtn("Teleport");
			break;
		}
	}

	onShowTargetBtn(self);
}
void LLPanelScriptLimitsRegionMemory::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("scripts_list");

	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	mGotParcelMemoryUsed = false;
	mGotParcelMemoryMax = false;
	mGotParcelURLsUsed = false;
	mGotParcelURLsMax = false;

	std::string msg_empty_string("");
	getChild<LLUICtrl>("memory_used")->setValue(LLSD(msg_empty_string));
	getChild<LLUICtrl>("urls_used")->setValue(LLSD(msg_empty_string));
	getChild<LLUICtrl>("parcels_listed")->setValue(LLSD(msg_empty_string));

	mObjectListItems.clear();
}
Exemplo n.º 25
0
// static
void LLFloaterClothing::refreshAll()
{
	if (sInstance)
	{
		sInstance->buildClothingList();

		LLCtrlListInterface* list = sInstance->childGetListInterface("clothing_list");
		if (list)
		{
			if (!sInstance->mAllowSelection)
			{
				// no selection, no commit on change
				list->operateOnSelection(LLCtrlListInterface::OP_DESELECT);
			}
			else if (sInstance->mSelectedID.isNull())
			{
				list->selectFirstItem();
			}
			else
			{
				if (list->setCurrentByID(sInstance->mSelectedID))
				{
					LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("clothing_list");
					if (scroll)
					{
						scroll->scrollToShowSelected();
					}
				}
				else
				{
					list->selectFirstItem();
				}
			}

			// Update button labels
			onCommitList(NULL, sInstance);
		}
	}
}
Exemplo n.º 26
0
void LLPanelScriptLimitsRegionMemory::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("scripts_list");
	
	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	mGotParcelMemoryUsed = false;
	mGotParcelMemoryMax = false;
	mGotParcelURLsUsed = false;
	mGotParcelURLsMax = false;
	
	LLStringUtil::format_map_t args_parcel_memory;
	std::string msg_empty_string("");
	childSetValue("memory_used", LLSD(msg_empty_string));
	childSetValue("urls_used", LLSD(msg_empty_string));
	childSetValue("parcels_listed", LLSD(msg_empty_string));

	mObjectListItems.clear();
}
Exemplo n.º 27
0
void LLChatBar::refresh()
{
	// HACK: Leave the name of the gesture in place for a few seconds.
	const F32 SHOW_GESTURE_NAME_TIME = 2.f;
	if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
	{
		LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
		if (gestures) gestures->selectFirstItem();
		mGestureLabelTimer.stop();
	}

	if ((gAgent.getTypingTime() > AGENT_TYPING_TIMEOUT) && (gAgent.getRenderState() & AGENT_STATE_TYPING))
	{
		gAgent.stopTyping();
	}

	childSetValue("History", LLFloaterChat::instanceVisible(LLSD()));

	//childSetValue("channel_control",( 1.f * ((S32)(mChannelControl->get()))) );
	childSetEnabled("Say", mInputEditor->getText().size() > 0);
	childSetEnabled("Shout", mInputEditor->getText().size() > 0);

}
Exemplo n.º 28
0
void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}
	if (!childHasKeyboardFocus("spin x"))
	{
		childSetValue("spin x", SIM_COORD_DEFAULT);
	}
	if (!childHasKeyboardFocus("spin y"))
	{
		childSetValue("spin y", SIM_COORD_DEFAULT);
	}
	if (!childHasKeyboardFocus("spin z"))
	{
		childSetValue("spin z", 0);
	}
	LLWorldMap::getInstance()->mIsTrackingCommit = FALSE;
	mCompletingRegionName = "";
	mExactMatch = FALSE;
}
Exemplo n.º 29
0
void LLChatBar::refresh()
{
	// HACK: Leave the name of the gesture in place for a few seconds.
	const F32 SHOW_GESTURE_NAME_TIME = 2.f;
	if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
	{
		LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
		if (gestures) gestures->selectFirstItem();
		mGestureLabelTimer.stop();
	}

	if ((gAgent.getTypingTime() > AGENT_TYPING_TIMEOUT) && (gAgent.getRenderState() & AGENT_STATE_TYPING))
	{
		gAgent.stopTyping();
	}

	if (LLUICtrl* history_ctrl = findChild<LLUICtrl>("History"))
		history_ctrl->setValue(LLFloaterChat::instanceVisible());

	if (LLUICtrl* say_ctrl = getChild<LLUICtrl>("Say"))
		say_ctrl->setEnabled(mInputEditor->getText().size() > 0);
	//childSetEnabled("Shout", mInputEditor->getText().size() > 0); createDummyWidget Making Dummy -HgB

}
Exemplo n.º 30
0
void LLFloaterWorldMap::buildLandmarkIDLists()
{
	LLCtrlListInterface *list = childGetListInterface("landmark combo");
	if (!list)
	{
		return;
	}

    // Delete all but the "None" entry
	S32 list_size = list->getItemCount();
	if (list_size > 1)
	{
		list->selectItemRange(1, -1);
		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
	}

	mLandmarkItemIDList.reset();
	mLandmarkAssetIDList.reset();

	// Get all of the current landmarks
	mLandmarkAssetIDList.put( LLUUID::null );
	mLandmarkItemIDList.put( LLUUID::null );

	mLandmarkAssetIDList.put( sHomeID );
	mLandmarkItemIDList.put( sHomeID );

	LLInventoryModel::cat_array_t cats;
	LLInventoryModel::item_array_t items;
	LLIsType is_landmark(LLAssetType::AT_LANDMARK);
	gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
									cats,
									items,
									LLInventoryModel::EXCLUDE_TRASH,
									is_landmark);

	std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
	
	S32 count = items.count();
	for(S32 i = 0; i < count; ++i)
	{
		LLInventoryItem* item = items.get(i);

		list->addSimpleElement(item->getName(), ADD_BOTTOM, item->getUUID());

		mLandmarkAssetIDList.put( item->getAssetUUID() );
		mLandmarkItemIDList.put( item->getUUID() );
	}
	list->sortByColumn(std::string("landmark name"), TRUE);

	list->selectFirstItem();
}