예제 #1
0
/// Vérifie s'il y a une carte présente
void Fenetre::poll_card()
{
    if (lecteur != nullptr)
    {
        if (lecteur->has_card()) // Il y avait une carte de détecté avant
        {
            if (! lecteur->pollCard())
            {
                razInfos();
                disableAll();
            }
        }
        else // Il n'y avait pas de carte de détectée avant
        {
            if (lecteur->pollCard())
            {
                lecteur->readCard();
                disableAll();
                switch (lecteur->get_card_type())
                {
                case Lecteur::ENROLLEE:
                    enableEnrolledEdit();
                    break;
                case Lecteur::FORMATEE:
                    enableFormattedEdit();
                    break;
                }
            }
        }
    }
}
예제 #2
0
void HelloWorld::didAccelerate(PAccelerationRotate *pAccelerationValue, PAccelerationSnake *pSnakeValue){
    if (pSnakeValue->isSnake) {
        disableAll();
        if (pSnakeValue->xLeft != kNULLSnake) {
            labelXLeft->setString(CCString::createWithFormat("%3.2f", pSnakeValue->xLeft)->getCString());
            labelXLeft->setVisible(true);
        }
        if (pSnakeValue->xRight != kNULLSnake) {
            labelXRight->setString(CCString::createWithFormat("%3.2f", pSnakeValue->xRight)->getCString());
            labelXRight->setVisible(true);
        }
        if (pSnakeValue->yLeft != kNULLSnake) {
            labelYLeft->setString(CCString::createWithFormat("%3.2f", pSnakeValue->yLeft)->getCString());
            labelYLeft->setVisible(true);
        }
        if (pSnakeValue->yRight != kNULLSnake) {
            labelYRight->setString(CCString::createWithFormat("%3.2f", pSnakeValue->yRight)->getCString());
            labelYRight->setVisible(true);
        }
        if (pSnakeValue->zLeft != kNULLSnake) {
            labelZLeft->setString(CCString::createWithFormat("%3.2f", pSnakeValue->zLeft)->getCString());
            labelZLeft->setVisible(true);
        }
        if (pSnakeValue->zRight != kNULLSnake) {
            labelZRight->setString(CCString::createWithFormat("%3.2f", pSnakeValue->zRight)->getCString());
            labelZRight->setVisible(true);
        }
    }
}
예제 #3
0
/// Déconnecte le lecteur de carte
void Fenetre::on_actionD_connecter_le_lecteur_triggered()
{
    delete lecteur;
    lecteur = nullptr;
    stop_timer();
    disableAll();
}
예제 #4
0
void PlayerArea::reset()
{
    disableAll();
    foreach(PlayerItem* ptr,playerItems)
        ptr->setSelected(0);
    selectedPlayers.clear();
}
예제 #5
0
void IntroPhone::toSignUp() {
	disableAll();
	showError("");

	checkRequest.start(1000);

	sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(0), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Application::language())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
}
예제 #6
0
void IntroPhone::toSignUp() {
	disableAll();
	showError(QString());

	checkRequest.start(1000);

	MTPauth_SendCode::Flags flags = 0;
	sentRequest = MTP::send(MTPauth_SendCode(MTP_flags(flags), MTP_string(sentPhone), MTPBool(), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Sandbox::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
}
예제 #7
0
/// Initialise la fenêtre de l'application
Fenetre::Fenetre(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Fenetre)
{
    ui->setupUi(this);
    lecteur = nullptr;
    disableAll();
    timer_carte = new QTimer();
}
예제 #8
0
파일: Notifier.cpp 프로젝트: 12307/poco
Notifier::~Notifier()
{
	try
	{
		disableAll();
	}
	catch (...)
	{
		poco_unexpected();
	}
}
예제 #9
0
파일: player.cpp 프로젝트: sdetwiler/pammo
void Player::disable()
{
    mScoreMeter->disableAll();
    mHealthMeter->disableAll();
    mEnergyMeter->disableAll();
    mWeaponSelector->disableAll();
    mShieldToggle->disableAll();
    mTargetRing->disableAll();
    mMovementRing->disableAll();

    disableAll();
}
void MainWindow::updateGameState(const unsigned int key, const unsigned int bankKey)
{
    disableAll();

    if(mode == DUALPLAYER)
    {
        dualPlayer_updateGameState(key, bankKey);
    }
    else if(mode == SINGLE)
    {
        Single_updateGameState(key);
    }
} // End of updateGameState().
예제 #11
0
 void moveLfMenu()
  {
		/*save data if we are leaving input menu*/
		if(activeItem->Select == INPUT) writeToFlashMemory();
		if(activeItem->Select == ACTION) disableAll();
		
   if((void*)activeItem->Parent == (void*)&NULL_ENTRY) return;
	   else activeItem = (void*)activeItem->Parent;
		//repaitn display
		lcdRepaintMenu();
		volatile int stPage = (activeItem->Index / FIELDS_NUMBER);
		lcdMovePoint(activeItem->Index  - (FIELDS_NUMBER*stPage));
  }
void MainWindow::on_actionDualAgents_triggered()
{
    mode = DUALAGENT;

    // Disable all botton.
    disableAll();

    // Reset the board.
    board.setNewGame();
    updateButtons();

    // Start the game with two AI.
    dualAgent_updateGameState();

} // End of on_actionDualAgents_triggered().
예제 #13
0
void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) {
	stopCheck();

	const MTPDauth_checkedPhone &d(result.c_auth_checkedPhone());
	if (d.vphone_registered.v) {
		disableAll();
		showError("");

		checkRequest.start(1000);

		sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Application::language())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
	} else {
		showError(lang(lng_bad_phone_noreg), true);
		enableAll(true);
	}
}
예제 #14
0
void IntroPhone::onSubmitPhone() {
	if (sentRequest || isHidden()) return;

	if (!App::isValidPhone(fullNumber())) {
		showError(lang(lng_bad_phone));
		phone.setFocus();
		return;
	}

	disableAll();
	showError(QString());

	checkRequest.start(1000);

	sentPhone = fullNumber();
	sentRequest = MTP::send(MTPauth_CheckPhone(MTP_string(sentPhone)), rpcDone(&IntroPhone::phoneCheckDone), rpcFail(&IntroPhone::phoneSubmitFail));
}
예제 #15
0
void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) {
	stopCheck();

	const auto &d(result.c_auth_checkedPhone());
	if (mtpIsTrue(d.vphone_registered)) {
		disableAll();
		showError(QString());

		checkRequest.start(1000);

		MTPauth_SendCode::Flags flags = 0;
		sentRequest = MTP::send(MTPauth_SendCode(MTP_flags(flags), MTP_string(sentPhone), MTPBool(), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Sandbox::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
	} else {
		showError(lang(lng_bad_phone_noreg), true);
		enableAll(true);
		sentRequest = 0;
	}
}
예제 #16
0
void createvolume::findInstalledFs()
{
	DialogMsg msg( this ) ;

	QStringList mkfsList =  QDir( QString( ZULUCRYPTmkfs_dir ) ).entryList().filter( "mkfs." ) ;

	if( mkfsList.size() == 0 ){
		disableAll() ;
		QString x = tr( "this tool expects to find file system creation tools at \"%1/\" " ).arg( ZULUCRYPTmkfs_dir ) ;
		x += tr( "and it can not find them.\nIt is therefore not possible to create volumes using this tool." ) ;
		msg.ShowUIOK( tr( "ERROR!" ),x ) ;
		return ;
	}

	int index = mkfsList.indexOf( QString( "mkfs.ext2" ) ) ;
	if( index != -1 ){
		mkfsList.move( index,0 ) ;
	}
	index = mkfsList.indexOf( QString( "mkfs.ntfs" ) ) ;
	if( index != -1 ){
		mkfsList.move( index,0 ) ;
	}
	index = mkfsList.indexOf( QString( "mkfs.vfat" ) ) ;
	if( index != -1 ){
		mkfsList.move( index,0 ) ;
	}
	index = mkfsList.indexOf( QString( "mkfs.ext3" ) ) ;
	if( index != -1 ){
		mkfsList.move( index,0 ) ;
	}
	index = mkfsList.indexOf( QString( "mkfs.ext4" ) ) ;
	if( index != -1 ){
		mkfsList.move( index,0 ) ;
	}
	int j = mkfsList.size() ;
	QStringList mkfs ;
	QString entry ;
	for( int i = 0 ; i < j ; i++ ) {
		entry = mkfsList.at( i ) ;
		mkfs.append( entry.mid( entry.indexOf( "." ) + 1 ) ) ;
	}
	m_ui->comboBoxFS->addItems( mkfs ) ;
}
bool VideoFormats::parseFormatSpec(const char *spec) {
    CHECK_EQ(kNumResolutionTypes, 3);

    disableAll();

    unsigned native, dummy;
    unsigned res[3];
    size_t size = strlen(spec);
    size_t offset = 0;

    if (sscanf(spec, "%02x %02x ", &native, &dummy) != 2) {
        return false;
    }

    offset += 6; // skip native and preferred-display-mode-supported
    CHECK_LE(offset + 58, size);
    while (offset < size) {
        parseH264Codec(spec + offset);
        offset += 60; // skip H.264-codec + ", "
    }

    mNativeIndex = native >> 3;
    mNativeType = (ResolutionType)(native & 7);

    bool success;
    if (mNativeType >= kNumResolutionTypes) {
        success = false;
    } else {
        success = GetConfiguration(
                mNativeType, mNativeIndex, NULL, NULL, NULL, NULL);
    }

    if (!success) {
        ALOGW("sink advertised an illegal native resolution, fortunately "
              "this value is ignored for the time being...");
    }

    return true;
}
예제 #18
0
void manageluksheader::pbCreate()
{
	DialogMsg msg( this ) ;

	if( m_ui->lineEditBackUpName->text().isEmpty() || m_ui->lineEditDevicePath->text().isEmpty() ){
		return msg.ShowUIOK( tr( "ERROR!" ),tr( "atleast one required field is empty" ) );
	}
	QString device = utility::resolvePath( m_ui->lineEditDevicePath->text() );

	device.replace( "\"","\"\"\"" ) ;

	QString backUp = m_ui->lineEditBackUpName->text().replace( "\"","\"\"\"" );

	QString exe ;
	if(  m_operation == QString( "backup" ) ){
		m_saveHeader = 1 ;
		exe = QString( "%1 -B -d \"%2\" -f \"%3\"" ).arg( ZULUCRYPTzuluCrypt ).arg( device ).arg( backUp );
	}else{
		m_saveHeader = 0 ;
		QString x = m_ui->lineEditDevicePath->text() ;
		QString y = m_ui->lineEditBackUpName->text() ;

		QString warn = tr( "Are you sure you want to replace a header on device \"%1\" with a backup copy at \"%2\"?" ).arg( x ).arg( y );

		if( msg.ShowUIYesNoDefaultNo( tr( "WARNING!" ),warn ) == QMessageBox::No ){
			return ;
		}
		exe = QString( "%1 -kR -d \"%2\" -f \"%3\"" ).arg( ZULUCRYPTzuluCrypt ).arg( device ).arg( backUp );
	}

	this->disableAll();

	m_OperationInProgress = true ;

	runInThread * rt = new runInThread( exe );
	connect( rt,SIGNAL( finished( int ) ),this,SLOT( threadExitStatus( int ) ) );
	rt->start();
	disableAll() ;
}
예제 #19
0
void toEditMenu::menuAboutToShow()
{
    disableAll();

    toEditWidget *editWidget = toEditWidget::findEdit(QApplication::focusWidget());
    if (editWidget)
    {
        toEditWidget::FlagSetStruct FlagSet = editWidget->flagSet();
        m_pasteSupported = FlagSet.Paste;
        undoAct->setEnabled(FlagSet.Undo);
        redoAct->setEnabled(FlagSet.Redo);

        cutAct->setEnabled(FlagSet.Cut);
        copyAct->setEnabled(FlagSet.Copy);
        pasteAct->setEnabled(m_pasteSupported && m_clipboardContent);
        searchReplaceAct->setEnabled(FlagSet.Search);
        searchNextAct->setEnabled(FlagSet.Search);
        selectAllAct->setEnabled(FlagSet.SelectAll);
#if 0 // TODO: this part is waiting for QScintilla backend feature (yet unimplemented).
        selectBlockAct->setEnabled(FlagSet.SelectAll);
#endif
        readAllAct->setEnabled(FlagSet.ReadAll);
    }
}
예제 #20
0
파일: Channel.cpp 프로젝트: Stuwang/fly
Channel::~Channel() {
	disableAll();
	remove();
	socketops::close(getfd());
	LOG_INFO << "Channel close , fd is" << getfd();
};
예제 #21
0
toEditMenu::toEditMenu()
    : QMenu(tr("&Edit"), NULL)
    , m_clipboardContent(false)
    , m_pasteSupported(false)
{
    QClipboard const *clipBoard = QApplication::clipboard();
    QMimeData const *mimeData = clipBoard->mimeData();
    connect(clipBoard, SIGNAL(dataChanged()), this, SLOT(clipBoardChanged()));
    connect(this, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow()));

    m_clipboardContent = mimeData->hasText() && !clipBoard->text().isEmpty();

    undoAct = new QAction(QPixmap(const_cast<const char**>(undo_xpm)), tr("&Undo"), this);
    undoAct->setShortcut(QKeySequence::Undo);

    redoAct = new QAction(QPixmap(const_cast<const char**>(redo_xpm)), tr("&Redo"), this);
    redoAct->setShortcut(QKeySequence::Redo);

    cutAct = new QAction(QPixmap(const_cast<const char**>(cut_xpm)), tr("Cu&t"), this);
    cutAct->setShortcut(QKeySequence::Cut);
    cutAct->setToolTip(tr("Cut to clipboard"));

    copyAct = new QAction(QPixmap(const_cast<const char**>(copy_xpm)), tr("&Copy"), this);
    copyAct->setShortcut(QKeySequence::Copy);
    copyAct->setToolTip(tr("Copy to clipboard"));

    pasteAct = new QAction(QPixmap(const_cast<const char**>(paste_xpm)), tr("&Paste"), this);
    pasteAct->setShortcut(QKeySequence::Paste);
    pasteAct->setToolTip(tr("Paste from clipboard"));

    searchReplaceAct = new QAction(QPixmap(const_cast<const char**>(search_xpm)), tr("&Search && Replace..."), this);
    searchReplaceAct->setShortcut(QKeySequence::Find);
    searchReplaceAct->setToolTip(tr("Search & replace"));

    searchNextAct = new QAction(tr("Search &Next"), this);
    searchNextAct->setShortcut(QKeySequence::FindNext);

    selectAllAct = new QAction(tr("Select &All"), this);
    selectAllAct->setShortcut(QKeySequence::SelectAll);

#if 0
    // TODO: this part is waiting for QScintilla backend feature (yet unimplemented).
    selectBlockAct = new QAction(tr("Block Selection"), this);
    selectBlockAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B);
    selectBlockAct->setCheckable(true);
#endif

    readAllAct = new QAction(tr("Read All &Items"), this);

    prefsAct = new QAction(tr("&Preferences..."), this);

    addAction(undoAct);
    addAction(redoAct);
    addSeparator();

    addAction(cutAct);
    addAction(copyAct);
    addAction(pasteAct);
    addSeparator();

    addAction(searchReplaceAct);
    addAction(searchNextAct);
    addAction(selectAllAct);
#if 0
// TODO: this part is waiting for QScintilla backend feature (yet unimplemented).
    addAction(selectBlockAct);
#endif
    addAction(readAllAct);
    addSeparator();

    addAction(prefsAct);

    disableAll();
}
예제 #22
0
void LLPanelPermissions::refresh()
{
	LLButton*	BtnDeedToGroup = getChild<LLButton>("button deed");
	if(BtnDeedToGroup)
	{	
		std::string deedText;
		if (gWarningSettings.getBOOL("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
		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.
	BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
						   && LLSelectMgr::getInstance()->selectGetRootsModify())
		|| LLSelectMgr::getInstance()->selectGetModify();
	const LLFocusableElement* 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);

	// 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 (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);
	}

	// 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*	combo_click_action = getChild<LLComboBox>("clickaction");
		if(combo_click_action)
		{
			const std::string combo_value = click_action_to_string_value(click_action);
			combo_click_action->setValue(LLSD(combo_value));
		}
	}
	childSetEnabled("label click action",			is_perm_modify && all_volume);
	childSetEnabled("clickaction",					is_perm_modify && all_volume);
}
예제 #23
0
void MediaControl::reparseConfig()
{
//	kdDebug(90200) << "reparseConfig();" << endl;
    _configFrontend->reparseConfiguration();

    if (_player != 0L) // make sure there is no player-object
    {
        _player->disconnect(); // disconnect from all things

        time_slider->disconnect();
        prev_button->disconnect();
        playpause_button->disconnect();
        stop_button->disconnect();
        next_button->disconnect();

        delete slider_tooltip; // tooltip depends on _player : delete it before _player gets deleted
        slider_tooltip = 0L;

        delete _player;
        _player = 0L;
    }

    mLastLen = -1;
    mLastTime = -1;
    mLastStatus = -1;

    QString playerString = _configFrontend->player();


#ifdef HAVE_XMMS
    if (playerString == "XMMS")
    {
        _player = new XmmsInterface ();
        time_slider->setSteps((_configFrontend->mouseWheelSpeed()*1000),
                              (_configFrontend->mouseWheelSpeed()*1000));
    }
    else
#endif
        if (playerString == "JuK")
        {
            _player = new JuKInterface();
            time_slider->setSteps((_configFrontend->mouseWheelSpeed()),
                                  (_configFrontend->mouseWheelSpeed()));
        }
        else if (playerString == "Amarok")
        {
            _player = new AmarokInterface();
            time_slider->setSteps((_configFrontend->mouseWheelSpeed()),
                                  (_configFrontend->mouseWheelSpeed()));
        }
        else if (playerString == "KsCD")
        {
            _player = new KsCDInterface();
            time_slider->setSteps((_configFrontend->mouseWheelSpeed()),
                                  (_configFrontend->mouseWheelSpeed()));
        }
        else if (playerString == "mpd")
        {
            _player = new MpdInterface();
            time_slider->setSteps((_configFrontend->mouseWheelSpeed()),
                                  (_configFrontend->mouseWheelSpeed()));
        }
        else // Fallback is Noatun
        {
            _player = new NoatunInterface();
            time_slider->setSteps((_configFrontend->mouseWheelSpeed()),
                                  (_configFrontend->mouseWheelSpeed()));
        }

    //  this signal gets emitted by a playerInterface when the player's playtime changed
    connect(_player, SIGNAL(newSliderPosition(int,int)),
            this, SLOT(setSliderPosition(int,int)));

    connect(_player, SIGNAL(playerStarted()), SLOT(enableAll()));
    connect(_player, SIGNAL(playerStopped()), SLOT(disableAll()));
    connect(_player, SIGNAL(playingStatusChanged(int)), SLOT(slotPlayingStatusChanged(int)));

    // do we use our icons or the default ones from KDE?
    if(_configFrontend->useCustomTheme())
    {
        // load theme
        QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/");

        // the user has to take care if all pixmaps are there, we only check for one of them
        if (QFile(skindir+"play.png").exists())
        {
            prev_button->setIconSet(SmallIconSet(locate("data",skindir+"prev.png")));
            if (_player->playingStatus() == PlayerInterface::Playing)
                playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"play.png")));
            else
                playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"pause.png")));
            stop_button->setIconSet(SmallIconSet(locate("data",skindir+"stop.png")));
            next_button->setIconSet(SmallIconSet(locate("data",skindir+"next.png")));
        }
        else // icon-theme is invalid or not there
        {
            KNotifyClient::event(winId(), KNotifyClient::warning,
                                 i18n("There was trouble loading theme %1. Please choose" \
                                      " a different theme.").arg(skindir));

            // default to kde-icons, they have to be installed :)
            slotIconChanged();

            // and open prefs-dialog
            preferences();
        }
    }
    else // KDE default-icons, assuming that these icons exist!
    {
        // sets icons from kde
        slotIconChanged();
    }

    slider_tooltip = new MediaControlToolTip(time_slider, _player);

    connect(prev_button, SIGNAL(clicked()), _player, SLOT(prev()));
    connect(playpause_button, SIGNAL(clicked()), _player, SLOT(playpause()));
    connect(stop_button, SIGNAL(clicked()), _player, SLOT(stop()));
    connect(next_button, SIGNAL(clicked()), _player, SLOT(next()));

    connect(time_slider, SIGNAL(sliderPressed()), _player, SLOT(sliderStartDrag()));
    connect(time_slider, SIGNAL(sliderReleased()), _player, SLOT(sliderStopDrag()));
    connect(time_slider, SIGNAL(valueChanged(int)), this, SLOT(adjustTime(int)));
    connect(time_slider, SIGNAL(volumeUp()), _player, SLOT(volumeUp()));
    connect(time_slider, SIGNAL(volumeDown()), _player, SLOT(volumeDown()));
    connect(this, SIGNAL(newJumpToTime(int)), _player, SLOT(jumpToTime(int)));
}
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
		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.
	BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
							&& LLSelectMgr::getInstance()->selectGetRootsModify()) 
							|| LLSelectMgr::getInstance()->selectGetModify();
	BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
						   && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced())
		|| LLSelectMgr::getInstance()->selectGetNonPermanentEnforced();
	const LLFocusableElement* 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"),
		getString("text modify info 5"),
		getString("text modify info 6")
	};
	if(!is_perm_modify)
	{
		string_index += 2;
	}
	else if (!is_nonpermanent_enforced)
	{
		string_index += 4;
	}
	if(!is_one_object)
	{
		++string_index;
	}
	getChildView("perm_modify")->setEnabled(TRUE);
	getChild<LLUICtrl>("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]);

	std::string pfAttrName;

	if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
		&& LLSelectMgr::getInstance()->selectGetRootsNonPathfinding())
		|| LLSelectMgr::getInstance()->selectGetNonPathfinding())
	{
		pfAttrName = "Pathfinding_Object_Attr_None";
	}
	else if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
		&& LLSelectMgr::getInstance()->selectGetRootsPermanent())
		|| LLSelectMgr::getInstance()->selectGetPermanent())
	{
		pfAttrName = "Pathfinding_Object_Attr_Permanent";
	}
	else if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
		&& LLSelectMgr::getInstance()->selectGetRootsCharacter())
		|| LLSelectMgr::getInstance()->selectGetCharacter())
	{
		pfAttrName = "Pathfinding_Object_Attr_Character";
	}
	else
	{
		pfAttrName = "Pathfinding_Object_Attr_MultiSelect";
	}

	getChildView("pathfinding_attributes_value")->setEnabled(TRUE);
	getChild<LLUICtrl>("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName));

	getChildView("Permissions:")->setEnabled(TRUE);
	
	// Update creator text field
	getChildView("Creator:")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
	BOOL creators_identical = FALSE;
// [/RLVa:KB]
	std::string creator_name;
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
	creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name);
// [/RLVa:KB]
//	LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name);

//	getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
//	getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row

	// Update owner text field
	getChildView("Owner:")->setEnabled(TRUE);

	// Update last owner text field
	getChildView("Last Owner:")->setEnabled(TRUE);

	std::string owner_name;
	const BOOL 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 );
			}
		}
	}
//	getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
//	getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row

// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
	bool fRlvEnableOwner = true;
	bool fRlvEnableCreator = true;
	bool fRlvEnableLastOwner = true;
	if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
	{
		// Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
		if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
		{
			creator_name = RlvStrings::getAnonym(creator_name);
			fRlvEnableCreator = false;
		}

		// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
		if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
		{
			owner_name = RlvStrings::getAnonym(owner_name);
			fRlvEnableOwner = false;
		}

		if (RlvUtil::isNearbyAgent(mLastOwnerID))
		{
			last_owner_name = RlvStrings::getAnonym(last_owner_name);
			fRlvEnableLastOwner = false;
		}
	}
	else if ((objectp->isAttachment() || objectp->isAvatar()) && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) && mOwnerID != gAgentID)
	{
		owner_name = RlvStrings::getAnonym(owner_name);
		fRlvEnableOwner = false;

		if (mOwnerID == mCreatorID)
		{
			creator_name = RlvStrings::getAnonym(creator_name);
			fRlvEnableCreator = false;
		}

		if (mOwnerID == mLastOwnerID)
		{
			last_owner_name = RlvStrings::getAnonym(last_owner_name);
			fRlvEnableLastOwner = false;
		}
	}
// [/RLVa:KB]
	getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
	getChildView("Creator Name")->setEnabled(TRUE);

	getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
	getChildView("Owner Name")->setEnabled(TRUE);
//	childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
//	getChildView("button last owner profile")->setEnabled(owners_identical && mLastOwnerID.notNull());
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
	getChildView("button owner profile")->setEnabled(fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
	getChildView("button creator profile")->setEnabled(fRlvEnableCreator && creators_identical && mCreatorID.notNull());
	getChildView("button last owner profile")->setEnabled(fRlvEnableLastOwner && owners_identical && mLastOwnerID.notNull());
// [/RLVa:KB]

	getChild<LLUICtrl>("Last Owner Name")->setValue(last_owner_name);
	getChildView("Last Owner Name")->setEnabled(TRUE);

	// update group text field
	getChildView("Group:")->setEnabled(TRUE);
	//getChild<LLUICtrl>("Group Name")->setValue(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, std::string(), true);
			mLabelGroupName->setEnabled(FALSE);
		}
	}
	
	getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced);
	getChildView("button open group")->setEnabled(group_id.notNull());

	getChildView("Name:")->setEnabled(TRUE);
	LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name");
	getChildView("Description:")->setEnabled(TRUE);
	LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description");

	if(is_one_object)
	{
		if(keyboard_focus_view != LineEditorObjectName)
		{
			LineEditorObjectName->setValue(nodep->mName);
		}

		if(LineEditorObjectDesc)
		{
			if(keyboard_focus_view != LineEditorObjectDesc)
			{
				LineEditorObjectDesc->setText(nodep->mDescription);
			}
		}
	}
	else
	{
		LineEditorObjectName->setText(LLStringUtil::null);
		LineEditorObjectDesc->setText(LLStringUtil::null);
	}

	// figure out the contents of the name, description, & category
	// Singu Note: It was requested that the user be able to bulk change description
	{
		const std::string& str(object_count > 1 ? getString("multiple_objects_selected") : LLStringUtil::null);
		LineEditorObjectName->setLabel(str);
		LineEditorObjectDesc->setLabel(str);
	}
	if (/*is_one_object &&*/ objectp->permModify() && !objectp->isPermanentEnforced())
	{
		LineEditorObjectName->setEnabled(TRUE);
		LineEditorObjectDesc->setEnabled(TRUE);
	}
	else
	{
		LineEditorObjectName->setEnabled(FALSE);
		LineEditorObjectDesc->setEnabled(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)
	{
		getChildView("Cost")->setEnabled(FALSE);
		getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
		getChildView("Edit Cost")->setEnabled(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)
		{
			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Per Unit"));
		}
		else
		{
			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
		}
		
		LLLineEditor *edit_price = getChild<LLLineEditor>("Edit Cost");
		if(keyboard_focus_view != edit_price)
		{
			// 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->setValue(getString("Sale Mixed"));
			}
			else if (num_for_sale > 0 && is_sale_price_mixed)
			{
				edit_price->setValue(getString("Cost Mixed"));
			}
			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;
		getChildView("Cost")->setEnabled(enable_edit);
		getChildView("Edit Cost")->setEnabled(enable_edit);
	}
	// Someone, not you, owns these objects.
	else if(!public_owned)
	{
		getChildView("Cost")->setEnabled(FALSE);
		getChildView("Edit Cost")->setEnabled(FALSE);
		
		// Don't show a price if none of the items are for sale.
		if (num_for_sale)
			getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",total_sale_price));
		else
			getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);

		// If multiple items are for sale, set text to TOTAL PRICE.
		if (num_for_sale > 1)
			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Total", argsCurrency));
		else
			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default", argsCurrency));
	}
	// This is a public object.
	else
	{
		getChildView("Cost")->setEnabled(FALSE);
		getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default", argsCurrency));
		
		getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
		getChildView("Edit Cost")->setEnabled(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);

	bool supports_export = LFSimFeatureHandler::instance().simSupportsExport();
	
	if( gSavedSettings.getBOOL("DebugPermissions") )
	{
		childSetVisible("perm_modify", false);
		if (valid_base_perms)
		{
			std::string perm_string = mask_to_string(base_mask_on);
			if (!supports_export && base_mask_on & PERM_EXPORT) // Hide Export when not available
				perm_string.erase(perm_string.find_last_of("E"));
			if (U32 diff_mask = base_mask_on ^ owner_mask_on) // When different, show the user's potential permissions lowercase.
			{
				if (diff_mask & PERM_MOVE)
					LLStringUtil::replaceChar(perm_string, 'V', 'v');
				if (diff_mask & PERM_MODIFY)
					LLStringUtil::replaceChar(perm_string, 'M', 'm');
				if (diff_mask & PERM_COPY)
					LLStringUtil::replaceChar(perm_string, 'C', 'c');
				if (diff_mask & PERM_TRANSFER)
					LLStringUtil::replaceChar(perm_string, 'T', 't');
				if (diff_mask & PERM_EXPORT)
					LLStringUtil::replaceChar(perm_string, 'E', 'e');
			}
			getChild<LLUICtrl>("B:")->setValue("B: " + perm_string);
			getChildView("B:")->setVisible(							TRUE);
			
			/*
			perm_string = mask_to_string(owner_mask_on);
			if (!supports_export && owner_mask_on & PERM_EXPORT) // Hide Export when not available
				perm_string.erase(perm_string.find_last_of("E"));
			getChild<LLUICtrl>("O:")->setValue("O: " + perm_string);
			getChildView("O:")->setVisible(							TRUE);
			*/
			
			getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on));
			getChildView("G:")->setVisible(							TRUE);
			
			perm_string = mask_to_string(everyone_mask_on);
			if (!supports_export && everyone_mask_on & PERM_EXPORT) // Hide Export when not available
				perm_string.erase(perm_string.find_last_of("E"));
			getChild<LLUICtrl>("E:")->setValue("E: " + perm_string);
			getChildView("E:")->setVisible(							TRUE);
			
			getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
			getChildView("N:")->setVisible(							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;

		getChild<LLUICtrl>("F:")->setValue("F:" + mask_to_string(flag_mask));
		getChildView("F:")->setVisible(								TRUE);
	}
	else
	{
		childSetVisible("perm_modify", true);
		getChildView("B:")->setVisible(								FALSE);
		//getChildView("O:")->setVisible(								FALSE);
		getChildView("G:")->setVisible(								FALSE);
		getChildView("E:")->setVisible(								FALSE);
		getChildView("N:")->setVisible(								FALSE);
		getChildView("F:")->setVisible(								FALSE);
	}

	BOOL has_change_perm_ability = FALSE;
	BOOL has_change_sale_ability = FALSE;

	if (valid_base_perms && is_nonpermanent_enforced &&
		(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE))))
	{
		has_change_perm_ability = TRUE;
	}
	if (valid_base_perms && is_nonpermanent_enforced &&
	   (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
		getChild<LLUICtrl>("perm_modify")->setValue(getString("text modify warning"));
	}

	if (has_change_perm_ability)
	{
		getChildView("checkbox share with group")->setEnabled(TRUE);
		getChildView("text anyone can")->setEnabled(true);
		getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE);
		getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
	}
	else
	{
		getChildView("checkbox share with group")->setEnabled(FALSE);
		getChildView("text anyone can")->setEnabled(false);
		getChildView("checkbox allow everyone move")->setEnabled(FALSE);
		getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
	}

	// Is this user allowed to toggle export on this object?
	if (supports_export && self_owned && mCreatorID == mOwnerID && can_set_export(base_mask_on, owner_mask_on, next_owner_mask_on))
	{
		bool can_export = true;
		LLInventoryObject::object_list_t objects;
		objectp->getInventoryContents(objects);
		for (LLInventoryObject::object_list_t::iterator i = objects.begin(); can_export && i != objects.end() ; ++i) //The object's inventory must have EXPORT.
		{
			LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(i->get()); //getInventoryContents() filters out categories, static_cast.
			can_export = perms_allow_export(item->getPermissions());
		}
		for (U8 i = 0; can_export && i < objectp->getNumTEs(); ++i) // Can the textures be exported?
			if (LLTextureEntry* texture = objectp->getTE(i))
				can_export = is_asset_exportable(texture->getID());
		getChildView("checkbox allow export")->setEnabled(can_export);
	}
	else
	{
		getChildView("checkbox allow export")->setEnabled(false);
		if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
			getChildView("checkbox allow everyone copy")->setVisible(true);
	}

	if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
	{
		getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale));
		// Set the checkbox to tentative if the prices of each object selected
		// are not the same.
		getChild<LLUICtrl>("checkbox for sale")->setTentative( 				is_for_sale_mixed);
		getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed);


		bool no_export = everyone_mask_off & PERM_EXPORT; // Next owner perms can't be changed if set
		getChildView("Next owner can:")->setEnabled(no_export);
		getChildView("checkbox next owner can modify")->setEnabled(no_export && base_mask_on & PERM_MODIFY);
		getChildView("checkbox next owner can copy")->setEnabled(no_export && base_mask_on & PERM_COPY);
		getChildView("checkbox next owner can transfer")->setEnabled(no_export && next_owner_mask_on & PERM_COPY);
	}
	else 
	{
		getChildView("checkbox for sale")->setEnabled(FALSE);
		getChildView("sale type")->setEnabled(FALSE);

		getChildView("Next owner can:")->setEnabled(FALSE);
		getChildView("checkbox next owner can modify")->setEnabled(FALSE);
		getChildView("checkbox next owner can copy")->setEnabled(FALSE);
		getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
	}

	if (valid_group_perms)
	{
		if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE))
		{
			getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox share with group")->setTentative(	FALSE);
			getChildView("button deed")->setEnabled(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))
		{
			getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox share with group")->setTentative(	FALSE);
			getChildView("button deed")->setEnabled(FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox share with group")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox share with group")->setTentative(	TRUE);
			getChildView("button deed")->setEnabled(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)
		{
			getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( 	FALSE);
		}
		else if (everyone_mask_off & PERM_MOVE)
		{
			getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( 	FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox allow everyone move")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox allow everyone move")->setTentative( 	TRUE);
		}

		// Copy == everyone can't copy
		if (everyone_mask_on & PERM_COPY)
		{
			getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative( 	!can_copy || !can_transfer);
		}
		else if (everyone_mask_off & PERM_COPY)
		{
			getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative(	FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox allow everyone copy")->setTentative(	TRUE);
		}

		// Export
		if (supports_export)
		{
			if(everyone_mask_on & PERM_EXPORT)
			{
				getChild<LLUICtrl>("checkbox allow export")->setValue(TRUE);
				getChild<LLUICtrl>("checkbox allow export")->setTentative(	FALSE);
			}
			else if(everyone_mask_off & PERM_EXPORT)
			{
				getChild<LLUICtrl>("checkbox allow export")->setValue(FALSE);
				getChild<LLUICtrl>("checkbox allow export")->setTentative(	FALSE);
			}
			else
			{
				getChild<LLUICtrl>("checkbox allow export")->setValue(TRUE);
				getChild<LLUICtrl>("checkbox allow export")->setValue(	TRUE);
			}
		}
		else
		{
			childSetValue("checkbox allow export", false);
			childSetTentative("checkbox allow export", false);
		}
	}

	if (valid_next_perms)
	{
		// Modify == next owner canot modify
		if (next_owner_mask_on & PERM_MODIFY)
		{
			getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can modify")->setTentative(	FALSE);
		}
		else if (next_owner_mask_off & PERM_MODIFY)
		{
			getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox next owner can modify")->setTentative(	FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can modify")->setTentative(	TRUE);
		}

		// Copy == next owner cannot copy
		if (next_owner_mask_on & PERM_COPY)
		{			
			getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can copy")->setTentative(	!can_copy);
		}
		else if (next_owner_mask_off & PERM_COPY)
		{
			getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox next owner can copy")->setTentative(	FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can copy")->setTentative(	TRUE);
		}

		// Transfer == next owner cannot transfer
		if (next_owner_mask_on & PERM_TRANSFER)
		{
			getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( !can_transfer);
		}
		else if (next_owner_mask_off & PERM_TRANSFER)
		{
			getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
			getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( FALSE);
		}
		else
		{
			getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
			getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( 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.
		}
	}

	getChild<LLUICtrl>("checkbox for sale")->setValue((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)
		{
			getChildView("checkbox for sale")->setEnabled(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);
	getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume);
	getChild<LLUICtrl>("search_check")->setValue(include_in_search);
	getChild<LLUICtrl>("search_check")->setTentative( 				!all_include_in_search);

	// Click action (touch, sit, buy)
	U8 click_action = 0;
	if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action))
	{
		LLComboBox*	combo_click_action = getChild<LLComboBox>("clickaction");
		if(combo_click_action)
		{
			combo_click_action->setCurrentByIndex((S32)click_action);
		}
	}
	getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced  && all_volume);
	getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
}