void lggDicDownloadFloater::setData(std::vector<std::string> shortNames, std::vector<std::string> longNames, void* data) { sNames = shortNames; lNames = longNames; empanel = (LLPrefsAscentChat*)data; LLComboBox* comboBox = getChild<LLComboBox>("Emerald_combo_dics"); if (comboBox != NULL) { comboBox->removeall(); for (int i = 0; i < (int)lNames.size(); i++) { comboBox->add(lNames[i], ADD_BOTTOM); } comboBox->setCurrentByIndex(0); comboBox->add("", ADD_BOTTOM); } }
// Update controls based on current settings void LLPrefsAscentVan::refresh() { //Main ----------------------------------------------------------------------------------- //Tags\Colors ---------------------------------------------------------------------------- LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox"); combo->setCurrentByIndex(mSelectedClient); childSetEnabled("friends_color_textbox", mUseStatusColors); childSetEnabled("friend_color_swatch", mUseStatusColors || mColorFriendChat); childSetEnabled("estate_owner_color_swatch", mUseStatusColors || mColorEOChat); childSetEnabled("linden_color_swatch", mUseStatusColors || mColorLindenChat); childSetEnabled("muted_color_swatch", mUseStatusColors || mColorMutedChat); childSetEnabled("custom_tag_label_text", mCustomTagOn); childSetEnabled("custom_tag_label_box", mCustomTagOn); childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel")); childSetEnabled("custom_tag_color_text", mCustomTagOn); childSetEnabled("custom_tag_color_swatch", mCustomTagOn); }
// virtual BOOL LLPreviewTexture::postBuild() { if (mCopyToInv) { getChild<LLButton>("Keep")->setLabel(getString("Copy")); childSetAction("Keep",LLPreview::onBtnCopyToInv,this); getChildView("Discard")->setVisible( false); } else if (mShowKeepDiscard) { childSetAction("Keep",onKeepBtn,this); childSetAction("Discard",onDiscardBtn,this); } else { getChildView("Keep")->setVisible( false); getChildView("Discard")->setVisible( false); } childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); getChildView("save_tex_btn")->setVisible( true); getChildView("save_tex_btn")->setEnabled(canSaveAs()); if (!mCopyToInv) { const LLInventoryItem* item = getItem(); if (item) { childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLUICtrl>("desc")->setValue(item->getDescription()); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); } } childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); combo->setCurrentByIndex(0); return LLPreview::postBuild(); }
// called from setFocus() // called internally too void HippoPanelGridsImpl::refresh() { const std::string &defaultGrid = gHippoGridManager->getDefaultGridName(); LLComboBox *grids = getChild<LLComboBox>("grid_selector"); S32 selectIndex = -1, i = 0; grids->removeall(); if (defaultGrid != "") { grids->add(defaultGrid); selectIndex = i++; } HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid(); for (it = gHippoGridManager->beginGrid(); it != end; ++it) { const std::string &grid = it->second->getGridName(); if (grid != defaultGrid) { grids->add(grid); if (grid == mCurGrid) selectIndex = i; i++; } } if ((mState == ADD_NEW) || (mState == ADD_COPY)) { grids->add("<new>"); selectIndex = i++; } if (selectIndex >= 0) { grids->setCurrentByIndex(selectIndex); } else { grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label } childSetTextArg("default_grid", "[DEFAULT]", (defaultGrid != "")? defaultGrid: " "); childSetEnabled("btn_delete", (selectIndex >= 0) && mIsEditable ); childSetEnabled("btn_copy", (mState == NORMAL) && (selectIndex >= 0)); childSetEnabled("btn_default", (mState == NORMAL) && (selectIndex > 0)); childSetEnabled("gridname", (mState == ADD_NEW) || (mState == ADD_COPY)); }
void LLPanelLogin::updateGridCombo() { const std::string &defaultGrid = gHippoGridManager->getDefaultGridName(); LLComboBox *grids = getChild<LLComboBox>("grids_combo"); std::string top_entry; grids->removeall(); const HippoGridInfo *curGrid = gHippoGridManager->getCurrentGrid(); const HippoGridInfo *defGrid = gHippoGridManager->getGrid(defaultGrid); S32 idx(-1); HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid(); for (it = gHippoGridManager->beginGrid(); it != end; ++it) { std::string grid = it->second->getGridName(); if (grid.empty() || it->second == defGrid) continue; if (it->second == curGrid) idx = grids->getItemCount(); grids->add(grid); } if (curGrid || defGrid) { if (defGrid) { grids->add(defGrid->getGridName(),ADD_TOP); ++idx; } grids->setCurrentByIndex(idx); } else { grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label } }
void LLFloaterBuyLandUI::refreshUI() { // section zero: title area { LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image"); if (snapshot) { snapshot->setImageAssetID( mParcelValid ? mParcelSnapshot : LLUUID::null); } if (mParcelValid) { getChild<LLUICtrl>("info_parcel")->setValue(mParcelLocation); LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea); string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects); getChild<LLUICtrl>("info_size")->setValue(getString("meters_supports_object", string_args)); F32 cost_per_sqm = 0.0f; if (mParcelActualArea > 0) { cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea; } LLStringUtil::format_map_t info_price_args; info_price_args["[PRICE]"] = llformat("%d", mParcelPrice); info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm); if (mParcelSoldWithObjects) { info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects"); } else { info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects"); } getChild<LLUICtrl>("info_price")->setValue(getString("info_price_string", info_price_args)); getChildView("info_price")->setVisible( mParcelIsForSale); } else { getChild<LLUICtrl>("info_parcel")->setValue(getString("no_parcel_selected")); getChild<LLUICtrl>("info_size")->setValue(LLStringUtil::null); getChild<LLUICtrl>("info_price")->setValue(LLStringUtil::null); } getChild<LLUICtrl>("info_action")->setValue( mCanBuy ? mIsForGroup ? getString("buying_for_group")//"Buying land for group:" : getString("buying_will")//"Buying this land will:" : mCannotBuyIsError ? getString("cannot_buy_now")//"Cannot buy now:" : getString("not_for_sale")//"Not for sale:" ); } bool showingError = !mCanBuy || !mSiteValid; // error section if (showingError) { mChildren.setBadge(std::string("step_error"), mCannotBuyIsError ? LLViewChildren::BADGE_ERROR : LLViewChildren::BADGE_WARN); LLTextBox* message = getChild<LLTextBox>("error_message"); if (message) { message->setVisible(true); message->setValue(LLSD(!mCanBuy ? mCannotBuyReason : "(waiting for data)")); } getChildView("error_web")->setVisible(mCannotBuyIsError && !mCannotBuyURI.empty()); } else { getChildView("step_error")->setVisible(FALSE); getChildView("error_message")->setVisible(FALSE); getChildView("error_web")->setVisible(FALSE); } // section one: account if (!showingError) { mChildren.setBadge(std::string("step_1"), mSiteMembershipUpgrade ? LLViewChildren::BADGE_NOTE : LLViewChildren::BADGE_OK); getChild<LLUICtrl>("account_action")->setValue(mSiteMembershipAction); getChild<LLUICtrl>("account_reason")->setValue( mSiteMembershipUpgrade ? getString("must_upgrade") : getString("cant_own_land") ); LLComboBox* levels = getChild<LLComboBox>( "account_level"); if (levels) { levels->setVisible(mSiteMembershipUpgrade); levels->removeall(); for(std::vector<std::string>::const_iterator i = mSiteMembershipPlanNames.begin(); i != mSiteMembershipPlanNames.end(); ++i) { levels->add(*i); } levels->setCurrentByIndex(mUserPlanChoice); } getChildView("step_1")->setVisible(TRUE); getChildView("account_action")->setVisible(TRUE); getChildView("account_reason")->setVisible(TRUE); } else { getChildView("step_1")->setVisible(FALSE); getChildView("account_action")->setVisible(FALSE); getChildView("account_reason")->setVisible(FALSE); getChildView("account_level")->setVisible(FALSE); } // section two: land use fees if (!showingError) { mChildren.setBadge(std::string("step_2"), mSiteLandUseUpgrade ? LLViewChildren::BADGE_NOTE : LLViewChildren::BADGE_OK); getChild<LLUICtrl>("land_use_action")->setValue(mSiteLandUseAction); std::string message; if (mIsForGroup) { LLStringUtil::format_map_t string_args; string_args["[GROUP]"] = std::string(gAgent.getGroupName()); message += getString("insufficient_land_credits", string_args); } else { LLStringUtil::format_map_t string_args; string_args["[BUYER]"] = llformat("%d", mAgentCommittedTier); message += getString("land_holdings", string_args); } if (!mParcelValid) { message += LLTrans::getString("sentences_separator") + getString("no_parcel_selected"); } else if (mParcelBillableArea == mParcelActualArea) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea); message += LLTrans::getString("sentences_separator") + getString("parcel_meters", string_args); } else { if (mParcelBillableArea > mParcelActualArea) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); message += LLTrans::getString("sentences_separator") + getString("premium_land", string_args); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); message += LLTrans::getString("sentences_separator") + getString("discounted_land", string_args); } } getChild<LLUICtrl>("land_use_reason")->setValue(message); getChildView("step_2")->setVisible(TRUE); getChildView("land_use_action")->setVisible(TRUE); getChildView("land_use_reason")->setVisible(TRUE); } else { getChildView("step_2")->setVisible(FALSE); getChildView("land_use_action")->setVisible(FALSE); getChildView("land_use_reason")->setVisible(FALSE); } // section three: purchase & currency S32 finalBalance = mAgentCashBalance + mCurrency.getAmount() - mParcelPrice; bool willHaveEnough = finalBalance >= 0; bool haveEnough = mAgentCashBalance >= mParcelPrice; S32 minContribution = llceil((F32)mParcelBillableArea / GROUP_LAND_BONUS_FACTOR); bool groupContributionEnough = mParcelGroupContribution >= minContribution; mCurrency.updateUI(!showingError && !haveEnough); if (!showingError) { mChildren.setBadge(std::string("step_3"), !willHaveEnough ? LLViewChildren::BADGE_WARN : mCurrency.getAmount() > 0 ? LLViewChildren::BADGE_NOTE : LLViewChildren::BADGE_OK); LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice); string_args["[SELLER]"] = mParcelSellerName; getChild<LLUICtrl>("purchase_action")->setValue(getString("pay_to_for_land", string_args)); getChildView("purchase_action")->setVisible( mParcelValid); std::string reasonString; if (haveEnough) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); getChild<LLUICtrl>("currency_reason")->setValue(getString("have_enough_lindens", string_args)); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); string_args["[AMOUNT2]"] = llformat("%d", mParcelPrice - mAgentCashBalance); getChild<LLUICtrl>("currency_reason")->setValue(getString("not_enough_lindens", string_args)); getChild<LLUICtrl>("currency_est")->setTextArg("[LOCAL_AMOUNT]", mCurrency.getLocalEstimate()); } if (willHaveEnough) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", finalBalance); getChild<LLUICtrl>("currency_balance")->setValue(getString("balance_left", string_args)); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice - mAgentCashBalance); getChild<LLUICtrl>("currency_balance")->setValue(getString("balance_needed", string_args)); } getChild<LLUICtrl>("remove_contribution")->setValue(LLSD(groupContributionEnough)); getChildView("remove_contribution")->setEnabled(groupContributionEnough); bool showRemoveContribution = mParcelIsGroupLand && (mParcelGroupContribution > 0); getChildView("remove_contribution")->setLabelArg("[AMOUNT]", llformat("%d", minContribution)); getChildView("remove_contribution")->setVisible( showRemoveContribution); getChildView("step_3")->setVisible(TRUE); getChildView("purchase_action")->setVisible(TRUE); getChildView("currency_reason")->setVisible(TRUE); getChildView("currency_balance")->setVisible(TRUE); } else { getChildView("step_3")->setVisible(FALSE); getChildView("purchase_action")->setVisible(FALSE); getChildView("currency_reason")->setVisible(FALSE); getChildView("currency_balance")->setVisible(FALSE); getChildView("remove_group_donation")->setVisible(FALSE); } bool agrees_to_covenant = false; LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant"); if (check) { agrees_to_covenant = check->get(); } getChildView("buy_btn")->setEnabled(mCanBuy && mSiteValid && willHaveEnough && !mTransaction && agrees_to_covenant); }
//--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- LLPanelLogin::LLPanelLogin(const LLRect &rect, void (*callback)(S32 option, void* user_data), void *cb_data) : LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE), // not bordered mLogoImage(), mCallback(callback), mCallbackData(cb_data), mHtmlAvailable( TRUE ) { setFocusRoot(TRUE); setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); // instance management if (LLPanelLogin::sInstance) { llwarns << "Duplicate instance of login view deleted" << llendl; delete LLPanelLogin::sInstance; // Don't leave bad pointer in gFocusMgr gFocusMgr.setDefaultKeyboardFocus(NULL); } LLPanelLogin::sInstance = this; // add to front so we are the bottom-most child gViewerWindow->getRootView()->addChildAtEnd(this); // Logo mLogoImage = LLUI::getUIImage("startup_logo.j2c"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); #if USE_VIEWER_AUTH //leave room for the login menu bar setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); #endif reshape(rect.getWidth(), rect.getHeight()); #if !USE_VIEWER_AUTH LLComboBox* name_combo = sInstance->getChild<LLComboBox>("name_combo"); name_combo->setCommitCallback(onSelectLoginEntry); name_combo->setFocusLostCallback(onLoginComboLostFocus); name_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe); name_combo->setSuppressTentative(true); name_combo->setSuppressAutoComplete(true); childSetCommitCallback("remember_name_check", onNameCheckChanged); childSetCommitCallback("password_edit", mungePassword); childSetKeystrokeCallback("password_edit", onPassKey, this); childSetUserData("password_edit", this); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); LLLineEditor* edit = getChild<LLLineEditor>("password_edit"); if (edit) edit->setDrawAsterixes(TRUE); //OGPX : This keeps the uris in a history file //OGPX TODO: should this be inside an OGP only check? LLComboBox* regioncombo = getChild<LLComboBox>("regionuri_edit"); regioncombo->setAllowTextEntry(TRUE, 256, FALSE); std::string current_regionuri = gSavedSettings.getString("CmdLineRegionURI"); // iterate on uri list adding to combobox (couldn't figure out how to add them all in one call) // ... and also append the command line value we might have gotten to the URLHistory LLSD regionuri_history = LLURLHistory::getURLHistory("regionuri"); LLSD::array_iterator iter_history = regionuri_history.beginArray(); LLSD::array_iterator iter_end = regionuri_history.endArray(); for (; iter_history != iter_end; ++iter_history) { regioncombo->addSimpleElement((*iter_history).asString()); } if ( LLURLHistory::appendToURLCollection("regionuri",current_regionuri)) { // since we are in login, another read of urlhistory file is going to happen // so we need to persist the new value we just added (or maybe we should do it in startup.cpp?) // since URL history only populated on create of sInstance, add to combo list directly regioncombo->addSimpleElement(current_regionuri); } // select which is displayed if we have a current URL. regioncombo->setSelectedByValue(LLSD(current_regionuri),TRUE); //llinfos << " url history: " << LLSDOStreamer<LLSDXMLFormatter>(LLURLHistory::getURLHistory("regionuri")) << llendl; LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); combo->setAllowTextEntry(TRUE, 128, FALSE); // The XML file loads the combo with the following labels: // 0 - "My Home" // 1 - "My Last Location" // 2 - "<Type region name>" BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { // Replace "<Type region name>" with this region name combo->remove(2); combo->add( sim_string ); combo->setTextEntry(sim_string); combo->setCurrentByIndex( 2 ); } else if (login_last) { combo->setCurrentByIndex( 1 ); } else { combo->setCurrentByIndex( 0 ); } combo->setCommitCallback( &set_start_location ); childSetAction("connect_btn", onClickConnect, this); setDefaultBtn("connect_btn"); // childSetAction("quit_btn", onClickQuit, this); childSetAction("grids_btn", onClickGrids, this); childSetCommitCallback("grids_combo", onSelectGrid, this); std::string channel = LL_CHANNEL; std::string version = llformat("%d.%d.%d (%d)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD ); LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[VERSION]", version); channel_text->setClickedCallback(onClickVersion); channel_text->setCallbackUserData(this); LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword); LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount); #endif // get the web browser control LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); // Need to handle login secondlife:///app/ URLs web_browser->setTrusted( true ); // don't make it a tab stop until SL-27594 is fixed web_browser->setTabStop(FALSE); // web_browser->navigateToLocalPage( "loading", "loading.html" ); // make links open in external browser web_browser->setOpenInExternalBrowser( true ); // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through) LLRect htmlRect = getRect(); #if USE_VIEWER_AUTH htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY(), getRect().getWidth() + 6, getRect().getHeight()); #else htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY() + 40, getRect().getWidth() + 6, getRect().getHeight() - 78 ); #endif web_browser->setRect( htmlRect ); web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); reshape( getRect().getWidth(), getRect().getHeight(), 1 ); updateGridCombo(); childSetVisible("create_new_account_text", !gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()); childSetVisible("forgot_password_text", !gHippoGridManager->getConnectedGrid()->getPasswordUrl().empty()); loadLoginPage(); #if !USE_VIEWER_AUTH // Initialize visibility (and don't force visibility - use prefs) refreshLocation( false ); #endif }
void LLPanelPermissions::refresh() { LLStringUtil::format_map_t argsCurrency; argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLButton* BtnDeedToGroup = getChild<LLButton>("button deed"); if(BtnDeedToGroup) { std::string deedText; if (gSavedSettings.getWarning("DeedObject")) { deedText = getString("text deed continued"); } else { deedText = getString("text deed"); } BtnDeedToGroup->setLabelSelected(deedText); BtnDeedToGroup->setLabelUnselected(deedText); } BOOL root_selected = TRUE; LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); if(!nodep || 0 == object_count) { nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode(); object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); root_selected = FALSE; } //BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment(); //attachment_selected = false; LLViewerObject* objectp = NULL; if(nodep) objectp = nodep->getObject(); if(!nodep || !objectp)// || attachment_selected) { // ...nothing selected childSetEnabled("perm_modify",false); childSetText("perm_modify",LLStringUtil::null); childSetEnabled("Creator:",false); childSetText("Creator Name",LLStringUtil::null); childSetEnabled("Creator Name",false); childSetEnabled("button creator profile",false); childSetEnabled("Owner:",false); childSetText("Owner Name",LLStringUtil::null); childSetEnabled("Owner Name",false); childSetEnabled("button owner profile",false); childSetEnabled("Last Owner:",false); childSetText("Last Owner Name",LLStringUtil::null); childSetEnabled("Last Owner Name",false); childSetEnabled("button last owner profile",false); childSetEnabled("Group:",false); childSetText("Group Name",LLStringUtil::null); childSetEnabled("Group Name",false); childSetEnabled("button set group",false); childSetText("Object Name",LLStringUtil::null); childSetEnabled("Object Name",false); childSetEnabled("Name:",false); childSetText("Group Name",LLStringUtil::null); childSetEnabled("Group Name",false); childSetEnabled("Description:",false); childSetText("Object Description",LLStringUtil::null); childSetEnabled("Object Description",false); childSetEnabled("Permissions:",false); childSetValue("checkbox share with group",FALSE); childSetEnabled("checkbox share with group",false); childSetEnabled("button deed",false); childSetValue("checkbox allow everyone move",FALSE); childSetEnabled("checkbox allow everyone move",false); childSetValue("checkbox allow everyone copy",FALSE); childSetEnabled("checkbox allow everyone copy",false); //Next owner can: childSetEnabled("Next owner can:",false); childSetValue("checkbox next owner can modify",FALSE); childSetEnabled("checkbox next owner can modify",false); childSetValue("checkbox next owner can copy",FALSE); childSetEnabled("checkbox next owner can copy",false); childSetValue("checkbox next owner can transfer",FALSE); childSetEnabled("checkbox next owner can transfer",false); //checkbox for sale childSetValue("checkbox for sale",FALSE); childSetEnabled("checkbox for sale",false); //checkbox include in search childSetValue("search_check", FALSE); childSetEnabled("search_check", false); LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type"); if(RadioSaleType) { RadioSaleType->setSelectedIndex(-1); RadioSaleType->setEnabled(FALSE); } childSetEnabled("Cost",false); childSetText("Cost", getString("Cost Default", argsCurrency)); childSetText("Edit Cost",LLStringUtil::null); childSetEnabled("Edit Cost",false); childSetEnabled("label click action",false); LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); if(ComboClickAction) { ComboClickAction->setEnabled(FALSE); ComboClickAction->clear(); } childSetVisible("B:",false); childSetVisible("O:",false); childSetVisible("G:",false); childSetVisible("E:",false); childSetVisible("N:",false); childSetVisible("F:",false); return; } // figure out a few variables BOOL is_one_object = (object_count == 1); // BUG: fails if a root and non-root are both single-selected. BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); const LLView* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = { getString("text modify info 1"), getString("text modify info 2"), getString("text modify info 3"), getString("text modify info 4") }; if(!is_perm_modify) { string_index += 2; } if(!is_one_object) { ++string_index; } childSetEnabled("perm_modify",true); childSetText("perm_modify",MODIFY_INFO_STRINGS[string_index]); childSetEnabled("Permissions:",true); // Update creator text field childSetEnabled("Creator:",true); BOOL creators_identical; std::string creator_name; creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); childSetText("Creator Name",creator_name); childSetEnabled("Creator Name",TRUE); childSetEnabled("button creator profile", creators_identical && mCreatorID.notNull() ); // Update owner text field childSetEnabled("Owner:",true); BOOL owners_identical; std::string owner_name; owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); // llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; std::string last_owner_name; LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); if (mOwnerID.isNull()) { if(LLSelectMgr::getInstance()->selectIsGroupOwned()) { // Group owned already displayed by selectGetOwner } else { // Display last owner if public //std::string last_owner_name; //LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); // It should never happen that the last owner is null and the owner // is null, but it seems to be a bug in the simulator right now. JC if (!mLastOwnerID.isNull() && !last_owner_name.empty()) { owner_name.append(", last "); owner_name.append( last_owner_name ); } } } // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) bool fRlvEnableOwner = true; if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) { // Only filter the owner name if: the selection is all owned by the same avie and not group owned if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) ) { owner_name = gRlvHandler.getAnonym(owner_name); fRlvEnableOwner = false; } } // [/RLVa:KB] childSetText("Owner Name",owner_name); childSetEnabled("Owner Name",TRUE); // childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) childSetEnabled("button owner profile", fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); // [/RLVa:KB] //if (owner_name != last_owner_name) // [RLVa:KB] if ( (owner_name != last_owner_name) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) // [/RLVa:KB] { childSetEnabled("Last Owner:", TRUE); childSetText("Last Owner Name", last_owner_name); childSetEnabled("Last Owner Name", TRUE); childSetEnabled("button last owner profile", TRUE); } else { childSetEnabled("Last Owner:", FALSE); childSetText("Last Owner Name", LLStringUtil::null); childSetEnabled("Last Owner Name", FALSE); childSetEnabled("button last owner profile", FALSE); } // update group text field childSetEnabled("Group:",true); childSetText("Group Name",LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { if(mLabelGroupName) { mLabelGroupName->setNameID(group_id, TRUE); mLabelGroupName->setEnabled(TRUE); } } else { if(mLabelGroupName) { mLabelGroupName->setNameID(LLUUID::null, TRUE); mLabelGroupName->refresh(LLUUID::null, LLStringUtil::null, LLStringUtil::null, TRUE); mLabelGroupName->setEnabled(FALSE); } } childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID())); // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; if(is_one_object && objectp->permModify()) { edit_name_desc = TRUE; } childSetEnabled("Name:",true); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); childSetEnabled("Description:",true); LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); if(is_one_object) { if(keyboard_focus_view != LineEditorObjectName) { childSetText("Object Name",nodep->mName); } if(LineEditorObjectDesc) { if(keyboard_focus_view != LineEditorObjectDesc) { LineEditorObjectDesc->setText(nodep->mDescription); } } } else { childSetText("Object Name",LLStringUtil::null); LineEditorObjectDesc->setText(LLStringUtil::null); } if(edit_name_desc) { childSetEnabled("Object Name",true); childSetEnabled("Object Description",true); } else { childSetEnabled("Object Name",false); childSetEnabled("Object Description",false); } S32 total_sale_price = 0; S32 individual_sale_price = 0; BOOL is_for_sale_mixed = FALSE; BOOL is_sale_price_mixed = FALSE; U32 num_for_sale = FALSE; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, is_for_sale_mixed, is_sale_price_mixed, total_sale_price, individual_sale_price); const BOOL self_owned = (gAgent.getID() == mOwnerID); const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); if(!owners_identical) { childSetEnabled("Cost",false); childSetText("Edit Cost",LLStringUtil::null); childSetEnabled("Edit Cost",false); } // You own these objects. else if(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) { // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { childSetText("Cost",getString("Cost Per Unit", argsCurrency)); } else { childSetText("Cost",getString("Cost Default", argsCurrency)); } LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost"); if(keyboard_focus_view != editPrice) { // If the sale price is mixed then set the cost to MIXED, otherwise // set to the actual cost. if (num_for_sale > 0 && is_for_sale_mixed) { childSetText("Edit Cost",getString("Sale Mixed")); } else if (num_for_sale > 0 && is_sale_price_mixed) { childSetText("Edit Cost",getString("Cost Mixed")); } else { childSetText("Edit Cost",llformat("%d",individual_sale_price)); } } // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false; childSetEnabled("Cost",enable_edit); childSetEnabled("Edit Cost",enable_edit); } // Someone, not you, owns these objects. else if(!public_owned) { childSetEnabled("Cost",false); childSetEnabled("Edit Cost",false); // Don't show a price if none of the items are for sale. if (num_for_sale) childSetText("Edit Cost",llformat("%d",total_sale_price)); else childSetText("Edit Cost",LLStringUtil::null); // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) childSetText("Cost", getString("Cost Total", argsCurrency)); else childSetText("Cost", getString("Cost Default", argsCurrency)); } // This is a public object. else { childSetEnabled("Cost",false); childSetText("Cost", getString("Cost Default", argsCurrency)); childSetText("Edit Cost",LLStringUtil::null); childSetEnabled("Edit Cost",false); } // Enable and disable the permissions checkboxes // based on who owns the object. // TODO: Creator permissions BOOL valid_base_perms = FALSE; BOOL valid_owner_perms = FALSE; BOOL valid_group_perms = FALSE; BOOL valid_everyone_perms = FALSE; BOOL valid_next_perms = FALSE; U32 base_mask_on; U32 base_mask_off; U32 owner_mask_on; U32 owner_mask_off; U32 group_mask_on; U32 group_mask_off; U32 everyone_mask_on; U32 everyone_mask_off; U32 next_owner_mask_on = 0; U32 next_owner_mask_off = 0; valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, &base_mask_on, &base_mask_off); valid_owner_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, &group_mask_on, &group_mask_off); valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, &everyone_mask_on, &everyone_mask_off); valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, &next_owner_mask_on, &next_owner_mask_off); if( gSavedSettings.getBOOL("DebugPermissions") ) { std::string perm_string; if (valid_base_perms) { perm_string = "B: "; perm_string += mask_to_string(base_mask_on); childSetText("B:",perm_string); childSetVisible("B:",true); perm_string = "O: "; perm_string += mask_to_string(owner_mask_on); childSetText("O:",perm_string); childSetVisible("O:",true); perm_string = "G: "; perm_string += mask_to_string(group_mask_on); childSetText("G:",perm_string); childSetVisible("G:",true); perm_string = "E: "; perm_string += mask_to_string(everyone_mask_on); childSetText("E:",perm_string); childSetVisible("E:",true); perm_string = "N: "; perm_string += mask_to_string(next_owner_mask_on); childSetText("N:",perm_string); childSetVisible("N:",true); } perm_string = "F: "; U32 flag_mask = 0x0; if (objectp->permMove()) flag_mask |= PERM_MOVE; if (objectp->permModify()) flag_mask |= PERM_MODIFY; if (objectp->permCopy()) flag_mask |= PERM_COPY; if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; perm_string += mask_to_string(flag_mask); childSetText("F:",perm_string); childSetVisible("F:",true); } else { childSetVisible("B:",false); childSetVisible("O:",false); childSetVisible("G:",false); childSetVisible("E:",false); childSetVisible("N:",false); childSetVisible("F:",false); } bool has_change_perm_ability = false; bool has_change_sale_ability = false; if(valid_base_perms && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = true; } if(valid_base_perms && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = true; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) { // ...must select root to choose permissions childSetValue("perm_modify", getString("text modify warning")); } if (has_change_perm_ability) { childSetEnabled("checkbox share with group",true); childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE); childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { childSetEnabled("checkbox share with group", FALSE); childSetEnabled("checkbox allow everyone move", FALSE); childSetEnabled("checkbox allow everyone copy", FALSE); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); // Set the checkbox to tentative if the prices of each object selected // are not the same. childSetTentative("checkbox for sale", is_for_sale_mixed); childSetEnabled("sale type",num_for_sale && can_transfer && !is_sale_price_mixed); childSetEnabled("Next owner can:", TRUE); childSetEnabled("checkbox next owner can modify",base_mask_on & PERM_MODIFY); childSetEnabled("checkbox next owner can copy",base_mask_on & PERM_COPY); childSetEnabled("checkbox next owner can transfer",next_owner_mask_on & PERM_COPY); } else { childSetEnabled("checkbox for sale",FALSE); childSetEnabled("sale type",FALSE); childSetEnabled("Next owner can:",FALSE); childSetEnabled("checkbox next owner can modify",FALSE); childSetEnabled("checkbox next owner can copy",FALSE); childSetEnabled("checkbox next owner can transfer",FALSE); } if(valid_group_perms) { if((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { childSetValue("checkbox share with group",TRUE); childSetTentative("checkbox share with group",FALSE); childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } else if((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { childSetValue("checkbox share with group",FALSE); childSetTentative("checkbox share with group",false); childSetEnabled("button deed",false); } else { childSetValue("checkbox share with group",TRUE); childSetTentative("checkbox share with group",true); childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } if(valid_everyone_perms) { // Move if(everyone_mask_on & PERM_MOVE) { childSetValue("checkbox allow everyone move",TRUE); childSetTentative("checkbox allow everyone move",false); } else if(everyone_mask_off & PERM_MOVE) { childSetValue("checkbox allow everyone move",FALSE); childSetTentative("checkbox allow everyone move",false); } else { childSetValue("checkbox allow everyone move",TRUE); childSetTentative("checkbox allow everyone move",true); } // Copy == everyone can't copy if(everyone_mask_on & PERM_COPY) { childSetValue("checkbox allow everyone copy",TRUE); childSetTentative("checkbox allow everyone copy",!can_copy || !can_transfer); } else if(everyone_mask_off & PERM_COPY) { childSetValue("checkbox allow everyone copy",FALSE); childSetTentative("checkbox allow everyone copy",false); } else { childSetValue("checkbox allow everyone copy",TRUE); childSetTentative("checkbox allow everyone copy",true); } } if(valid_next_perms) { // Modify == next owner canot modify if(next_owner_mask_on & PERM_MODIFY) { childSetValue("checkbox next owner can modify",TRUE); childSetTentative("checkbox next owner can modify",false); } else if(next_owner_mask_off & PERM_MODIFY) { childSetValue("checkbox next owner can modify",FALSE); childSetTentative("checkbox next owner can modify",false); } else { childSetValue("checkbox next owner can modify",TRUE); childSetTentative("checkbox next owner can modify",true); } // Copy == next owner cannot copy if(next_owner_mask_on & PERM_COPY) { childSetValue("checkbox next owner can copy",TRUE); childSetTentative("checkbox next owner can copy",!can_copy); } else if(next_owner_mask_off & PERM_COPY) { childSetValue("checkbox next owner can copy",FALSE); childSetTentative("checkbox next owner can copy",FALSE); } else { childSetValue("checkbox next owner can copy",TRUE); childSetTentative("checkbox next owner can copy",TRUE); } // Transfer == next owner cannot transfer if(next_owner_mask_on & PERM_TRANSFER) { childSetValue("checkbox next owner can transfer",TRUE); childSetTentative("checkbox next owner can transfer",!can_transfer); } else if(next_owner_mask_off & PERM_TRANSFER) { childSetValue("checkbox next owner can transfer",FALSE); childSetTentative("checkbox next owner can transfer",FALSE); } else { childSetValue("checkbox next owner can transfer",TRUE); childSetTentative("checkbox next owner can transfer",TRUE); } } // reflect sale information LLSaleInfo sale_info; BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type"); if(RadioSaleType) { if (valid_sale_info) { RadioSaleType->setSelectedIndex((S32)sale_type - 1); RadioSaleType->setTentative(FALSE); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest RadioSaleType->setSelectedIndex((S32)LLSaleInfo::FS_COPY - 1); RadioSaleType->setTentative(TRUE); // unfortunately this doesn't do anything at the moment. } } childSetValue("checkbox for sale", num_for_sale != 0); // HACK: There are some old objects in world that are set for sale, // but are no-transfer. We need to let users turn for-sale off, but only // if for-sale is set. bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY); if (num_for_sale && has_change_sale_ability && cannot_actually_sell) { childSetEnabled("checkbox for sale", true); } // Check search status of objects BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); childSetEnabled("search_check", has_change_sale_ability && all_volume); childSetValue("search_check", include_in_search); childSetTentative("search_check", ! all_include_in_search); // Click action (touch, sit, buy) U8 click_action = 0; if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action)) { LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); if(ComboClickAction) { ComboClickAction->setCurrentByIndex((S32)click_action); } } childSetEnabled("label click action",is_perm_modify && all_volume); childSetEnabled("clickaction",is_perm_modify && all_volume); }
void LLPrefsAscentSysImpl::refresh() { //General ----------------------------------------------------------------------------- childSetValue("double_click_teleport_check", mDoubleClickTeleport); childSetValue("center_after_teleport_check", mResetCameraAfterTP); childSetValue("offset_teleport_check", mOffsetTPByUserHeight); childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld); childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono); childSetValue("always_rez_in_group_check", mAlwaysRezInGroup); //Disable Teleport Progress //Disable Logout progress //always show Build childSetValue("always_fly_check", mAlwaysShowFly); //Disable camera minimum distance //Chat -------------------------------------------------------------------------------- childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat); childSetValue("play_typing_sound_check", mPlayTypingSound); childSetValue("hide_typing_check", mHideTypingNotification); childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); childSetValue("allow_mu_pose_check", mEnableMUPose); childSetValue("close_ooc_check", mEnableOOCAutoClose); LLRadioGroup* radioLinkOptions = getChild<LLRadioGroup>("objects_link"); radioLinkOptions->selectNthItem(mLinksForChattingObjects); //childSetValue("objects_link", mLinksForChattingObjects); std::string format = gSavedSettings.getString("ShortTimeFormat"); if (format.find("%p") == -1) { mTimeFormat = 0; } else { mTimeFormat = 1; } format = gSavedSettings.getString("ShortDateFormat"); if (format.find("%m/%d/%") != -1) { mDateFormat = 2; } else if (format.find("%d/%m/%") != -1) { mDateFormat = 1; } else { mDateFormat = 0; } // time format combobox LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); if (combo) { combo->setCurrentByIndex(mTimeFormat); } // date format combobox combo = getChild<LLComboBox>("date_format_combobox"); if (combo) { combo->setCurrentByIndex(mDateFormat); } childSetValue("seconds_in_chat_and_ims_check", mEnableOOCAutoClose); //Save Performance -------------------------------------------------------------------- childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin); childSetValue("enable_wind", mEnableLLWind); childSetValue("enable_clouds", mEnableClouds); childSetValue("speed_rez_check", mSpeedRez); if (mSpeedRez) { childEnable("speed_rez_interval"); childEnable("speed_rez_seconds"); } else { childDisable("speed_rez_interval"); childDisable("speed_rez_seconds"); } //Command Line ------------------------------------------------------------------------ //Privacy ----------------------------------------------------------------------------- childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects); childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam); childSetValue("private_look_at_check", mPrivateLookAt); childSetValue("show_look_at_check", mShowLookAt); childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp); }
// Update controls based on current settings void LLPrefsAscentChat::refresh() { //Chat -------------------------------------------------------------------------------- // time format combobox LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); if (combo) { combo->setCurrentByIndex(mTimeFormat); } // date format combobox combo = getChild<LLComboBox>("date_format_combobox"); if (combo) { combo->setCurrentByIndex(mDateFormat); } childSetValue("AscentInstantMessageResponseAnyone", mIMResponseAnyone); childSetValue("AscentInstantMessageResponseFriends", mIMResponseFriends); childSetValue("AscentInstantMessageResponseMuted", mIMResponseMuted); childSetValue("AscentInstantMessageShowOnTyping", mIMShowOnTyping); childSetValue("AscentInstantMessageShowResponded", mIMShowResponded); childSetValue("AscentInstantMessageResponseRepeat", mIMResponseRepeat); childSetValue("AscentInstantMessageResponseItem", mIMResponseItem); LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); LLWStringUtil::replaceChar(auto_response, '^', '\n'); LLWStringUtil::replaceChar(auto_response, '%', ' '); childSetText("im_response", wstring_to_utf8str(auto_response)); //Text Options ------------------------------------------------------------------------ combo = getChild<LLComboBox>("SpellBase"); if (combo != NULL) { combo->removeall(); std::vector<std::string> names = glggHunSpell->getDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(gSavedSettings.getString("SpellBase")); } combo = getChild<LLComboBox>("EmSpell_Avail"); if (combo != NULL) { combo->removeall(); combo->add(""); std::vector<std::string> names = glggHunSpell->getAvailDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(std::string("")); } combo = getChild<LLComboBox>("EmSpell_Installed"); if (combo != NULL) { combo->removeall(); combo->add(""); std::vector<std::string> names = glggHunSpell->getInstalledDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(std::string("")); } childSetEnabled("KeywordsList", mKeywordsOn); childSetEnabled("KeywordsInChat", mKeywordsOn); childSetEnabled("KeywordsInIM", mKeywordsOn); childSetEnabled("KeywordsChangeColor", mKeywordsOn); childSetEnabled("KeywordsColor", mKeywordsOn); childSetEnabled("KeywordsPlaySound", mKeywordsOn); childSetEnabled("KeywordsSound", mKeywordsOn); childSetValue("KeywordsOn", mKeywordsOn); childSetValue("KeywordsList", mKeywordsList); childSetValue("KeywordsInChat", mKeywordsInChat); childSetValue("KeywordsInIM", mKeywordsInIM); childSetValue("KeywordsChangeColor", mKeywordsChangeColor); LLColorSwatchCtrl* colorctrl = getChild<LLColorSwatchCtrl>("KeywordsColor"); colorctrl->set(LLColor4(mKeywordsColor),TRUE); childSetValue("KeywordsPlaySound", mKeywordsPlaySound); childSetValue("KeywordsSound", mKeywordsSound); }
BOOL LLPanelGeneral::postBuild() { LLComboBox* fade_out_combobox = getChild<LLComboBox>("fade_out_combobox"); fade_out_combobox->setCurrentByIndex(gSavedSettings.getS32("RenderName")); LLComboBox* combo = getChild<LLComboBox>("default_location_combo"); childSetCommitCallback("default_location_combo", onLocationChanged, this); combo->setAllowTextEntry(TRUE, 128, FALSE); // The XML file loads the combo with the following labels: // 0 - "My Home" // 1 - "My Last Location" // 2 - "<Type region name>" BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { // Replace "<Type region name>" with this region name combo->remove(2); combo->add( sim_string ); combo->setTextEntry(sim_string); combo->setCurrentByIndex( 2 ); } else if (login_last) { combo->setCurrentByIndex( 1 ); } else { combo->setCurrentByIndex( 0 ); } childSetValue("show_location_checkbox", gSavedSettings.getBOOL("ShowStartLocation")); childSetValue("show_all_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitleAll")); childSetValue("show_my_name_checkbox", gSavedSettings.getBOOL("RenderNameHideSelf")); childSetValue("large_avatar_names_checkbox", !gSavedSettings.getBOOL("SmallAvatarNames")); childSetValue("highlight_friends_checkbox", gSavedSettings.getBOOL("HighlightFriends")); //childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); -- MC childSetEnabled("afk_timeout_spinner", gSavedSettings.getBOOL("AllowIdleAFK")); childSetValue("afk_timeout_spinner", llround(gSavedSettings.getF32("AFKTimeout") / 60)); // User enters minutes, we store as seconds -- MC childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); childSetCommitCallback("afk_timeout_checkbox", onCommitAFKCheckbox, this); childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange")); childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange")); // mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage"); // mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends"); LLComboBox* time_combobox = getChild<LLComboBox>("time_combobox"); time_combobox->setCurrentByIndex(gSavedSettings.getU32("TimeFormat")); childSetValue("language_combobox", gSavedSettings.getString("Language")); // if we have no agent, we can't let them choose anything // if we have an agent, then we only let them choose if they have a choice bool can_choose = gAgent.getID().notNull() && (gAgent.isMature() || gAgent.isGodlike()); if (can_choose) { // if they're not adult or a god, they shouldn't see the adult selection, so delete it if (!gAgent.isAdult() && !gAgent.isGodlike()) { LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox"); // we're going to remove the adult entry from the combo. This obviously depends // on the order of items in the XML file, but there doesn't seem to be a reasonable // way to depend on the field in XML called 'name'. maturity_combo->remove(0); } } U32 preferred_maturity = gSavedSettings.getU32("PreferredMaturity"); childSetValue("maturity_desired_combobox", int(preferred_maturity)); std::string selected_item_label = getChild<LLComboBox>("maturity_desired_combobox")->getSelectedItemLabel(); childSetValue("maturity_desired_textbox", selected_item_label); childSetVisible("maturity_desired_combobox", can_choose); childSetVisible("maturity_desired_textbox", !can_choose); childSetAction("grid_btn", onClickGrid, this); return TRUE; }
//static void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data) { LLComboBox* self = (LLComboBox*)user_data; if (self->mTextEntryCallback) { (*self->mTextEntryCallback)(line_editor, self->mCallbackUserData); } KEY key = gKeyboard->currentKey(); if (key == KEY_BACKSPACE || key == KEY_DELETE) { if (self->mList->selectItemByLabel(line_editor->getText(), FALSE)) { line_editor->setTentative(FALSE); } else { if (!self->mSuppressTentative) line_editor->setTentative(self->mTextEntryTentative); self->mList->deselectAllItems(); } return; } if (key == KEY_LEFT || key == KEY_RIGHT) { return; } if (key == KEY_DOWN) { self->setCurrentByIndex(llmin(self->getItemCount() - 1, self->getCurrentIndex() + 1)); if (!self->mList->getVisible()) { if( self->mPrearrangeCallback ) { self->mPrearrangeCallback( self, self->mCallbackUserData ); } if (self->mList->getItemCount() != 0) { self->showList(); } } line_editor->selectAll(); line_editor->setTentative(FALSE); } else if (key == KEY_UP) { self->setCurrentByIndex(llmax(0, self->getCurrentIndex() - 1)); if (!self->mList->getVisible()) { if( self->mPrearrangeCallback ) { self->mPrearrangeCallback( self, self->mCallbackUserData ); } if (self->mList->getItemCount() != 0) { self->showList(); } } line_editor->selectAll(); line_editor->setTentative(FALSE); } else { // RN: presumably text entry self->updateSelection(); } }
// virtual BOOL LLPreviewTexture::postBuild() { if (mCopyToInv) { getChild<LLButton>("Keep")->setLabel(getString("Copy")); childSetAction("Keep",LLPreview::onBtnCopyToInv,this); getChildView("Discard")->setVisible( false); } else if (mShowKeepDiscard) { childSetAction("Keep",onKeepBtn,this); childSetAction("Discard",onDiscardBtn,this); } else { getChildView("Keep")->setVisible( false); getChildView("Discard")->setVisible( false); } childSetCommitCallback("save_tex_btn", onSaveAsBtn, this); getChildView("save_tex_btn")->setVisible(canSaveAs()); // Ansariel: No need to show the save button if we can't save anyway getChildView("save_tex_btn")->setEnabled(canSaveAs()); if (!mCopyToInv) { const LLInventoryItem* item = getItem(); if (item) { childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLUICtrl>("desc")->setValue(item->getDescription()); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); } } // Fill in ratios list with common aspect ratio values mRatiosList.clear(); mRatiosList.push_back(LLTrans::getString("Unconstrained")); mRatiosList.push_back("1:1"); mRatiosList.push_back("4:3"); mRatiosList.push_back("10:7"); mRatiosList.push_back("3:2"); mRatiosList.push_back("16:10"); mRatiosList.push_back("16:9"); mRatiosList.push_back("2:1"); // Now fill combo box with provided list LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); combo->removeall(); for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it) { combo->add(*it); } childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); combo->setCurrentByIndex(0); // <FS:Techwolf Lupindo> texture comment metadata reader getChild<LLButton>("openprofile")->setClickedCallback(boost::bind(&LLPreviewTexture::onButtonClickProfile, this)); getChild<LLButton>("copyuuid")->setClickedCallback(boost::bind(&LLPreviewTexture::onButtonClickUUID, this)); mUploaderDateTime = getString("UploaderDateTime"); // </FS:Techwolf Lupindo> // <FS:Ansariel> AnsaStorm skin: Need to disable line editors from // code or the floater would be dragged around if // trying to mark text if (findChild<LLLineEditor>("uploader")) { getChild<LLLineEditor>("uploader")->setEnabled(FALSE); getChild<LLLineEditor>("upload_time")->setEnabled(FALSE); getChild<LLLineEditor>("uuid")->setEnabled(FALSE); } // </FS:Ansariel> // <FS:Ansariel> Performance improvement mDimensionsCtrl = getChild<LLUICtrl>("dimensions"); return LLPreview::postBuild(); }
void LLPreviewTexture::init() { sInstance = this; LLUICtrlFactory::getInstance()->buildFloater(sInstance,"floater_preview_texture.xml"); childSetVisible("desc", !mCopyToInv); // Hide description field for embedded textures childSetVisible("desc txt", !mCopyToInv); childSetVisible("Copy To Inventory", mCopyToInv); childSetVisible("Keep", mShowKeepDiscard); childSetVisible("Discard", mShowKeepDiscard); childSetAction("openprofile", onClickProfile, this); if (mCopyToInv) { childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this); } else if (mShowKeepDiscard) { childSetAction("Keep",onKeepBtn,this); childSetAction("Discard",onDiscardBtn,this); } else { // If the buttons are hidden move stuff down to use the space. LLRect keep_rect, old_rect, new_rect; S32 diff; childGetRect("Keep", keep_rect); childGetRect("combo_aspect_ratio", old_rect); diff = old_rect.mBottom - keep_rect.mBottom; new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff, old_rect.getWidth(), old_rect.getHeight()); childSetRect("combo_aspect_ratio", new_rect); childGetRect("aspect_ratio", old_rect); new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff, old_rect.getWidth(), old_rect.getHeight()); childSetRect("aspect_ratio", new_rect); childGetRect("dimensions", old_rect); new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff, old_rect.getWidth(), old_rect.getHeight()); childSetRect("dimensions", new_rect); } if (!mCopyToInv) { const LLInventoryItem* item = getItem(); if (item) { childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); } } childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); combo->setCurrentByIndex(0); }
void LLPrefsAscentSysImpl::refresh() { //General ----------------------------------------------------------------------------- childSetValue("double_click_teleport_check", mDoubleClickTeleport); childSetValue("center_after_teleport_check", mResetCameraAfterTP); childSetEnabled("center_after_teleport_check", mDoubleClickTeleport); childSetValue("offset_teleport_check", mOffsetTPByUserHeight); childSetEnabled("offset_teleport_check", mDoubleClickTeleport); childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld); childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono); childSetValue("always_rez_in_group_check", mAlwaysRezInGroup); //Disable Teleport Progress //Disable Logout progress //always show Build childSetValue("always_fly_check", mAlwaysShowFly); //Disable camera minimum distance childSetValue("power_user_check", mPowerUser); childSetValue("power_user_confirm_check", mPowerUser); childSetValue("system_folder_check", mUseSystemFolder); childSetValue("temp_in_system_check", mUploadToSystem); childSetEnabled("temp_in_system_check", mUseSystemFolder); //Chat -------------------------------------------------------------------------------- childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat); childSetValue("play_typing_sound_check", mPlayTypingSound); childSetValue("hide_typing_check", mHideTypingNotification); childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); childSetValue("allow_mu_pose_check", mEnableMUPose); childSetValue("close_ooc_check", mEnableOOCAutoClose); LLRadioGroup* radioLinkOptions = getChild<LLRadioGroup>("objects_link"); radioLinkOptions->selectNthItem(mLinksForChattingObjects); //childSetValue("objects_link", mLinksForChattingObjects); std::string format = gSavedSettings.getString("ShortTimeFormat"); if (format.find("%p") == -1) { mTimeFormat = 0; } else { mTimeFormat = 1; } format = gSavedSettings.getString("ShortDateFormat"); if (format.find("%m/%d/%") != -1) { mDateFormat = 2; } else if (format.find("%d/%m/%") != -1) { mDateFormat = 1; } else { mDateFormat = 0; } // time format combobox LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); if (combo) { combo->setCurrentByIndex(mTimeFormat); } // date format combobox combo = getChild<LLComboBox>("date_format_combobox"); if (combo) { combo->setCurrentByIndex(mDateFormat); } childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); LLWStringUtil::replaceChar(auto_response, '^', '\n'); LLWStringUtil::replaceChar(auto_response, '%', ' '); childSetText("im_response", wstring_to_utf8str(auto_response)); childSetValue("AscentInstantMessageResponseFriends", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends")); childSetValue("AscentInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted")); childSetValue("AscentInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone")); childSetValue("AscentInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded")); childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")); childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat" )); childSetValue("AscentInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem")); //Save Performance -------------------------------------------------------------------- childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin); childSetValue("enable_wind", mEnableLLWind); childSetValue("enable_clouds", mEnableClouds); childSetValue("enable_classic_clouds", mEnableClassicClouds); gLLWindEnabled = mEnableLLWind; childSetValue("speed_rez_check", mSpeedRez); childSetEnabled("speed_rez_interval", mSpeedRez); childSetEnabled("speed_rez_seconds", mSpeedRez); //Command Line ------------------------------------------------------------------------ //Privacy ----------------------------------------------------------------------------- childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects); childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam); childSetValue("private_look_at_check", mPrivateLookAt); childSetValue("show_look_at_check", mShowLookAt); childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp); childSetValue("disable_click_sit_check", mDisableClickSit); }
//--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- LLPanelLogin::LLPanelLogin(const LLRect &rect, BOOL show_server, void (*callback)(S32 option, void* user_data), void *cb_data) : LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE), // not bordered mLogoImage(), mCallback(callback), mCallbackData(cb_data), mHtmlAvailable( TRUE ) { setFocusRoot(TRUE); setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); // instance management if (LLPanelLogin::sInstance) { llwarns << "Duplicate instance of login view deleted" << llendl; delete LLPanelLogin::sInstance; // Don't leave bad pointer in gFocusMgr gFocusMgr.setDefaultKeyboardFocus(NULL); } LLPanelLogin::sInstance = this; // add to front so we are the bottom-most child gViewerWindow->getRootView()->addChildAtEnd(this); // Logo mLogoImage = LLUI::getUIImage("startup_logo.j2c"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); #if USE_VIEWER_AUTH //leave room for the login menu bar setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); #endif reshape(rect.getWidth(), rect.getHeight()); #if !USE_VIEWER_AUTH childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace); childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); LLComboBox* name_combo = getChild<LLComboBox>("name_combo"); // Only works as intended with this combination of flags, // and in this order of setting them, therefore overriding xui name_combo->setAllowTextEntry(TRUE); name_combo->setTextEntryVisible(FALSE); // Send it down the line, or the invisible text entry covers up our normal // input fields if placed after them in xui sendChildToBack(getChildView("name_combo")); bool mru_enabled = gSavedSettings.getBOOL("LoginMRUEnabled"); if (mru_enabled) { LLSD name_list = gSavedSettings.getLLSD("LoginMRUList"); if (name_list.isArray()) { for (LLSD::array_iterator iter = name_list.endArray() - 1; iter >= name_list.beginArray(); --iter) { if (iter->isMap() && iter->has("first") && iter->has("last")) { name_combo->add((*iter)["first"].asString() + " " + (*iter)["last"].asString(), *iter); } } } childSetCommitCallback("name_combo", onSelectLoginMRU, this); } setLoginMRUEnabled(mru_enabled); childSetCommitCallback("password_edit", mungePassword); childSetKeystrokeCallback("password_edit", onPassKey, this); childSetUserData("password_edit", this); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); LLLineEditor* edit = getChild<LLLineEditor>("password_edit"); if (edit) edit->setDrawAsterixes(TRUE); LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); combo->setAllowTextEntry(TRUE, 128, FALSE); // The XML file loads the combo with the following labels: // 0 - "My Home" // 1 - "My Last Location" // 2 - "<Type region name>" BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { // Replace "<Type region name>" with this region name combo->remove(2); combo->add( sim_string ); combo->setTextEntry(sim_string); combo->setCurrentByIndex( 2 ); } else if (login_last) { combo->setCurrentByIndex( 1 ); } else { combo->setCurrentByIndex( 0 ); } combo->setCommitCallback( &set_start_location ); LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer); server_choice_combo->setFocusLostCallback(onServerComboLostFocus); childSetAction("connect_btn", onClickConnect, this); setDefaultBtn("connect_btn"); // childSetAction("quit_btn", onClickQuit, this); std::string channel = llformat("(%s)", DX_CHANNEL ); // Kirsten uses version Viewer headers not saved settings! for channel info. std::string version = llformat("%d.%d.%d (%d)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD ); LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[VERSION]", version); channel_text->setClickedCallback(onClickVersion); channel_text->setCallbackUserData(this); LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword); LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount); #endif // get the web browser control LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("login_html"); // Need to handle login secondlife:///app/ URLs web_browser->setTrusted( true ); // observe browser events web_browser->addObserver( this ); // don't make it a tab stop until SL-27594 is fixed web_browser->setTabStop(FALSE); web_browser->navigateToLocalPage( "loading", "loading.html" ); // make links open in external browser web_browser->setOpenInExternalBrowser( true ); // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through) LLRect htmlRect = getRect(); #if USE_VIEWER_AUTH htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY(), getRect().getWidth() + 6, getRect().getHeight()); #else htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY() + 40, getRect().getWidth() + 6, getRect().getHeight() - 78 ); #endif web_browser->setRect( htmlRect ); web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); reshape( getRect().getWidth(), getRect().getHeight(), 1 ); // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); std::string login_page = gSavedSettings.getString("LoginPage"); if (login_page.empty()) { login_page = getString( "real_url" ); } LLHTTPClient::head( login_page, gResponsePtr ); #if !USE_VIEWER_AUTH // Initialize visibility (and don't force visibility - use prefs) refreshLocation( false ); #endif }
// Update controls based on current settings void LLPrefsAscentChat::refresh() { //Chat -------------------------------------------------------------------------------- // time format combobox LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); if (combo) { combo->setCurrentByIndex(mTimeFormat); } // date format combobox combo = getChild<LLComboBox>("date_format_combobox"); if (combo) { combo->setCurrentByIndex(mDateFormat); } //Antispam ------------------------------------------------------------------------ // sensitivity tuners childSetEnabled("spammsg_checkbox", mEnableAS); childSetEnabled("antispamtime", mEnableAS); childSetEnabled("antispamamount", mEnableAS); childSetEnabled("antispamsoundmulti", mEnableAS); childSetEnabled("antispamsoundpreloadmulti", mEnableAS); childSetEnabled("antispamnewlines", mEnableAS); childSetEnabled("Notify On Spam", mEnableAS); // dialog blocking tuners childSetEnabled("Block All Dialogs From", !mBlockDialogSpam); childSetEnabled("Alerts", !mBlockDialogSpam); childSetEnabled("Friendship Offers", !mBlockDialogSpam); childSetEnabled("Group Invites", !mBlockDialogSpam); childSetEnabled("Group Fee Invites", !mBlockDialogSpam && !mBlockGroupInviteSpam); childSetEnabled("Group Notices", !mBlockDialogSpam); childSetEnabled("Item Offers", !mBlockDialogSpam); childSetEnabled("Scripts", !mBlockDialogSpam); childSetEnabled("Teleport Offers", !mBlockDialogSpam); //Text Options ------------------------------------------------------------------------ combo = getChild<LLComboBox>("SpellBase"); if (combo != NULL) { combo->removeall(); std::vector<std::string> names = glggHunSpell->getDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(gSavedSettings.getString("SpellBase")); } combo = getChild<LLComboBox>("EmSpell_Avail"); if (combo != NULL) { combo->removeall(); combo->add(""); std::vector<std::string> names = glggHunSpell->getAvailDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(std::string("")); } combo = getChild<LLComboBox>("EmSpell_Installed"); if (combo != NULL) { combo->removeall(); combo->add(""); std::vector<std::string> names = glggHunSpell->getInstalledDicts(); for (int i = 0; i < (int)names.size(); i++) { combo->add(names[i]); } combo->setSimple(std::string("")); } childSetEnabled("KeywordsList", mKeywordsOn); childSetEnabled("KeywordsInChat", mKeywordsOn); childSetEnabled("KeywordsInIM", mKeywordsOn); childSetEnabled("KeywordsChangeColor", mKeywordsOn); childSetEnabled("KeywordsColor", mKeywordsOn); childSetEnabled("KeywordsPlaySound", mKeywordsOn); childSetEnabled("KeywordsSound", mKeywordsOn); childSetValue("KeywordsOn", mKeywordsOn); childSetValue("KeywordsList", mKeywordsList); childSetValue("KeywordsInChat", mKeywordsInChat); childSetValue("KeywordsInIM", mKeywordsInIM); childSetValue("KeywordsChangeColor", mKeywordsChangeColor); LLColorSwatchCtrl* colorctrl = getChild<LLColorSwatchCtrl>("KeywordsColor"); colorctrl->set(LLColor4(mKeywordsColor),TRUE); childSetValue("KeywordsPlaySound", mKeywordsPlaySound); childSetValue("KeywordsSound", mKeywordsSound); }
//--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- LLPanelLogin::LLPanelLogin(const LLRect &rect, BOOL show_server, void (*callback)(S32 option, void* user_data), void *cb_data) : LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE), // not bordered mLogoImage(), mCallback(callback), mCallbackData(cb_data), mHtmlAvailable( TRUE ) { setFocusRoot(TRUE); setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); // instance management if (LLPanelLogin::sInstance) { llwarns << "Duplicate instance of login view deleted" << llendl; delete LLPanelLogin::sInstance; // Don't leave bad pointer in gFocusMgr gFocusMgr.setDefaultKeyboardFocus(NULL); } LLPanelLogin::sInstance = this; // add to front so we are the bottom-most child gViewerWindow->getRootView()->addChildAtEnd(this); // Logo mLogoImage = LLUI::getUIImage("startup_logo.j2c"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); #if USE_VIEWER_AUTH //leave room for the login menu bar setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); #endif reshape(rect.getWidth(), rect.getHeight()); #if !USE_VIEWER_AUTH childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace); childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); childSetCommitCallback("password_edit", mungePassword); childSetKeystrokeCallback("password_edit", onPassKey, this); childSetUserData("password_edit", this); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); LLLineEditor* edit = getChild<LLLineEditor>("password_edit"); if (edit) edit->setDrawAsterixes(TRUE); LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); combo->setAllowTextEntry(TRUE, 128, FALSE); // The XML file loads the combo with the following labels: // 0 - "My Home" // 1 - "My Last Location" // 2 - "<Type region name>" BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { // Replace "<Type region name>" with this region name combo->remove(2); combo->add( sim_string ); combo->setTextEntry(sim_string); combo->setCurrentByIndex( 2 ); } else if (login_last) { combo->setCurrentByIndex( 1 ); } else { combo->setCurrentByIndex( 0 ); } LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer); //server_choice_combo->setFocusLostCallback(onServerComboLostFocus); childSetAction("connect_btn", onClickConnect, this); childSetAction("grid_btn", onClickGrid, this); setDefaultBtn("connect_btn"); // childSetAction("quit_btn", onClickQuit, this); std::string imp_channel = gSavedSettings.getString("VersionChannelName"); std::string imp_version = llformat("%d.%d.%d %s", ViewerVersion::getImpMajorVersion(), ViewerVersion::getImpMinorVersion(), ViewerVersion::getImpPatchVersion(), ViewerVersion::getImpTestVersion().c_str() ); std::string ll_channel = ViewerVersion::getLLViewerName(); std::string ll_version = llformat("%d.%d.%d (%d)", ViewerVersion::getLLMajorVersion(), ViewerVersion::getLLMinorVersion(), ViewerVersion::getLLPatchVersion(), ViewerVersion::getLLBuildVersion() ); LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); channel_text->setTextArg("[CHANNEL]", imp_channel); channel_text->setTextArg("[VERSION]", imp_version); channel_text->setTextArg("[ALT_CHANNEL]", ll_channel); channel_text->setTextArg("[ALT_VERSION]", ll_version); channel_text->setClickedCallback(onClickVersion); channel_text->setCallbackUserData(this); LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword); LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount); #endif // get the web browser control LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("login_html"); // Need to handle login secondlife:///app/ URLs web_browser->setTrusted( true ); // observe browser events web_browser->addObserver( this ); // don't make it a tab stop until SL-27594 is fixed web_browser->setTabStop(FALSE); web_browser->navigateToLocalPage( "loading", "loading.html" ); // make links open in external browser web_browser->setOpenInExternalBrowser( true ); // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through) LLRect htmlRect = getRect(); #if USE_VIEWER_AUTH htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY(), getRect().getWidth() + 6, getRect().getHeight()); #else htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY() + 40, getRect().getWidth() + 6, getRect().getHeight() - 78 ); #endif web_browser->setRect( htmlRect ); web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); reshape( getRect().getWidth(), getRect().getHeight(), 1 ); // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); std::string login_page = gSavedSettings.getString("LoginPage"); if (login_page.empty()) { login_page = getString( "real_url" ); } LLHTTPClient::head( login_page, gResponsePtr ); #if !USE_VIEWER_AUTH // Initialize visibility (and don't force visibility - use prefs) refreshLocation( false ); #endif LLFirstUse::useLoginScreen(); }
void LLSidepanelTaskInfo::refresh() { LLButton* btn_deed_to_group = getChild<LLButton>("button deed"); if (btn_deed_to_group) { std::string deedText; if (gWarningSettings.getBOOL("DeedObject")) { deedText = getString("text deed continued"); } else { deedText = getString("text deed"); } btn_deed_to_group->setLabelSelected(deedText); btn_deed_to_group->setLabelUnselected(deedText); } BOOL root_selected = TRUE; LLSelectNode* nodep = mObjectSelection->getFirstRootNode(); S32 object_count = mObjectSelection->getRootObjectCount(); if (!nodep || (object_count == 0)) { nodep = mObjectSelection->getFirstNode(); object_count = mObjectSelection->getObjectCount(); root_selected = FALSE; } LLViewerObject* objectp = NULL; if (nodep) { objectp = nodep->getObject(); } // ...nothing selected if (!nodep || !objectp) { disableAll(); return; } // figure out a few variables const BOOL is_one_object = (object_count == 1); // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = { getString("text modify info 1"), getString("text modify info 2"), getString("text modify info 3"), getString("text modify info 4") }; if (!is_perm_modify) { string_index += 2; } if (!is_one_object) { ++string_index; } childSetEnabled("perm_modify", TRUE); childSetText("perm_modify", MODIFY_INFO_STRINGS[string_index]); childSetEnabled("Permissions:", TRUE); // Update creator text field childSetEnabled("Creator:", TRUE); BOOL creators_identical; std::string creator_name; creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); childSetText("Creator Name", creator_name); childSetEnabled("Creator Name", TRUE); // Update owner text field childSetEnabled("Owner:", TRUE); std::string owner_name; const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); if (mOwnerID.isNull()) { if (LLSelectMgr::getInstance()->selectIsGroupOwned()) { // Group owned already displayed by selectGetOwner } else { // Display last owner if public std::string last_owner_name; LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); // It should never happen that the last owner is null and the owner // is null, but it seems to be a bug in the simulator right now. JC if (!mLastOwnerID.isNull() && !last_owner_name.empty()) { owner_name.append(", last "); owner_name.append(last_owner_name); } } } childSetText("Owner Name", owner_name); childSetEnabled("Owner Name", TRUE); // update group text field childSetEnabled("Group:", TRUE); childSetText("Group Name", LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { if (mLabelGroupName) { mLabelGroupName->setNameID(group_id,TRUE); mLabelGroupName->setEnabled(TRUE); } } else { if (mLabelGroupName) { mLabelGroupName->setNameID(LLUUID::null, TRUE); mLabelGroupName->refresh(LLUUID::null,LLStringUtil::null, LLStringUtil::null, TRUE); mLabelGroupName->setEnabled(FALSE); } } childSetEnabled("button set group", owners_identical && (mOwnerID == gAgent.getID())); childSetEnabled("Name:", TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); childSetEnabled("Description:", TRUE); LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); if (is_one_object) { if (!LineEditorObjectName->hasFocus()) { childSetText("Object Name",nodep->mName); } if (LineEditorObjectDesc) { if (!LineEditorObjectDesc->hasFocus()) { LineEditorObjectDesc->setText(nodep->mDescription); } } } else { childSetText("Object Name", LLStringUtil::null); LineEditorObjectDesc->setText(LLStringUtil::null); } // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; if (is_one_object && objectp->permModify()) { edit_name_desc = TRUE; } if (edit_name_desc) { childSetEnabled("Object Name", TRUE); childSetEnabled("Object Description", TRUE); } else { childSetEnabled("Object Name", FALSE); childSetEnabled("Object Description", FALSE); } S32 total_sale_price = 0; S32 individual_sale_price = 0; BOOL is_for_sale_mixed = FALSE; BOOL is_sale_price_mixed = FALSE; U32 num_for_sale = FALSE; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, is_for_sale_mixed, is_sale_price_mixed, total_sale_price, individual_sale_price); const BOOL self_owned = (gAgent.getID() == mOwnerID); const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); if (!owners_identical) { childSetEnabled("Cost", FALSE); childSetText("Edit Cost", LLStringUtil::null); childSetEnabled("Edit Cost", FALSE); } // You own these objects. else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) { // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { childSetText("Cost", getString("Cost Per Unit")); } else { childSetText("Cost", getString("Cost Default")); } LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); if (!edit_price->hasFocus()) { // If the sale price is mixed then set the cost to MIXED, otherwise // set to the actual cost. if ((num_for_sale > 0) && is_for_sale_mixed) { edit_price->setTentative(TRUE); } else if ((num_for_sale > 0) && is_sale_price_mixed) { edit_price->setTentative(TRUE); } else { edit_price->setValue(individual_sale_price); } } // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; childSetEnabled("Cost", enable_edit); childSetEnabled("Edit Cost", enable_edit); } // Someone, not you, owns these objects. else if (!public_owned) { childSetEnabled("Cost", FALSE); childSetEnabled("Edit Cost", FALSE); // Don't show a price if none of the items are for sale. if (num_for_sale) childSetText("Edit Cost", llformat("%d",total_sale_price)); else childSetText("Edit Cost", LLStringUtil::null); // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) childSetText("Cost", getString("Cost Total")); else childSetText("Cost", getString("Cost Default")); } // This is a public object. else { childSetEnabled("Cost", FALSE); childSetText("Cost", getString("Cost Default")); childSetText("Edit Cost", LLStringUtil::null); childSetEnabled("Edit Cost", FALSE); } // Enable and disable the permissions checkboxes // based on who owns the object. // TODO: Creator permissions U32 base_mask_on = 0; U32 base_mask_off = 0; U32 owner_mask_off = 0; U32 owner_mask_on = 0; U32 group_mask_on = 0; U32 group_mask_off = 0; U32 everyone_mask_on = 0; U32 everyone_mask_off = 0; U32 next_owner_mask_on = 0; U32 next_owner_mask_off = 0; BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, &base_mask_on, &base_mask_off); //BOOL valid_owner_perms =// LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, &group_mask_on, &group_mask_off); BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, &everyone_mask_on, &everyone_mask_off); BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, &next_owner_mask_on, &next_owner_mask_off); if (gSavedSettings.getBOOL("DebugPermissions") ) { if (valid_base_perms) { childSetText("B:", "B: " + mask_to_string(base_mask_on)); childSetVisible("B:", TRUE); childSetText("O:", "O: " + mask_to_string(owner_mask_on)); childSetVisible("O:", TRUE); childSetText("G:", "G: " + mask_to_string(group_mask_on)); childSetVisible("G:", TRUE); childSetText("E:", "E: " + mask_to_string(everyone_mask_on)); childSetVisible("E:", TRUE); childSetText("N:", "N: " + mask_to_string(next_owner_mask_on)); childSetVisible("N:", TRUE); } U32 flag_mask = 0x0; if (objectp->permMove()) flag_mask |= PERM_MOVE; if (objectp->permModify()) flag_mask |= PERM_MODIFY; if (objectp->permCopy()) flag_mask |= PERM_COPY; if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; childSetText("F:", "F:" + mask_to_string(flag_mask)); childSetVisible("F:", TRUE); } else { childSetVisible("B:", FALSE); childSetVisible("O:", FALSE); childSetVisible("G:", FALSE); childSetVisible("E:", FALSE); childSetVisible("N:", FALSE); childSetVisible("F:", FALSE); } BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; if (valid_base_perms && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } if (valid_base_perms && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) { // ...must select root to choose permissions childSetValue("perm_modify", getString("text modify warning")); } if (has_change_perm_ability) { childSetEnabled("checkbox share with group", TRUE); childSetEnabled("checkbox allow everyone move", owner_mask_on & PERM_MOVE); childSetEnabled("checkbox allow everyone copy", owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { childSetEnabled("checkbox share with group", FALSE); childSetEnabled("checkbox allow everyone move", FALSE); childSetEnabled("checkbox allow everyone copy", FALSE); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); // Set the checkbox to tentative if the prices of each object selected // are not the same. childSetTentative("checkbox for sale", is_for_sale_mixed); childSetEnabled("sale type", num_for_sale && can_transfer && !is_sale_price_mixed); childSetEnabled("Next owner can:", TRUE); childSetEnabled("checkbox next owner can modify", base_mask_on & PERM_MODIFY); childSetEnabled("checkbox next owner can copy", base_mask_on & PERM_COPY); childSetEnabled("checkbox next owner can transfer", next_owner_mask_on & PERM_COPY); } else { childSetEnabled("checkbox for sale", FALSE); childSetEnabled("sale type", FALSE); childSetEnabled("Next owner can:", FALSE); childSetEnabled("checkbox next owner can modify", FALSE); childSetEnabled("checkbox next owner can copy", FALSE); childSetEnabled("checkbox next owner can transfer", FALSE); } if (valid_group_perms) { if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { childSetValue("checkbox share with group", TRUE); childSetTentative("checkbox share with group", FALSE); childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { childSetValue("checkbox share with group", FALSE); childSetTentative("checkbox share with group", FALSE); childSetEnabled("button deed", FALSE); } else { childSetValue("checkbox share with group", TRUE); childSetTentative("checkbox share with group", TRUE); childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } if (valid_everyone_perms) { // Move if (everyone_mask_on & PERM_MOVE) { childSetValue("checkbox allow everyone move", TRUE); childSetTentative("checkbox allow everyone move", FALSE); } else if (everyone_mask_off & PERM_MOVE) { childSetValue("checkbox allow everyone move", FALSE); childSetTentative("checkbox allow everyone move", FALSE); } else { childSetValue("checkbox allow everyone move", TRUE); childSetTentative("checkbox allow everyone move", TRUE); } // Copy == everyone can't copy if (everyone_mask_on & PERM_COPY) { childSetValue("checkbox allow everyone copy", TRUE); childSetTentative("checkbox allow everyone copy", !can_copy || !can_transfer); } else if (everyone_mask_off & PERM_COPY) { childSetValue("checkbox allow everyone copy", FALSE); childSetTentative("checkbox allow everyone copy", FALSE); } else { childSetValue("checkbox allow everyone copy", TRUE); childSetTentative("checkbox allow everyone copy", TRUE); } } if (valid_next_perms) { // Modify == next owner canot modify if (next_owner_mask_on & PERM_MODIFY) { childSetValue("checkbox next owner can modify", TRUE); childSetTentative("checkbox next owner can modify", FALSE); } else if (next_owner_mask_off & PERM_MODIFY) { childSetValue("checkbox next owner can modify", FALSE); childSetTentative("checkbox next owner can modify", FALSE); } else { childSetValue("checkbox next owner can modify", TRUE); childSetTentative("checkbox next owner can modify", TRUE); } // Copy == next owner cannot copy if (next_owner_mask_on & PERM_COPY) { childSetValue("checkbox next owner can copy", TRUE); childSetTentative("checkbox next owner can copy", !can_copy); } else if (next_owner_mask_off & PERM_COPY) { childSetValue("checkbox next owner can copy", FALSE); childSetTentative("checkbox next owner can copy", FALSE); } else { childSetValue("checkbox next owner can copy", TRUE); childSetTentative("checkbox next owner can copy", TRUE); } // Transfer == next owner cannot transfer if (next_owner_mask_on & PERM_TRANSFER) { childSetValue("checkbox next owner can transfer", TRUE); childSetTentative("checkbox next owner can transfer", !can_transfer); } else if (next_owner_mask_off & PERM_TRANSFER) { childSetValue("checkbox next owner can transfer", FALSE); childSetTentative("checkbox next owner can transfer", FALSE); } else { childSetValue("checkbox next owner can transfer", TRUE); childSetTentative("checkbox next owner can transfer", TRUE); } } // reflect sale information LLSaleInfo sale_info; BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); if (valid_sale_info) { combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest combo_sale_type->setValue( LLSaleInfo::FS_COPY); combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. } childSetValue("checkbox for sale", (num_for_sale != 0)); // HACK: There are some old objects in world that are set for sale, // but are no-transfer. We need to let users turn for-sale off, but only // if for-sale is set. bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY); if (cannot_actually_sell) { if (num_for_sale && has_change_sale_ability) { childSetEnabled("checkbox for sale", true); } } // Check search status of objects const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); childSetEnabled("search_check", has_change_sale_ability && all_volume); childSetValue("search_check", include_in_search); childSetTentative("search_check", !all_include_in_search); // Click action (touch, sit, buy) U8 click_action = 0; if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action)) { LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); if (ComboClickAction) { ComboClickAction->setCurrentByIndex((S32)click_action); } } childSetEnabled("label click action", is_perm_modify && all_volume); childSetEnabled("clickaction", is_perm_modify && all_volume); if (!getIsEditing()) { const std::string no_item_names[] = { "Object Name", "Object Description", "button set group", "checkbox share with group", "button deed", "checkbox allow everyone move", "checkbox allow everyone copy", "checkbox for sale", "sale type", "Edit Cost", "checkbox next owner can modify", "checkbox next owner can copy", "checkbox next owner can transfer", "clickaction", "search_check", "perm_modify", "Group Name", }; for (size_t t=0; t<LL_ARRAY_SIZE(no_item_names); ++t) { childSetEnabled(no_item_names[t], FALSE); } } updateVerbs(); }