diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-02-09 17:02:16 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-02-09 17:02:16 -0800 |
commit | 3a9f437fdfff07264b5c71803541f4dff04f746f (patch) | |
tree | a58eb9556a359056e5947f7e5df10a06784fcd75 /indra | |
parent | 0cbab65345947faddb39993fe8933d13e8886439 (diff) |
PATH-245: Adding proper toggling of the enabled state for the take, take copy, and delete buttons.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterpathfindingcharacters.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermenu.h | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 4e47d5af9c..f1f9ef6278 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -532,10 +532,10 @@ void LLFloaterPathfindingCharacters::setEnableActionFields(BOOL pEnabled) {
mLabelActions->setEnabled(pEnabled);
mShowBeaconCheckBox->setEnabled(false && pEnabled);
- mTakeBtn->setEnabled(true && pEnabled);
- mTakeCopyBtn->setEnabled(true && pEnabled);
+ mTakeBtn->setEnabled(pEnabled && tools_visible_take_object());
+ mTakeCopyBtn->setEnabled(pEnabled && enable_object_take_copy());
mReturnBtn->setEnabled(false && pEnabled);
- mDeleteBtn->setEnabled(true && pEnabled);
+ mDeleteBtn->setEnabled(pEnabled && enable_object_delete());
mTeleportBtn->setEnabled(pEnabled && (mCharactersScrollList->getNumSelected() == 1));
}
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index d5b060aba6..6316141e75 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -93,6 +93,11 @@ void handle_object_touch(); bool enable_object_open(); void handle_object_open(); +bool visible_take_object(); +bool tools_visible_take_object(); +bool enable_object_take_copy(); +bool enable_object_delete(); + // Buy either contents or object itself void handle_buy(); void handle_take(); |