// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setCommitOnSelectionChange(TRUE); mFriendsList->setCommitCallback(onSelectName, this); //childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); mFriendsList->setDoubleClickCallback(onClickIM, this); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLFilterEditor* contact = getChild<LLFilterEditor>("buddy_search_lineedit"); if (contact) { contact->setCommitCallback(boost::bind(&LLPanelFriends::onContactFilterEdit, this, _2)); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); //childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); getChild<LLUICtrl>("offer_teleport_btn")->setCommitCallback(boost::bind(static_cast<void(*)(const uuid_vec_t&)>(LLAvatarActions::offerTeleport), boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); getChild<LLUICtrl>("remove_btn")->setCommitCallback(boost::bind(LLAvatarActions::removeFriendsDialog, boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
// virtual BOOL LLFloaterTexturePicker::postBuild() { LLFloater::postBuild(); if (!mLabel.empty()) { std::string pick = getString("pick title"); setTitle(pick + mLabel); } mTentativeLabel = getChild<LLTextBox>("Multiple"); mResolutionLabel = getChild<LLTextBox>("unknown"); childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); childSetCommitCallback("show_folders_check", onShowFolders, this); getChildView("show_folders_check")->setVisible( FALSE); mFilterEdit = getChild<LLFilterEditor>("inventory search editor"); mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2)); mInventoryPanel = getChild<LLInventoryPanel>("inventory panel"); if(mInventoryPanel) { U32 filter_types = 0x0; filter_types |= 0x1 << LLInventoryType::IT_TEXTURE; filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT; mInventoryPanel->setFilterTypes(filter_types); //mInventoryPanel->setFilterPermMask(getFilterPermMask()); //Commented out due to no-copy texture loss. mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask); mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2)); mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); // Disable auto selecting first filtered item because it takes away // selection from the item set by LLTextureCtrl owning this floater. mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); // Commented out to stop opening all folders with textures // mInventoryPanel->openDefaultFolderForType(LLFolderType::FT_TEXTURE); // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO); } mNoCopyTextureSelected = FALSE; getChild<LLUICtrl>("apply_immediate_check")->setValue(gSavedSettings.getBOOL("ApplyTextureImmediately")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); if (!mCanApplyImmediately) { getChildView("show_folders_check")->setEnabled(FALSE); } getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this)); childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this); childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this); // update permission filter once UI is fully initialized updateFilterPermMask(); mSavedFolderState.setApply(FALSE); LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); return TRUE; }
// virtual BOOL LLFloaterTexturePicker::postBuild() { LLFloater::postBuild(); // <dogmode> /** LLInventoryItem* itemp = gInventory.getItem(mImageAssetID); if (itemp && (itemp->getPermissions().getMaskOwner() & PERM_ALL)) childSetValue("texture_uuid", mImageAssetID); else childSetValue("texture_uuid", LLUUID::null.asString()); **/ if (!mLabel.empty()) { std::string pick = getString("pick title"); setTitle(pick + mLabel); } mTentativeLabel = getChild<LLTextBox>("Multiple"); mResolutionLabel = getChild<LLTextBox>("unknown"); childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); childSetAction("Alpha", LLFloaterTexturePicker::onBtnAlpha,this); childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); childSetAction("Invisible", LLFloaterTexturePicker::onBtnInvisible,this); // tag: vaa emerald local_asset_browser [begin] // childSetAction("Local", LLFloaterTexturePicker::onBtnLocal, this); // childSetAction("Server", LLFloaterTexturePicker::onBtnServer, this); childSetAction("Add", LLFloaterTexturePicker::onBtnAdd, this); childSetAction("Remove", LLFloaterTexturePicker::onBtnRemove, this); childSetAction("Browser", LLFloaterTexturePicker::onBtnBrowser, this); mLocalScrollCtrl = getChild<LLScrollListCtrl>("local_name_list"); mLocalScrollCtrl->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onLocalScrollCommit, this)); LocalAssetBrowser::UpdateTextureCtrlList( mLocalScrollCtrl ); // tag: vaa emerald local_asset_browser [end] childSetCommitCallback("show_folders_check", onShowFolders, this); getChildView("show_folders_check")->setVisible( FALSE); mFilterEdit = getChild<LLFilterEditor>("inventory search editor"); mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2)); mInventoryPanel = getChild<LLInventoryPanel>("inventory panel"); if(mInventoryPanel) { U32 filter_types = 0x0; filter_types |= 0x1 << LLInventoryType::IT_TEXTURE; filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT; mInventoryPanel->setFilterTypes(filter_types); //mInventoryPanel->setFilterPermMask(getFilterPermMask()); //Commented out due to no-copy texture loss. mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask); mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2)); mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->setAllowMultiSelect(FALSE); // Disable auto selecting first filtered item because it takes away // selection from the item set by LLTextureCtrl owning this floater. mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); // Commented out to stop opening all folders with textures // mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE); // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO); } mNoCopyTextureSelected = FALSE; getChild<LLUICtrl>("apply_immediate_check")->setValue(gSavedSettings.getBOOL("ApplyTextureImmediately")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); if (!mCanApplyImmediately) { getChildView("show_folders_check")->setEnabled(FALSE); } getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this)); childSetAction("ApplyUUID", LLFloaterTexturePicker::onBtnUUID,this); childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this); childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this); mFilterEdit->setFocus(true); // update permission filter once UI is fully initialized updateFilterPermMask(); LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); return TRUE; }