// static - 'Sell to Anyone' clicked, throw up a confirmation dialog void LLFloaterAuction::onClickSellToAnyone(void* data) { LLFloaterAuction* self = (LLFloaterAuction*)(data); if (self) { LLParcel* parcelp = self->mParcelp->getParcel(); // Do a confirmation S32 sale_price = parcelp->getArea(); // Selling for L$1 per meter S32 area = parcelp->getArea(); LLSD args; args["LAND_SIZE"] = llformat("%d", area); args["SALE_PRICE"] = llformat("%d", sale_price); args["NAME"] = LLTrans::getString("Anyone"); LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog params.substitutions(args) .functor.function(boost::bind(&LLFloaterAuction::onSellToAnyoneConfirmed, self, _1, _2)); params.name("ConfirmLandSaleToAnyoneChange"); // ask away LLNotifications::instance().add(params); } }
// Fill in some reasonable defaults for a new classified. void LLPanelClassified::initNewClassified() { // TODO: Don't generate this on the client. mClassifiedID.generate(); mCreatorID = gAgent.getID(); mPosGlobal = gAgent.getPositionGlobal(); mPaidFor = FALSE; // Try to fill in the current parcel LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { mNameEditor->setText(parcel->getName()); //mDescEditor->setText(parcel->getDesc()); mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID()); //mPriceEditor->setText("0"); mCategoryCombo->setCurrentByIndex(0); } mUpdateBtn->setLabel(getString("publish_txt")); // simulate clicking the "location" button LLPanelClassified::onClickSet(this); }
void LLFloaterAuction::initialize() { mParcelp = gParcelMgr->getParcelSelection(); LLViewerRegion* region = gParcelMgr->getSelectionRegion(); LLParcel* parcelp = mParcelp->getParcel(); if(parcelp && region && !parcelp->getForSale()) { mParcelHost = region->getHost(); mParcelID = parcelp->getLocalID(); childSetText("parcel_text", parcelp->getName()); childEnable("snapshot_btn"); childEnable("ok_btn"); } else { mParcelHost.invalidate(); if(parcelp && parcelp->getForSale()) { childSetText("parcel_text", childGetText("already for sale")); } else { childSetText("parcel_text", LLString::null); } mParcelID = -1; childSetEnabled("snapshot_btn", false); childSetEnabled("ok_btn", false); } mImageID.setNull(); mImage = NULL; }
void LLFloaterBuyLandUI::updateNames() { LLParcel* parcelp = mParcel->getParcel(); if (!parcelp) { mParcelSellerName = LLStringUtil::null; return; } if (mIsClaim) { mParcelSellerName = "Linden Lab"; } else if (parcelp->getIsGroupOwned()) { mParcelSellerName = "(Loading...)"; gCacheName->getGroup(parcelp->getGroupID(), boost::bind(&LLFloaterBuyLandUI::updateName, this, _1, _2, _3)); } else { mParcelSellerName = "(Loading...)"; gCacheName->get(parcelp->getOwnerID(), false, boost::bind(&LLFloaterBuyLandUI::updateName, this, _1, _2, _3)); } }
void KCWindlightInterface::onClickWLStatusButton() { //clear the last notification if its still open if (mClearWLNotification && !mClearWLNotification->isRespondedTo()) { LLSD response = mClearWLNotification->getResponseTemplate(); response["Ignore"] = true; mClearWLNotification->respond(response); } if (WLset) { LLParcel *parcel = NULL; parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { //TODO: this could be better LLSD payload; payload["local_id"] = parcel->getLocalID(); payload["land_owner"] = getOwnerID(parcel); LLSD args; args["PARCEL_NAME"] = parcel->getName(); mClearWLNotification = LLNotifications::instance().add("PhoenixWLClear", args, payload, boost::bind(&KCWindlightInterface::callbackParcelWLClear, this, _1, _2)); } } }
void LLPanelPlaceProfile::onForSaleBannerClick() { LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); LLParcel* parcel = mgr->getFloatingParcelSelection()->getParcel(); LLViewerRegion* selected_region = mgr->getSelectionRegion(); if(parcel && selected_region) { if(parcel->getLocalID() == mSelectedParcelID && mLastSelectedRegionID ==selected_region->getRegionID()) { S32 price = parcel->getSalePrice(); if(price - gStatusBar->getBalance() > 0) { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("buying_selected_land", args), price ); } else { LLViewerParcelMgr::getInstance()->startBuyLand(); } } else { LL_WARNS("Places") << "User is trying to buy remote parcel.Operation is not supported"<< LL_ENDL; } } }
void LLPanelPickEdit::onClickSetLocation() { // Save location for later use. setPosGlobal(gAgent.getPositionGlobal()); std::string parcel_name, region_name; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { mParcelId = parcel->getID(); parcel_name = parcel->getName(); } LLViewerRegion* region = gAgent.getRegion(); if(region) { region_name = region->getName(); } setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal())); mLocationChanged = true; enableSaveButton(TRUE); }
static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp) { //FIXME: how do we handle object in different parcel than us? LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!parcel) return; // did we hit an object? if (objectp.isNull()) return; // did we hit a valid face on the object? S32 face = LLToolPie::getInstance()->getPick().mObjectFace; if( face < 0 || face >= objectp->getNumTEs() ) return; // is media playing on this face? if (LLViewerMedia::getMediaImplFromTextureID(objectp->getTE(face)->getID()) != NULL) { handle_click_action_play(); return; } std::string media_url = std::string ( parcel->getMediaURL () ); std::string media_type = std::string ( parcel->getMediaType() ); LLStringUtil::trim(media_url); LLWeb::loadURL(media_url); }
static ECursorType cursor_from_parcel_media(U8 click_action) { // HACK: This is directly referencing an impl name. BAD! // This can be removed when we have a truly generic media browser that only // builds an impl based on the type of url it is passed. //FIXME: how do we handle object in different parcel than us? ECursorType open_cursor = UI_CURSOR_ARROW; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!parcel) return open_cursor; std::string media_url = std::string ( parcel->getMediaURL () ); std::string media_type = std::string ( parcel->getMediaType() ); LLStringUtil::trim(media_url); open_cursor = UI_CURSOR_TOOLMEDIAOPEN; LLViewerMediaImpl::EMediaStatus status = LLViewerParcelMedia::getStatus(); switch(status) { case LLViewerMediaImpl::MEDIA_PLAYING: return click_action == CLICK_ACTION_PLAY ? UI_CURSOR_TOOLPAUSE : open_cursor; default: return UI_CURSOR_TOOLPLAY; } }
static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp) { //FIXME: how do we handle object in different parcel than us? LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!parcel) return; // did we hit an object? if (objectp.isNull()) return; // did we hit a valid face on the object? S32 face = LLToolPie::getInstance()->getPick().mObjectFace; if( face < 0 || face >= objectp->getNumTEs() ) return; // is media playing on this face? if (LLViewerMedia::getMediaImplFromTextureID(objectp->getTE(face)->getID()) != NULL) { handle_click_action_play(); return; } std::string media_url = std::string ( parcel->getMediaURL () ); std::string media_type = std::string ( parcel->getMediaType() ); LLStringUtil::trim(media_url); // Get the scheme, see if that is handled as well. LLURI uri(media_url); std::string media_scheme = uri.scheme() != "" ? uri.scheme() : "http"; // HACK: This is directly referencing an impl name. BAD! // This can be removed when we have a truly generic media browser that only // builds an impl based on the type of url it is passed. LLWeb::loadURL(media_url); }
static ECursorType cursor_from_parcel_media(U8 click_action) { // HACK: This is directly referencing an impl name. BAD! // This can be removed when we have a truly generic media browser that only // builds an impl based on the type of url it is passed. //FIXME: how do we handle object in different parcel than us? ECursorType open_cursor = UI_CURSOR_ARROW; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!parcel) return open_cursor; std::string media_url = std::string ( parcel->getMediaURL () ); std::string media_type = std::string ( parcel->getMediaType() ); LLStringUtil::trim(media_url); // Get the scheme, see if that is handled as well. LLURI uri(media_url); std::string media_scheme = uri.scheme() != "" ? uri.scheme() : "http"; if( LLMediaManager::getInstance()->supportsMediaType( "LLMediaImplLLMozLib", media_scheme, media_type ) ) { open_cursor = UI_CURSOR_TOOLMEDIAOPEN; } LLMediaBase::EStatus status = LLViewerParcelMedia::getStatus(); switch(status) { case LLMediaBase::STATUS_STARTED: return click_action == CLICK_ACTION_PLAY ? UI_CURSOR_TOOLPAUSE : open_cursor; default: return UI_CURSOR_TOOLPLAY; } }
void LLFloaterBuyLandUI::updateNames() { LLParcel* parcelp = mParcel->getParcel(); if (!parcelp) { mParcelSellerName = LLStringUtil::null; return; } if (mIsClaim) { mParcelSellerName = "Linden Lab"; } else if (parcelp->getIsGroupOwned()) { gCacheName->getGroup(parcelp->getGroupID(), boost::bind(&LLFloaterBuyLandUI::updateGroupName, this, _1, _2, _3)); } else { mParcelSellerName = LLSLURL("agent", parcelp->getOwnerID(), "completename").getSLURLString(); } }
// static void LLPanelLandMedia::onClickRemoveURLFilter(void *data) { LLPanelLandMedia* panelp = (LLPanelLandMedia*)data; if (panelp && panelp->mURLFilterList) { LLParcel* parcel = panelp->mParcel->getParcel(); if (parcel) { LLSD list = parcel->getMediaURLFilterList(); std::vector<LLScrollListItem*> domains = panelp->mURLFilterList->getAllSelected(); for (std::vector<LLScrollListItem*>::iterator iter = domains.begin(); iter != domains.end(); iter++) { LLScrollListItem* item = *iter; const std::string domain = item->getValue().asString(); for(S32 i = 0; i < list.size(); i++) { if (list[i].asString() == domain) { list.erase(i); break; } } } parcel->setMediaURLFilterList(list); LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); panelp->refresh(); } } }
// static void LLFloaterSellLandUI::doSellLand(void *userdata) { LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata; LLParcel* parcel = self->mParcelSelection->getParcel(); // Do a confirmation S32 sale_price = self->getChild<LLUICtrl>("price")->getValue(); S32 area = parcel->getArea(); std::string authorizedBuyerName = LLTrans::getString("Anyone"); bool sell_to_anyone = true; if ("user" == self->getChild<LLUICtrl>("sell_to")->getValue().asString()) { authorizedBuyerName = self->getChild<LLUICtrl>("sell_to_agent")->getValue().asString(); sell_to_anyone = false; } // must sell to someone if indicating sale to anyone if (!parcel->getForSale() && (sale_price == 0) && sell_to_anyone) { LLSD args; std::string type_currency = LLGridManager::getInstance()->getCurrency(); args["CUR"] = type_currency; LLNotificationsUtil::add("SalePriceRestriction", args); return; } std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["LAND_SIZE"] = llformat("%d",area); args["SALE_PRICE"] = llformat("%d",sale_price); args["NAME"] = authorizedBuyerName; args["CUR"] = type_currency; LLNotification::Params params("ConfirmLandSaleChange"); params.substitutions(args) .functor.function(boost::bind(&LLFloaterSellLandUI::onConfirmSale, self, _1, _2)); if (sell_to_anyone) { params.name("ConfirmLandSaleToAnyoneChange"); } if (parcel->getForSale()) { // parcel already for sale, so ignore this question LLNotifications::instance().forceResponse(params, -1); } else { // ask away LLNotifications::instance().add(params); } }
void LLPanelLandMedia::setMediaType(const std::string& mime_type) { LLParcel *parcel = mParcel->getParcel(); if(parcel) parcel->setMediaType(mime_type); std::string media_key = LLMIMETypes::widgetType(mime_type); mMediaTypeCombo->setValue(media_key); childSetText("mime_type", mime_type); }
// static void LLPanelLandMedia::onResetBtn(void *userdata) { LLPanelLandMedia *self = (LLPanelLandMedia *)userdata; LLParcel* parcel = self->mParcel->getParcel(); // LLViewerMedia::navigateHome(); self->refresh(); self->childSetText("current_url", parcel->getMediaURL()); // LLViewerParcelMedia::sendMediaNavigateMessage(parcel->getMediaURL()); }
void LLOverlayBar::onPlayButtonPressed( const LLMediaRemoteCtrlObserver::EventType& eventIn ) { LLUICtrl* control = eventIn.getControl (); LLParcel* parcel = gParcelMgr->getAgentParcel(); if ( control == mMusicRemote ) { if (gAudiop) { if ( parcel ) { // this doesn't work properly when crossing parcel boundaries - even when the // stream is stopped, it doesn't return the right thing - commenting out for now. //if ( gAudiop->isInternetStreamPlaying() == 0 ) //{ const char* music_url = parcel->getMusicURL(); gAudiop->startInternetStream(music_url); mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Play, FALSE ); //} } }; // CP: this is the old way of doing things (click play each time on a parcel to start stream) //if (gAudiop) //{ // if (gAudiop->isInternetStreamPlaying() > 0) // { // gAudiop->pauseInternetStream ( 0 ); // } // else // { // if (parcel) // { // const char* music_url = parcel->getMusicURL(); // gAudiop->startInternetStream(music_url); // } // } //}; //mMusicRemote->setTransportState ( LLMediaRemoteCtrl::Stop, FALSE ); } else if ( control == mMediaRemote ) { LLParcel* parcel = gParcelMgr->getAgentParcel(); if (parcel) { LLString path( "" ); LLMediaEngine::getInstance ()->convertImageAndLoadUrl( true, false, path ); mMediaRemote->setTransportState ( LLMediaRemoteCtrl::Play, TRUE ); } }; }
void LLPanelPickEdit::onOpen(const LLSD& key) { LLUUID pick_id = key["pick_id"]; mNeedData = true; // creating new Pick if(pick_id.isNull()) { mNewPick = true; setAvatarId(gAgent.getID()); resetData(); resetControls(); setPosGlobal(gAgent.getPositionGlobal()); LLUUID parcel_id = LLUUID::null, snapshot_id = LLUUID::null; std::string pick_name, pick_desc, region_name; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if(parcel) { parcel_id = parcel->getID(); pick_name = parcel->getName(); pick_desc = parcel->getDesc(); snapshot_id = parcel->getSnapshotID(); } LLViewerRegion* region = gAgent.getRegion(); if(region) { region_name = region->getName(); } setParcelID(parcel_id); childSetValue("pick_name", pick_name.empty() ? region_name : pick_name); childSetValue("pick_desc", pick_desc); setSnapshotId(snapshot_id); setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal())); enableSaveButton(true); } // editing existing pick else { mNewPick = false; LLPanelPickInfo::onOpen(key); enableSaveButton(false); } resetDirty(); }
//static std::string LLWeb::expandURLSubstitutions(const std::string &url, const LLSD &default_subs) { LLSD substitution = default_subs; substitution["VERSION"] = LLVersionInfo::getVersion(); substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor(); substitution["VERSION_MINOR"] = LLVersionInfo::getMinor(); substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); substitution["CHANNEL"] = LLVersionInfo::getChannel(); // substitution["GRID"] = LLGridManager::getInstance()->getGridLabel(); // substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridLabel()); //NOTE: getGridLabel() returns e.g. "Second Life" // getGridNick() returns e.g. "agni" substitution["GRID"] = LLGridManager::getInstance()->getGridNick(); substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridNick()); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); // work out the current language std::string lang = LLUI::getLanguage(); if (lang == "en-us") { // *HACK: the correct fix is to change English.lproj/language.txt, // but we're late in the release cycle and this is a less risky fix lang = "en"; } substitution["LANGUAGE"] = lang; // find the region ID LLUUID region_id; LLViewerRegion *region = gAgent.getRegion(); if (region) { region_id = region->getRegionID(); } substitution["REGION_ID"] = region_id; // find the parcel local ID S32 parcel_id = 0; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { parcel_id = parcel->getLocalID(); } substitution["PARCEL_ID"] = llformat("%d", parcel_id); // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); return LLWeb::escapeURL(expanded_url); }
void LLViewerAudio::onTeleportFailed() { if (gAudiop) { LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { mNextStreamURI = parcel->getMusicURL(); } } }
void LLFloaterBuyLandUI::updateGroupName(const LLUUID& id, const std::string& name, bool is_group) { LLParcel* parcelp = mParcel->getParcel(); if (parcelp && parcelp->getGroupID() == id) { // request is current mParcelSellerName = name; } }
// static void LLFloaterSellLandUI::doShowObjects(void *userdata) { LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata; LLParcel* parcel = self->mParcelSelection->getParcel(); if (!parcel) return; send_parcel_select_objects(parcel->getLocalID(), RT_SELL); // we shouldn't pass callback functor since it is registered in LLFunctorRegistration LLNotificationsUtil::add("TransferObjectsHighlighted", LLSD(), LLSD()); }
// static void LLFloaterSellLandUI::doShowObjects(void *userdata) { LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata; LLParcel* parcel = self->mParcelSelection->getParcel(); if (!parcel) return; send_parcel_select_objects(parcel->getLocalID(), RT_SELL); LLNotificationsUtil::add("TransferObjectsHighlighted", LLSD(), LLSD(), &LLFloaterSellLandUI::callbackHighlightTransferable); }
// public void LLPanelLandAudio::refresh() { LLParcel *parcel = mParcel->getParcel(); if (!parcel) { clearCtrls(); } else { // something selected, hooray! // Display options BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); bool allow_voice = parcel->getParcelFlagAllowVoice(); LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (region && region->isVoiceEnabled()) { mCheckEstateDisabledVoice->setVisible(false); mCheckParcelEnableVoice->setVisible(true); mCheckParcelEnableVoice->setEnabled( can_change_media ); mCheckParcelEnableVoice->set(allow_voice); mCheckParcelVoiceLocal->setEnabled( can_change_media && allow_voice ); } else { // Voice disabled at estate level, overrides parcel settings // Replace the parcel voice checkbox with a disabled one // labelled with an explanatory message mCheckEstateDisabledVoice->setVisible(true); mCheckParcelEnableVoice->setVisible(false); mCheckParcelEnableVoice->setEnabled(false); mCheckParcelVoiceLocal->setEnabled(false); } mCheckParcelEnableVoice->set(allow_voice); mCheckParcelVoiceLocal->set(!parcel->getParcelFlagUseEstateVoiceChannel()); mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData(); mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds()); mCheckAVSoundAny->setEnabled(can_change_av_sounds); mCheckAVSoundGroup->set(parcel->getAllowGroupAVSounds() || parcel->getAllowAnyAVSounds()); // On if "Everyone" is on mCheckAVSoundGroup->setEnabled(can_change_av_sounds && !parcel->getAllowAnyAVSounds()); // Enabled if "Everyone" is off } }
void LLPanelLandMedia::setMediaURL(const std::string& media_url) { mMediaURLEdit->setText(media_url); LLParcel *parcel = mParcel->getParcel(); if(parcel) parcel->setMediaCurrentURL(media_url); // LLViewerMedia::navigateHome(); mMediaURLEdit->onCommit(); // LLViewerParcelMedia::sendMediaNavigateMessage(media_url); childSetText("current_url", media_url); }
void LLViewerMediaFocus::setFocusFace( BOOL b, LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl ) { LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (b && media_impl.notNull()) { mMediaImpl = media_impl; LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); mFocus = LLSelectMgr::getInstance()->getSelection(); if(mMediaHUD.get() && ! parcel->getMediaPreventCameraZoom()) { mMediaHUD.get()->resetZoomLevel(); mMediaHUD.get()->nextZoomLevel(); } if (!mFocus->isEmpty()) { gFocusMgr.setKeyboardFocus(this); } mObjectID = objectp->getID(); // LLViewerMedia::addObserver(this, mObjectID); } else { gFocusMgr.setKeyboardFocus(NULL); if(! parcel->getMediaPreventCameraZoom()) { if (!mFocus->isEmpty()) { gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); } } mFocus = NULL; // LLViewerMedia::remObserver(this, mObjectID); // Null out the media hud media pointer if(mMediaHUD.get()) { mMediaHUD.get()->setMediaImpl(NULL); } // and null out the media impl mMediaImpl = NULL; } if(mMediaHUD.get()) { mMediaHUD.get()->setMediaFocus(b); } }
void LLFloaterAuction::initialize() { mParcelUpdateCapUrl.clear(); mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection(); LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); LLParcel* parcelp = mParcelp->getParcel(); if(parcelp && region && !parcelp->getForSale()) { mParcelHost = region->getHost(); mParcelID = parcelp->getLocalID(); mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate"); childSetText("parcel_text", parcelp->getName()); childEnable("snapshot_btn"); childEnable("reset_parcel_btn"); childEnable("start_auction_btn"); LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); if (panel) { // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet U32 estate_id = panel->getEstateID(); childSetEnabled("sell_to_anyone_btn", (estate_id == ESTATE_TEEN || estate_id == 0)); } else { // Don't have the panel up, so don't know if we're on the teen grid or not. Default to enabling it childEnable("sell_to_anyone_btn"); } } else { mParcelHost.invalidate(); if(parcelp && parcelp->getForSale()) { childSetText("parcel_text", getString("already for sale")); } else { childSetText("parcel_text", LLStringUtil::null); } mParcelID = -1; childSetEnabled("snapshot_btn", false); childSetEnabled("reset_parcel_btn", false); childSetEnabled("sell_to_anyone_btn", false); childSetEnabled("start_auction_btn", false); } mImageID.setNull(); mImage = NULL; }
void KCWindlightInterface::ParcelChange() { if (!gSavedSettings.getBOOL("PhoenixWLParcelEnabled") || (rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) ) return; LLParcel *parcel = NULL; S32 this_parcel_id = 0; std::string desc; parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { this_parcel_id = parcel->getLocalID(); desc = parcel->getDesc(); } if ( (this_parcel_id != mLastParcelID) || (mLastParcelDesc != desc) ) //parcel changed { //llinfos << "agent in new parcel: "<< this_parcel_id << " : " << parcel->getName() << llendl; mLastParcelID = this_parcel_id; mLastParcelDesc = desc; mCurrentSpace = -2.f; mCurrentSettings.clear(); setWL_Status(false); //clear the status bar icon const LLVector3& agent_pos_region = gAgent.getPositionAgent(); mLastZ = lltrunc( agent_pos_region.mV[VZ] ); //clear the last notification if its still open if (mSetWLNotification && !mSetWLNotification->isRespondedTo()) { LLSD response = mSetWLNotification->getResponseTemplate(); response["Ignore"] = true; mSetWLNotification->respond(response); } mEventTimer.reset(); mEventTimer.start(); // Apply new WL settings instantly on TP if (mTPing) { mTPing = false; tick(); } } }
void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName> names) { LLParcel* parcel = mParcelSelection->getParcel(); if (names.empty() || ids.empty()) return; LLUUID id = ids[0]; parcel->setAuthorizedBuyerID(id); mAuthorizedBuyer = ids[0]; getChild<LLUICtrl>("sell_to_agent")->setValue(names[0].getCompleteName()); refreshUI(); }
// static void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) { LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)data; LLParcel* parcel = floaterp->mParcelSelection->getParcel(); if (names.empty() || ids.empty()) return; LLUUID id = ids[0]; parcel->setAuthorizedBuyerID(id); floaterp->mAuthorizedBuyer = ids[0]; floaterp->childSetText("sell_to_agent", names[0]); floaterp->refreshUI(); }