// static void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) { LLPanelLandAudio *self = (LLPanelLandAudio *)userdata; LLParcel* parcel = self->mParcel->getParcel(); if (!parcel) { return; } // Extract data from UI BOOL sound_local = self->mCheckSoundLocal->get(); std::string music_url = self->mMusicURLEdit->getText(); U8 obscure_music = self->mMusicUrlCheck->get(); BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); // Remove leading/trailing whitespace (common when copying/pasting) LLStringUtil::trim(music_url); // Push data into current parcel parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); parcel->setObscureMusic(obscure_music); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); // Might have changed properties, so let's redraw! self->refresh(); }
// static void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) { LLPanelLandAudio *self = (LLPanelLandAudio *)userdata; LLParcel* parcel = self->mParcel->getParcel(); if (!parcel) { return; } // Extract data from UI BOOL sound_local = self->mCheckSoundLocal->get(); std::string music_url = self->mMusicURLEdit->getText(); BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); BOOL any_av_sound = self->mCheckAVSoundAny->get(); BOOL group_av_sound = TRUE; // If set to "Everyone" then group is checked as well if (!any_av_sound) { // If "Everyone" is off, use the value from the checkbox group_av_sound = self->mCheckAVSoundGroup->get(); } // Remove leading/trailing whitespace (common when copying/pasting) LLStringUtil::trim(music_url); // Push data into current parcel parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); parcel->setAllowAnyAVSounds(any_av_sound); parcel->setAllowGroupAVSounds(group_av_sound); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); // Might have changed properties, so let's redraw! self->refresh(); }
bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) { return false; } S32 sale_price = getChild<LLUICtrl>("price")->getValue(); // Valid extracted data if (sale_price < 0) { // TomY TODO: Throw an error return false; } LLParcel* parcel = mParcelSelection->getParcel(); if (!parcel) return false; // can_agent_modify_parcel deprecated by GROUPS // if (!can_agent_modify_parcel(parcel)) // { // close(); // return; // } parcel->setParcelFlag(PF_FOR_SALE, TRUE); parcel->setSalePrice(sale_price); bool sell_with_objects = false; if ("yes" == getChild<LLUICtrl>("sell_objects")->getValue().asString()) { sell_with_objects = true; } parcel->setSellWithObjects(sell_with_objects); if ("user" == getChild<LLUICtrl>("sell_to")->getValue().asString()) { parcel->setAuthorizedBuyerID(mAuthorizedBuyer); } else { parcel->setAuthorizedBuyerID(LLUUID::null); } // Send update to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); closeFloater(); return false; }