// virtual
void LLFloaterReporter::draw()
{
    // this is set by a static callback sometime after the dialog is created.
    // Only disable screenshot for abuse reports to estate owners - bug reports always
    // allow screenshots to be taken.
    if ( gEmailToEstateOwner && ( mReportType != BUG_REPORT ) )
    {
        childSetValue("screen_check", FALSE );
        childSetEnabled("screen_check", FALSE );
    }
    else
    {
        childSetEnabled("screen_check", TRUE );
    }

    LLFloater::draw();
}
Ejemplo n.º 2
0
void LLPreview::refreshFromItem(const LLInventoryItem* item)
{
	setTitle(llformat("%s: %s",getTitleName(),item->getName().c_str()));
	childSetText("desc",item->getDescription());

	BOOL can_agent_manipulate = item->getPermissions().allowModifyBy(gAgent.getID());
	childSetEnabled("desc",can_agent_manipulate);
}
Ejemplo n.º 3
0
void LLPanelDirClassified::refresh()
{
	BOOL godlike = gAgent.isGodlike();
	childSetVisible("Delete", godlike);
	childSetEnabled("Delete", godlike);

	updateMaturityCheckbox();
}
Ejemplo n.º 4
0
void LLPanelDirEvents::refresh()
{
	childSetVisible("incmature", TRUE);

	BOOL godlike = gAgent.isGodlike();
	childSetVisible("Delete", godlike);
	childSetEnabled("Delete", godlike);
}
void LLFloaterHardwareSettings::refreshEnabledState()
{
    S32 min_tex_mem = LLViewerImageList::getMinVideoRamSetting();
    S32 max_tex_mem = LLViewerImageList::getMaxVideoRamSetting();
    childSetMinValue("GrapicsCardTextureMemory", min_tex_mem);
    childSetMaxValue("GrapicsCardTextureMemory", max_tex_mem);

    if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
            !gGLManager.mHasVertexBufferObject)
    {
        childSetEnabled("vbo", FALSE);
    }

    if (!gGLManager.mHasFramebufferObject)
    {
        childSetEnabled("fbo", FALSE);
    }

    if (!gGLManager.mHasDrawBuffers || !gSavedSettings.getBOOL("RenderUseFBO"))
    {
        childSetEnabled("deferred", FALSE);
    }
    else
    {
        childSetEnabled("deferred", TRUE);
    }

    // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
    childSetEnabled("gamma", !gPipeline.canUseWindLightShaders());
    childSetEnabled("(brightness, lower is brighter)", !gPipeline.canUseWindLightShaders());
    childSetEnabled("fog", !gPipeline.canUseWindLightShaders());

}
void LLFloaterHardwareSettings::refreshEnabledState()
{
	S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
	S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
	childSetMinValue("GrapicsCardTextureMemory", min_tex_mem);
	childSetMaxValue("GrapicsCardTextureMemory", max_tex_mem);

	mLastVBOState = LLVertexBuffer::sEnableVBOs;
	if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
		!gGLManager.mHasVertexBufferObject)
	{
		childSetEnabled("vbo", FALSE);
		//Streaming VBOs -Shyotl
		childSetEnabled("vbo_stream", FALSE);
	}
	else
	{
		childSetEnabled("vbo_stream", LLVertexBuffer::sEnableVBOs);
	}

	childSetEnabled("fbo",gGLManager.mHasFramebufferObject && !LLPipeline::sRenderDeferred);

	// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
	childSetEnabled("gamma", !gPipeline.canUseWindLightShaders());
	childSetEnabled("(brightness, lower is brighter)", !gPipeline.canUseWindLightShaders());
	childSetEnabled("fog", !gPipeline.canUseWindLightShaders());

}
void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
{
	LLPanelChatControlPanel::setSessionId(session_id);

	LLIMModel& im_model = LLIMModel::instance();

	LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
	mAvatarID = im_model.getOtherParticipantID(session_id);
	LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this);

	// Disable "Add friend" button for friends.
	childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
	
	// Disable "Teleport" button if friend is offline
	if(LLAvatarActions::isFriend(mAvatarID))
	{
		childSetEnabled("teleport_btn", LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
	}

	getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID);

	// Disable most profile buttons if the participant is
	// not really an SL avatar (e.g., an Avaline caller).
	LLIMModel::LLIMSession* im_session =
		im_model.findIMSession(session_id);
	if( im_session && !im_session->mOtherParticipantIsAvatar )
	{
		childSetEnabled("view_profile_btn", FALSE);
		childSetEnabled("add_friend_btn", FALSE);

		childSetEnabled("share_btn", FALSE);
		childSetEnabled("teleport_btn", FALSE);
		childSetEnabled("pay_btn", FALSE);
	}
}
Ejemplo n.º 8
0
void LLPanelAvatarProfile::onOpen(const LLSD& key)
{
    LLPanelProfileTab::onOpen(key);

    mGroups.clear();

    //Disable "Add Friend" button for friends.
    childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
}
Ejemplo n.º 9
0
void LLPanelProfileTab::updateButtons()
{
    bool is_buddy_online = LLAvatarTracker::instance().isBuddyOnline(getAvatarId());

    if(LLAvatarActions::isFriend(getAvatarId()))
    {
        childSetEnabled("teleport", is_buddy_online);
    }
    else
    {
        childSetEnabled("teleport", true);
    }

    bool enable_map_btn = (is_buddy_online &&
                           is_agent_mappable(getAvatarId()))
                          || gAgent.isGodlike();
    childSetEnabled("show_on_map_btn", enable_map_btn);
}
Ejemplo n.º 10
0
void LLPanelAvatarNotes::onOpen(const LLSD& key)
{
    LLPanelProfileTab::onOpen(key);

    fillRightsData();

    //Disable "Add Friend" button for friends.
    childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
}
Ejemplo n.º 11
0
void lggAutoCorrectFloater::updateEnabledStuff()
{
	static BOOL *enabledd = rebind_llcontrol<BOOL>("EmeraldEnableAutoCorrect", &gSavedSettings, true);
	if(!(*enabledd))
	{
		getChild<LLCheckBoxCtrl>("em_ac_enable")->setEnabledColor(LLColor4(1.0f,0.0f,0.0f,1.0f));		
	}else
	{
		getChild<LLCheckBoxCtrl>("em_ac_enable")->setEnabledColor(LLUI::sColorsGroup->getColor( "LabelTextColor" ));
	}

	childSetEnabled("em_ac_list_name",*enabledd);
	childSetEnabled("em_ac_list_entry",*enabledd);
	updateListControlsEnabled(*enabledd);
	updateNamesList();
	LGGAutoCorrect::getInstance()->save();

}
Ejemplo n.º 12
0
void wlfPanel_AdvSettings::refresh()
{
// [RLVa:KB] - Checked: 2009-09-19
	if ( (rlv_handler_t::isEnabled()) && (gSavedSettings.getBOOL("wlfAdvSettingsPopup")) )
	{
		childSetEnabled("use_estate_wl", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("EnvAdvancedWaterButton", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WWPresetsCombo", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WWprev", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WWnext", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("EnvAdvancedSkyButton", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WLPresetsCombo", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WLprev", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("WLnext", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
		childSetEnabled("EnvTimeSlider", !gRlvHandler.hasBehaviour(RLV_BHVR_SETENV));
	}
// [/RLVa:KB]
}
Ejemplo n.º 13
0
void LLFloaterFriends::refreshUI()
{	
	if (!sInstance) return;
	int num_selected = mFriendsList->getAllSelected().size();
	BOOL single_selected = (num_selected == 1);
	BOOL some_selected = (num_selected > 0);

	//Options that can only be performed with one friend selected
	childSetEnabled("profile_btn", single_selected);
	childSetEnabled("pay_btn", single_selected);

	//Options that can be performed with up to MAX_FRIEND_SELECT friends selected
	childSetEnabled("remove_btn", some_selected);
	childSetEnabled("im_btn", some_selected);
	childSetEnabled("friend_rights", some_selected);

	refreshRightsChangeList();
}
Ejemplo n.º 14
0
// virtual
void LLPanelGroup::onChange(EStatusType status, const std::string &channelURI, bool proximal)
{
    if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
    {
        return;
    }

    childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
}
LLPrefsAscentChat::LLPrefsAscentChat()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_chat.xml");

	getChild<LLUICtrl>("SpellBase")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellBaseComboBoxCommit, this, _2));
	getChild<LLUICtrl>("EmSpell_EditCustom")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellEditCustom, this));
	getChild<LLUICtrl>("EmSpell_GetMore")->setCommitCallback(boost::bind(&lggHunSpell_Wrapper::getMoreButton, glggHunSpell, this));
	getChild<LLUICtrl>("EmSpell_Add")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellAdd, this));
	getChild<LLUICtrl>("EmSpell_Remove")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellRemove, this));

	getChild<LLUICtrl>("time_format_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitTimeDate, this, _1));
	getChild<LLUICtrl>("date_format_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitTimeDate, this, _1));

	bool started = (LLStartUp::getStartupState() == STATE_STARTED);
	if (!started) // Disable autoresponse when not logged in
	{
		LLView* autoresponse = getChildView("Autoresponse");
		autoresponse->setAllChildrenEnabled(false);
		autoresponse->setToolTip(LLTrans::getString("NotLoggedIn"));
	}

	// Saved per account settings aren't detected by control_name, therefore autoresponse controls get their values here and have them saved during apply.
	childSetValue("AscentInstantMessageResponseRepeat",  gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"));
	childSetValue("AutoresponseAnyone",                  gSavedPerAccountSettings.getBOOL("AutoresponseAnyone"));
	childSetValue("AutoresponseAnyoneFriendsOnly",       gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly"));
	childSetValue("AutoresponseAnyoneItem",              gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneItem"));
	childSetValue("AutoresponseAnyoneMessage",           gSavedPerAccountSettings.getString("AutoresponseAnyoneMessage"));
	childSetValue("AutoresponseAnyoneShow",              gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneShow"));
	childSetValue("AutoresponseNonFriends",              gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends"));
	childSetValue("AutoresponseNonFriendsItem",          gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsItem"));
	childSetValue("AutoresponseNonFriendsMessage",       gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage"));
	childSetValue("AutoresponseNonFriendsShow",          gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsShow"));
	childSetValue("AutoresponseMuted",                   gSavedPerAccountSettings.getBOOL("AutoresponseMuted"));
	childSetValue("AutoresponseMutedItem",               gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"));
	childSetValue("AutoresponseMutedMessage",            gSavedPerAccountSettings.getString("AutoresponseMutedMessage"));
	childSetValue("BusyModeResponse",                    gSavedPerAccountSettings.getString("BusyModeResponse"));
	childSetValue("BusyModeResponseItem",                gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"));
	childSetValue("BusyModeResponseShow",                gSavedPerAccountSettings.getBOOL("BusyModeResponseShow"));

	childSetEnabled("reset_antispam", started);
	getChild<LLUICtrl>("reset_antispam")->setCommitCallback(boost::bind(NACLAntiSpamRegistry::purgeAllQueues));
	getChild<LLUICtrl>("enable_as")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitEnableAS, this, _2));
	getChild<LLUICtrl>("antispam_checkbox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));
	getChild<LLUICtrl>("Group Invites")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));

	getChild<LLUICtrl>("KeywordsOn")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsList")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsSound")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsInChat")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsInIM")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsChangeColor")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsColor")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsPlaySound")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));

    refreshValues();
    refresh();
}
Ejemplo n.º 16
0
void LLPanelDirEvents::refresh()
{
	// You only have a choice if you are mature
	childSetVisible("incmature", !gAgent.isTeen());

	BOOL godlike = gAgent.isGodlike();
	childSetVisible("Delete", godlike);
	childSetEnabled("Delete", godlike);
}
Ejemplo n.º 17
0
BOOL LLPanelDirLand::postBuild()
{
	LLPanelDirBrowser::postBuild();

	childSetValue("type", gSavedSettings.getString("FindLandType"));

	bool adult_enabled = gAgent.canAccessAdult();
	bool mature_enabled = gAgent.canAccessMature();
	childSetVisible("incpg", true);
	if (!mature_enabled)
	{
		childSetValue("incmature", FALSE);
		childDisable("incmature");
	}
	if (!adult_enabled)
	{
		childSetValue("incadult", FALSE);
		childDisable("incadult");
	}

	childSetCommitCallback("pricecheck", onCommitPrice, this);
	childSetCommitCallback("areacheck", onCommitArea, this);

	childSetValue("priceedit", gStatusBar->getBalance());
	childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
	childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32);
	
	childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
	childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32);

	childSetAction("Search", onClickSearchCore, this);
	setDefaultBtn("Search");

	mCurrentSortColumn = "per_meter";

	LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results");
	if (results)
	{
		results->setSortChangedCallback(onClickSort);
		results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
	}

	return TRUE;
}
void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
{
	mCurrentURL = url;

	// redirects will navigate momentarily to about:blank, don't add to history
	if (mCurrentURL != "about:blank")
	{
		mAddressCombo->remove(mCurrentURL);
		mAddressCombo->add(mCurrentURL, ADD_SORTED);
		mAddressCombo->selectByValue(mCurrentURL);

		// Serialize url history
		LLURLHistory::removeURL("browser", mCurrentURL);
		LLURLHistory::addURL("browser", mCurrentURL);
	}
	childSetEnabled("back", mBrowser->canNavigateBack());
	childSetEnabled("forward", mBrowser->canNavigateForward());
	childSetEnabled("reload", TRUE);
}
Ejemplo n.º 19
0
void LLPanelContents::getState(LLViewerObject *objectp )
{
	if( !objectp )
	{
		childSetEnabled("button new script",FALSE);
		return;
	}

	LLUUID group_id;			// used for SL-23488
	LLSelectMgr::getInstance()->selectGetGroup(group_id);  // sets group_id as a side effect SL-23488

	// BUG? Check for all objects being editable?
	BOOL editable = gAgent.isGodlike()
					|| (objectp->permModify()
					       && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) )));  // solves SL-23488
	BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );

// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
	if ( (rlv_handler_t::isEnabled()) && (editable) )
	{
		// Don't allow creation of new scripts if it's non-detachable
		if (objectp->isAttachment())
			editable = !gRlvAttachmentLocks.isLockedAttachment(objectp->getRootEdit());

		// Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection
		if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
		{
			// Only check the first (non-)root object because nothing else would result in enabling the button (see below)
			LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE);

			LLVOAvatar* pAvatar = gAgent.getAvatarObject();
			editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit()));
		}
	}
// [/RLVa:KB]

	// Edit script button - ok if object is editable and there's an unambiguous destination for the object.
	childSetEnabled("button new script",
		editable &&
		all_volume &&
		((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
			|| (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)));
}
Ejemplo n.º 20
0
void LLFloaterReporter::enableControls(BOOL enable)
{
	childSetEnabled("category_combo", enable);
	childSetEnabled("chat_check", enable);
	childSetEnabled("screen_check",	enable);
	childDisable("screenshot");
	childSetEnabled("pick_btn",		enable);
	childSetEnabled("summary_edit",	enable);
	childSetEnabled("details_edit",	enable);
	childSetEnabled("send_btn",		enable);
	childSetEnabled("cancel_btn",	enable);
}
Ejemplo n.º 21
0
void LLFloaterObjectIMInfo::update(const LLUUID& object_id, const std::string& name, const std::string& slurl, const LLUUID& owner_id, bool owner_is_group, const LLUUID &region_id, const std::string& localpart)
{
	// When talking to an old region we won't have a slurl.
	// The object id isn't really the object id either but we don't use it so who cares.
//	bool have_slurl = !slurl.empty();
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-0.2.0g
	bool have_slurl = (!slurl.empty()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
	childSetVisible("Unknown_Slurl",!have_slurl);
	childSetVisible("Slurl",have_slurl);

	childSetText("ObjectName",name);
	childSetText("Slurl",slurl);
	childSetText("OwnerName",std::string(""));

//	bool my_object = (owner_id == gAgentID);
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0g
	bool my_object = (owner_id == gAgentID) || ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(owner_id)));
// [/RLVa:KB]
	childSetEnabled("Mute",!my_object);
	
	mObjectID = object_id;
	mObjectName = name;
	mSlurl = slurl;
	mOwnerID = owner_id;
	mOwnerIsGroup = owner_is_group;

	std::string tempname = name;

	size_t found = tempname.find(" ");
	while(found != std::string::npos)
	{
		tempname.replace(found, 1, "");
		found = tempname.find(" ");
	}

	if (tempname.length() < 1)
	{
		tempname = ">>";
//		chat.mFromName = name;
		childSetText("ObjectName",tempname);
	}

	if (gCacheName) gCacheName->get(owner_id,owner_is_group,nameCallback,this);

	// If we do not have slurl, try resolving using the region_id and localpos
	// (but don't resolve if there was a slurl but RLVa ate it because the avie isn't supposed to be able to see where they are -- Kitty)
	//if(!have_slurl) {
	if (slurl.empty()) {
		mPosPart = localpart;
		mCallback = new LLFloaterObjectIMInfoRegionHandleCallback(this);
		LLLandmark::requestRegionHandle(gMessageSystem, gAgent.getRegionHost(), region_id, mCallback);
		llinfos << "URL had no slurl, resolving region_id " << region_id.asString() << llendl;
	}
}
Ejemplo n.º 22
0
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
	if (!mListNames)
	{
		return;
	}

	std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
	if ( search_items.size() == 0 )
	{	// Nothing selected in the search results
		mAvatarIDs.clear();
		mAvatarNames.clear();
		childSetEnabled("Select", FALSE);
	}
	BOOL first_calling_card = TRUE;

	std::deque<LLFolderViewItem*>::const_iterator item_it;
	for (item_it = items.begin(); item_it != items.end(); ++item_it)
	{
		LLFolderViewEventListener* listenerp = (*item_it)->getListener();
		if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
		{
			LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());

			if (item)
			{
				if ( first_calling_card )
				{	// Have a calling card selected, so clear anything from the search panel
					first_calling_card = FALSE;
					mAvatarIDs.clear();
					mAvatarNames.clear();
					mListNames->deselectAllItems();
				}

				// Add calling card info to the selected avatars
				mAvatarIDs.push_back(item->getCreatorUUID());
				mAvatarNames.push_back(listenerp->getName());
				childSetEnabled("Select", TRUE);
			}
		}
	}
}
void LLMakeOutfitDialog::setWearableToInclude(S32 wearable, bool enabled, bool selected)
{
	LLWearableType::EType wtType = (LLWearableType::EType)wearable;
	if (((0 <= wtType) && (wtType < LLWearableType::WT_COUNT)) && 
		((LLAssetType::AT_BODYPART != LLWearableType::getAssetType(wtType)) || !getUseOutfits()))
	{
		std::string name = std::string("checkbox_") + LLWearableType::getTypeLabel(wtType);
		childSetEnabled(name, enabled);
		childSetValue(name, selected);
	}
}
Ejemplo n.º 24
0
void LLPanelChatControlPanel::updateCallButton()
{
	bool voice_enabled = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking();

	LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId);
	
	if (!session) 
	{
		childSetEnabled("call_btn", false);
		return;
	}

	bool session_initialized = session->mSessionInitialized;
	bool callback_enabled = session->mCallBackEnabled;

	BOOL enable_connect = session_initialized
		&& voice_enabled
		&& callback_enabled;
	childSetEnabled("call_btn", enable_connect);
}
Ejemplo n.º 25
0
// virtual
void LLPanelDirFind::draw()
{
	// enable/disable buttons depending on state
	if ( mWebBrowser )
	{
		bool enable_back = mWebBrowser->canNavigateBack();	
		childSetEnabled( "back_btn", enable_back );

		bool enable_forward = mWebBrowser->canNavigateForward();	
		childSetEnabled( "forward_btn", enable_forward );
	}

	// showcase doesn't have maturity flags -- it's all PG
	if (hasChild("incmature"))
	{
		updateMaturityCheckbox();
	}

	LLPanelDirBrowser::draw();
}
Ejemplo n.º 26
0
void LLPanelAvatarProfile::resetControls()
{
    childSetVisible("status_panel", true);
    childSetVisible("profile_buttons_panel", true);
    childSetVisible("title_groups_text", true);
    childSetVisible("sl_groups", true);
    childSetEnabled("add_friend", true);

    childSetVisible("status_me_panel", false);
    childSetVisible("profile_me_buttons_panel", false);
    childSetVisible("account_actions_panel", false);
}
LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) : mDone(FALSE)
{
	mID.generate();
	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
	childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"));
	childSetAction("help", onHelpBtn, this);
	childSetAction("apply", onApplyBtn, this);
	childSetAction("close", onCloseBtn, this);
	childSetAction("check_all", onCheckAll, this);
	childSetAction("check_none", onUncheckAll, this);
	childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
}
void LLFloaterMediaBrowser::draw()
{
	childSetEnabled("go", !mAddressCombo->getValue().asString().empty());
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if(parcel)
	{
		childSetVisible("parcel_owner_controls", LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA));
		childSetEnabled("assign", !mAddressCombo->getValue().asString().empty());
	}
	bool show_time_controls = false;
	bool media_playing = false;
	if(mBrowser)
	{
		LLPluginClassMedia* media_plugin = mBrowser->getMediaPlugin();
		if(media_plugin)
		{
			show_time_controls = media_plugin->pluginSupportsMediaTime();
			media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING;
		}
	}
	childSetVisible("rewind", show_time_controls);
	childSetVisible("play", show_time_controls && ! media_playing);
	childSetVisible("pause", show_time_controls && media_playing);
	childSetVisible("stop", show_time_controls);
	childSetVisible("seek", show_time_controls);

	childSetEnabled("play", ! media_playing);
	childSetEnabled("stop", media_playing);

	childSetEnabled("back", mBrowser->canNavigateBack());
	childSetEnabled("forward", mBrowser->canNavigateForward());

	LLFloater::draw();
}
Ejemplo n.º 29
0
void LLPanelDirBrowser::updateMaturityCheckbox()
{
	BOOL godlike = gAgent.isGodlike();
	// You only have a choice if your maturity is 'mature' or higher.
	// Logic: if you're not at least mature, hide the mature and adult options
	// After that, enable only the options you can legitimately choose.
	// If you're PG only, show you the checkbox but don't let you change it.
	// If you're God, you have everything.
	bool mature_enabled = gAgent.canAccessMature() || godlike;
	bool adult_enabled = gAgent.canAccessAdult() || godlike;

	// These check boxes can only be checked if you have the right access to use them
	std::string control_name_pg = getChild<LLCheckBoxCtrl>("incpg")->getControlName();
	std::string control_name_mature = getChild<LLCheckBoxCtrl>("incmature")->getControlName();
	std::string control_name_adult = getChild<LLCheckBoxCtrl>("incadult")->getControlName();

	childSetValue("incpg", gSavedSettings.getBOOL(control_name_pg));
	childSetValue("incmature", gSavedSettings.getBOOL(control_name_mature) && mature_enabled);
	childSetValue("incadult", gSavedSettings.getBOOL(control_name_adult) && adult_enabled);
	
	// Teens don't get mature/adult choices
	if (gAgent.wantsPGOnly())
	{
		childHide("incmature");
		childHide("incadult");
		childSetValue("incpg", TRUE);
		childDisable("incpg");
	}

	childSetEnabled("incmature", mature_enabled);		
	childSetEnabled("incadult", adult_enabled);

	if (mature_enabled)
	{
		childEnable("incpg");
		childSetVisible("incpg", TRUE);
		childSetVisible("incmature", TRUE);
		childSetVisible("incadult", TRUE);
	}
}
Ejemplo n.º 30
0
void LLPanelFriends::refreshRightsChangeList()
{
	std::vector<LLUUID> friends = getSelectedIDs();
	S32 num_selected = friends.size();

	bool can_offer_teleport = num_selected >= 1;
	bool selected_friends_online = true;

	const LLRelationship* friend_status = NULL;
	for(std::vector<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
	{
		friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
		if (friend_status)
		{
			if(!friend_status->isOnline())
			{
				can_offer_teleport = false;
				selected_friends_online = false;
			}
		}
		else // missing buddy info, don't allow any operations
		{
			can_offer_teleport = false;
		}
	}
	
	if (num_selected == 0)  // nothing selected
	{
		childSetEnabled("im_btn", FALSE);
		childSetEnabled("offer_teleport_btn", FALSE);
	}
	else // we have at least one friend selected...
	{
		// only allow IMs to groups when everyone in the group is online
		// to be consistent with context menus in inventory and because otherwise
		// offline friends would be silently dropped from the session
		childSetEnabled("im_btn", selected_friends_online || num_selected == 1);
		childSetEnabled("offer_teleport_btn", can_offer_teleport);
	}
}