FIRE-17158: Remove "block" button for script dialog of own objects

meow-7.2.2
Ansariel 2016-02-04 11:03:14 +01:00
parent 8411984acf
commit bbccec78ba
2 changed files with 15 additions and 3 deletions

View File

@ -190,10 +190,11 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
mControlPanel->addChild(ignore_btn, -1);
mute_btn_pad = 4 * HPAD; //only use a 4 * HPAD padding if an ignore button exists
}
// FIRE-3948: Commenting all out as mute button is disabled (FS:MS)
// <FS:Ansariel> Undo the removal and make it optional after I was looking for the mute button on spammy dialogs!
// <FS:Ansariel> FIRE-3948: Option to remove the mute button; FIRE-17158: Remove "block" button for script dialog of own objects
//if (mIsScriptDialog && mute_btn != NULL)
if (mIsScriptDialog && mute_btn != NULL && !gSavedSettings.getBOOL("FSRemoveScriptBlockButton"))
if (mIsScriptDialog && mute_btn != NULL && !gSavedSettings.getBOOL("FSRemoveScriptBlockButton") &&
(!mNotification->getPayload().has("own_object") || !mNotification->getPayload()["own_object"].asBoolean()))
// </FS:Ansariel>
{
LLRect mute_btn_rect(mute_btn->getRect());
// Place mute (Block) button to the left of the ignore button.

View File

@ -9342,6 +9342,17 @@ void process_script_dialog(LLMessageSystem* msg, void**)
payload["chat_channel"] = chat_channel;
payload["object_name"] = object_name;
// <FS:Ansariel> FIRE-17158: Remove "block" button for script dialog of own objects
bool own_object = false;
std::string self_name;
LLAgentUI::buildFullname(self_name);
if (LLCacheName::buildFullName(first_name, last_name) == self_name)
{
own_object = true;
}
payload["own_object"] = own_object;
// </FS:Ansariel>
// build up custom form
S32 button_count = msg->getNumberOfBlocks("Buttons");
if (button_count > SCRIPT_DIALOG_MAX_BUTTONS)