Merge remote-tracking branch 'lirusaito/master'
This commit is contained in:
@@ -63,6 +63,7 @@ enum LAND_STAT_FLAGS
|
||||
STAT_FILTER_BY_PARCEL = 0x00000001,
|
||||
STAT_FILTER_BY_OWNER = 0x00000002,
|
||||
STAT_FILTER_BY_OBJECT = 0x00000004,
|
||||
STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
|
||||
STAT_REQUEST_LAST_ENTRY = 0x80000000,
|
||||
};
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ set(llui_SOURCE_FILES
|
||||
lleditmenuhandler.cpp
|
||||
llfiltereditor.cpp
|
||||
llfloater.cpp
|
||||
llflyoutbutton.cpp
|
||||
llfocusmgr.cpp
|
||||
llfunctorregistry.cpp
|
||||
lliconctrl.cpp
|
||||
@@ -59,7 +60,10 @@ set(llui_SOURCE_FILES
|
||||
llscrollbar.cpp
|
||||
llscrollcontainer.cpp
|
||||
llscrollingpanellist.cpp
|
||||
llscrolllistcell.cpp
|
||||
llscrolllistcolumn.cpp
|
||||
llscrolllistctrl.cpp
|
||||
llscrolllistitem.cpp
|
||||
llsearcheditor.cpp
|
||||
llslider.cpp
|
||||
llsliderctrl.cpp
|
||||
@@ -105,6 +109,7 @@ set(llui_HEADER_FILES
|
||||
lleditmenuhandler.h
|
||||
llfiltereditor.h
|
||||
llfloater.h
|
||||
llflyoutbutton.h
|
||||
llfocusmgr.h
|
||||
llfunctorregistry.h
|
||||
llhtmlhelp.h
|
||||
@@ -134,7 +139,10 @@ set(llui_HEADER_FILES
|
||||
llscrollbar.h
|
||||
llscrollcontainer.h
|
||||
llscrollingpanellist.h
|
||||
llscrolllistcell.h
|
||||
llscrolllistcolumn.h
|
||||
llscrolllistctrl.h
|
||||
llscrolllistitem.h
|
||||
llslider.h
|
||||
llsliderctrl.h
|
||||
llspinctrl.h
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llcombobox.cpp
|
||||
* @brief LLComboBox base class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -48,6 +42,8 @@
|
||||
#include "llwindow.h"
|
||||
#include "llfloater.h"
|
||||
#include "llscrollbar.h"
|
||||
#include "llscrolllistcell.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llcontrol.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "lllineeditor.h"
|
||||
@@ -58,10 +54,9 @@ S32 LLCOMBOBOX_HEIGHT = 0;
|
||||
S32 LLCOMBOBOX_WIDTH = 0;
|
||||
S32 MAX_COMBO_WIDTH = 500;
|
||||
|
||||
static LLRegisterWidget<LLComboBox> r1("combo_box");
|
||||
static LLRegisterWidget<LLComboBox> register_combo_box("combo_box");
|
||||
|
||||
LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std::string& label,
|
||||
commit_callback_t commit_callback)
|
||||
LLComboBox::LLComboBox(const std::string& name, const LLRect& rect, const std::string& label, commit_callback_t commit_callback)
|
||||
: LLUICtrl(name, rect, TRUE, commit_callback, FOLLOWS_LEFT | FOLLOWS_TOP),
|
||||
mTextEntry(NULL),
|
||||
mTextEntryTentative(TRUE),
|
||||
@@ -81,9 +76,7 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std::
|
||||
{
|
||||
// Always use text box
|
||||
// Text label button
|
||||
mButton = new LLButton(mLabel,
|
||||
LLRect(),
|
||||
LLStringUtil::null);
|
||||
mButton = new LLButton(mLabel, LLRect(), LLStringUtil::null);
|
||||
mButton->setImageUnselected(LLUI::getUIImage("square_btn_32x128.tga"));
|
||||
mButton->setImageSelected(LLUI::getUIImage("square_btn_selected_32x128.tga"));
|
||||
mButton->setImageDisabled(LLUI::getUIImage("square_btn_32x128.tga"));
|
||||
@@ -98,11 +91,11 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std::
|
||||
addChild(mButton);
|
||||
|
||||
// disallow multiple selection
|
||||
mList = new LLScrollListCtrl(std::string("ComboBox"), LLRect(),
|
||||
mList = new LLScrollListCtrl(std::string("ComboBox"), LLRect(),
|
||||
boost::bind(&LLComboBox::onItemSelected, this, _2), FALSE);
|
||||
mList->setVisible(FALSE);
|
||||
mList->setVisible(false);
|
||||
mList->setBgWriteableColor(mListColor);
|
||||
mList->setCommitOnKeyboardMovement(FALSE);
|
||||
mList->setCommitOnKeyboardMovement(false);
|
||||
addChild(mList);
|
||||
|
||||
// Mouse-down on button will transfer mouse focus to the list
|
||||
@@ -113,12 +106,11 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std::
|
||||
mButton->setImageOverlay("combobox_arrow.tga", LLFontGL::RIGHT);
|
||||
|
||||
updateLayout();
|
||||
|
||||
|
||||
mTopLostSignalConnection = setTopLostCallback(boost::bind(&LLComboBox::hideList, this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// virtual
|
||||
LLXMLNodePtr LLComboBox::getXML(bool save_children) const
|
||||
{
|
||||
@@ -127,16 +119,12 @@ LLXMLNodePtr LLComboBox::getXML(bool save_children) const
|
||||
node->setName(LL_COMBO_BOX_TAG);
|
||||
|
||||
// Attributes
|
||||
|
||||
node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry);
|
||||
|
||||
node->createChild("max_chars", TRUE)->setIntValue(mMaxChars);
|
||||
|
||||
// Contents
|
||||
|
||||
std::vector<LLScrollListItem*> data_list = mList->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator data_itor;
|
||||
for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
|
||||
for (std::vector<LLScrollListItem*>::iterator data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
|
||||
{
|
||||
LLScrollListItem* item = *data_itor;
|
||||
LLScrollListCell* cell = item->getColumn(0);
|
||||
@@ -168,9 +156,7 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *
|
||||
S32 max_chars = 20;
|
||||
node->getAttributeS32("max_chars", max_chars);
|
||||
|
||||
LLComboBox* combo_box = new LLComboBox("combo_box",
|
||||
rect,
|
||||
label);
|
||||
LLComboBox* combo_box = new LLComboBox("combo_box", rect, label);
|
||||
combo_box->setAllowTextEntry(allow_text_entry, max_chars);
|
||||
|
||||
const std::string& contents = node->getValue();
|
||||
@@ -197,7 +183,7 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *
|
||||
{
|
||||
std::string tool_tip = label;
|
||||
child->getAttributeString("tool_tip", tool_tip);
|
||||
item->setToolTip(tool_tip);
|
||||
item->getColumn(0)->setToolTip(tool_tip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,7 +239,6 @@ void LLComboBox::onCommit()
|
||||
mTextEntry->setValue(getSimple());
|
||||
mTextEntry->setTentative(FALSE);
|
||||
}
|
||||
|
||||
setControlValue(getValue());
|
||||
LLUICtrl::onCommit();
|
||||
}
|
||||
@@ -301,7 +286,6 @@ void LLComboBox::resetTextDirty()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// add item "name" to menu
|
||||
LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOOL enabled)
|
||||
{
|
||||
@@ -573,7 +557,7 @@ void LLComboBox::updateLayout()
|
||||
if (!mTextEntry)
|
||||
{
|
||||
LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
|
||||
text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
|
||||
text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * shadow_size;
|
||||
// clear label on button
|
||||
std::string cur_label = mButton->getLabelSelected();
|
||||
mTextEntry = new LLLineEditor(std::string("combo_text_entry"),
|
||||
@@ -586,9 +570,9 @@ void LLComboBox::updateLayout()
|
||||
mTextEntry->setSelectAllonFocusReceived(TRUE);
|
||||
mTextEntry->setHandleEditKeysDirectly(TRUE);
|
||||
mTextEntry->setCommitOnFocusLost(FALSE);
|
||||
mTextEntry->setFollows(FOLLOWS_ALL);
|
||||
mTextEntry->setText(cur_label);
|
||||
mTextEntry->setIgnoreTab(TRUE);
|
||||
mTextEntry->setFollowsAll();
|
||||
addChild(mTextEntry);
|
||||
}
|
||||
else
|
||||
@@ -613,7 +597,7 @@ void LLComboBox::updateLayout()
|
||||
{
|
||||
mTextEntry->setVisible(FALSE);
|
||||
}
|
||||
mButton->setFollowsAll();
|
||||
mButton->setFollows(FOLLOWS_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -751,10 +735,6 @@ void LLComboBox::hideList()
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// static functions
|
||||
//------------------------------------------------------------------
|
||||
|
||||
void LLComboBox::onButtonMouseDown()
|
||||
{
|
||||
if (!mList->getVisible())
|
||||
@@ -892,7 +872,10 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
|
||||
return FALSE;
|
||||
}
|
||||
// if selection has changed, pop open list
|
||||
else if (mList->getLastSelectedItem() != last_selected_item)
|
||||
else if (mList->getLastSelectedItem() != last_selected_item
|
||||
|| ((key == KEY_DOWN || key == KEY_UP)
|
||||
&& mList->getCanSelect()
|
||||
&& !mList->isEmpty()))
|
||||
{
|
||||
showList();
|
||||
}
|
||||
@@ -1027,7 +1010,7 @@ void LLComboBox::updateSelection()
|
||||
if(mSuppressAutoComplete) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LLWString left_wstring = mTextEntry->getWText().substr(0, mTextEntry->getCursor());
|
||||
// user-entered portion of string, based on assumption that any selected
|
||||
// text was a result of auto-completion
|
||||
@@ -1237,168 +1220,3 @@ BOOL LLComboBox::selectItemRange( S32 first, S32 last )
|
||||
return mList->selectItemRange(first, last);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// LLFlyoutButton
|
||||
//
|
||||
|
||||
static LLRegisterWidget<LLFlyoutButton> r2("flyout_button");
|
||||
|
||||
const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
|
||||
|
||||
LLFlyoutButton::LLFlyoutButton(
|
||||
const std::string& name,
|
||||
const LLRect &rect,
|
||||
const std::string& label)
|
||||
: LLComboBox(name, rect, LLStringUtil::null),
|
||||
mToggleState(FALSE),
|
||||
mActionButton(NULL)
|
||||
{
|
||||
// Always use text box
|
||||
// Text label button
|
||||
mActionButton = new LLButton(label,
|
||||
LLRect(), LLStringUtil::null, boost::bind(&LLFlyoutButton::onActionButtonClick, this));
|
||||
mActionButton->setScaleImage(TRUE);
|
||||
mActionButton->setFollowsAll();
|
||||
mActionButton->setHAlign( LLFontGL::HCENTER );
|
||||
mActionButton->setLabel(label);
|
||||
addChild(mActionButton);
|
||||
|
||||
mActionButtonImage = LLUI::getUIImage("flyout_btn_left.tga");
|
||||
mExpanderButtonImage = LLUI::getUIImage("flyout_btn_right.tga");
|
||||
mActionButtonImageSelected = LLUI::getUIImage("flyout_btn_left_selected.tga");
|
||||
mExpanderButtonImageSelected = LLUI::getUIImage("flyout_btn_right_selected.tga");
|
||||
mActionButtonImageDisabled = LLUI::getUIImage("flyout_btn_left_disabled.tga");
|
||||
mExpanderButtonImageDisabled = LLUI::getUIImage("flyout_btn_right_disabled.tga");
|
||||
|
||||
mActionButton->setImageSelected(mActionButtonImageSelected);
|
||||
mActionButton->setImageUnselected(mActionButtonImage);
|
||||
mActionButton->setImageDisabled(mActionButtonImageDisabled);
|
||||
mActionButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
|
||||
|
||||
mButton->setImageSelected(mExpanderButtonImageSelected);
|
||||
mButton->setImageUnselected(mExpanderButtonImage);
|
||||
mButton->setImageDisabled(mExpanderButtonImageDisabled);
|
||||
mButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
|
||||
mButton->setRightHPad(6);
|
||||
|
||||
updateLayout();
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLXMLNodePtr LLFlyoutButton::getXML(bool save_children) const
|
||||
{
|
||||
LLXMLNodePtr node = LLComboBox::getXML();
|
||||
|
||||
node->setName(LL_FLYOUT_BUTTON_TAG);
|
||||
|
||||
LLXMLNodePtr child;
|
||||
|
||||
for (child = node->getFirstChild(); child.notNull();)
|
||||
{
|
||||
if (child->hasName("combo_item"))
|
||||
{
|
||||
child->setName(LL_FLYOUT_BUTTON_ITEM_TAG);
|
||||
|
||||
//setName does a delete and add, so we have to start over
|
||||
child = node->getFirstChild();
|
||||
}
|
||||
else
|
||||
{
|
||||
child = child->getNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
//static
|
||||
LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string label("");
|
||||
node->getAttributeString("label", label);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
LLFlyoutButton* flyout_button = new LLFlyoutButton("flyout_button",
|
||||
rect,
|
||||
label);
|
||||
|
||||
std::string list_position;
|
||||
node->getAttributeString("list_position", list_position);
|
||||
if (list_position == "below")
|
||||
{
|
||||
flyout_button->mListPosition = BELOW;
|
||||
}
|
||||
else if (list_position == "above")
|
||||
{
|
||||
flyout_button->mListPosition = ABOVE;
|
||||
}
|
||||
|
||||
|
||||
flyout_button->initFromXML(node, parent);
|
||||
|
||||
LLXMLNodePtr child;
|
||||
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||
{
|
||||
if (child->hasName("flyout_button_item"))
|
||||
{
|
||||
std::string label = child->getTextContents();
|
||||
|
||||
std::string value = label;
|
||||
child->getAttributeString("value", value);
|
||||
|
||||
flyout_button->add(label, LLSD(value) );
|
||||
}
|
||||
}
|
||||
|
||||
flyout_button->updateLayout();
|
||||
|
||||
return flyout_button;
|
||||
}
|
||||
|
||||
void LLFlyoutButton::updateLayout()
|
||||
{
|
||||
LLComboBox::updateLayout();
|
||||
|
||||
mButton->setOrigin(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0);
|
||||
mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
|
||||
mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
|
||||
mButton->setTabStop(FALSE);
|
||||
mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT);
|
||||
|
||||
mActionButton->setOrigin(0, 0);
|
||||
mActionButton->reshape(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
|
||||
}
|
||||
|
||||
void LLFlyoutButton::onActionButtonClick()
|
||||
{
|
||||
// remember last list selection?
|
||||
mList->deselect();
|
||||
onCommit();
|
||||
}
|
||||
|
||||
void LLFlyoutButton::draw()
|
||||
{
|
||||
mActionButton->setToggleState(mToggleState);
|
||||
mButton->setToggleState(mToggleState);
|
||||
|
||||
//FIXME: this should be an attribute of comboboxes, whether they have a distinct label or
|
||||
// the label reflects the last selected item, for now we have to manually remove the label
|
||||
mButton->setLabel(LLStringUtil::null);
|
||||
LLComboBox::draw();
|
||||
}
|
||||
|
||||
void LLFlyoutButton::setEnabled(BOOL enabled)
|
||||
{
|
||||
mActionButton->setEnabled(enabled);
|
||||
LLComboBox::setEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
void LLFlyoutButton::setToggleState(BOOL state)
|
||||
{
|
||||
mToggleState = state;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llcombobox.h
|
||||
* @brief LLComboBox base class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -39,15 +33,12 @@
|
||||
#include "llbutton.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llctrlselectioninterface.h"
|
||||
#include "llimagegl.h"
|
||||
#include "llrect.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
|
||||
// Classes
|
||||
|
||||
class LLFontGL;
|
||||
class LLButton;
|
||||
class LLSquareButton;
|
||||
class LLScrollListCtrl;
|
||||
class LLLineEditor;
|
||||
class LLViewBorder;
|
||||
|
||||
@@ -64,15 +55,12 @@ public:
|
||||
BELOW
|
||||
} EPreferredPosition;
|
||||
|
||||
LLComboBox(
|
||||
const std::string& name,
|
||||
const LLRect &rect,
|
||||
const std::string& label,
|
||||
commit_callback_t commit_callback = NULL
|
||||
);
|
||||
virtual ~LLComboBox();
|
||||
protected:
|
||||
void prearrangeList(std::string filter = "");
|
||||
friend class LLFloaterTestImpl;
|
||||
friend class LLUICtrlFactory;
|
||||
LLComboBox(const std::string& name, const LLRect& rect, const std::string& label, commit_callback_t commit_callback = NULL);
|
||||
void prearrangeList(std::string filter = "");
|
||||
|
||||
public:
|
||||
// LLView interface
|
||||
@@ -191,7 +179,6 @@ public:
|
||||
void onButtonMouseDown();
|
||||
void onListMouseUp();
|
||||
void onItemSelected(const LLSD& data);
|
||||
|
||||
void onTextCommit(const LLSD& data);
|
||||
|
||||
void setSuppressTentative(bool suppress);
|
||||
@@ -226,34 +213,4 @@ private:
|
||||
S32 mLastSelectedIndex;
|
||||
};
|
||||
|
||||
class LLFlyoutButton : public LLComboBox
|
||||
{
|
||||
public:
|
||||
LLFlyoutButton(
|
||||
const std::string& name,
|
||||
const LLRect &rect,
|
||||
const std::string& label);
|
||||
|
||||
virtual void updateLayout();
|
||||
virtual void draw();
|
||||
virtual void setEnabled(BOOL enabled);
|
||||
|
||||
void setToggleState(BOOL state);
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
void onActionButtonClick();
|
||||
void onSelectAction(LLUICtrl* ctrl);
|
||||
|
||||
protected:
|
||||
LLButton* mActionButton;
|
||||
LLPointer<LLUIImage> mActionButtonImage;
|
||||
LLPointer<LLUIImage> mExpanderButtonImage;
|
||||
LLPointer<LLUIImage> mActionButtonImageSelected;
|
||||
LLPointer<LLUIImage> mExpanderButtonImageSelected;
|
||||
LLPointer<LLUIImage> mActionButtonImageDisabled;
|
||||
LLPointer<LLUIImage> mExpanderButtonImageDisabled;
|
||||
BOOL mToggleState;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
172
indra/llui/llflyoutbutton.cpp
Normal file
172
indra/llui/llflyoutbutton.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
/**
|
||||
* @file llflyoutbutton.cpp
|
||||
* @brief LLFlyoutButton base class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
// file includes
|
||||
#include "llflyoutbutton.h"
|
||||
|
||||
static LLRegisterWidget<LLFlyoutButton> r2("flyout_button");
|
||||
|
||||
const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
|
||||
|
||||
LLFlyoutButton::LLFlyoutButton(const std::string& name, const LLRect& rect, const std::string& label)
|
||||
: LLComboBox(name, rect, LLStringUtil::null),
|
||||
mToggleState(FALSE),
|
||||
mActionButton(NULL)
|
||||
{
|
||||
// Always use text box
|
||||
// Text label button
|
||||
mActionButton = new LLButton(label, LLRect(), LLStringUtil::null, boost::bind(&LLFlyoutButton::onActionButtonClick, this, _2));
|
||||
mActionButton->setScaleImage(true);
|
||||
mActionButton->setFollowsAll();
|
||||
mActionButton->setHAlign(LLFontGL::HCENTER);
|
||||
mActionButton->setLabel(label);
|
||||
addChild(mActionButton);
|
||||
|
||||
mActionButton->setImageSelected(LLUI::getUIImage("flyout_btn_left_selected.tga"));
|
||||
mActionButton->setImageUnselected(LLUI::getUIImage("flyout_btn_left.tga"));
|
||||
mActionButton->setImageDisabled(LLUI::getUIImage("flyout_btn_left_disabled.tga"));
|
||||
mActionButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
|
||||
|
||||
mButton->setImageSelected(LLUI::getUIImage("flyout_btn_right_selected.tga"));
|
||||
mButton->setImageUnselected(LLUI::getUIImage("flyout_btn_right.tga"));
|
||||
mButton->setImageDisabled(LLUI::getUIImage("flyout_btn_right_disabled.tga"));
|
||||
mButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
|
||||
mButton->setRightHPad(6);
|
||||
|
||||
updateLayout();
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLXMLNodePtr LLFlyoutButton::getXML(bool save_children) const
|
||||
{
|
||||
LLXMLNodePtr node = LLComboBox::getXML();
|
||||
node->setName(LL_FLYOUT_BUTTON_TAG);
|
||||
|
||||
for (LLXMLNodePtr child = node->getFirstChild(); child.notNull();)
|
||||
{
|
||||
if (child->hasName("combo_item"))
|
||||
{
|
||||
child->setName(LL_FLYOUT_BUTTON_ITEM_TAG);
|
||||
|
||||
//setName does a delete and add, so we have to start over
|
||||
child = node->getFirstChild();
|
||||
}
|
||||
else
|
||||
{
|
||||
child = child->getNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
//static
|
||||
LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory)
|
||||
{
|
||||
std::string label("");
|
||||
node->getAttributeString("label", label);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
LLFlyoutButton* flyout_button = new LLFlyoutButton("flyout_button", rect, label);
|
||||
|
||||
std::string list_position;
|
||||
node->getAttributeString("list_position", list_position);
|
||||
if (list_position == "below")
|
||||
{
|
||||
flyout_button->mListPosition = BELOW;
|
||||
}
|
||||
else if (list_position == "above")
|
||||
{
|
||||
flyout_button->mListPosition = ABOVE;
|
||||
}
|
||||
|
||||
flyout_button->initFromXML(node, parent);
|
||||
|
||||
for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||
{
|
||||
if (child->hasName(LL_FLYOUT_BUTTON_ITEM_TAG))
|
||||
{
|
||||
std::string label(child->getTextContents());
|
||||
std::string value(label);
|
||||
child->getAttributeString("value", value);
|
||||
|
||||
flyout_button->add(label, LLSD(value));
|
||||
}
|
||||
}
|
||||
|
||||
flyout_button->updateLayout();
|
||||
|
||||
return flyout_button;
|
||||
}
|
||||
|
||||
void LLFlyoutButton::updateLayout()
|
||||
{
|
||||
LLComboBox::updateLayout();
|
||||
|
||||
mButton->setOrigin(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0);
|
||||
mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
|
||||
mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
|
||||
mButton->setTabStop(false);
|
||||
mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT);
|
||||
|
||||
mActionButton->setOrigin(0, 0);
|
||||
mActionButton->reshape(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
|
||||
}
|
||||
|
||||
void LLFlyoutButton::onActionButtonClick(const LLSD& data)
|
||||
{
|
||||
// remember last list selection?
|
||||
mList->deselect();
|
||||
onCommit();
|
||||
}
|
||||
|
||||
void LLFlyoutButton::draw()
|
||||
{
|
||||
mActionButton->setToggleState(mToggleState);
|
||||
mButton->setToggleState(mToggleState);
|
||||
|
||||
//FIXME: this should be an attribute of comboboxes, whether they have a distinct label or
|
||||
// the label reflects the last selected item, for now we have to manually remove the label
|
||||
mButton->setLabel(LLStringUtil::null);
|
||||
LLComboBox::draw();
|
||||
}
|
||||
|
||||
void LLFlyoutButton::setEnabled(BOOL enabled)
|
||||
{
|
||||
mActionButton->setEnabled(enabled);
|
||||
LLComboBox::setEnabled(enabled);
|
||||
}
|
||||
|
||||
void LLFlyoutButton::setToggleState(BOOL state)
|
||||
{
|
||||
mToggleState = state;
|
||||
}
|
||||
|
||||
|
||||
59
indra/llui/llflyoutbutton.h
Normal file
59
indra/llui/llflyoutbutton.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* @file llflyoutbutton.h
|
||||
* @brief LLFlyoutButton base class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// A control that displays the name of the chosen item, which when clicked
|
||||
// shows a scrolling box of choices.
|
||||
|
||||
#ifndef LL_LLFLYOUTBUTTON_H
|
||||
#define LL_LLFLYOUTBUTTON_H
|
||||
|
||||
#include "llcombobox.h"
|
||||
|
||||
// Classes
|
||||
|
||||
class LLFlyoutButton : public LLComboBox
|
||||
{
|
||||
protected:
|
||||
LLFlyoutButton(const std::string& name, const LLRect& rect, const std::string& label);
|
||||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
virtual void updateLayout();
|
||||
virtual void draw();
|
||||
virtual void setEnabled(BOOL enabled);
|
||||
|
||||
void setToggleState(BOOL state);
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory);
|
||||
void onActionButtonClick(const LLSD& data);
|
||||
void onSelectAction(LLUICtrl* ctrl);
|
||||
|
||||
protected:
|
||||
LLButton* mActionButton;
|
||||
BOOL mToggleState;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLYOUTBUTTON_H
|
||||
437
indra/llui/llscrolllistcell.cpp
Normal file
437
indra/llui/llscrolllistcell.cpp
Normal file
@@ -0,0 +1,437 @@
|
||||
/**
|
||||
* @file llscrolllistcell.cpp
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llscrolllistcell.h"
|
||||
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llresmgr.h"
|
||||
|
||||
//static
|
||||
LLScrollListCell* LLScrollListCell::create(LLScrollListCell::Params cell_p)
|
||||
{
|
||||
LLScrollListCell* cell = NULL;
|
||||
|
||||
if (cell_p.type() == "icon")
|
||||
{
|
||||
cell = new LLScrollListIcon(cell_p);
|
||||
}
|
||||
else if (cell_p.type() == "checkbox")
|
||||
{
|
||||
cell = new LLScrollListCheck(cell_p);
|
||||
}
|
||||
else if (cell_p.type() == "date")
|
||||
{
|
||||
if (!cell_p.color.isProvided()) cell_p.color = LLUI::sColorsGroup->getColor("DefaultListText");
|
||||
cell = new LLScrollListDate(cell_p);
|
||||
}
|
||||
else // default is "text"
|
||||
{
|
||||
if (!cell_p.color.isProvided()) cell_p.color = LLUI::sColorsGroup->getColor("DefaultListText");
|
||||
cell = new LLScrollListText(cell_p);
|
||||
}
|
||||
|
||||
if (cell_p.value.isProvided())
|
||||
{
|
||||
cell->setValue(cell_p.value);
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
LLScrollListCell::LLScrollListCell(const LLScrollListCell::Params& p)
|
||||
: mWidth(p.width),
|
||||
mToolTip(p.tool_tip)
|
||||
{}
|
||||
|
||||
// virtual
|
||||
const LLSD LLScrollListCell::getValue() const
|
||||
{
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListIcon
|
||||
//
|
||||
LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p)
|
||||
: LLScrollListCell(p),
|
||||
// <edit>
|
||||
mCallback(NULL),
|
||||
// </edit>
|
||||
mColor(p.color),
|
||||
mAlignment(p.font_halign)
|
||||
{
|
||||
setValue(p.value().asString());
|
||||
}
|
||||
|
||||
LLScrollListIcon::~LLScrollListIcon()
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
S32 LLScrollListIcon::getHeight() const
|
||||
{ return mIcon ? mIcon->getHeight() : 0; }
|
||||
|
||||
/*virtual*/
|
||||
const LLSD LLScrollListIcon::getValue() const
|
||||
{ return mIcon.isNull() ? LLStringUtil::null : mIcon->getName(); }
|
||||
|
||||
void LLScrollListIcon::setValue(const LLSD& value)
|
||||
{
|
||||
if (value.isUUID())
|
||||
{
|
||||
// don't use default image specified by LLUUID::null, use no image in that case
|
||||
LLUUID image_id = value.asUUID();
|
||||
mIcon = image_id.notNull() ? LLUI::getUIImageByID(image_id) : LLUIImagePtr(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string value_string = value.asString();
|
||||
if (LLUUID::validate(value_string))
|
||||
{
|
||||
setValue(LLUUID(value_string));
|
||||
}
|
||||
else if (!value_string.empty())
|
||||
{
|
||||
mIcon = LLUI::getUIImage(value.asString());
|
||||
}
|
||||
else
|
||||
{
|
||||
mIcon = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLScrollListIcon::setColor(const LLColor4& color)
|
||||
{
|
||||
mColor = color;
|
||||
}
|
||||
|
||||
S32 LLScrollListIcon::getWidth() const
|
||||
{
|
||||
// if no specified fix width, use width of icon
|
||||
if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
|
||||
{
|
||||
return mIcon->getWidth();
|
||||
}
|
||||
return LLScrollListCell::getWidth();
|
||||
}
|
||||
|
||||
|
||||
void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color) const
|
||||
{
|
||||
if (mIcon)
|
||||
{
|
||||
switch(mAlignment)
|
||||
{
|
||||
case LLFontGL::LEFT:
|
||||
mIcon->draw(0, 0, mColor);
|
||||
break;
|
||||
case LLFontGL::RIGHT:
|
||||
mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor);
|
||||
break;
|
||||
case LLFontGL::HCENTER:
|
||||
mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListText
|
||||
//
|
||||
U32 LLScrollListText::sCount = 0;
|
||||
|
||||
LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
|
||||
: LLScrollListCell(p),
|
||||
mText(p.value().asString()),
|
||||
mFont(p.font.isProvided() ? LLResMgr::getInstance()->getRes(p.font) : LLFontGL::getFontSansSerifSmall()),
|
||||
mColor(p.color),
|
||||
mUseColor(p.color.isProvided()),
|
||||
mFontStyle(LLFontGL::getStyleFromString(p.font_style)),
|
||||
mFontAlignment(p.font_halign),
|
||||
mVisible(p.visible),
|
||||
mHighlightCount( 0 ),
|
||||
mHighlightOffset( 0 )
|
||||
{
|
||||
sCount++;
|
||||
|
||||
mTextWidth = getWidth();
|
||||
|
||||
// initialize rounded rect image
|
||||
if (!mRoundedRectImage)
|
||||
{
|
||||
mRoundedRectImage = LLUI::getUIImage("rounded_square.tga");
|
||||
}
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLScrollListText::highlightText(S32 offset, S32 num_chars)
|
||||
{
|
||||
mHighlightOffset = offset;
|
||||
mHighlightCount = num_chars;
|
||||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLScrollListText::isText() const
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//virtual
|
||||
const std::string &LLScrollListText::getToolTip() const
|
||||
{
|
||||
// If base class has a tooltip, return that
|
||||
if (! LLScrollListCell::getToolTip().empty())
|
||||
return LLScrollListCell::getToolTip();
|
||||
|
||||
// ...otherwise, return the value itself as the tooltip
|
||||
return mText.getString();
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLScrollListText::needsToolTip() const
|
||||
{
|
||||
// If base class has a tooltip, return that
|
||||
if (LLScrollListCell::needsToolTip())
|
||||
return LLScrollListCell::needsToolTip();
|
||||
|
||||
// ...otherwise, show tooltips for truncated text
|
||||
return mFont->getWidth(mText.getString()) > getWidth();
|
||||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLScrollListText::getVisible() const
|
||||
{
|
||||
return mVisible;
|
||||
}
|
||||
|
||||
//virtual
|
||||
S32 LLScrollListText::getHeight() const
|
||||
{
|
||||
return llround(mFont->getLineHeight());
|
||||
}
|
||||
|
||||
|
||||
LLScrollListText::~LLScrollListText()
|
||||
{
|
||||
sCount--;
|
||||
}
|
||||
|
||||
S32 LLScrollListText::getContentWidth() const
|
||||
{
|
||||
return mFont->getWidth(mText.getString());
|
||||
}
|
||||
|
||||
|
||||
void LLScrollListText::setColor(const LLColor4& color)
|
||||
{
|
||||
mColor = color;
|
||||
mUseColor = TRUE;
|
||||
}
|
||||
|
||||
void LLScrollListText::setText(const LLStringExplicit& text)
|
||||
{
|
||||
mText = text;
|
||||
}
|
||||
|
||||
void LLScrollListText::setFontStyle(const U8 font_style)
|
||||
{
|
||||
mFontStyle = font_style;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLScrollListText::setValue(const LLSD& text)
|
||||
{
|
||||
setText(text.asString());
|
||||
}
|
||||
|
||||
//virtual
|
||||
const LLSD LLScrollListText::getValue() const
|
||||
{
|
||||
return LLSD(mText.getString());
|
||||
}
|
||||
|
||||
|
||||
void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const
|
||||
{
|
||||
LLColor4 display_color;
|
||||
if (mUseColor)
|
||||
{
|
||||
display_color = mColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
display_color = color;
|
||||
}
|
||||
|
||||
if (mHighlightCount > 0)
|
||||
{
|
||||
S32 left = 0;
|
||||
switch(mFontAlignment)
|
||||
{
|
||||
case LLFontGL::LEFT:
|
||||
left = mFont->getWidth(mText.getString(), 0, mHighlightOffset);
|
||||
break;
|
||||
case LLFontGL::RIGHT:
|
||||
left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX);
|
||||
break;
|
||||
case LLFontGL::HCENTER:
|
||||
left = (getWidth() - mFont->getWidth(mText.getString())) / 2;
|
||||
break;
|
||||
}
|
||||
LLRect highlight_rect(left - 2,
|
||||
llround(mFont->getLineHeight()) + 1,
|
||||
left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1,
|
||||
1);
|
||||
mRoundedRectImage->draw(highlight_rect, highlight_color);
|
||||
}
|
||||
|
||||
// Try to draw the entire string
|
||||
F32 right_x;
|
||||
U32 string_chars = mText.length();
|
||||
F32 start_x = 0.f;
|
||||
switch(mFontAlignment)
|
||||
{
|
||||
case LLFontGL::LEFT:
|
||||
start_x = (mFontStyle & LLFontGL::ITALIC) ? 2.f : 0.f; //Italic text seems to need a little padding.
|
||||
break;
|
||||
case LLFontGL::RIGHT:
|
||||
start_x = (F32)getWidth();
|
||||
break;
|
||||
case LLFontGL::HCENTER:
|
||||
start_x = (F32)getWidth() * 0.5f;
|
||||
break;
|
||||
}
|
||||
mFont->render(mText.getWString(), 0,
|
||||
start_x, 2.f,
|
||||
display_color,
|
||||
mFontAlignment,
|
||||
LLFontGL::BOTTOM,
|
||||
mFontStyle,
|
||||
LLFontGL::NO_SHADOW,
|
||||
string_chars,
|
||||
getTextWidth(),
|
||||
&right_x,
|
||||
FALSE,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListCheck
|
||||
//
|
||||
LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p)
|
||||
: LLScrollListCell(p)
|
||||
{
|
||||
mCheckBox = new LLCheckBoxCtrl("checkbox", LLRect(0, p.width, p.width, 0), "", NULL, NULL, p.value());
|
||||
mCheckBox->setEnabled(p.enabled);
|
||||
|
||||
LLRect rect(mCheckBox->getRect());
|
||||
if (p.width)
|
||||
{
|
||||
rect.mRight = rect.mLeft + p.width;
|
||||
mCheckBox->setRect(rect);
|
||||
setWidth(p.width);
|
||||
}
|
||||
else
|
||||
{
|
||||
setWidth(rect.getWidth()); //check_box->getWidth();
|
||||
}
|
||||
|
||||
mCheckBox->setColor(p.color);
|
||||
}
|
||||
|
||||
|
||||
LLScrollListCheck::~LLScrollListCheck()
|
||||
{
|
||||
delete mCheckBox;
|
||||
mCheckBox = NULL;
|
||||
}
|
||||
|
||||
void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color) const
|
||||
{
|
||||
mCheckBox->draw();
|
||||
}
|
||||
|
||||
BOOL LLScrollListCheck::handleClick()
|
||||
{
|
||||
if (mCheckBox->getEnabled())
|
||||
{
|
||||
mCheckBox->toggle();
|
||||
}
|
||||
// don't change selection when clicking on embedded checkbox
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
const LLSD LLScrollListCheck::getValue() const
|
||||
{
|
||||
return mCheckBox->getValue();
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLScrollListCheck::setValue(const LLSD& value)
|
||||
{
|
||||
mCheckBox->setValue(value);
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLScrollListCheck::onCommit()
|
||||
{
|
||||
mCheckBox->onCommit();
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLScrollListCheck::setEnabled(BOOL enable)
|
||||
{
|
||||
mCheckBox->setEnabled(enable);
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListDate
|
||||
//
|
||||
|
||||
LLScrollListDate::LLScrollListDate( const LLScrollListCell::Params& p)
|
||||
: LLScrollListText(p),
|
||||
mDate(p.value().asDate())
|
||||
{}
|
||||
|
||||
void LLScrollListDate::setValue(const LLSD& value)
|
||||
{
|
||||
mDate = value.asDate();
|
||||
LLScrollListText::setValue(mDate.asRFC1123());
|
||||
}
|
||||
|
||||
const LLSD LLScrollListDate::getValue() const
|
||||
{
|
||||
return mDate;
|
||||
}
|
||||
236
indra/llui/llscrolllistcell.h
Normal file
236
indra/llui/llscrolllistcell.h
Normal file
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* @file llscrolllistcell.h
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLSCROLLLISTCELL_H
|
||||
#define LLSCROLLLISTCELL_H
|
||||
|
||||
#include "llfontgl.h" // HAlign
|
||||
#include "llpointer.h" // LLPointer<>
|
||||
#include "lluistring.h"
|
||||
#include "v4color.h"
|
||||
#include "llui.h"
|
||||
#include "llinitparam.h"
|
||||
|
||||
class LLCheckBoxCtrl;
|
||||
class LLSD;
|
||||
|
||||
/*
|
||||
* Represents a cell in a scrollable table.
|
||||
*
|
||||
* Sub-classes must return height and other properties
|
||||
* though width accessors are implemented by the base class.
|
||||
* It is therefore important for sub-class constructors to call
|
||||
* setWidth() with realistic values.
|
||||
*/
|
||||
class LLScrollListCell
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params>
|
||||
{
|
||||
Optional<std::string> type,
|
||||
column;
|
||||
|
||||
Optional<S32> width;
|
||||
Optional<bool> enabled,
|
||||
visible;
|
||||
|
||||
Optional<void*> userdata;
|
||||
Optional<LLSD> value;
|
||||
Optional<std::string> tool_tip;
|
||||
|
||||
Optional<std::string> font;
|
||||
Optional<LLColor4> font_color;
|
||||
Optional<LLFontGL::HAlign> font_halign;
|
||||
Optional<std::string> font_style;
|
||||
|
||||
Optional<LLColor4> color;
|
||||
|
||||
Params()
|
||||
: type("type", "text"),
|
||||
column("column"),
|
||||
width("width"),
|
||||
enabled("enabled", true),
|
||||
visible("visible", true),
|
||||
value("value"),
|
||||
tool_tip("tool_tip", ""),
|
||||
font("font"/*, LLFontGL::getFontSansSerifSmall()*/),
|
||||
font_color("font_color", LLColor4::black),
|
||||
font_style("font-style"),
|
||||
color("color", LLColor4::white),
|
||||
font_halign("halign", LLFontGL::LEFT)
|
||||
{
|
||||
addSynonym(column, "name");
|
||||
addSynonym(font_color, "font-color");
|
||||
}
|
||||
};
|
||||
|
||||
static LLScrollListCell* create(Params);
|
||||
|
||||
LLScrollListCell(const LLScrollListCell::Params&);
|
||||
virtual ~LLScrollListCell() {};
|
||||
|
||||
virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const {}; // truncate to given width, if possible
|
||||
virtual S32 getWidth() const {return mWidth;}
|
||||
virtual S32 getContentWidth() const { return 0; }
|
||||
virtual S32 getHeight() const { return 0; }
|
||||
virtual const LLSD getValue() const;
|
||||
virtual void setValue(const LLSD& value) { }
|
||||
virtual const std::string &getToolTip() const { return mToolTip; }
|
||||
virtual void setToolTip(const std::string &str) { mToolTip = str; }
|
||||
virtual BOOL getVisible() const { return TRUE; }
|
||||
virtual void setWidth(S32 width) { mWidth = width; }
|
||||
virtual void highlightText(S32 offset, S32 num_chars) {}
|
||||
virtual BOOL isText() const { return FALSE; }
|
||||
virtual BOOL needsToolTip() const { return ! mToolTip.empty(); }
|
||||
virtual void setColor(const LLColor4&) {}
|
||||
virtual void onCommit() {};
|
||||
|
||||
virtual BOOL handleClick() { return FALSE; }
|
||||
virtual void setEnabled(BOOL enable) { }
|
||||
|
||||
private:
|
||||
S32 mWidth;
|
||||
std::string mToolTip;
|
||||
};
|
||||
|
||||
class LLScrollListSpacer : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListSpacer(const LLScrollListCell::Params& p) : LLScrollListCell(p) {}
|
||||
/*virtual*/ ~LLScrollListSpacer() {};
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const {}
|
||||
};
|
||||
|
||||
/*
|
||||
* Cell displaying a text label.
|
||||
*/
|
||||
class LLScrollListText : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListText(const LLScrollListCell::Params&);
|
||||
/*virtual*/ ~LLScrollListText();
|
||||
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getContentWidth() const;
|
||||
/*virtual*/ S32 getHeight() const;
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ BOOL getVisible() const;
|
||||
/*virtual*/ void highlightText(S32 offset, S32 num_chars);
|
||||
|
||||
/*virtual*/ void setColor(const LLColor4&);
|
||||
/*virtual*/ BOOL isText() const;
|
||||
/*virtual*/ const std::string & getToolTip() const;
|
||||
/*virtual*/ BOOL needsToolTip() const;
|
||||
|
||||
S32 getTextWidth() const { return mTextWidth;}
|
||||
void setTextWidth(S32 value) { mTextWidth = value;}
|
||||
virtual void setWidth(S32 width) { LLScrollListCell::setWidth(width); mTextWidth = width; }
|
||||
|
||||
void setText(const LLStringExplicit& text);
|
||||
void setFontStyle(const U8 font_style);
|
||||
|
||||
private:
|
||||
LLUIString mText;
|
||||
S32 mTextWidth;
|
||||
const LLFontGL* mFont;
|
||||
LLColor4 mColor;
|
||||
U8 mUseColor;
|
||||
U8 mFontStyle;
|
||||
LLFontGL::HAlign mFontAlignment;
|
||||
BOOL mVisible;
|
||||
S32 mHighlightCount;
|
||||
S32 mHighlightOffset;
|
||||
|
||||
LLPointer<LLUIImage> mRoundedRectImage;
|
||||
|
||||
static U32 sCount;
|
||||
};
|
||||
|
||||
/*
|
||||
* Cell displaying an image.
|
||||
*/
|
||||
class LLScrollListIcon : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListIcon(const LLScrollListCell::Params& p);
|
||||
/*virtual*/ ~LLScrollListIcon();
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getWidth() const;
|
||||
/*virtual*/ S32 getHeight() const;
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ void setColor(const LLColor4&);
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
// <edit>
|
||||
void setClickCallback(boost::function<bool (void)> cb) { mCallback = cb; }
|
||||
/*virtual*/ BOOL handleClick() { return mCallback ? mCallback() : false; }
|
||||
// </edit>
|
||||
|
||||
private:
|
||||
LLPointer<LLUIImage> mIcon;
|
||||
LLColor4 mColor;
|
||||
LLFontGL::HAlign mAlignment;
|
||||
// <edit>
|
||||
boost::function<bool (void)> mCallback;
|
||||
// </edit>
|
||||
};
|
||||
|
||||
/*
|
||||
* An interactive cell containing a check box.
|
||||
*/
|
||||
class LLScrollListCheck : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListCheck( const LLScrollListCell::Params&);
|
||||
/*virtual*/ ~LLScrollListCheck();
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getHeight() const { return 0; }
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ void onCommit();
|
||||
|
||||
/*virtual*/ BOOL handleClick();
|
||||
/*virtual*/ void setEnabled(BOOL enable);
|
||||
|
||||
LLCheckBoxCtrl* getCheckBox() { return mCheckBox; }
|
||||
|
||||
private:
|
||||
LLCheckBoxCtrl* mCheckBox;
|
||||
};
|
||||
|
||||
class LLScrollListDate : public LLScrollListText
|
||||
{
|
||||
public:
|
||||
LLScrollListDate( const LLScrollListCell::Params& p );
|
||||
virtual void setValue(const LLSD& value);
|
||||
virtual const LLSD getValue() const;
|
||||
|
||||
private:
|
||||
LLDate mDate;
|
||||
};
|
||||
|
||||
#endif
|
||||
350
indra/llui/llscrolllistcolumn.cpp
Normal file
350
indra/llui/llscrolllistcolumn.cpp
Normal file
@@ -0,0 +1,350 @@
|
||||
/**
|
||||
* @file llscrollcolumnheader.cpp
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llscrolllistcolumn.h"
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "llkeyboard.h" // For gKeyboard
|
||||
#include "llresizebar.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
const S32 MIN_COLUMN_WIDTH = 20;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// LLScrollColumnHeader
|
||||
//---------------------------------------------------------------------------
|
||||
LLScrollColumnHeader::LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column)
|
||||
: LLButton(name, rect, "square_btn_32x128.tga", "square_btn_selected_32x128.tga", LLStringUtil::null, NULL, LLFontGL::getFontSansSerifSmall()),
|
||||
mColumn(column),
|
||||
mHasResizableElement(FALSE)
|
||||
{
|
||||
setClickedCallback(boost::bind(&LLScrollColumnHeader::onClick, this, _2));
|
||||
setHAlign(LLFontGL::LEFT);
|
||||
|
||||
// resize handles on left and right
|
||||
const S32 RESIZE_BAR_THICKNESS = 3;
|
||||
LLResizeBar::Params resize_bar_p;
|
||||
resize_bar_p.resizing_view(this);
|
||||
resize_bar_p.rect(LLRect(getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0));
|
||||
resize_bar_p.min_size(MIN_COLUMN_WIDTH);
|
||||
resize_bar_p.side(LLResizeBar::RIGHT);
|
||||
resize_bar_p.enabled(false);
|
||||
mResizeBar = LLUICtrlFactory::create<LLResizeBar>(resize_bar_p);
|
||||
addChild(mResizeBar);
|
||||
}
|
||||
|
||||
LLScrollColumnHeader::~LLScrollColumnHeader()
|
||||
{}
|
||||
|
||||
void LLScrollColumnHeader::draw()
|
||||
{
|
||||
std::string sort_column = mColumn->mParentCtrl->getSortColumnName();
|
||||
BOOL draw_arrow = !mColumn->mLabel.empty()
|
||||
&& mColumn->mParentCtrl->isSorted()
|
||||
// check for indirect sorting column as well as column's sorting name
|
||||
&& (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName);
|
||||
|
||||
BOOL is_ascending = mColumn->mParentCtrl->getSortAscending();
|
||||
if (draw_arrow)
|
||||
{
|
||||
setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white);
|
||||
}
|
||||
else
|
||||
{
|
||||
setImageOverlay(LLUUID::null);
|
||||
}
|
||||
|
||||
// Draw children
|
||||
LLButton::draw();
|
||||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLScrollColumnHeader::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
|
||||
{
|
||||
if (!getRect().pointInRect(x,y)) return false;
|
||||
std::string tool_tip = LLUI::sShowXUINames ? getShowNamesToolTip() : getToolTip();
|
||||
if (tool_tip.empty()) tool_tip = getLabelUnselected(); // Fallback on label
|
||||
|
||||
if (!tool_tip.empty())
|
||||
{
|
||||
msg = tool_tip;
|
||||
// Convert rect local to screen coordinates
|
||||
localPointToScreen(0, 0, &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom));
|
||||
localPointToScreen(getRect().getWidth(), getRect().getHeight(), &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop));
|
||||
}
|
||||
return !tool_tip.empty();
|
||||
}
|
||||
|
||||
BOOL LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (canResize() && mResizeBar->getRect().pointInRect(x, y))
|
||||
{
|
||||
// reshape column to max content width
|
||||
mColumn->mParentCtrl->calcMaxContentWidth();
|
||||
LLRect column_rect = getRect();
|
||||
column_rect.mRight = column_rect.mLeft + mColumn->mMaxContentWidth;
|
||||
setShape(column_rect, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
onClick(LLSD());
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::onClick(const LLSD& data)
|
||||
{
|
||||
if (mColumn)
|
||||
{
|
||||
LLScrollListCtrl::onClickColumn(mColumn);
|
||||
}
|
||||
}
|
||||
|
||||
LLView* LLScrollColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding)
|
||||
{
|
||||
// this logic assumes dragging on right
|
||||
llassert(snap_edge == SNAP_RIGHT);
|
||||
|
||||
// use higher snap threshold for column headers
|
||||
threshold = llmin(threshold, 10);
|
||||
|
||||
LLRect snap_rect = getSnapRect();
|
||||
|
||||
mColumn->mParentCtrl->calcMaxContentWidth();
|
||||
|
||||
S32 snap_delta = mColumn->mMaxContentWidth - snap_rect.getWidth();
|
||||
|
||||
// x coord growing means column growing, so same signs mean we're going in right direction
|
||||
if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 )
|
||||
{
|
||||
new_edge_val = snap_rect.mRight + snap_delta;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLScrollListColumn* next_column = mColumn->mParentCtrl->getColumn(mColumn->mIndex + 1);
|
||||
while (next_column)
|
||||
{
|
||||
if (next_column->mHeader)
|
||||
{
|
||||
snap_delta = (next_column->mHeader->getSnapRect().mRight - next_column->mMaxContentWidth) - snap_rect.mRight;
|
||||
if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 )
|
||||
{
|
||||
new_edge_val = snap_rect.mRight + snap_delta;
|
||||
}
|
||||
break;
|
||||
}
|
||||
next_column = mColumn->mParentCtrl->getColumn(next_column->mIndex + 1);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user)
|
||||
{
|
||||
S32 new_width = new_rect.getWidth();
|
||||
S32 delta_width = new_width - (getRect().getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/);
|
||||
|
||||
if (delta_width != 0)
|
||||
{
|
||||
S32 remaining_width = -delta_width;
|
||||
S32 col;
|
||||
for (col = mColumn->mIndex + 1; col < mColumn->mParentCtrl->getNumColumns(); col++)
|
||||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (!columnp) continue;
|
||||
|
||||
if (columnp->mHeader && columnp->mHeader->canResize())
|
||||
{
|
||||
// how many pixels in width can this column afford to give up?
|
||||
S32 resize_buffer_amt = llmax(0, columnp->getWidth() - MIN_COLUMN_WIDTH);
|
||||
|
||||
// user shrinking column, need to add width to other columns
|
||||
if (delta_width < 0)
|
||||
{
|
||||
if (columnp->getWidth() > 0)
|
||||
{
|
||||
// statically sized column, give all remaining width to this column
|
||||
columnp->setWidth(columnp->getWidth() + remaining_width);
|
||||
if (columnp->mRelWidth > 0.f)
|
||||
{
|
||||
columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
|
||||
}
|
||||
// all padding went to this widget, we're done
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// user growing column, need to take width from other columns
|
||||
remaining_width += resize_buffer_amt;
|
||||
|
||||
if (columnp->getWidth() > 0)
|
||||
{
|
||||
columnp->setWidth(columnp->getWidth() - llmin(columnp->getWidth() - MIN_COLUMN_WIDTH, delta_width));
|
||||
if (columnp->mRelWidth > 0.f)
|
||||
{
|
||||
columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
|
||||
}
|
||||
}
|
||||
|
||||
if (remaining_width >= 0)
|
||||
{
|
||||
// width sucked up from neighboring columns, done
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// clamp resize amount to maximum that can be absorbed by other columns
|
||||
if (delta_width > 0)
|
||||
{
|
||||
delta_width += llmin(remaining_width, 0);
|
||||
}
|
||||
|
||||
// propagate constrained delta_width to new width for this column
|
||||
new_width = getRect().getWidth() + delta_width - mColumn->mParentCtrl->getColumnPadding();
|
||||
|
||||
// use requested width
|
||||
mColumn->setWidth(new_width);
|
||||
|
||||
// update proportional spacing
|
||||
if (mColumn->mRelWidth > 0.f)
|
||||
{
|
||||
mColumn->mRelWidth = (F32)new_width / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
|
||||
}
|
||||
|
||||
// tell scroll list to layout columns again
|
||||
// do immediate update to get proper feedback to resize handle
|
||||
// which needs to know how far the resize actually went
|
||||
mColumn->mParentCtrl->dirtyColumns(); //Must flag as dirty, else updateColumns will probably be a noop.
|
||||
mColumn->mParentCtrl->updateColumns();
|
||||
}
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::setHasResizableElement(BOOL resizable)
|
||||
{
|
||||
if (mHasResizableElement != resizable)
|
||||
{
|
||||
mColumn->mParentCtrl->dirtyColumns();
|
||||
mHasResizableElement = resizable;
|
||||
}
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::updateResizeBars()
|
||||
{
|
||||
S32 num_resizable_columns = 0;
|
||||
S32 col;
|
||||
for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
|
||||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (columnp->mHeader && columnp->mHeader->canResize())
|
||||
{
|
||||
num_resizable_columns++;
|
||||
}
|
||||
}
|
||||
|
||||
S32 num_resizers_enabled = 0;
|
||||
|
||||
// now enable/disable resize handles on resizable columns if we have at least two
|
||||
for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
|
||||
{
|
||||
LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
|
||||
if (!columnp->mHeader) continue;
|
||||
BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
|
||||
columnp->mHeader->enableResizeBar(enable);
|
||||
if (enable)
|
||||
{
|
||||
num_resizers_enabled++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLScrollColumnHeader::enableResizeBar(BOOL enable)
|
||||
{
|
||||
mResizeBar->setEnabled(enable);
|
||||
}
|
||||
|
||||
BOOL LLScrollColumnHeader::canResize()
|
||||
{
|
||||
return getVisible() && (mHasResizableElement || mColumn->mDynamicWidth);
|
||||
}
|
||||
|
||||
void LLScrollListColumn::SortNames::declareValues()
|
||||
{
|
||||
declare("ascending", LLScrollListColumn::ASCENDING);
|
||||
declare("descending", LLScrollListColumn::DESCENDING);
|
||||
}
|
||||
|
||||
//
|
||||
// LLScrollListColumn
|
||||
//
|
||||
/* Singu TODO: LLUICtrlFactory::getDefaultParams
|
||||
//static
|
||||
const LLScrollListColumn::Params& LLScrollListColumn::getDefaultParams()
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLScrollListColumn>();
|
||||
}*/
|
||||
|
||||
|
||||
LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent)
|
||||
: mWidth(0),
|
||||
mIndex (-1),
|
||||
mParentCtrl(parent),
|
||||
mName(p.name),
|
||||
mLabel(p.header.label),
|
||||
mHeader(NULL),
|
||||
mMaxContentWidth(0),
|
||||
mDynamicWidth(p.width.dynamic_width),
|
||||
mRelWidth(p.width.relative_width),
|
||||
mFontAlignment(p.halign),
|
||||
mSortingColumn(p.sort_column)
|
||||
{
|
||||
if (p.sort_ascending.isProvided())
|
||||
{
|
||||
mSortDirection = p.sort_ascending() ? ASCENDING : DESCENDING;
|
||||
}
|
||||
else
|
||||
{
|
||||
mSortDirection = p.sort_direction;
|
||||
}
|
||||
|
||||
setWidth(p.width.pixel_width);
|
||||
}
|
||||
|
||||
void LLScrollListColumn::setWidth(S32 width)
|
||||
{
|
||||
if (!mDynamicWidth && mRelWidth <= 0.f)
|
||||
{
|
||||
mParentCtrl->updateStaticColumnWidth(this, width);
|
||||
}
|
||||
mWidth = width;
|
||||
}
|
||||
170
indra/llui/llscrolllistcolumn.h
Normal file
170
indra/llui/llscrolllistcolumn.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/**
|
||||
* @file llscrollcolumnheader.h
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLSCROLLLISTCOLUMN_H
|
||||
#define LLSCROLLLISTCOLUMN_H
|
||||
|
||||
#include "llrect.h"
|
||||
#include "lluistring.h"
|
||||
#include "llbutton.h"
|
||||
#include "llinitparam.h"
|
||||
|
||||
class LLScrollListColumn;
|
||||
class LLResizeBar;
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class LLScrollColumnHeader : public LLButton
|
||||
{
|
||||
public:
|
||||
LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column);
|
||||
~LLScrollColumnHeader();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen);
|
||||
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
||||
/*virtual*/ LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding);
|
||||
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
|
||||
|
||||
LLScrollListColumn* getColumn() { return mColumn; }
|
||||
void setHasResizableElement(BOOL resizable);
|
||||
void updateResizeBars();
|
||||
BOOL canResize();
|
||||
void enableResizeBar(BOOL enable);
|
||||
|
||||
void onClick(const LLSD& data);
|
||||
|
||||
private:
|
||||
LLScrollListColumn* mColumn;
|
||||
LLResizeBar* mResizeBar;
|
||||
BOOL mHasResizableElement;
|
||||
};
|
||||
|
||||
/*
|
||||
* A simple data class describing a column within a scroll list.
|
||||
*/
|
||||
class LLScrollListColumn
|
||||
{
|
||||
public:
|
||||
typedef enum e_sort_direction
|
||||
{
|
||||
DESCENDING,
|
||||
ASCENDING
|
||||
} ESortDirection;
|
||||
|
||||
struct SortNames
|
||||
: public LLInitParam::TypeValuesHelper<LLScrollListColumn::ESortDirection, SortNames>
|
||||
{
|
||||
static void declareValues();
|
||||
};
|
||||
|
||||
struct Params : public LLInitParam::Block<Params>
|
||||
{
|
||||
Optional<std::string> name,
|
||||
tool_tip;
|
||||
Optional<std::string> sort_column;
|
||||
Optional<ESortDirection, SortNames> sort_direction;
|
||||
Optional<bool> sort_ascending;
|
||||
|
||||
struct Width : public LLInitParam::ChoiceBlock<Width>
|
||||
{
|
||||
Alternative<bool> dynamic_width;
|
||||
Alternative<S32> pixel_width;
|
||||
Alternative<F32> relative_width;
|
||||
|
||||
Width()
|
||||
: dynamic_width("dynamic_width", false),
|
||||
pixel_width("width"),
|
||||
relative_width("relative_width", -1.f)
|
||||
{
|
||||
addSynonym(dynamic_width, "dynamicwidth"); // Singu TODO: deprecate and remove
|
||||
addSynonym(relative_width, "relwidth");
|
||||
}
|
||||
};
|
||||
Optional<Width> width;
|
||||
|
||||
// either an image or label is used in column header
|
||||
struct Header : public LLInitParam::ChoiceBlock<Header>
|
||||
{
|
||||
Alternative<std::string> label;
|
||||
Alternative<std::string> image_overlay;
|
||||
Alternative<std::string> image;
|
||||
|
||||
Header()
|
||||
: label("label"),
|
||||
image_overlay("image_overlay"),
|
||||
image("image")
|
||||
{}
|
||||
};
|
||||
Optional<Header> header;
|
||||
|
||||
Optional<LLFontGL::HAlign> halign;
|
||||
|
||||
Params()
|
||||
: name("name"),
|
||||
tool_tip("tool_tip"),
|
||||
sort_column("sort_column"),
|
||||
sort_direction("sort_direction"),
|
||||
sort_ascending("sort_ascending", true),
|
||||
halign("halign", LLFontGL::LEFT)
|
||||
{
|
||||
// default choice to "dynamic_width"
|
||||
changeDefault(width.dynamic_width, true);
|
||||
|
||||
addSynonym(sort_column, "sort");
|
||||
}
|
||||
};
|
||||
|
||||
//static const Params& getDefaultParams();
|
||||
|
||||
//NOTE: this is default constructible so we can store it in a map.
|
||||
LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL);
|
||||
|
||||
void setWidth(S32 width);
|
||||
S32 getWidth() const { return mWidth; }
|
||||
|
||||
public:
|
||||
// Public data is fine so long as this remains a simple struct-like data class.
|
||||
// If it ever gets any smarter than that, these should all become private
|
||||
// with protected or public accessor methods added as needed. -MG
|
||||
std::string mName;
|
||||
std::string mSortingColumn;
|
||||
ESortDirection mSortDirection;
|
||||
LLUIString mLabel;
|
||||
F32 mRelWidth;
|
||||
BOOL mDynamicWidth;
|
||||
S32 mMaxContentWidth;
|
||||
S32 mIndex;
|
||||
LLScrollListCtrl* mParentCtrl;
|
||||
LLScrollColumnHeader* mHeader;
|
||||
LLFontGL::HAlign mFontAlignment;
|
||||
|
||||
private:
|
||||
S32 mWidth;
|
||||
};
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,31 +1,28 @@
|
||||
/**
|
||||
* @file llscrolllistctrl.h
|
||||
* @brief A scrolling list of items. This is the one you want to use
|
||||
* in UI code. LLScrollListCell, LLScrollListItem, etc. are utility
|
||||
* classes.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -37,325 +34,16 @@
|
||||
|
||||
#include "lluictrl.h"
|
||||
#include "llctrlselectioninterface.h"
|
||||
#include "lldarray.h"
|
||||
//#include "lldarray.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llui.h"
|
||||
#include "llstring.h"
|
||||
#include "llimagegl.h"
|
||||
#include "llstring.h" // LLWString
|
||||
#include "lleditmenuhandler.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
|
||||
#include "llscrollbar.h"
|
||||
#include "llresizebar.h"
|
||||
#include "lldate.h"
|
||||
// <edit>
|
||||
#include "lllineeditor.h"
|
||||
#include <boost/function.hpp>
|
||||
// </edit>
|
||||
|
||||
/*
|
||||
* Represents a cell in a scrollable table.
|
||||
*
|
||||
* Sub-classes must return height and other properties
|
||||
* though width accessors are implemented by the base class.
|
||||
* It is therefore important for sub-class constructors to call
|
||||
* setWidth() with realistic values.
|
||||
*/
|
||||
class LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListCell(S32 width = 0) : mWidth(width) {};
|
||||
virtual ~LLScrollListCell() {};
|
||||
virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const = 0; // truncate to given width, if possible
|
||||
virtual S32 getWidth() const {return mWidth;}
|
||||
virtual S32 getContentWidth() const { return 0; }
|
||||
virtual S32 getHeight() const { return 0; }
|
||||
virtual const LLSD getValue() const { return LLStringUtil::null; }
|
||||
virtual void setValue(const LLSD& value) { }
|
||||
virtual BOOL getVisible() const { return TRUE; }
|
||||
virtual void setWidth(S32 width) { mWidth = width; }
|
||||
virtual void highlightText(S32 offset, S32 num_chars) {}
|
||||
virtual BOOL isText() const { return FALSE; }
|
||||
virtual void setColor(const LLColor4&) {}
|
||||
virtual void onCommit() {};
|
||||
|
||||
virtual BOOL handleClick() { return FALSE; }
|
||||
virtual void setEnabled(BOOL enable) { }
|
||||
|
||||
private:
|
||||
S32 mWidth;
|
||||
};
|
||||
|
||||
/*
|
||||
* Cell displaying a text label.
|
||||
*/
|
||||
class LLScrollListText : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListText( const std::string& text, const LLFontGL* font, S32 width = 0, U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, LLColor4& color = LLColor4::black, BOOL use_color = FALSE, BOOL visible = TRUE);
|
||||
/*virtual*/ ~LLScrollListText();
|
||||
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getContentWidth() const;
|
||||
/*virtual*/ S32 getHeight() const;
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ BOOL getVisible() const;
|
||||
/*virtual*/ void highlightText(S32 offset, S32 num_chars);
|
||||
|
||||
/*virtual*/ void setColor(const LLColor4&);
|
||||
/*virtual*/ BOOL isText() const;
|
||||
|
||||
S32 getTextWidth() const { return mTextWidth;}
|
||||
void setTextWidth(S32 value) { mTextWidth = value;}
|
||||
virtual void setWidth(S32 width) { LLScrollListCell::setWidth(width); mTextWidth = width; }
|
||||
|
||||
void setText(const LLStringExplicit& text);
|
||||
void setFontStyle(const U8 font_style);
|
||||
|
||||
private:
|
||||
LLUIString mText;
|
||||
S32 mTextWidth;
|
||||
const LLFontGL* mFont;
|
||||
LLColor4 mColor;
|
||||
U8 mUseColor;
|
||||
U8 mFontStyle;
|
||||
LLFontGL::HAlign mFontAlignment;
|
||||
BOOL mVisible;
|
||||
S32 mHighlightCount;
|
||||
S32 mHighlightOffset;
|
||||
|
||||
LLPointer<LLUIImage> mRoundedRectImage;
|
||||
|
||||
static U32 sCount;
|
||||
};
|
||||
|
||||
/*
|
||||
* Cell displaying an image.
|
||||
*/
|
||||
class LLScrollListIcon : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListIcon( LLUIImagePtr icon, S32 width = 0);
|
||||
LLScrollListIcon(const LLSD& value, S32 width = 0);
|
||||
/*virtual*/ ~LLScrollListIcon();
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getWidth() const;
|
||||
/*virtual*/ S32 getHeight() const;
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ void setColor(const LLColor4&);
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
// <edit>
|
||||
void setClickCallback(boost::function<bool (void)> cb);
|
||||
virtual BOOL handleClick();
|
||||
// </edit>
|
||||
|
||||
private:
|
||||
LLPointer<LLUIImage> mIcon;
|
||||
LLColor4 mColor;
|
||||
// <edit>
|
||||
boost::function<bool (void)> mCallback;
|
||||
// </edit>
|
||||
};
|
||||
|
||||
/*
|
||||
* An interactive cell containing a check box.
|
||||
*/
|
||||
class LLScrollListCheck : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListCheck( LLCheckBoxCtrl* check_box, S32 width = 0);
|
||||
/*virtual*/ ~LLScrollListCheck();
|
||||
/*virtual*/ void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
/*virtual*/ S32 getHeight() const { return 0; }
|
||||
/*virtual*/ const LLSD getValue() const;
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ void onCommit();
|
||||
|
||||
/*virtual*/ BOOL handleClick();
|
||||
/*virtual*/ void setEnabled(BOOL enable);
|
||||
|
||||
LLCheckBoxCtrl* getCheckBox() { return mCheckBox; }
|
||||
|
||||
private:
|
||||
LLCheckBoxCtrl* mCheckBox;
|
||||
};
|
||||
|
||||
|
||||
class LLScrollListDate : public LLScrollListText
|
||||
{
|
||||
public:
|
||||
LLScrollListDate( const LLDate& date, const LLFontGL* font, S32 width=0, U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, LLColor4& color = LLColor4::black, BOOL use_color = FALSE, BOOL visible = TRUE);
|
||||
virtual void setValue(const LLSD& value);
|
||||
virtual const LLSD getValue() const;
|
||||
|
||||
private:
|
||||
LLDate mDate;
|
||||
};
|
||||
|
||||
// <edit>
|
||||
class LLScrollListLineEditor : public LLScrollListCell
|
||||
{
|
||||
public:
|
||||
LLScrollListLineEditor( LLLineEditor* line_editor, S32 width = 0);
|
||||
/*virtual*/ ~LLScrollListLineEditor();
|
||||
virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const;
|
||||
virtual S32 getHeight() const { return 0; }
|
||||
virtual const LLSD getValue() const { return mLineEditor->getValue(); }
|
||||
virtual void setValue(const LLSD& value) { mLineEditor->setValue(value); }
|
||||
virtual void onCommit() { mLineEditor->onCommit(); }
|
||||
virtual BOOL handleClick();
|
||||
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
|
||||
virtual BOOL handleUnicodeCharHere(llwchar uni_char );
|
||||
virtual void setEnabled(BOOL enable) { mLineEditor->setEnabled(enable); }
|
||||
|
||||
LLLineEditor* getLineEditor() { return mLineEditor; }
|
||||
virtual BOOL isText() const { return FALSE; }
|
||||
|
||||
private:
|
||||
LLLineEditor* mLineEditor;
|
||||
};
|
||||
// </edit>
|
||||
|
||||
class LLScrollListColumn;
|
||||
class LLScrollColumnHeader : public LLComboBox
|
||||
{
|
||||
public:
|
||||
LLScrollColumnHeader(const std::string& label, const LLRect &rect, LLScrollListColumn* column, const LLFontGL *font = NULL);
|
||||
~LLScrollColumnHeader();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
||||
/*virtual*/ void showList();
|
||||
/*virtual*/ LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding);
|
||||
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
|
||||
|
||||
void setImage(const std::string &image_name);
|
||||
void setImageOverlay(const std::string &overlay_image, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
|
||||
LLScrollListColumn* getColumn() { return mColumn; }
|
||||
void setHasResizableElement(BOOL resizable);
|
||||
void updateResizeBars();
|
||||
BOOL canResize();
|
||||
void enableResizeBar(BOOL enable);
|
||||
std::string getLabel() { return mOrigLabel; }
|
||||
|
||||
void onSelectSort();
|
||||
void onClick();
|
||||
void onMouseDown();
|
||||
|
||||
private:
|
||||
LLScrollListColumn* mColumn;
|
||||
LLResizeBar* mResizeBar;
|
||||
std::string mOrigLabel;
|
||||
LLUIString mAscendingText;
|
||||
LLUIString mDescendingText;
|
||||
BOOL mShowSortOptions;
|
||||
BOOL mHasResizableElement;
|
||||
|
||||
LLPointer<LLUIImage> mImageOverlay;
|
||||
LLFontGL::HAlign mImageOverlayAlignment;
|
||||
LLColor4 mImageOverlayColor;
|
||||
};
|
||||
|
||||
/*
|
||||
* A simple data class describing a column within a scroll list.
|
||||
*/
|
||||
class LLScrollListColumn
|
||||
{
|
||||
public:
|
||||
typedef enum e_sort_direction
|
||||
{
|
||||
DESCENDING,
|
||||
ASCENDING
|
||||
} ESortDirection;
|
||||
LLScrollListColumn();
|
||||
LLScrollListColumn(const LLSD &sd, LLScrollListCtrl* parent);
|
||||
|
||||
void setWidth(S32 width);
|
||||
S32 getWidth() const { return mWidth; }
|
||||
|
||||
// Public data is fine so long as this remains a simple struct-like data class.
|
||||
// If it ever gets any smarter than that, these should all become private
|
||||
// with protected or public accessor methods added as needed. -MG
|
||||
std::string mName;
|
||||
std::string mSortingColumn;
|
||||
ESortDirection mSortDirection;
|
||||
std::string mLabel;
|
||||
F32 mRelWidth;
|
||||
BOOL mDynamicWidth;
|
||||
S32 mMaxContentWidth;
|
||||
S32 mIndex;
|
||||
LLScrollListCtrl* mParentCtrl;
|
||||
LLScrollColumnHeader* mHeader;
|
||||
LLFontGL::HAlign mFontAlignment;
|
||||
|
||||
private:
|
||||
S32 mWidth;
|
||||
|
||||
};
|
||||
|
||||
class LLScrollListItem : public LLHandleProvider<LLScrollListItem>
|
||||
{
|
||||
public:
|
||||
LLScrollListItem( BOOL enabled = TRUE, void* userdata = NULL, const LLUUID& uuid = LLUUID::null )
|
||||
: mSelected(FALSE), mEnabled( enabled ), mUserdata( userdata ), mItemValue( uuid ), mColumns() {}
|
||||
LLScrollListItem( LLSD item_value, void* userdata = NULL )
|
||||
: mSelected(FALSE), mEnabled( TRUE ), mUserdata( userdata ), mItemValue( item_value ), mColumns() {}
|
||||
|
||||
virtual ~LLScrollListItem();
|
||||
|
||||
void setSelected( BOOL b ) { mSelected = b; }
|
||||
BOOL getSelected() const { return mSelected; }
|
||||
|
||||
void setEnabled( BOOL b ) { mEnabled = b; }
|
||||
BOOL getEnabled() const { return mEnabled; }
|
||||
|
||||
void setUserdata( void* userdata ) { mUserdata = userdata; }
|
||||
void* getUserdata() const { return mUserdata; }
|
||||
|
||||
void setToolTip(const std::string tool_tip) { mToolTip=tool_tip; }
|
||||
std::string getToolTip() { return mToolTip; }
|
||||
|
||||
virtual LLUUID getUUID() const { return mItemValue.asUUID(); }
|
||||
LLSD getValue() const { return mItemValue; }
|
||||
|
||||
void setRect(LLRect rect) { mRectangle = rect; }
|
||||
LLRect getRect() const { return mRectangle; }
|
||||
|
||||
// If width = 0, just use the width of the text. Otherwise override with
|
||||
// specified width in pixels.
|
||||
void addColumn( const std::string& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE)
|
||||
{ mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); }
|
||||
|
||||
void addColumn( LLUIImagePtr icon, S32 width = 0 )
|
||||
{ mColumns.push_back( new LLScrollListIcon(icon, width) ); }
|
||||
|
||||
void addColumn( LLCheckBoxCtrl* check, S32 width = 0 )
|
||||
{ mColumns.push_back( new LLScrollListCheck(check,width) ); }
|
||||
|
||||
void setNumColumns(S32 columns);
|
||||
|
||||
void setColumn( S32 column, LLScrollListCell *cell );
|
||||
|
||||
S32 getNumColumns() const;
|
||||
|
||||
LLScrollListCell *getColumn(const S32 i) const;
|
||||
|
||||
std::string getContentsCSV() const;
|
||||
|
||||
virtual void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
|
||||
|
||||
private:
|
||||
BOOL mSelected;
|
||||
BOOL mEnabled;
|
||||
void* mUserdata;
|
||||
LLSD mItemValue;
|
||||
std::string mToolTip;
|
||||
std::vector<LLScrollListCell *> mColumns;
|
||||
LLRect mRectangle;
|
||||
};
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
|
||||
class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
|
||||
public LLCtrlListInterface, public LLCtrlScrollInterface
|
||||
@@ -386,13 +74,10 @@ public:
|
||||
|
||||
|
||||
typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32> > sort_signal_t;
|
||||
LLScrollListCtrl(
|
||||
const std::string& name,
|
||||
const LLRect& rect,
|
||||
commit_callback_t commit_callback,
|
||||
BOOL allow_multiple_selection,
|
||||
BOOL draw_border = TRUE, bool draw_heading = false);
|
||||
|
||||
LLScrollListCtrl(const std::string& name, const LLRect& rect, commit_callback_t commit_callback, bool multi_select, bool has_border = true, bool draw_heading = false);
|
||||
|
||||
public:
|
||||
virtual ~LLScrollListCtrl();
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
@@ -404,16 +89,16 @@ public:
|
||||
void deleteAllItems() { clearRows(); }
|
||||
|
||||
// Sets an array of column descriptors
|
||||
void setColumnHeadings(LLSD headings);
|
||||
void setColumnHeadings(const LLSD& headings);
|
||||
void sortByColumnIndex(U32 column, BOOL ascending);
|
||||
|
||||
// LLCtrlListInterface functions
|
||||
virtual S32 getItemCount() const;
|
||||
// Adds a single column descriptor: ["name" : string, "label" : string, "width" : integer, "relwidth" : integer ]
|
||||
virtual void addColumn(const LLScrollListColumn::Params& column, EAddPosition pos = ADD_BOTTOM);
|
||||
virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM);
|
||||
virtual void clearColumns();
|
||||
virtual void setColumnLabel(const std::string& column, const std::string& label);
|
||||
|
||||
virtual LLScrollListColumn* getColumn(S32 index);
|
||||
virtual LLScrollListColumn* getColumn(const std::string& name);
|
||||
virtual S32 getNumColumns() const { return mColumnsIndexed.size(); }
|
||||
@@ -421,7 +106,9 @@ public:
|
||||
// Adds a single element, from an array of:
|
||||
// "columns" => [ "column" => column name, "value" => value, "type" => type, "font" => font, "font-style" => style ], "id" => uuid
|
||||
// Creates missing columns automatically.
|
||||
virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
|
||||
virtual LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
|
||||
virtual LLScrollListItem* addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM);
|
||||
virtual LLScrollListItem* addRow(const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM);
|
||||
// Simple add element. Takes a single array of:
|
||||
// [ "value" => value, "font" => font, "font-style" => style ]
|
||||
virtual void clearRows(); // clears all elements
|
||||
@@ -473,8 +160,8 @@ public:
|
||||
S32 getHighlightedItemInx() const { return mHighlightedItem; }
|
||||
|
||||
void setDoubleClickCallback( callback_t cb ) { mOnDoubleClickCallback = cb; }
|
||||
void setMaximumSelectCallback( callback_t cb ) { mOnMaximumSelectCallback = cb; }
|
||||
void setSortChangedCallback( callback_t cb ) { mOnSortChangedCallback = cb; }
|
||||
void setMaximumSelectCallback( callback_t cb) { mOnMaximumSelectCallback = cb; }
|
||||
void setSortChangedCallback( callback_t cb) { mOnSortChangedCallback = cb; }
|
||||
// Convenience function; *TODO: replace with setter above + boost::bind() in calling code
|
||||
void setDoubleClickCallback( boost::function<void (void* userdata)> cb, void* userdata) { mOnDoubleClickCallback = boost::bind(cb, userdata); }
|
||||
|
||||
@@ -495,7 +182,6 @@ public:
|
||||
// one of which can be selected at a time.
|
||||
virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
|
||||
|
||||
|
||||
BOOL selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE ); // FALSE if item not found
|
||||
BOOL selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE);
|
||||
BOOL selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE);
|
||||
@@ -506,7 +192,7 @@ public:
|
||||
// DEPRECATED: Use LLSD versions of addCommentText() and getSelectedValue().
|
||||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0);
|
||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||
LLUUID getStringUUIDSelectedItem() const;
|
||||
|
||||
LLScrollListItem* getFirstSelected() const;
|
||||
@@ -531,7 +217,7 @@ public:
|
||||
void setBgStripeColor(const LLColor4& c) { mBgStripeColor = c; }
|
||||
void setFgSelectedColor(const LLColor4 &c) { mFgSelectedColor = c; }
|
||||
void setFgUnselectedColor(const LLColor4 &c){ mFgUnselectedColor = c; }
|
||||
void setHighlightedColor(const LLColor4 &c) { mHighlightedColor = c; }
|
||||
void setHighlightedColor(const LLColor4 &c) { mHighlightedColor = c; }
|
||||
void setFgDisableColor(const LLColor4 &c) { mFgDisabledColor = c; }
|
||||
|
||||
void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; }
|
||||
@@ -548,11 +234,11 @@ public:
|
||||
|
||||
virtual S32 getScrollPos() const;
|
||||
virtual void setScrollPos( S32 pos );
|
||||
|
||||
|
||||
// <edit>
|
||||
S32 getPageLines() { return mPageLines; }
|
||||
// </edit>
|
||||
|
||||
|
||||
S32 getSearchColumn();
|
||||
void setSearchColumn(S32 column) { mSearchColumn = column; }
|
||||
S32 getColumnIndexFromOffset(S32 x);
|
||||
@@ -592,7 +278,7 @@ public:
|
||||
LLRect getCellRect(S32 row_index, S32 column_index);
|
||||
|
||||
// Used "internally" by the scroll bar.
|
||||
void onScrollChange( S32 new_pos, LLScrollbar* src);
|
||||
void onScrollChange( S32 new_pos, LLScrollbar* src );
|
||||
|
||||
static void onClickColumn(void *userdata);
|
||||
|
||||
@@ -601,7 +287,6 @@ public:
|
||||
bool updateColumnWidths();
|
||||
S32 getMaxContentWidth() { return mMaxContentWidth; }
|
||||
|
||||
void setDisplayHeading(BOOL display);
|
||||
void setHeadingHeight(S32 heading_height);
|
||||
/**
|
||||
* Sets max visible lines without scroolbar, if this value equals to 0,
|
||||
@@ -660,6 +345,7 @@ public:
|
||||
return mSortCallback->connect(cb);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
// "Full" interface: use this when you're creating a list that has one or more of the following:
|
||||
// * contains icons
|
||||
@@ -736,7 +422,6 @@ private:
|
||||
LLColor4 mFgUnselectedColor;
|
||||
LLColor4 mFgDisabledColor;
|
||||
LLColor4 mHighlightedColor;
|
||||
LLColor4 mDefaultListTextColor;
|
||||
|
||||
S32 mBorderThickness;
|
||||
callback_t mOnDoubleClickCallback;
|
||||
@@ -773,5 +458,4 @@ private:
|
||||
sort_signal_t* mSortCallback;
|
||||
}; // end class LLScrollListCtrl
|
||||
|
||||
|
||||
#endif // LL_SCROLLLISTCTRL_H
|
||||
|
||||
147
indra/llui/llscrolllistitem.cpp
Normal file
147
indra/llui/llscrolllistitem.cpp
Normal file
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
* @file llscrolllistitem.cpp
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llscrolllistitem.h"
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// LLScrollListItem
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
LLScrollListItem::LLScrollListItem( const Params& p )
|
||||
: mSelected(FALSE),
|
||||
mEnabled(p.enabled),
|
||||
mUserdata(p.userdata),
|
||||
mItemValue(p.value),
|
||||
mColumns()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLScrollListItem::~LLScrollListItem()
|
||||
{
|
||||
std::for_each(mColumns.begin(), mColumns.end(), DeletePointer());
|
||||
}
|
||||
|
||||
void LLScrollListItem::addColumn(const LLScrollListCell::Params& p)
|
||||
{
|
||||
mColumns.push_back(LLScrollListCell::create(p));
|
||||
}
|
||||
|
||||
void LLScrollListItem::setNumColumns(S32 columns)
|
||||
{
|
||||
S32 prev_columns = mColumns.size();
|
||||
if (columns < prev_columns)
|
||||
{
|
||||
std::for_each(mColumns.begin()+columns, mColumns.end(), DeletePointer());
|
||||
}
|
||||
|
||||
mColumns.resize(columns);
|
||||
|
||||
for (S32 col = prev_columns; col < columns; ++col)
|
||||
{
|
||||
mColumns[col] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell )
|
||||
{
|
||||
if (column < (S32)mColumns.size())
|
||||
{
|
||||
delete mColumns[column];
|
||||
mColumns[column] = cell;
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "LLScrollListItem::setColumn: bad column: " << column << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
S32 LLScrollListItem::getNumColumns() const
|
||||
{
|
||||
return mColumns.size();
|
||||
}
|
||||
|
||||
LLScrollListCell* LLScrollListItem::getColumn(const S32 i) const
|
||||
{
|
||||
if (0 <= i && i < (S32)mColumns.size())
|
||||
{
|
||||
return mColumns[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::string LLScrollListItem::getContentsCSV() const
|
||||
{
|
||||
std::string ret;
|
||||
|
||||
S32 count = getNumColumns();
|
||||
for (S32 i=0; i<count; ++i)
|
||||
{
|
||||
ret += getColumn(i)->getValue().asString();
|
||||
if (i < count-1)
|
||||
{
|
||||
ret += ", ";
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding)
|
||||
{
|
||||
// draw background rect
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLRect bg_rect = rect;
|
||||
gl_rect_2d( bg_rect, bg_color );
|
||||
|
||||
S32 cur_x = rect.mLeft;
|
||||
S32 num_cols = getNumColumns();
|
||||
S32 cur_col = 0;
|
||||
|
||||
for (LLScrollListCell* cell = getColumn(0); cur_col < num_cols; cell = getColumn(++cur_col))
|
||||
{
|
||||
// Two ways a cell could be hidden
|
||||
if (cell->getWidth() < 0
|
||||
|| !cell->getVisible()) continue;
|
||||
|
||||
LLUI::pushMatrix();
|
||||
{
|
||||
LLUI::translate((F32) cur_x, (F32) rect.mBottom);
|
||||
|
||||
cell->draw( fg_color, highlight_color );
|
||||
}
|
||||
LLUI::popMatrix();
|
||||
|
||||
cur_x += cell->getWidth() + column_padding;
|
||||
}
|
||||
}
|
||||
|
||||
112
indra/llui/llscrolllistitem.h
Normal file
112
indra/llui/llscrolllistitem.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* @file llscrolllistitem.h
|
||||
* @brief Scroll lists are composed of rows (items), each of which
|
||||
* contains columns (cells).
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLSCROLLLISTITEM_H
|
||||
#define LLSCROLLLISTITEM_H
|
||||
|
||||
#include "llrefcount.h"
|
||||
#include "llhandle.h"
|
||||
#include "llsd.h"
|
||||
#include "llscrolllistcell.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// LLScrollListItem
|
||||
//---------------------------------------------------------------------------
|
||||
class LLScrollListItem
|
||||
: public LLHandleProvider<LLScrollListItem> // Singu TODO: Break out into LLNameListItem
|
||||
{
|
||||
friend class LLScrollListCtrl;
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params>
|
||||
{
|
||||
Optional<bool> enabled;
|
||||
Optional<void*> userdata;
|
||||
Optional<LLSD> value;
|
||||
|
||||
Ignored name; // use for localization tools
|
||||
Ignored type;
|
||||
Ignored length;
|
||||
|
||||
Multiple<LLScrollListCell::Params> columns;
|
||||
|
||||
Params()
|
||||
: enabled("enabled", true),
|
||||
value("value"),
|
||||
name("name"),
|
||||
type("type"),
|
||||
length("length"),
|
||||
columns("columns")
|
||||
{
|
||||
addSynonym(columns, "column");
|
||||
addSynonym(value, "id");
|
||||
}
|
||||
};
|
||||
|
||||
virtual ~LLScrollListItem();
|
||||
|
||||
void setSelected( BOOL b ) { mSelected = b; }
|
||||
BOOL getSelected() const { return mSelected; }
|
||||
|
||||
void setEnabled( BOOL b ) { mEnabled = b; }
|
||||
BOOL getEnabled() const { return mEnabled; }
|
||||
|
||||
void setUserdata( void* userdata ) { mUserdata = userdata; }
|
||||
void* getUserdata() const { return mUserdata; }
|
||||
|
||||
virtual LLUUID getUUID() const { return mItemValue.asUUID(); }
|
||||
LLSD getValue() const { return mItemValue; }
|
||||
|
||||
void setRect(LLRect rect) { mRectangle = rect; }
|
||||
LLRect getRect() const { return mRectangle; }
|
||||
|
||||
void addColumn( const LLScrollListCell::Params& p );
|
||||
|
||||
void setNumColumns(S32 columns);
|
||||
|
||||
void setColumn( S32 column, LLScrollListCell *cell );
|
||||
|
||||
S32 getNumColumns() const;
|
||||
|
||||
LLScrollListCell *getColumn(const S32 i) const;
|
||||
|
||||
std::string getContentsCSV() const;
|
||||
|
||||
virtual void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
|
||||
|
||||
protected:
|
||||
LLScrollListItem( const Params& );
|
||||
|
||||
private:
|
||||
BOOL mSelected;
|
||||
BOOL mEnabled;
|
||||
void* mUserdata;
|
||||
LLSD mItemValue;
|
||||
std::vector<LLScrollListCell *> mColumns;
|
||||
LLRect mRectangle;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -4326,17 +4326,6 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>ColumnHeaderDropDownDelay</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Time in seconds of mouse click before column header shows sort options list</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.300000011921</real>
|
||||
</map>
|
||||
<key>CompileOutputRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -38,7 +38,6 @@ this feature is still a work in progress.
|
||||
|
||||
/* basic headers */
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
/* own class header && upload floater header */
|
||||
#include "floaterlocalassetbrowse.h"
|
||||
@@ -50,6 +49,12 @@ this feature is still a work in progress.
|
||||
#include "llimagejpeg.h"
|
||||
#include "llimagepng.h"
|
||||
|
||||
/* llui headers */
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
/* misc headers */
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
@@ -60,13 +65,7 @@ this feature is still a work in progress.
|
||||
#include "llfloaterimagepreview.h"
|
||||
#include "llfile.h"
|
||||
|
||||
/* repeated in header */
|
||||
#include "lltexturectrl.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
/* including to force rebakes when needed */
|
||||
#include "llagent.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
/* sculpt refresh */
|
||||
|
||||
@@ -44,6 +44,8 @@ tag: vaa emerald local_asset_browser
|
||||
#include "lldrawable.h"
|
||||
#include "lleventtimer.h"
|
||||
|
||||
class LLCheckBoxCtrl;
|
||||
class LLComboBox;
|
||||
|
||||
/*=======================================*/
|
||||
/* Global structs / enums / defines */
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
// static variable
|
||||
HBFloaterGroupTitles* HBFloaterGroupTitles::sInstance = NULL;
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
|
||||
#include "llfiltereditor.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "lltracker.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
|
||||
const std::string request_string = "JCFloaterAreaSearch::Requested_\xF8\xA7\xB5";
|
||||
const F32 min_refresh_interval = 0.25f; // Minimum interval between list refreshes in seconds.
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
// Included so that constants/settings might be initialized
|
||||
// in save_settings_to_globals()
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "llsurface.h"
|
||||
#include "llvosky.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "llavatarnamecache.h" // IDEVO
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h" // for LLNotificationsUtil
|
||||
#include "llnotificationsutil.h"
|
||||
#include "roles_constants.h" // for GP_MEMBER_INVITE
|
||||
|
||||
#include "llagent.h"
|
||||
@@ -75,6 +75,9 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
|
||||
payload["name"] = name;
|
||||
|
||||
LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
|
||||
|
||||
// add friend to recent people list
|
||||
//LLRecentPeople::instance().add(id);
|
||||
}
|
||||
|
||||
void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
|
||||
@@ -218,7 +221,6 @@ static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLAvatarActions::startCall(const LLUUID& id)
|
||||
{
|
||||
@@ -240,8 +242,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -568,8 +569,8 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id)
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_MEMBER_INVITE);
|
||||
//widget->removeNoneOption();
|
||||
widget->setSelectCallback(callback_invite_to_group, (void*)&id);
|
||||
widget->removeNoneOption();
|
||||
widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,10 +626,10 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, void* id)
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
|
||||
{
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(*static_cast<const LLUUID*>(id));
|
||||
agent_ids.push_back(id);
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
|
||||
}
|
||||
@@ -725,7 +726,6 @@ void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::stri
|
||||
|
||||
LLSD payload;
|
||||
payload["from_id"] = target_id;
|
||||
//payload["SUPPRESS_TOAST"] = true;
|
||||
LLNotificationsUtil::add("FriendshipOffered", args, payload);
|
||||
}
|
||||
|
||||
@@ -754,4 +754,3 @@ bool LLAvatarActions::canBlock(const LLUUID& id)
|
||||
bool is_self = id == gAgentID;
|
||||
return !is_self && !is_linden;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ private:
|
||||
static bool handleKick(const LLSD& notification, const LLSD& response);
|
||||
static bool handleFreeze(const LLSD& notification, const LLSD& response);
|
||||
static bool handleUnfreeze(const LLSD& notification, const LLSD& response);
|
||||
static void callback_invite_to_group(LLUUID group_id, void* id);
|
||||
static void callback_invite_to_group(LLUUID group_id, LLUUID id);
|
||||
|
||||
public:
|
||||
// Just request friendship, no dialog.
|
||||
|
||||
@@ -20,12 +20,14 @@
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "llvoavatar.h"
|
||||
#include "llimview.h"
|
||||
@@ -493,6 +495,7 @@ void LLFloaterAvatarList::assessColumns()
|
||||
|
||||
client_col->mDynamicWidth = !client_hidden;
|
||||
name_col->mDynamicWidth = client_hidden;
|
||||
mAvatarList->setNumDynamicColumns(1); // Dynamic width is set on only one column, be sure to let the list know, otherwise we may divide by zero
|
||||
|
||||
if(!client_hidden)
|
||||
{
|
||||
@@ -775,7 +778,7 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
|
||||
BOOST_FOREACH(av_list_t::value_type& entry, mAvatars)
|
||||
{
|
||||
LLSD element;
|
||||
LLScrollListItem::Params element;
|
||||
LLUUID av_id;
|
||||
std::string av_name;
|
||||
|
||||
@@ -822,33 +825,30 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
continue;
|
||||
}
|
||||
|
||||
element.value = av_id;
|
||||
|
||||
element["id"] = av_id;
|
||||
|
||||
element["columns"][LIST_MARK]["column"] = "marked";
|
||||
element["columns"][LIST_MARK]["type"] = "text";
|
||||
LLScrollListCell::Params mark;
|
||||
mark.column = "marked";
|
||||
mark.type = "text";
|
||||
if (entry->isMarked())
|
||||
{
|
||||
element["columns"][LIST_MARK]["value"] = "X";
|
||||
element["columns"][LIST_MARK]["color"] = LLColor4::blue.getValue();
|
||||
element["columns"][LIST_MARK]["font-style"] = "BOLD";
|
||||
}
|
||||
else
|
||||
{
|
||||
element["columns"][LIST_MARK]["value"] = "";
|
||||
mark.value = "X";
|
||||
mark.color = LLColor4::blue;
|
||||
mark.font_style = "BOLD";
|
||||
}
|
||||
|
||||
element["columns"][LIST_AVATAR_NAME]["column"] = "avatar_name";
|
||||
element["columns"][LIST_AVATAR_NAME]["type"] = "text";
|
||||
element["columns"][LIST_AVATAR_NAME]["value"] = av_name;
|
||||
LLScrollListCell::Params name;
|
||||
name.column = "avatar_name";
|
||||
name.type = "text";
|
||||
name.value = av_name;
|
||||
if (entry->isFocused())
|
||||
{
|
||||
element["columns"][LIST_AVATAR_NAME]["font-style"] = "BOLD";
|
||||
name.font_style = "BOLD";
|
||||
}
|
||||
|
||||
//<edit> custom colors for certain types of avatars!
|
||||
//Changed a bit so people can modify them in settings. And since they're colors, again it's possibly account-based. Starting to think I need a function just to determine that. - HgB
|
||||
//element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapAvatar" ).getValue();
|
||||
//name.color = gColors.getColor( "MapAvatar" );
|
||||
LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition());
|
||||
LLUUID estate_owner = LLUUID::null;
|
||||
if(parent_estate && parent_estate->isAlive())
|
||||
@@ -892,12 +892,13 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
|
||||
name_color = name_color*0.5f + unselected_color*0.5f;
|
||||
|
||||
element["columns"][LIST_AVATAR_NAME]["color"] = name_color.getValue();
|
||||
name.color = name_color;
|
||||
|
||||
char temp[32];
|
||||
LLColor4 color = sDefaultListText;
|
||||
element["columns"][LIST_DISTANCE]["column"] = "distance";
|
||||
element["columns"][LIST_DISTANCE]["type"] = "text";
|
||||
LLScrollListCell::Params dist;
|
||||
dist.column = "distance";
|
||||
dist.type = "text";
|
||||
if (UnknownAltitude)
|
||||
{
|
||||
strcpy(temp, "?");
|
||||
@@ -929,9 +930,10 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
snprintf(temp, sizeof(temp), "%d", (S32)distance);
|
||||
}
|
||||
}
|
||||
element["columns"][LIST_DISTANCE]["value"] = temp;
|
||||
element["columns"][LIST_DISTANCE]["color"] = color.getValue();
|
||||
dist.value = temp;
|
||||
dist.color = color;
|
||||
|
||||
LLScrollListCell::Params pos;
|
||||
position = position - simpos;
|
||||
|
||||
S32 x = (S32)position.mdV[VX];
|
||||
@@ -960,12 +962,13 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
strcat(temp, "E");
|
||||
}
|
||||
}
|
||||
element["columns"][LIST_POSITION]["column"] = "position";
|
||||
element["columns"][LIST_POSITION]["type"] = "text";
|
||||
element["columns"][LIST_POSITION]["value"] = temp;
|
||||
pos.column = "position";
|
||||
pos.type = "text";
|
||||
pos.value = temp;
|
||||
|
||||
element["columns"][LIST_ALTITUDE]["column"] = "altitude";
|
||||
element["columns"][LIST_ALTITUDE]["type"] = "text";
|
||||
LLScrollListCell::Params alt;
|
||||
alt.column = "altitude";
|
||||
alt.type = "text";
|
||||
if (UnknownAltitude)
|
||||
{
|
||||
strcpy(temp, "?");
|
||||
@@ -974,10 +977,11 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
{
|
||||
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
|
||||
}
|
||||
element["columns"][LIST_ALTITUDE]["value"] = temp;
|
||||
alt.value = temp;
|
||||
|
||||
element["columns"][LIST_ACTIVITY]["column"] = "activity";
|
||||
element["columns"][LIST_ACTIVITY]["type"] = "icon";
|
||||
LLScrollListCell::Params act;
|
||||
act.column = "activity";
|
||||
act.type = "icon";
|
||||
|
||||
std::string activity_icon = "";
|
||||
std::string activity_tip = "";
|
||||
@@ -1029,12 +1033,13 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
break;
|
||||
}
|
||||
|
||||
element["columns"][LIST_ACTIVITY]["value"] = activity_icon;//icon_image_id; //"icn_active-speakers-dot-lvl0.tga";
|
||||
//element["columns"][LIST_AVATAR_ACTIVITY]["color"] = icon_color.getValue();
|
||||
element["columns"][LIST_ACTIVITY]["tool_tip"] = activity_tip;
|
||||
act.value = activity_icon;//icon_image_id; //"icn_active-speakers-dot-lvl0.tga";
|
||||
//act.color = icon_color;
|
||||
act.tool_tip = activity_tip;
|
||||
|
||||
element["columns"][LIST_AGE]["column"] = "age";
|
||||
element["columns"][LIST_AGE]["type"] = "text";
|
||||
LLScrollListCell::Params agep;
|
||||
agep.column = "age";
|
||||
agep.type = "text";
|
||||
color = sDefaultListText;
|
||||
std::string age = boost::lexical_cast<std::string>(entry->mAge);
|
||||
if (entry->mAge > -1)
|
||||
@@ -1054,23 +1059,22 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
{
|
||||
age = "?";
|
||||
}
|
||||
element["columns"][LIST_AGE]["value"] = age;
|
||||
element["columns"][LIST_AGE]["color"] = color.getValue();
|
||||
agep.value = age;
|
||||
agep.color = color;
|
||||
|
||||
int dur = difftime(time(NULL), entry->getTime());
|
||||
int hours = dur / 3600;
|
||||
int mins = (dur % 3600) / 60;
|
||||
int secs = (dur % 3600) % 60;
|
||||
|
||||
element["columns"][LIST_TIME]["column"] = "time";
|
||||
element["columns"][LIST_TIME]["type"] = "text";
|
||||
element["columns"][LIST_TIME]["value"] = llformat("%d:%02d:%02d", hours, mins, secs);
|
||||
LLScrollListCell::Params time;
|
||||
time.column = "time";
|
||||
time.type = "text";
|
||||
time.value = llformat("%d:%02d:%02d", hours, mins, secs);
|
||||
|
||||
element["columns"][LIST_CLIENT]["column"] = "client";
|
||||
element["columns"][LIST_CLIENT]["type"] = "text";
|
||||
|
||||
//element["columns"][LIST_METADATA]["column"] = "metadata";
|
||||
//element["columns"][LIST_METADATA]["type"] = "text";
|
||||
LLScrollListCell::Params viewer;
|
||||
viewer.column = "client";
|
||||
viewer.type = "text";
|
||||
|
||||
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor",LLColor4(0.98f, 0.69f, 0.36f, 1.f));
|
||||
LLColor4 client_color(avatar_name_color);
|
||||
@@ -1084,27 +1088,30 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
client_color = unselected_color;
|
||||
client = "?";
|
||||
}
|
||||
element["columns"][LIST_CLIENT]["value"] = client.c_str();
|
||||
|
||||
// <dogmode>
|
||||
// Don't expose Emerald's metadata.
|
||||
|
||||
//if(avatarp->extraMetadata.length())
|
||||
//{
|
||||
// element["columns"][LIST_METADATA]["value"] = avatarp->extraMetadata.c_str();
|
||||
//}
|
||||
viewer.value = client.c_str();
|
||||
}
|
||||
else
|
||||
{
|
||||
element["columns"][LIST_CLIENT]["value"] = "Out Of Range";
|
||||
viewer.value = getString("Out Of Range");
|
||||
}
|
||||
//Blend to make the color show up better
|
||||
client_color = client_color *.5f + unselected_color * .5f;
|
||||
|
||||
element["columns"][LIST_CLIENT]["color"] = client_color.getValue();
|
||||
viewer.color = client_color;
|
||||
|
||||
// Add individual column cell params to the item param
|
||||
element.columns.add(mark);
|
||||
element.columns.add(name);
|
||||
element.columns.add(dist);
|
||||
element.columns.add(pos);
|
||||
element.columns.add(alt);
|
||||
element.columns.add(act);
|
||||
element.columns.add(agep);
|
||||
element.columns.add(time);
|
||||
element.columns.add(viewer);
|
||||
|
||||
// Add to list
|
||||
mAvatarList->addElement(element, ADD_BOTTOM);
|
||||
mAvatarList->addRow(element);
|
||||
}
|
||||
|
||||
// finish
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h" // getCapability()
|
||||
#include "llworld.h"
|
||||
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Linden libraries
|
||||
#include "llavatarnamecache.h" // IDEVO
|
||||
@@ -43,13 +46,11 @@
|
||||
#include "llcachename.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "message.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//put it back as a member once the legacy path is out?
|
||||
static std::map<LLUUID, LLAvatarName> sAvatarNameMap;
|
||||
@@ -81,12 +82,13 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
|
||||
}
|
||||
|
||||
// Default constructor
|
||||
LLFloaterAvatarPicker::LLFloaterAvatarPicker() :
|
||||
LLFloater(),
|
||||
LLFloaterAvatarPicker::LLFloaterAvatarPicker()
|
||||
: LLFloater(),
|
||||
mNumResultsReturned(0),
|
||||
mNearMeListComplete(FALSE),
|
||||
mCloseOnSelect(FALSE)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_picker.xml", NULL);
|
||||
}
|
||||
|
||||
@@ -111,7 +113,6 @@ BOOL LLFloaterAvatarPicker::postBuild()
|
||||
|
||||
LLScrollListCtrl* friends = getChild<LLScrollListCtrl>("Friends");
|
||||
friends->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
|
||||
childSetAction("RefreshFriends", boost::bind(&LLFloaterAvatarPicker::populateFriend, this));
|
||||
getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this));
|
||||
|
||||
childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
|
||||
@@ -130,7 +131,7 @@ BOOL LLFloaterAvatarPicker::postBuild()
|
||||
getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("no_results"));
|
||||
|
||||
getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback(
|
||||
boost::bind(&LLFloaterAvatarPicker::onTabChanged,this));
|
||||
boost::bind(&LLFloaterAvatarPicker::onTabChanged, this));
|
||||
|
||||
setAllowMultiple(FALSE);
|
||||
|
||||
@@ -199,7 +200,6 @@ static void getSelectedAvatarData(const LLUICtrl* from, uuid_vec_t& avatar_ids,
|
||||
addAvatarUUID(from->getValue().asUUID(), avatar_ids, avatar_names);
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterAvatarPicker::onBtnSelect()
|
||||
{
|
||||
|
||||
@@ -271,6 +271,22 @@ void LLFloaterAvatarPicker::onRangeAdjust()
|
||||
void LLFloaterAvatarPicker::onList()
|
||||
{
|
||||
getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
|
||||
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
|
||||
RLV_ASSERT( (pTabs) && (pNearMePanel) );
|
||||
if ( (pTabs) && (pNearMePanel) )
|
||||
{
|
||||
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
|
||||
pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
|
||||
if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
|
||||
pTabs->selectTabByName("SearchPanel");
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLFloaterAvatarPicker::populateNearMe()
|
||||
@@ -364,31 +380,7 @@ void LLFloaterAvatarPicker::draw()
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
|
||||
// TODO-RLVa: this code needs revisiting
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
|
||||
if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) )
|
||||
{
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
if (mNearMeListComplete)
|
||||
{
|
||||
getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
|
||||
childSetEnabled("Select", false);
|
||||
}
|
||||
mNearMeListComplete = FALSE;
|
||||
pNearMePanel->setCtrlsEnabled(FALSE);
|
||||
return;
|
||||
}
|
||||
pNearMePanel->setCtrlsEnabled(TRUE);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
|
||||
if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
|
||||
{
|
||||
populateNearMe();
|
||||
}
|
||||
@@ -425,7 +417,7 @@ public:
|
||||
LLUUID mQueryID;
|
||||
|
||||
LLAvatarPickerResponder(const LLUUID& id) : mQueryID(id) { }
|
||||
|
||||
|
||||
/*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content)
|
||||
{
|
||||
//std::ostringstream ss;
|
||||
@@ -443,8 +435,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "avatar picker failed " << status
|
||||
<< " reason " << reason << llendl;
|
||||
llwarns << "avatar picker failed " << status << " reason " << reason << llendl;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -605,7 +596,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
|
||||
|
||||
if(!instanceExists())
|
||||
return;
|
||||
LLFloaterAvatarPicker *floater = getInstance();
|
||||
LLFloaterAvatarPicker* floater = getInstance();
|
||||
|
||||
// floater is closed or these are not results from our last request
|
||||
if (NULL == floater || query_id != floater->mQueryID)
|
||||
@@ -760,6 +751,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
|
||||
std::string active_panel_name;
|
||||
LLUICtrl* list = NULL;
|
||||
LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
|
||||
|
||||
if(active_panel)
|
||||
{
|
||||
active_panel_name = active_panel->getName();
|
||||
@@ -783,8 +775,8 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
|
||||
|
||||
if(list)
|
||||
{
|
||||
uuid_vec_t avatar_ids;
|
||||
std::vector<LLAvatarName> avatar_names;
|
||||
uuid_vec_t avatar_ids;
|
||||
std::vector<LLAvatarName> avatar_names;
|
||||
getSelectedAvatarData(list, avatar_ids, avatar_names);
|
||||
return mOkButtonValidateSignal(avatar_ids);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
// <edit>
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterblacklist.h"
|
||||
|
||||
#include "llaudioengine.h"
|
||||
#include "llvfs.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldate.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llvfs.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
|
||||
LLFloaterBlacklist* LLFloaterBlacklist::sInstance;
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloaterbulkpermission.h"
|
||||
#include "llfloaterperms.h" // for utilities
|
||||
#include "llinventorydefines.h"
|
||||
#include "llagent.h"
|
||||
#include "llchat.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
@@ -49,26 +49,28 @@
|
||||
#include "llresmgr.h"
|
||||
#include "llbutton.h"
|
||||
#include "lldir.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "roles_constants.h" // for GP_OBJECT_MANIPULATE
|
||||
|
||||
|
||||
LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) : mDone(FALSE)
|
||||
LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
|
||||
: LLFloater(),
|
||||
mDone(FALSE)
|
||||
{
|
||||
mID.generate();
|
||||
mCommitCallbackRegistrar.add("BulkPermission.Help", boost::bind(LLFloaterBulkPermission::onHelpBtn));
|
||||
mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
|
||||
mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
|
||||
mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
|
||||
mCommitCallbackRegistrar.add("BulkPermission.UncheckAll", boost::bind(&LLFloaterBulkPermission::onUncheckAll, this));
|
||||
mCommitCallbackRegistrar.add("BulkPermission.CommitCopy", boost::bind(&LLFloaterBulkPermission::onCommitCopy, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
|
||||
childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"));
|
||||
childSetAction("help", onHelpBtn, this);
|
||||
childSetAction("apply", onApplyBtn, this);
|
||||
childSetAction("close", onCloseBtn, this);
|
||||
childSetAction("check_all", onCheckAll, this);
|
||||
childSetAction("check_none", onUncheckAll, this);
|
||||
childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
|
||||
}
|
||||
|
||||
void LLFloaterBulkPermission::doApply()
|
||||
@@ -112,7 +114,7 @@ void LLFloaterBulkPermission::doApply()
|
||||
// worked on.
|
||||
// NOT static, virtual!
|
||||
void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32,
|
||||
void* q_id)
|
||||
{
|
||||
@@ -146,34 +148,31 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterBulkPermission::onApplyBtn(void* user_data)
|
||||
void LLFloaterBulkPermission::onApplyBtn()
|
||||
{
|
||||
LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(user_data);
|
||||
self->doApply();
|
||||
doApply();
|
||||
}
|
||||
|
||||
void LLFloaterBulkPermission::onHelpBtn(void* user_data)
|
||||
void LLFloaterBulkPermission::onHelpBtn()
|
||||
{
|
||||
LLNotificationsUtil::add("HelpBulkPermission");
|
||||
}
|
||||
|
||||
void LLFloaterBulkPermission::onCloseBtn(void* user_data)
|
||||
void LLFloaterBulkPermission::onCloseBtn()
|
||||
{
|
||||
LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(user_data);
|
||||
self->onClose(false);
|
||||
onClose(false);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterBulkPermission::onCommitCopy(LLUICtrl* ctrl, void* data)
|
||||
void LLFloaterBulkPermission::onCommitCopy()
|
||||
{
|
||||
LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(data);
|
||||
// Implements fair use
|
||||
BOOL copyable = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
|
||||
if(!copyable)
|
||||
{
|
||||
gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", TRUE);
|
||||
}
|
||||
LLCheckBoxCtrl* xfer = self->getChild<LLCheckBoxCtrl>("next_owner_transfer");
|
||||
LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>("next_owner_transfer");
|
||||
xfer->setEnabled(copyable);
|
||||
}
|
||||
|
||||
@@ -255,7 +254,7 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv)
|
||||
void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
|
||||
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
#include "llfloater.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
|
||||
#include "llviewerinventory.h"
|
||||
|
||||
class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener, public LLFloaterSingleton<LLFloaterBulkPermission>
|
||||
{
|
||||
public:
|
||||
@@ -62,7 +60,7 @@ private:
|
||||
// This is the callback method for the viewer object currently
|
||||
// being worked on.
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32 serial_num,
|
||||
void* queue);
|
||||
|
||||
@@ -76,12 +74,12 @@ private:
|
||||
U8 key,
|
||||
bool is_new);
|
||||
|
||||
static void onHelpBtn(void* user_data);
|
||||
static void onCloseBtn(void* user_data);
|
||||
static void onApplyBtn(void* user_data);
|
||||
static void onCommitCopy(LLUICtrl* ctrl, void* data);
|
||||
static void onCheckAll( void* user_data) { ((LLFloaterBulkPermission*)user_data)->doCheckUncheckAll(TRUE); }
|
||||
static void onUncheckAll(void* user_data) { ((LLFloaterBulkPermission*)user_data)->doCheckUncheckAll(FALSE); }
|
||||
static void onHelpBtn();
|
||||
void onCloseBtn();
|
||||
void onApplyBtn();
|
||||
void onCommitCopy();
|
||||
void onCheckAll() { doCheckUncheckAll(TRUE); }
|
||||
void onUncheckAll() { doCheckUncheckAll(FALSE); }
|
||||
|
||||
// returns true if this is done
|
||||
BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterexploresounds.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
|
||||
static const size_t num_collision_sounds = 29;
|
||||
const LLUUID collision_sounds[num_collision_sounds] =
|
||||
|
||||
@@ -46,8 +46,10 @@
|
||||
#include "lleventtimer.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "llworld.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llnotify.h"
|
||||
#include "llxfermanager.h"
|
||||
#include "llvlcomposition.h"
|
||||
#include "llsurface.h"
|
||||
@@ -77,9 +76,9 @@
|
||||
|
||||
const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f;
|
||||
|
||||
// *****************************************************************************
|
||||
//*****************************************************************************
|
||||
// LLFloaterGodTools
|
||||
// *****************************************************************************
|
||||
//*****************************************************************************
|
||||
|
||||
void LLFloaterGodTools::onOpen()
|
||||
{
|
||||
@@ -100,6 +99,7 @@ void LLFloaterGodTools::onOpen()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterGodTools::refreshAll()
|
||||
{
|
||||
@@ -121,36 +121,31 @@ LLFloaterGodTools::LLFloaterGodTools()
|
||||
mCurrentHost(LLHost::invalid),
|
||||
mUpdateTimer()
|
||||
{
|
||||
LLCallbackMap::map_t factory_map;
|
||||
factory_map["grid"] = LLCallbackMap(createPanelGrid, this);
|
||||
factory_map["region"] = LLCallbackMap(createPanelRegion, this);
|
||||
factory_map["objects"] = LLCallbackMap(createPanelObjects, this);
|
||||
factory_map["request"] = LLCallbackMap(createPanelRequest, this);
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml", &factory_map);
|
||||
mFactoryMap["grid"] = LLCallbackMap(createPanelGrid, this);
|
||||
mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this);
|
||||
mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this);
|
||||
mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml", &getFactoryMap());
|
||||
}
|
||||
|
||||
BOOL LLFloaterGodTools::postBuild()
|
||||
{
|
||||
getChild<LLTabContainer>("GodTools Tabs")->setCommitCallback(boost::bind(&LLFloaterGodTools::onTabChanged,_1,_2));
|
||||
|
||||
sendRegionInfoRequest();
|
||||
getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region");
|
||||
|
||||
childSetTextArg("land cost text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
getChild<LLUICtrl>("land cost text")->setTextArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// static
|
||||
void* LLFloaterGodTools::createPanelGrid(void *userdata)
|
||||
{
|
||||
return new LLPanelGridTools("grid");
|
||||
return new LLPanelGridTools();
|
||||
}
|
||||
|
||||
// static
|
||||
void* LLFloaterGodTools::createPanelRegion(void *userdata)
|
||||
{
|
||||
LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
|
||||
self->mPanelRegionTools = new LLPanelRegionTools("region");
|
||||
self->mPanelRegionTools = new LLPanelRegionTools();
|
||||
return self->mPanelRegionTools;
|
||||
}
|
||||
|
||||
@@ -158,14 +153,14 @@ void* LLFloaterGodTools::createPanelRegion(void *userdata)
|
||||
void* LLFloaterGodTools::createPanelObjects(void *userdata)
|
||||
{
|
||||
LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
|
||||
self->mPanelObjectTools = new LLPanelObjectTools("objects");
|
||||
self->mPanelObjectTools = new LLPanelObjectTools();
|
||||
return self->mPanelObjectTools;
|
||||
}
|
||||
|
||||
// static
|
||||
void* LLFloaterGodTools::createPanelRequest(void *userdata)
|
||||
{
|
||||
return new LLPanelRequestTools("region");
|
||||
return new LLPanelRequestTools();
|
||||
}
|
||||
|
||||
LLFloaterGodTools::~LLFloaterGodTools()
|
||||
@@ -226,14 +221,6 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name)
|
||||
panel->setFocus(TRUE);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterGodTools::onTabChanged(LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
LLPanel* panel = (LLPanel*)ctrl->getChildView(param.asString(),false,false);
|
||||
if (panel)
|
||||
panel->setFocus(TRUE);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
|
||||
{
|
||||
@@ -403,9 +390,9 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
|
||||
}
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
//*****************************************************************************
|
||||
// LLPanelRegionTools
|
||||
// *****************************************************************************
|
||||
//*****************************************************************************
|
||||
|
||||
|
||||
// || Region |______________________________________
|
||||
@@ -440,72 +427,37 @@ const F32 PRICE_PER_METER_MIN = 0.f;
|
||||
const F32 PRICE_PER_METER_MAX = 100.f;
|
||||
|
||||
|
||||
LLPanelRegionTools::LLPanelRegionTools(const std::string& title)
|
||||
: LLPanel(title)
|
||||
LLPanelRegionTools::LLPanelRegionTools()
|
||||
: LLPanel()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("RegionTools.ChangeAnything", boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.ChangePrelude", boost::bind(&LLPanelRegionTools::onChangePrelude, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.BakeTerrain", boost::bind(&LLPanelRegionTools::onBakeTerrain, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.RevertTerrain", boost::bind(&LLPanelRegionTools::onRevertTerrain, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.SwapTerrain", boost::bind(&LLPanelRegionTools::onSwapTerrain, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.Refresh", boost::bind(&LLPanelRegionTools::onRefresh, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.ApplyChanges", boost::bind(&LLPanelRegionTools::onApplyChanges, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.SelectRegion", boost::bind(&LLPanelRegionTools::onSelectRegion, this));
|
||||
mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this));
|
||||
}
|
||||
|
||||
BOOL LLPanelRegionTools::postBuild()
|
||||
{
|
||||
LLLineEditor* region_name = getChild<LLLineEditor>("region name");
|
||||
region_name->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
region_name->setKeystrokeCallback(boost::bind(&LLPanelRegionTools::onChangeSimName, this));
|
||||
region_name->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe);
|
||||
getChild<LLLineEditor>("region name")->setKeystrokeCallback(boost::bind(&LLPanelRegionTools::onChangeSimName, this));
|
||||
getChild<LLLineEditor>("region name")->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe);
|
||||
getChild<LLLineEditor>("estate")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
getChildView("parentestate")->setEnabled(FALSE);
|
||||
getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
getChildView("gridposx")->setEnabled(FALSE);
|
||||
getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
getChildView("gridposy")->setEnabled(FALSE);
|
||||
|
||||
getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
|
||||
getChild<LLUICtrl>("check prelude")->setCommitCallback(boost::bind(&LLPanelRegionTools:: onChangePrelude, this));
|
||||
getChild<LLUICtrl>("check fixed sun")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("check reset home")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("check visible")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("check damage")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("block dwell")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("block terraform")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("allow transfer")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("is sandbox")->setCommitCallback( boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("is gaming")->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_GOD_FLOATER));
|
||||
getChild<LLUICtrl>("is gaming")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("hide from search")->setVisible(!gHippoGridManager->getConnectedGrid()->isSecondLife());
|
||||
getChild<LLUICtrl>("hide from search")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
|
||||
childSetAction("Bake Terrain", boost::bind(&LLPanelRegionTools::onBakeTerrain, this));
|
||||
childSetAction("Revert Terrain", boost::bind(&LLPanelRegionTools::onRevertTerrain, this));
|
||||
childSetAction("Swap Terrain", boost::bind(&LLPanelRegionTools::onSwapTerrain, this));
|
||||
|
||||
LLLineEditor* estate = getChild<LLLineEditor>("estate name");
|
||||
estate->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
estate->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
|
||||
LLLineEditor* parentestate = getChild<LLLineEditor>("parentestate");
|
||||
parentestate->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
parentestate->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
parentestate->setEnabled(false);
|
||||
|
||||
LLLineEditor* gridposx = getChild<LLLineEditor>("gridposx");
|
||||
gridposx->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
gridposx->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
gridposx->setEnabled(false);
|
||||
|
||||
LLLineEditor* gridposy = getChild<LLLineEditor>("gridposy");
|
||||
gridposy->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
gridposy->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
gridposy->setEnabled(false);
|
||||
|
||||
LLLineEditor* redirectx = getChild<LLLineEditor>("redirectx");
|
||||
redirectx->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
redirectx->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
|
||||
LLLineEditor* redirecty = getChild<LLLineEditor>("redirecty");
|
||||
redirecty->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
redirecty->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
|
||||
|
||||
getChild<LLUICtrl>("billable factor")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
|
||||
getChild<LLUICtrl>("land cost")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
|
||||
|
||||
getChild<LLButton>("Refresh")->setClickedCallback(boost::bind(&LLPanelRegionTools::onRefresh, this));
|
||||
getChild<LLButton>("Apply")->setClickedCallback(boost::bind(&LLPanelRegionTools::onApplyChanges, this));
|
||||
|
||||
getChild<LLButton>("Select Region")->setClickedCallback(boost::bind(&LLPanelRegionTools::onSelectRegion, this));
|
||||
getChild<LLButton>("Autosave now")->setClickedCallback(boost::bind(&LLPanelRegionTools::onSaveState,(void*)NULL));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -592,8 +544,7 @@ void LLPanelRegionTools::enableAllWidgets()
|
||||
getChildView("Autosave now")->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelRegionTools::onSaveState(void*)
|
||||
void LLPanelRegionTools::onSaveState(void* userdata)
|
||||
{
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
@@ -918,12 +869,13 @@ void LLPanelRegionTools::onSelectRegion()
|
||||
// LEFT R2 RIGHT
|
||||
|
||||
const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
|
||||
const char FLOATER_GRID_ADMIN_TITLE[] = "Grid Administration";
|
||||
|
||||
|
||||
LLPanelGridTools::LLPanelGridTools(const std::string& name) :
|
||||
LLPanel(name)
|
||||
LLPanelGridTools::LLPanelGridTools() :
|
||||
LLPanel()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("GridTools.KickAllUsers", boost::bind(&LLPanelGridTools::onClickKickAll, this));
|
||||
mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
@@ -933,9 +885,6 @@ LLPanelGridTools::~LLPanelGridTools()
|
||||
|
||||
BOOL LLPanelGridTools::postBuild()
|
||||
{
|
||||
childSetAction("Kick all users", boost::bind(&LLPanelGridTools::onClickKickAll, this));
|
||||
childSetAction("Flush This Region's Map Visibility Caches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -943,7 +892,6 @@ void LLPanelGridTools::refresh()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void LLPanelGridTools::onClickKickAll()
|
||||
{
|
||||
LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
|
||||
@@ -952,7 +900,7 @@ void LLPanelGridTools::onClickKickAll()
|
||||
// static
|
||||
bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
if (LLNotification::getSelectedOption(notification, response) == 0)
|
||||
if (LLNotificationsUtil::getSelectedOption(notification, response) == 0)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["kick_message"] = response["message"].asString();
|
||||
@@ -964,7 +912,7 @@ bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& respons
|
||||
// static
|
||||
bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
@@ -1036,10 +984,19 @@ bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification,
|
||||
// LEFT RIGHT
|
||||
|
||||
// Default constructor
|
||||
LLPanelObjectTools::LLPanelObjectTools(const std::string& title)
|
||||
: LLPanel(title),
|
||||
LLPanelObjectTools::LLPanelObjectTools()
|
||||
: LLPanel(),
|
||||
mTargetAvatar()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("ObjectTools.ChangeAnything", boost::bind(&LLPanelObjectTools::onChangeAnything, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.DeletePublicOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeletePublicOwnedBy, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.DeleteAllScriptedOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.DeleteAllOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllOwnedBy, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.ApplyChanges", boost::bind(&LLPanelObjectTools::onApplyChanges, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.Set", boost::bind(&LLPanelObjectTools::onClickSet, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.GetTopColliders", boost::bind(&LLPanelObjectTools::onGetTopColliders, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.GetTopScripts", boost::bind(&LLPanelObjectTools::onGetTopScripts, this));
|
||||
mCommitCallbackRegistrar.add("ObjectTools.GetScriptDigest", boost::bind(&LLPanelObjectTools::onGetScriptDigest, this));
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
@@ -1050,22 +1007,6 @@ LLPanelObjectTools::~LLPanelObjectTools()
|
||||
|
||||
BOOL LLPanelObjectTools::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>("disable scripts")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("disable collisions")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
|
||||
getChild<LLUICtrl>("disable physics")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
|
||||
|
||||
childSetAction("Apply", boost::bind(&LLPanelObjectTools::onApplyChanges, this));
|
||||
|
||||
childSetAction("Set Target", boost::bind(&LLPanelObjectTools::onClickSet, this));
|
||||
|
||||
childSetAction("Delete Target's Scripted Objects On Others Land", boost::bind(&LLPanelObjectTools::onClickDeletePublicOwnedBy, this));
|
||||
childSetAction("Delete Target's Scripted Objects On *Any* Land", boost::bind(&LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy, this));
|
||||
childSetAction("Delete *ALL* Of Target's Objects", boost::bind(&LLPanelObjectTools::onClickDeleteAllOwnedBy, this));
|
||||
|
||||
childSetAction("Get Top Colliders", boost::bind(&LLPanelObjectTools::onGetTopColliders, this));
|
||||
childSetAction("Get Top Scripts", boost::bind(&LLPanelObjectTools::onGetTopScripts, this));
|
||||
childSetAction("Scripts digest", boost::bind(&LLPanelObjectTools::onGetScriptDigest, this));
|
||||
|
||||
refresh();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1154,29 +1095,30 @@ void LLPanelObjectTools::enableAllWidgets()
|
||||
getChildView("Get Top Scripts")->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void LLPanelObjectTools::onGetTopColliders()
|
||||
{
|
||||
LLFloaterGodTools* god_tools = LLFloaterGodTools::instanceExists() ? LLFloaterGodTools::getInstance() : NULL;
|
||||
if(!god_tools)
|
||||
return;
|
||||
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
|
||||
if(!instance) return;
|
||||
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
LLFloaterTopObjects::show();
|
||||
instance->open();
|
||||
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_COLLIDERS);
|
||||
LLFloaterTopObjects::onRefresh(NULL);
|
||||
instance->onRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelObjectTools::onGetTopScripts()
|
||||
{
|
||||
LLFloaterGodTools* god_tools = LLFloaterGodTools::instanceExists() ? LLFloaterGodTools::getInstance() : NULL;
|
||||
if(!god_tools)
|
||||
return;
|
||||
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
|
||||
if(!instance) return;
|
||||
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
LLFloaterTopObjects::show();
|
||||
instance->open();
|
||||
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
|
||||
LLFloaterTopObjects::onRefresh(NULL);
|
||||
instance->onRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1282,7 +1224,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
|
||||
LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
|
||||
if (!panelp) return;
|
||||
|
||||
const BOOL non_root_ok = TRUE;
|
||||
const BOOL non_root_ok = TRUE;
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
|
||||
if (!node) return;
|
||||
|
||||
@@ -1336,9 +1278,10 @@ void LLPanelObjectTools::onApplyChanges()
|
||||
const std::string SELECTION = "Selection";
|
||||
const std::string AGENT_REGION = "Agent Region";
|
||||
|
||||
LLPanelRequestTools::LLPanelRequestTools(const std::string& name):
|
||||
LLPanel(name)
|
||||
LLPanelRequestTools::LLPanelRequestTools():
|
||||
LLPanel()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("GodTools.Request", boost::bind(&LLPanelRequestTools::onClickRequest, this));
|
||||
}
|
||||
|
||||
LLPanelRequestTools::~LLPanelRequestTools()
|
||||
@@ -1347,8 +1290,6 @@ LLPanelRequestTools::~LLPanelRequestTools()
|
||||
|
||||
BOOL LLPanelRequestTools::postBuild()
|
||||
{
|
||||
childSetAction("Make Request", boost::bind(&LLPanelRequestTools::onClickRequest, this));
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -52,7 +52,7 @@ class LLTextBox;
|
||||
class LLMessageSystem;
|
||||
|
||||
class LLFloaterGodTools
|
||||
: public LLFloater, public LLSingleton<LLFloaterGodTools>
|
||||
: public LLFloater, public LLSingleton<LLFloaterGodTools>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -94,8 +94,6 @@ public:
|
||||
// Send possibly changed values to simulator.
|
||||
void sendGodUpdateRegionInfo();
|
||||
|
||||
static void onTabChanged(LLUICtrl* ctrl, const LLSD& param);
|
||||
|
||||
public:
|
||||
|
||||
LLFloaterGodTools();
|
||||
@@ -128,14 +126,14 @@ class LLPanelRegionTools
|
||||
: public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelRegionTools(const std::string& name);
|
||||
LLPanelRegionTools();
|
||||
/*virtual*/ ~LLPanelRegionTools();
|
||||
|
||||
BOOL postBuild();
|
||||
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
static void onSaveState(void*);
|
||||
static void onSaveState(void* userdata);
|
||||
void onChangeSimName();
|
||||
|
||||
void onChangeAnything();
|
||||
@@ -190,7 +188,7 @@ class LLPanelGridTools
|
||||
: public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelGridTools(const std::string& name);
|
||||
LLPanelGridTools();
|
||||
virtual ~LLPanelGridTools();
|
||||
|
||||
BOOL postBuild();
|
||||
@@ -217,7 +215,7 @@ class LLPanelObjectTools
|
||||
: public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelObjectTools(const std::string& name);
|
||||
LLPanelObjectTools();
|
||||
/*virtual*/ ~LLPanelObjectTools();
|
||||
|
||||
BOOL postBuild();
|
||||
@@ -258,7 +256,7 @@ protected:
|
||||
class LLPanelRequestTools : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelRequestTools(const std::string& name);
|
||||
LLPanelRequestTools();
|
||||
/*virtual*/ ~LLPanelRequestTools();
|
||||
|
||||
BOOL postBuild();
|
||||
|
||||
@@ -40,93 +40,68 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
|
||||
#include "message.h"
|
||||
#include "roles_constants.h"
|
||||
|
||||
#include "hbfloatergrouptitles.h"
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llimview.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llimview.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "hippolimits.h"
|
||||
|
||||
using namespace LLOldEvents;
|
||||
|
||||
// static
|
||||
std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
|
||||
|
||||
// helper functions
|
||||
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
|
||||
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLFloaterGroupPicker
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// static
|
||||
LLFloaterGroupPicker* LLFloaterGroupPicker::findInstance(const LLSD& seed)
|
||||
LLFloaterGroupPicker* LLFloaterGroupPicker::showInstance(const LLSD& seed)
|
||||
{
|
||||
instance_map_t::iterator found_it = sInstances.find(seed.asUUID());
|
||||
if (found_it != sInstances.end())
|
||||
{
|
||||
return found_it->second;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// static
|
||||
LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
|
||||
{
|
||||
LLFloaterGroupPicker* pickerp = new LLFloaterGroupPicker(seed);
|
||||
LLUICtrlFactory::getInstance()->buildFloater(pickerp, "floater_choose_group.xml");
|
||||
LLFloaterGroupPicker* pickerp = getInstance(seed);
|
||||
if (pickerp) pickerp->open();
|
||||
else pickerp = new LLFloaterGroupPicker(seed);
|
||||
return pickerp;
|
||||
}
|
||||
|
||||
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
|
||||
mSelectCallback(NULL),
|
||||
mCallbackUserdata(NULL),
|
||||
mPowersMask(GP_ALL_POWERS)
|
||||
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed)
|
||||
: LLFloater(), LLInstanceTracker<LLFloaterGroupPicker, LLUUID>(seed.asUUID()),
|
||||
mPowersMask(GP_ALL_POWERS),
|
||||
mID(seed.asUUID())
|
||||
{
|
||||
mID = seed.asUUID();
|
||||
sInstances.insert(std::make_pair(mID, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_choose_group.xml");
|
||||
}
|
||||
|
||||
LLFloaterGroupPicker::~LLFloaterGroupPicker()
|
||||
{
|
||||
sInstances.erase(mID);
|
||||
}
|
||||
|
||||
void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
|
||||
void* userdata)
|
||||
{
|
||||
mSelectCallback = callback;
|
||||
mCallbackUserdata = userdata;
|
||||
}
|
||||
|
||||
void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
|
||||
{
|
||||
mPowersMask = powers_mask;
|
||||
postBuild();
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask);
|
||||
}
|
||||
|
||||
|
||||
BOOL LLFloaterGroupPicker::postBuild()
|
||||
{
|
||||
|
||||
const std::string none_text = getString("none");
|
||||
LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("group list");
|
||||
init_group_list(group_list, gAgent.getGroupID(), none_text, mPowersMask);
|
||||
LLScrollListCtrl* list_ctrl = getChild<LLScrollListCtrl>("group list");
|
||||
if (list_ctrl)
|
||||
{
|
||||
init_group_list(list_ctrl, gAgent.getGroupID(), mPowersMask);
|
||||
list_ctrl->setDoubleClickCallback(onBtnOK, this);
|
||||
}
|
||||
|
||||
childSetAction("OK", onBtnOK, this);
|
||||
|
||||
@@ -134,13 +109,25 @@ BOOL LLFloaterGroupPicker::postBuild()
|
||||
|
||||
setDefaultBtn("OK");
|
||||
|
||||
group_list->setDoubleClickCallback(boost::bind(&LLFloaterGroupPicker::onBtnOK,this));
|
||||
|
||||
childEnable("OK");
|
||||
getChildView("OK")->setEnabled(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterGroupPicker::removeNoneOption()
|
||||
{
|
||||
// Remove group "none" from list. Group "none" is added in init_group_list().
|
||||
// Some UI elements use group "none", we need to manually delete it here.
|
||||
// Group "none" ID is LLUUID:null.
|
||||
LLCtrlListInterface* group_list = getChild<LLScrollListCtrl>("group list")->getListInterface();
|
||||
if(group_list)
|
||||
{
|
||||
group_list->selectByValue(LLUUID::null);
|
||||
group_list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterGroupPicker::onBtnOK(void* userdata)
|
||||
{
|
||||
LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata;
|
||||
@@ -162,10 +149,7 @@ void LLFloaterGroupPicker::ok()
|
||||
{
|
||||
group_id = group_list->getCurrentID();
|
||||
}
|
||||
if(mSelectCallback)
|
||||
{
|
||||
mSelectCallback(group_id, mCallbackUserdata);
|
||||
}
|
||||
mGroupSelectSignal(group_id);
|
||||
|
||||
close();
|
||||
}
|
||||
@@ -201,38 +185,39 @@ LLPanelGroups::~LLPanelGroups()
|
||||
// clear the group list, and get a fresh set of info.
|
||||
void LLPanelGroups::reset()
|
||||
{
|
||||
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||
|
||||
const std::string none_text = getString("none");
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
|
||||
enableButtons();
|
||||
}
|
||||
|
||||
BOOL LLPanelGroups::postBuild()
|
||||
{
|
||||
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gHippoLimits->getMaxAgentGroups()));
|
||||
|
||||
const std::string none_text = getString("none");
|
||||
LLScrollListCtrl *group_list = getChild<LLScrollListCtrl>("group list");
|
||||
init_group_list(group_list, gAgent.getGroupID(), none_text);
|
||||
group_list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList,this));
|
||||
group_list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
|
||||
group_list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
|
||||
if (list)
|
||||
{
|
||||
init_group_list(list, gAgent.getGroupID());
|
||||
list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList, this));
|
||||
list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
|
||||
list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
|
||||
}
|
||||
|
||||
getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
|
||||
|
||||
getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
|
||||
|
||||
getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
|
||||
|
||||
getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, group_list)));
|
||||
getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
|
||||
|
||||
getChild<LLUICtrl>("Create")->setCommitCallback(boost::bind(LLGroupActions::createGroup));
|
||||
|
||||
getChild<LLUICtrl>("Search...")->setCommitCallback(boost::bind(LLGroupActions::search));
|
||||
|
||||
|
||||
childSetAction("Invite...", onBtnInvite, this);
|
||||
|
||||
getChild<LLUICtrl>("Titles...")->setCommitCallback(boost::bind(HBFloaterGroupTitles::toggle));
|
||||
@@ -255,40 +240,26 @@ void LLPanelGroups::enableButtons()
|
||||
|
||||
if(group_id != gAgent.getGroupID())
|
||||
{
|
||||
childEnable("Activate");
|
||||
getChildView("Activate")->setEnabled(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
childDisable("Activate");
|
||||
getChildView("Activate")->setEnabled(FALSE);
|
||||
}
|
||||
if (group_id.notNull())
|
||||
{
|
||||
childEnable("Info");
|
||||
childEnable("IM");
|
||||
childEnable("Leave");
|
||||
getChildView("Info")->setEnabled(TRUE);
|
||||
getChildView("IM")->setEnabled(TRUE);
|
||||
getChildView("Leave")->setEnabled(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
childDisable("Info");
|
||||
childDisable("IM");
|
||||
childDisable("Leave");
|
||||
}
|
||||
if(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups())
|
||||
{
|
||||
childEnable("Create");
|
||||
}
|
||||
else
|
||||
{
|
||||
childDisable("Create");
|
||||
}
|
||||
if (group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE))
|
||||
{
|
||||
LLPanelGroups::childEnable("Invite...");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPanelGroups::childDisable("Invite...");
|
||||
getChildView("Info")->setEnabled(FALSE);
|
||||
getChildView("IM")->setEnabled(FALSE);
|
||||
getChildView("Leave")->setEnabled(FALSE);
|
||||
}
|
||||
getChildView("Create")->setEnabled(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups());
|
||||
getChildView("Invite...")->setEnabled(group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE));
|
||||
}
|
||||
|
||||
|
||||
@@ -302,15 +273,11 @@ void LLPanelGroups::invite()
|
||||
{
|
||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
||||
LLUUID group_id;
|
||||
|
||||
//if (group_list && (group_id = group_list->getCurrentID()).notNull())
|
||||
|
||||
if (group_list)
|
||||
{
|
||||
group_id = group_list->getCurrentID();
|
||||
}
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id);
|
||||
LLFloaterGroupInvite::showForGroup(group_id);
|
||||
}
|
||||
|
||||
void LLPanelGroups::onGroupSortChanged()
|
||||
@@ -334,7 +301,7 @@ void LLPanelGroups::onGroupList()
|
||||
if(!item)
|
||||
return;
|
||||
|
||||
const LLUUID group_id = item->getValue().asUUID();
|
||||
const LLUUID group_id = item->getValue().asUUID();
|
||||
if(group_id.isNull())
|
||||
return;
|
||||
|
||||
@@ -360,13 +327,13 @@ void LLPanelGroups::onGroupList()
|
||||
update_group_floaters(group_id);
|
||||
}
|
||||
|
||||
LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_group, const std::string& none_text, const U64 &powers_mask)
|
||||
LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_group, const U64 &powers_mask)
|
||||
{
|
||||
if(group_datap && !((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0)))
|
||||
return LLSD();
|
||||
const LLUUID &id = group_datap ? group_datap->mID : LLUUID::null;
|
||||
const bool enabled = !!group_datap;
|
||||
|
||||
|
||||
std::string style = (group_datap && group_datap->mListInProfile) ? "BOLD" : "NORMAL";
|
||||
if(active_group == id)
|
||||
{
|
||||
@@ -376,7 +343,7 @@ LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_g
|
||||
element["id"] = id;
|
||||
LLSD& name_column = element["columns"][0];
|
||||
name_column["column"] = "name";
|
||||
name_column["value"] = group_datap ? group_datap->mName : none_text;
|
||||
name_column["value"] = group_datap ? group_datap->mName : LLTrans::getString("GroupsNone");
|
||||
name_column["font"] = "SANSSERIF";
|
||||
name_column["font-style"] = style;
|
||||
|
||||
@@ -401,7 +368,7 @@ LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_g
|
||||
return element;
|
||||
}
|
||||
|
||||
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask)
|
||||
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
|
||||
{
|
||||
S32 count = gAgent.mGroups.count();
|
||||
LLUUID id;
|
||||
@@ -416,13 +383,13 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const s
|
||||
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, none_text, powers_mask);
|
||||
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, powers_mask);
|
||||
if(element.size())
|
||||
group_list->addElement(element, ADD_SORTED);
|
||||
}
|
||||
|
||||
// add "none" to list at top
|
||||
group_list->addElement(create_group_element(NULL, highlight_id, none_text, powers_mask), ADD_TOP);
|
||||
group_list->addElement(create_group_element(NULL, highlight_id, powers_mask), ADD_TOP);
|
||||
|
||||
if(selected_id.notNull())
|
||||
group_list->selectByValue(selected_id);
|
||||
|
||||
@@ -46,20 +46,26 @@
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "llfloater.h"
|
||||
#include "llinstancetracker.h"
|
||||
#include <map>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLUICtrl;
|
||||
class LLTextBox;
|
||||
class LLScrollListCtrl;
|
||||
class LLButton;
|
||||
|
||||
class LLFloaterGroupPicker : public LLFloater, public LLUIFactory<LLFloaterGroupPicker, LLFloaterGroupPicker, VisibilityPolicy<LLFloater> >
|
||||
class LLFloaterGroupPicker : public LLFloater, public LLInstanceTracker<LLFloaterGroupPicker, LLUUID>
|
||||
{
|
||||
friend class LLUIFactory<LLFloaterGroupPicker>;
|
||||
public:
|
||||
static LLFloaterGroupPicker* showInstance(const LLSD& seed);
|
||||
LLFloaterGroupPicker(const LLSD& seed);
|
||||
~LLFloaterGroupPicker();
|
||||
void setSelectCallback( void (*callback)(LLUUID, void*),
|
||||
void* userdata);
|
||||
|
||||
// Note: Don't return connection; use boost::bind + boost::signals2::trackable to disconnect slots
|
||||
typedef boost::signals2::signal<void (LLUUID id)> signal_t;
|
||||
void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
|
||||
void setPowersMask(U64 powers_mask);
|
||||
BOOL postBuild();
|
||||
|
||||
@@ -67,8 +73,10 @@ public:
|
||||
static LLFloaterGroupPicker* findInstance(const LLSD& seed);
|
||||
static LLFloaterGroupPicker* createInstance(const LLSD& seed);
|
||||
|
||||
// for cases like inviting avatar to group we don't want the none option
|
||||
void removeNoneOption();
|
||||
|
||||
protected:
|
||||
LLFloaterGroupPicker(const LLSD& seed);
|
||||
void ok();
|
||||
static void onBtnOK(void* userdata);
|
||||
static void onBtnCancel(void* userdata);
|
||||
@@ -76,8 +84,7 @@ protected:
|
||||
protected:
|
||||
LLUUID mID;
|
||||
U64 mPowersMask;
|
||||
void (*mSelectCallback)(LLUUID id, void* userdata);
|
||||
void* mCallbackUserdata;
|
||||
signal_t mGroupSelectSignal;
|
||||
|
||||
typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t;
|
||||
static instance_map_t sInstances;
|
||||
|
||||
@@ -32,31 +32,48 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llfloaterinspect.h"
|
||||
|
||||
#include "llfloatertools.h"
|
||||
#include "llcachename.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "llagent.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
LLFloaterInspect::LLFloaterInspect(void) :
|
||||
LLFloater(std::string("Inspect Object")),
|
||||
LLFloaterInspect::LLFloaterInspect()
|
||||
: LLFloater(std::string("Inspect Object")),
|
||||
mDirty(FALSE)
|
||||
{
|
||||
sInstance = this;
|
||||
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = getChild<LLScrollListCtrl>("object_list");
|
||||
// childSetAction("button owner",onClickOwnerProfile, this);
|
||||
// childSetAction("button creator",onClickCreatorProfile, this);
|
||||
// childSetCommitCallback("object_list", onSelectObject, this);
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
if(!gFloaterTools->getVisible())
|
||||
@@ -72,42 +89,30 @@ LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
gFloaterTools->setFocus(TRUE);
|
||||
}
|
||||
sInstance = NULL;
|
||||
//sInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::isVisible()
|
||||
// static
|
||||
void LLFloaterInspect::showInstance()
|
||||
{
|
||||
return (!!sInstance);
|
||||
getInstance()->open();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::show(void* ignored)
|
||||
void LLFloaterInspect::onOpen()
|
||||
{
|
||||
// setForceSelection ensures that the pie menu does not deselect things when it
|
||||
// looses the focus (this can happen with "select own objects only" enabled
|
||||
// VWR-1471
|
||||
BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE);
|
||||
|
||||
if (!sInstance) // first use
|
||||
{
|
||||
sInstance = new LLFloaterInspect;
|
||||
}
|
||||
|
||||
sInstance->open();
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
|
||||
LLSelectMgr::getInstance()->setForceSelection(forcesel); // restore previouis value
|
||||
|
||||
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
sInstance->refresh();
|
||||
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
void LLFloaterInspect::onClickCreatorProfile()
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0)
|
||||
if(mObjectList->getAllSelected().size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
@@ -120,19 +125,27 @@ void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(first_selected->getUUID());
|
||||
LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
const LLUUID& idCreator = node->mPermissions->getCreator();
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
|
||||
((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLAvatarActions::showProfile(idCreator);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
void LLFloaterInspect::onClickOwnerProfile()
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
if(mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
@@ -146,66 +159,62 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(selected_id);
|
||||
LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
// LLAvatarActions::showProfile(owner_id);
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = getChild<LLScrollListCtrl>("object_list");
|
||||
childSetAction("button owner",onClickOwnerProfile, this);
|
||||
childSetAction("button creator",onClickCreatorProfile, this);
|
||||
childSetCommitCallback("object_list", onSelectObject, this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
|
||||
void LLFloaterInspect::onSelectObject()
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
{
|
||||
//sInstance->childSetEnabled("button owner", true);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
|
||||
sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
// getChildView("button owner")->setEnabled(true);
|
||||
// getChildView("button creator")->setEnabled(true);
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
// TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
|
||||
getChildView("button creator")->setEnabled(true);
|
||||
// [/RLVa:KB]
|
||||
sInstance->childSetEnabled("button creator", true);
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID LLFloaterInspect::getSelectedUUID()
|
||||
{
|
||||
if(sInstance)
|
||||
if(mObjectList->getAllSelected().size() > 0)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() > 0)
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
return first_selected->getUUID();
|
||||
}
|
||||
return first_selected->getUUID();
|
||||
}
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
|
||||
{
|
||||
if (FloaterPtr)
|
||||
{
|
||||
LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
|
||||
floater->dirty();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLUUID creator_id;
|
||||
std::string creator_name;
|
||||
S32 pos = mObjectList->getScrollPos();
|
||||
childSetEnabled("button owner", false);
|
||||
childSetEnabled("button creator", false);
|
||||
getChildView("button owner")->setEnabled(false);
|
||||
getChildView("button creator")->setEnabled(false);
|
||||
LLUUID selected_uuid;
|
||||
S32 selected_index = mObjectList->getFirstSelectedIndex();
|
||||
if(selected_index > -1)
|
||||
@@ -234,18 +243,67 @@ void LLFloaterInspect::refresh()
|
||||
|
||||
time_t timestamp = (time_t) (obj->mCreationDate/1000000);
|
||||
timeToFormattedString(timestamp, gSavedSettings.getString("TimestampFormat"), time);
|
||||
gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
// TODO-RLVa: shouldn't filter if this is a group-owned prim (will show "(nobody)")
|
||||
owner_name = RlvStrings::getAnonym(owner_name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
|
||||
|
||||
const LLUUID& idOwner = obj->mPermissions->getOwner();
|
||||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
// <edit>
|
||||
gCacheName->getFullName(obj->mPermissions->getLastOwner(), last_owner_name);
|
||||
const LLUUID& idLastOwner = obj->mPermissions->getLastOwner();
|
||||
// </edit>
|
||||
LLAvatarName av_name;
|
||||
|
||||
// Only work with the names if we actually get a result
|
||||
// from the name cache. If not, defer setting the
|
||||
// actual name and set a placeholder.
|
||||
if (LLAvatarNameCache::get(idOwner, &av_name))
|
||||
{
|
||||
// owner_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idOwner != gAgent.getID()) &&
|
||||
(!obj->mPermissions->isGroupOwned());
|
||||
owner_name = (!fRlvFilterOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
{
|
||||
// creator_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
LLAvatarNameCache::get(idCreator, &av_name);
|
||||
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idCreator != gAgent.getID()) &&
|
||||
( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) );
|
||||
creator_name = (!fRlvFilterCreator) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
{
|
||||
creator_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
|
||||
// <edit>
|
||||
if (LLAvatarNameCache::get(idLastOwner, &av_name))
|
||||
{
|
||||
// last_owner_name = av_name.getCompleteName();
|
||||
// [RLVa:LF] - Copied from the above creator check Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
LLAvatarNameCache::get(idLastOwner, &av_name);
|
||||
bool fRlvFilterLastOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idLastOwner != gAgent.getID()) &&
|
||||
( (obj->mPermissions->getOwner() == idLastOwner) || (RlvUtil::isNearbyAgent(idLastOwner)) );
|
||||
last_owner_name = (!fRlvFilterLastOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:LF]
|
||||
}
|
||||
else
|
||||
{
|
||||
last_owner_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idLastOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
// </edit>
|
||||
|
||||
row["id"] = obj->getObject()->getID();
|
||||
row["columns"][0]["column"] = "object_name";
|
||||
row["columns"][0]["type"] = "text";
|
||||
@@ -259,28 +317,25 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
row["columns"][0]["value"] = obj->mName;
|
||||
}
|
||||
row["columns"][1]["column"] = "owner_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = owner_name;
|
||||
// <edit>
|
||||
int i = 1;
|
||||
row["columns"][i]["column"] = "owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "last_owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = last_owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creator_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = creator_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "face_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumFaces());
|
||||
++i;
|
||||
row["columns"][i]["column"] = "vertex_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumVertices());
|
||||
++i;
|
||||
row["columns"][2]["column"] = "last_owner_name";
|
||||
row["columns"][2]["type"] = "text";
|
||||
row["columns"][2]["value"] = last_owner_name;
|
||||
// </edit>
|
||||
row["columns"][3]["column"] = "creator_name";
|
||||
row["columns"][3]["type"] = "text";
|
||||
row["columns"][3]["value"] = creator_name;
|
||||
// <edit>
|
||||
row["columns"][4]["column"] = "face_num";
|
||||
row["columns"][4]["type"] = "text";
|
||||
row["columns"][4]["value"] = llformat("%d",obj->getObject()->getNumFaces());
|
||||
|
||||
row["columns"][5]["column"] = "vertex_num";
|
||||
row["columns"][5]["type"] = "text";
|
||||
row["columns"][5]["value"] = llformat("%d",obj->getObject()->getNumVertices());
|
||||
// inventory silliness
|
||||
S32 scripts,total_inv;
|
||||
std::map<LLUUID,std::pair<S32,S32> >::iterator itr = mInventoryNums.find(obj->getObject()->getID());
|
||||
@@ -300,18 +355,16 @@ void LLFloaterInspect::refresh()
|
||||
requestVOInventory();
|
||||
}
|
||||
}
|
||||
row["columns"][i]["column"] = "script_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",scripts);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "inv_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",total_inv);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creation_date";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = time;
|
||||
row["columns"][6]["column"] = "script_num";
|
||||
row["columns"][6]["type"] = "text";
|
||||
row["columns"][6]["value"] = llformat("%d",scripts);
|
||||
row["columns"][7]["column"] = "inv_num";
|
||||
row["columns"][7]["type"] = "text";
|
||||
row["columns"][7]["value"] = llformat("%d",total_inv);
|
||||
// </edit>
|
||||
row["columns"][8]["column"] = "creation_date";
|
||||
row["columns"][8]["type"] = "text";
|
||||
row["columns"][8]["value"] = time;
|
||||
mObjectList->addElement(row, ADD_TOP);
|
||||
}
|
||||
if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
|
||||
@@ -322,26 +375,23 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
mObjectList->selectNthItem(0);
|
||||
}
|
||||
onSelectObject(this, NULL);
|
||||
onSelectObject();
|
||||
mObjectList->setScrollPos(pos);
|
||||
}
|
||||
|
||||
// <edit>
|
||||
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32,
|
||||
void* q_id)
|
||||
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object, LLInventoryObject::object_list_t* inv, S32, void* q_id)
|
||||
{
|
||||
S32 scripts = 0;
|
||||
std::vector<LLUUID>::iterator iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID());
|
||||
if (viewer_object && inv && iter != mQueue.end() )
|
||||
{
|
||||
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
|
||||
S32 scripts = 0;
|
||||
LLInventoryObject::object_list_t::const_iterator end = inv->end();
|
||||
for ( ; it != end; ++it)
|
||||
for (LLInventoryObject::object_list_t::const_iterator it = inv->begin(); it != end; ++it)
|
||||
{
|
||||
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
|
||||
{
|
||||
scripts++;
|
||||
++scripts;
|
||||
}
|
||||
}
|
||||
mInventoryNums[viewer_object->getID()] = std::make_pair(scripts,inv->size());
|
||||
@@ -350,6 +400,7 @@ void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
|
||||
void LLFloaterInspect::onFocusReceived()
|
||||
{
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
|
||||
@@ -358,13 +409,11 @@ void LLFloaterInspect::onFocusReceived()
|
||||
|
||||
void LLFloaterInspect::dirty()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
// <edit>
|
||||
sInstance->mInventoryNums.clear();
|
||||
sInstance->mQueue.clear();
|
||||
sInstance->setDirty();
|
||||
}
|
||||
// <edit>
|
||||
mInventoryNums.clear();
|
||||
mQueue.clear();
|
||||
// </edit>
|
||||
setDirty();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::draw()
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#ifndef LL_LLFLOATERINSPECT_H
|
||||
#define LL_LLFLOATERINSPECT_H
|
||||
|
||||
#include "llavatarname.h"
|
||||
#include "llfloater.h"
|
||||
#include "llvoinventorylistener.h"
|
||||
|
||||
@@ -43,41 +44,47 @@ class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater, public LLVOInventoryListener
|
||||
class LLFloaterInspect : public LLFloater, public LLSingleton<LLFloaterInspect>, public LLVOInventoryListener
|
||||
{
|
||||
friend class LLSingleton;
|
||||
public:
|
||||
virtual ~LLFloaterInspect(void);
|
||||
static void show(void* ignored = NULL);
|
||||
|
||||
static void showInstance();
|
||||
// static void show(void* ignored = NULL);
|
||||
void onOpen();
|
||||
virtual BOOL postBuild();
|
||||
static void dirty();
|
||||
static LLUUID getSelectedUUID();
|
||||
void dirty();
|
||||
LLUUID getSelectedUUID();
|
||||
virtual void draw();
|
||||
virtual void refresh();
|
||||
static BOOL isVisible();
|
||||
// static BOOL isVisible();
|
||||
virtual void onFocusReceived();
|
||||
static void onClickCreatorProfile(void* ctrl);
|
||||
static void onClickOwnerProfile(void* ctrl);
|
||||
static void onSelectObject(LLUICtrl* ctrl, void* user_data);
|
||||
void onClickCreatorProfile();
|
||||
void onClickOwnerProfile();
|
||||
void onSelectObject();
|
||||
|
||||
static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr);
|
||||
|
||||
LLScrollListCtrl* mObjectList;
|
||||
protected:
|
||||
// protected members
|
||||
LLFloaterInspect();
|
||||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
// <edit>
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32 serial_num,
|
||||
void* queue);
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj, LLInventoryObject::object_list_t* inv, S32, void* queue);
|
||||
// </edit>
|
||||
|
||||
private:
|
||||
LLFloaterInspect();
|
||||
virtual ~LLFloaterInspect(void);
|
||||
// static data
|
||||
static LLFloaterInspect* sInstance;
|
||||
// static LLFloaterInspect* sInstance;
|
||||
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
// <edit>
|
||||
std::map<LLUUID,std::pair<S32,S32> > mInventoryNums; //<scripts,total>
|
||||
std::vector<LLUUID> mQueue;
|
||||
// </edit>
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
|
||||
@@ -43,29 +43,25 @@
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llparcel.h"
|
||||
#include "message.h"
|
||||
#include "lluserauth.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentaccess.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarconstants.h" //For new Online check - HgB
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterauction.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotify.h"
|
||||
#include "llpanellandaudio.h"
|
||||
#include "llpanellandmedia.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lltabcontainer.h"
|
||||
@@ -221,16 +217,15 @@ void LLFloaterLand::onClose(bool app_quitting)
|
||||
LLFloaterLand::LLFloaterLand(const LLSD& seed)
|
||||
: LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land"))
|
||||
{
|
||||
LLCallbackMap::map_t factory_map;
|
||||
factory_map["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
|
||||
factory_map["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
|
||||
factory_map["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
|
||||
factory_map["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
|
||||
factory_map["land_audio_panel"] = LLCallbackMap(createPanelLandAudio, this);
|
||||
factory_map["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
|
||||
factory_map["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
|
||||
mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
|
||||
mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
|
||||
mFactoryMap["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
|
||||
mFactoryMap["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
|
||||
mFactoryMap["land_audio_panel"] = LLCallbackMap(createPanelLandAudio, this);
|
||||
mFactoryMap["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
|
||||
mFactoryMap["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &factory_map, false);
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &getFactoryMap(), false);
|
||||
|
||||
sObserver = new LLParcelSelectionObserver();
|
||||
LLViewerParcelMgr::getInstance()->addObserver( sObserver );
|
||||
@@ -796,7 +791,7 @@ void LLPanelLandGeneral::refreshNames()
|
||||
mTextOwner->setText(owner);
|
||||
|
||||
std::string group;
|
||||
if(!parcel->getGroupID().isNull())
|
||||
if (!parcel->getGroupID().isNull())
|
||||
{
|
||||
gCacheName->getGroupName(parcel->getGroupID(), group);
|
||||
}
|
||||
@@ -822,7 +817,6 @@ void LLPanelLandGeneral::refreshNames()
|
||||
// virtual
|
||||
void LLPanelLandGeneral::draw()
|
||||
{
|
||||
//refreshNames();
|
||||
LLPanel::draw();
|
||||
}
|
||||
|
||||
@@ -833,7 +827,7 @@ void LLPanelLandGeneral::onClickSetGroup()
|
||||
LLFloaterGroupPicker* fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
|
||||
if (fg)
|
||||
{
|
||||
fg->setSelectCallback( cbGroupID, this);
|
||||
fg->setSelectGroupCallback( boost::bind(&LLPanelLandGeneral::setGroup, this, _1 ));
|
||||
if (parent_floater)
|
||||
{
|
||||
LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, fg);
|
||||
@@ -867,13 +861,6 @@ void LLPanelLandGeneral::onClickProfile()
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandGeneral::cbGroupID(LLUUID group_id, void* userdata)
|
||||
{
|
||||
LLPanelLandGeneral* self = (LLPanelLandGeneral*)userdata;
|
||||
self->setGroup(group_id);
|
||||
}
|
||||
|
||||
// public
|
||||
void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
|
||||
{
|
||||
@@ -1128,7 +1115,6 @@ BOOL LLPanelLandObjects::postBuild()
|
||||
|
||||
mCleanOtherObjectsTime->setFocusLostCallback(boost::bind(&LLPanelLandObjects::onLostFocus, _1, this));
|
||||
mCleanOtherObjectsTime->setCommitCallback(onCommitClean, this);
|
||||
|
||||
mCleanOtherObjectsTime->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
|
||||
|
||||
mBtnRefresh = getChild<LLButton>("Refresh List");
|
||||
@@ -1886,7 +1872,6 @@ BOOL LLPanelLandOptions::postBuild()
|
||||
childSetCommitCallback("check landmark", onCommitAny, this);
|
||||
mCheckLandmark->setVisible(!gHippoGridManager->getConnectedGrid()->isSecondLife());
|
||||
|
||||
|
||||
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
|
||||
childSetCommitCallback("check group scripts", onCommitAny, this);
|
||||
|
||||
@@ -2452,11 +2437,15 @@ BOOL LLPanelLandAccess::postBuild()
|
||||
|
||||
mListAccess = getChild<LLNameListCtrl>("AccessList");
|
||||
if (mListAccess)
|
||||
{
|
||||
mListAccess->sortByColumnIndex(0, TRUE); // ascending
|
||||
}
|
||||
|
||||
mListBanned = getChild<LLNameListCtrl>("BannedList");
|
||||
if (mListBanned)
|
||||
{
|
||||
mListBanned->sortByColumnIndex(0, TRUE); // ascending
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2969,10 +2958,7 @@ void LLPanelLandCovenant::refresh()
|
||||
}
|
||||
|
||||
LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
|
||||
if (region_landtype)
|
||||
{
|
||||
region_landtype->setText(region->getLocalizedSimProductName());
|
||||
}
|
||||
region_landtype->setText(region->getLocalizedSimProductName());
|
||||
|
||||
LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
|
||||
if (region_maturity)
|
||||
@@ -3022,11 +3008,8 @@ void LLPanelLandCovenant::updateCovenantText(const std::string &string)
|
||||
if (self)
|
||||
{
|
||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("covenant_editor");
|
||||
if (editor)
|
||||
{
|
||||
editor->setHandleEditKeysDirectly(TRUE);
|
||||
editor->setText(string);
|
||||
}
|
||||
editor->setHandleEditKeysDirectly(TRUE);
|
||||
editor->setText(string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ public:
|
||||
void onClickProfile();
|
||||
void onClickSetGroup();
|
||||
static void onClickInfoGroup(void*);
|
||||
static void cbGroupID(LLUUID group_id, void* userdata);
|
||||
static void onClickDeed(void*);
|
||||
static void onClickBuyLand(void* data);
|
||||
static void onClickScriptLimits(void* data);
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
// <edit>
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloatermessagelog.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llworld.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "llviewerwindow.h" // alertXml
|
||||
#include "llmessagetemplate.h"
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include "llmenugl.h"
|
||||
|
||||
#include "lleventtimer.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llmessagetemplate.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llworld.h"
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
@@ -826,7 +829,7 @@ BOOL LLFloaterMessageLog::onClickCloseCircuit(void* user_data)
|
||||
// static
|
||||
bool LLFloaterMessageLog::onConfirmCloseCircuit(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLCircuitData* cdp = gMessageSystem->mCircuitInfo.findCircuit(LLHost(notification["payload"]["circuittoclose"].asString()));
|
||||
if(!cdp) return false;
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(cdp->getHost());
|
||||
@@ -861,7 +864,7 @@ bool LLFloaterMessageLog::onConfirmCloseCircuit(const LLSD& notification, const
|
||||
// static
|
||||
bool LLFloaterMessageLog::onConfirmRemoveRegion(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if(option == 0) // yes
|
||||
LLWorld::getInstance()->removeRegion(LLHost(notification["payload"]["regionhost"].asString()));
|
||||
return false;
|
||||
|
||||
@@ -34,27 +34,15 @@
|
||||
|
||||
#include "llfloatermute.h"
|
||||
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llerror.h"
|
||||
#include "llstring.h"
|
||||
#include "message.h"
|
||||
#include "llavatarname.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
// project include
|
||||
#include "llagent.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llbutton.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llresizehandle.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llfocusmgr.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llbutton.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llpanel.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llviewertexteditor.h"
|
||||
|
||||
const S32 NOTIFICATION_PANEL_HEADER_HEIGHT = 20;
|
||||
const S32 HEADER_PADDING = 38;
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
};
|
||||
|
||||
LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name)
|
||||
: LLLayoutPanel(NOTIFICATION_PANEL_HEADER_HEIGHT,true,true)
|
||||
: LLLayoutPanel(NOTIFICATION_PANEL_HEADER_HEIGHT,true,true)
|
||||
{
|
||||
setName(channel_name);
|
||||
mChannelPtr = LLNotifications::instance().getChannel(channel_name);
|
||||
@@ -112,10 +112,15 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data)
|
||||
{
|
||||
LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data;
|
||||
if (!self) return;
|
||||
void* data = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected()->getUserdata();
|
||||
if (data)
|
||||
LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected();
|
||||
llassert(firstselected);
|
||||
if (firstselected)
|
||||
{
|
||||
gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
|
||||
void* data = firstselected->getUserdata();
|
||||
if (data)
|
||||
{
|
||||
gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +165,9 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter)
|
||||
// LLFloaterNotificationConsole
|
||||
//
|
||||
LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
|
||||
: LLFloater()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));
|
||||
LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
|
||||
}
|
||||
|
||||
@@ -185,7 +192,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
|
||||
addChannel("Notifications");
|
||||
addChannel("NotificationTips");
|
||||
|
||||
getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
||||
// getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
||||
|
||||
LLComboBox* notifications = getChild<LLComboBox>("notification_types");
|
||||
LLNotificationTemplates::TemplateNames names = LLNotificationTemplates::instance().getTemplateNames();
|
||||
@@ -232,21 +239,21 @@ void LLFloaterNotificationConsole::updateResizeLimits()
|
||||
setResizeLimits(getMinWidth(), LLFLOATER_HEADER_SIZE + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
|
||||
}
|
||||
|
||||
void LLFloaterNotificationConsole::onClickAdd(void* user_data)
|
||||
void LLFloaterNotificationConsole::onClickAdd()
|
||||
{
|
||||
LLFloaterNotificationConsole* floater = (LLFloaterNotificationConsole*)user_data;
|
||||
|
||||
std::string message_name = floater->getChild<LLComboBox>("notification_types")->getValue().asString();
|
||||
std::string message_name = getChild<LLComboBox>("notification_types")->getValue().asString();
|
||||
if (!message_name.empty())
|
||||
{
|
||||
LLNotifications::instance().add(message_name, LLSD());
|
||||
LLNotifications::instance().add(message_name, LLSD(), LLSD());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=============== LLFloaterNotification ================
|
||||
|
||||
LLFloaterNotification::LLFloaterNotification(LLNotification* note) : mNote(note)
|
||||
LLFloaterNotification::LLFloaterNotification(LLNotification* note)
|
||||
: LLFloater(),
|
||||
mNote(note)
|
||||
{
|
||||
LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml");
|
||||
}
|
||||
@@ -254,7 +261,7 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) : mNote(note)
|
||||
BOOL LLFloaterNotification::postBuild()
|
||||
{
|
||||
setTitle(mNote->getName());
|
||||
getChild<LLViewerTextEditor>("payload")->setText(mNote->getMessage());
|
||||
getChild<LLUICtrl>("payload")->setValue(mNote->getMessage());
|
||||
|
||||
LLComboBox* responses_combo = getChild<LLComboBox>("response");
|
||||
LLCtrlListInterface* response_list = responses_combo->getListInterface();
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lllayoutstack.h"
|
||||
#include "llnotifications.h"
|
||||
//#include "llnotificationsutil.h"
|
||||
|
||||
class LLNotification;
|
||||
|
||||
class LLFloaterNotificationConsole :
|
||||
public LLFloater,
|
||||
@@ -55,7 +57,7 @@ public:
|
||||
void updateResizeLimits();
|
||||
|
||||
private:
|
||||
static void onClickAdd(void* user_data);
|
||||
void onClickAdd();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "llpathfindinglinkset.h"
|
||||
#include "llpathfindinglinksetlist.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsd.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llui.h"
|
||||
@@ -114,26 +114,26 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
|
||||
{
|
||||
mBeaconColor = LLUI::sColorsGroup->getColor("PathfindingLinksetBeaconColor");
|
||||
|
||||
mFilterByName = getChild<LLLineEditor>("filter_by_name");
|
||||
mFilterByName = findChild<LLLineEditor>("filter_by_name");
|
||||
llassert(mFilterByName != NULL);
|
||||
mFilterByName->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
|
||||
mFilterByName->setSelectAllonFocusReceived(true);
|
||||
mFilterByName->setCommitOnFocusLost(true);
|
||||
|
||||
mFilterByDescription = getChild<LLLineEditor>("filter_by_description");
|
||||
mFilterByDescription = findChild<LLLineEditor>("filter_by_description");
|
||||
llassert(mFilterByDescription != NULL);
|
||||
mFilterByDescription->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
|
||||
mFilterByDescription->setSelectAllonFocusReceived(true);
|
||||
mFilterByDescription->setCommitOnFocusLost(true);
|
||||
|
||||
mFilterByLinksetUse = getChild<LLComboBox>("filter_by_linkset_use");
|
||||
mFilterByLinksetUse = findChild<LLComboBox>("filter_by_linkset_use");
|
||||
llassert(mFilterByLinksetUse != NULL);
|
||||
mFilterByLinksetUse->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
|
||||
|
||||
childSetAction("apply_filters", boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
|
||||
childSetAction("clear_filters", boost::bind(&LLFloaterPathfindingLinksets::onClearFiltersClicked, this));
|
||||
|
||||
mEditLinksetUse = getChild<LLComboBox>("edit_linkset_use");
|
||||
mEditLinksetUse = findChild<LLComboBox>("edit_linkset_use");
|
||||
llassert(mEditLinksetUse != NULL);
|
||||
mEditLinksetUse->clearRows();
|
||||
|
||||
@@ -160,54 +160,54 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
|
||||
|
||||
mEditLinksetUse->selectFirstItem();
|
||||
|
||||
mLabelWalkabilityCoefficients = getChild<LLTextBox>("walkability_coefficients_label");
|
||||
mLabelWalkabilityCoefficients = findChild<LLTextBox>("walkability_coefficients_label");
|
||||
llassert(mLabelWalkabilityCoefficients != NULL);
|
||||
|
||||
mLabelEditA = getChild<LLTextBox>("edit_a_label");
|
||||
mLabelEditA = findChild<LLTextBox>("edit_a_label");
|
||||
llassert(mLabelEditA != NULL);
|
||||
|
||||
mLabelSuggestedUseA = getChild<LLTextBox>("suggested_use_a_label");
|
||||
mLabelSuggestedUseA = findChild<LLTextBox>("suggested_use_a_label");
|
||||
llassert(mLabelSuggestedUseA != NULL);
|
||||
|
||||
mEditA = getChild<LLLineEditor>("edit_a_value");
|
||||
mEditA = findChild<LLLineEditor>("edit_a_value");
|
||||
llassert(mEditA != NULL);
|
||||
mEditA->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
|
||||
mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueA));
|
||||
|
||||
mLabelEditB = getChild<LLTextBox>("edit_b_label");
|
||||
mLabelEditB = findChild<LLTextBox>("edit_b_label");
|
||||
llassert(mLabelEditB != NULL);
|
||||
|
||||
mLabelSuggestedUseB = getChild<LLTextBox>("suggested_use_b_label");
|
||||
mLabelSuggestedUseB = findChild<LLTextBox>("suggested_use_b_label");
|
||||
llassert(mLabelSuggestedUseB != NULL);
|
||||
|
||||
mEditB = getChild<LLLineEditor>("edit_b_value");
|
||||
mEditB = findChild<LLLineEditor>("edit_b_value");
|
||||
llassert(mEditB != NULL);
|
||||
mEditB->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
|
||||
mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueB));
|
||||
|
||||
mLabelEditC = getChild<LLTextBox>("edit_c_label");
|
||||
mLabelEditC = findChild<LLTextBox>("edit_c_label");
|
||||
llassert(mLabelEditC != NULL);
|
||||
|
||||
mLabelSuggestedUseC = getChild<LLTextBox>("suggested_use_c_label");
|
||||
mLabelSuggestedUseC = findChild<LLTextBox>("suggested_use_c_label");
|
||||
llassert(mLabelSuggestedUseC != NULL);
|
||||
|
||||
mEditC = getChild<LLLineEditor>("edit_c_value");
|
||||
mEditC = findChild<LLLineEditor>("edit_c_value");
|
||||
llassert(mEditC != NULL);
|
||||
mEditC->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
|
||||
mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueC));
|
||||
|
||||
mLabelEditD = getChild<LLTextBox>("edit_d_label");
|
||||
mLabelEditD = findChild<LLTextBox>("edit_d_label");
|
||||
llassert(mLabelEditD != NULL);
|
||||
|
||||
mLabelSuggestedUseD = getChild<LLTextBox>("suggested_use_d_label");
|
||||
mLabelSuggestedUseD = findChild<LLTextBox>("suggested_use_d_label");
|
||||
llassert(mLabelSuggestedUseD != NULL);
|
||||
|
||||
mEditD = getChild<LLLineEditor>("edit_d_value");
|
||||
mEditD = findChild<LLLineEditor>("edit_d_value");
|
||||
llassert(mEditD != NULL);
|
||||
mEditD->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
|
||||
mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueD));
|
||||
|
||||
mApplyEditsButton = getChild<LLButton>("apply_edit_values");
|
||||
mApplyEditsButton = findChild<LLButton>("apply_edit_values");
|
||||
llassert(mApplyEditsButton != NULL);
|
||||
mApplyEditsButton->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyChangesClicked, this));
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "llpathfindingmanager.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llsd.h"
|
||||
#include "llstring.h"
|
||||
@@ -205,46 +206,46 @@ BOOL LLFloaterPathfindingObjects::postBuild()
|
||||
mErrorTextColor = LLUI::sColorsGroup->getColor("PathfindingErrorColor");
|
||||
mWarningTextColor = LLUI::sColorsGroup->getColor("PathfindingWarningColor");
|
||||
|
||||
mObjectsScrollList = getChild<LLScrollListCtrl>("objects_scroll_list");
|
||||
mObjectsScrollList = findChild<LLScrollListCtrl>("objects_scroll_list");
|
||||
llassert(mObjectsScrollList != NULL);
|
||||
mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onScrollListSelectionChanged, this));
|
||||
mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), TRUE);
|
||||
|
||||
mMessagingStatus = getChild<LLTextBox>("messaging_status");
|
||||
mMessagingStatus = findChild<LLTextBox>("messaging_status");
|
||||
llassert(mMessagingStatus != NULL);
|
||||
|
||||
mRefreshListButton = getChild<LLButton>("refresh_objects_list");
|
||||
mRefreshListButton = findChild<LLButton>("refresh_objects_list");
|
||||
llassert(mRefreshListButton != NULL);
|
||||
mRefreshListButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onRefreshObjectsClicked, this));
|
||||
|
||||
mSelectAllButton = getChild<LLButton>("select_all_objects");
|
||||
mSelectAllButton = findChild<LLButton>("select_all_objects");
|
||||
llassert(mSelectAllButton != NULL);
|
||||
mSelectAllButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onSelectAllObjectsClicked, this));
|
||||
|
||||
mSelectNoneButton = getChild<LLButton>("select_none_objects");
|
||||
mSelectNoneButton = findChild<LLButton>("select_none_objects");
|
||||
llassert(mSelectNoneButton != NULL);
|
||||
mSelectNoneButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onSelectNoneObjectsClicked, this));
|
||||
|
||||
mShowBeaconCheckBox = getChild<LLCheckBoxCtrl>("show_beacon");
|
||||
mShowBeaconCheckBox = findChild<LLCheckBoxCtrl>("show_beacon");
|
||||
llassert(mShowBeaconCheckBox != NULL);
|
||||
|
||||
mTakeButton = getChild<LLButton>("take_objects");
|
||||
mTakeButton = findChild<LLButton>("take_objects");
|
||||
llassert(mTakeButton != NULL);
|
||||
mTakeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTakeClicked, this));
|
||||
|
||||
mTakeCopyButton = getChild<LLButton>("take_copy_objects");
|
||||
mTakeCopyButton = findChild<LLButton>("take_copy_objects");
|
||||
llassert(mTakeCopyButton != NULL);
|
||||
mTakeCopyButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTakeCopyClicked, this));
|
||||
|
||||
mReturnButton = getChild<LLButton>("return_objects");
|
||||
mReturnButton = findChild<LLButton>("return_objects");
|
||||
llassert(mReturnButton != NULL);
|
||||
mReturnButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onReturnClicked, this));
|
||||
|
||||
mDeleteButton = getChild<LLButton>("delete_objects");
|
||||
mDeleteButton = findChild<LLButton>("delete_objects");
|
||||
llassert(mDeleteButton != NULL);
|
||||
mDeleteButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onDeleteClicked, this));
|
||||
|
||||
mTeleportButton = getChild<LLButton>("teleport_me_to_object");
|
||||
mTeleportButton = findChild<LLButton>("teleport_me_to_object");
|
||||
llassert(mTeleportButton != NULL);
|
||||
mTeleportButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTeleportClicked, this));
|
||||
|
||||
|
||||
@@ -172,6 +172,8 @@ BOOL LLFloaterProperties::postBuild()
|
||||
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this));
|
||||
// owner information
|
||||
getChild<LLUICtrl>("BtnOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickOwner,this));
|
||||
// last owner information
|
||||
getChild<LLUICtrl>("BtnLastOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickLastOwner,this));
|
||||
// acquired date
|
||||
// owner permissions
|
||||
// Permissions debug text
|
||||
@@ -227,6 +229,8 @@ void LLFloaterProperties::refresh()
|
||||
"BtnCreator",
|
||||
"LabelOwnerName",
|
||||
"BtnOwner",
|
||||
"LabelLastOwnerName",
|
||||
"BtnLastOwner",
|
||||
"CheckOwnerModify",
|
||||
"CheckOwnerCopy",
|
||||
"CheckOwnerTransfer",
|
||||
@@ -341,6 +345,21 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
getChild<LLUICtrl>("LabelCreatorName")->setValue(getString("unknown"));
|
||||
}
|
||||
|
||||
if (perm.getLastOwner().notNull())
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(perm.getLastOwner(), name);
|
||||
getChildView("LabelLastOwnerTitle")->setEnabled(true);
|
||||
getChildView("LabelLastOwnerName")->setEnabled(true);
|
||||
getChild<LLUICtrl>("LabelLastOwnerName")->setValue(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("LabelLastOwnerTitle")->setEnabled(false);
|
||||
getChildView("LabelLastOwnerName")->setEnabled(false);
|
||||
getChild<LLUICtrl>("LabelLastOwnerName")->setValue(getString("unknown"));
|
||||
}
|
||||
|
||||
////////////////
|
||||
// OWNER NAME //
|
||||
////////////////
|
||||
@@ -617,6 +636,11 @@ void LLFloaterProperties::onClickOwner()
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterProperties::onClickLastOwner()
|
||||
{
|
||||
if (const LLInventoryItem* item = findItem()) LLAvatarActions::showProfile(item->getPermissions().getLastOwner());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterProperties::onCommitName()
|
||||
{
|
||||
|
||||
@@ -76,6 +76,7 @@ protected:
|
||||
// ui callbacks
|
||||
void onClickCreator();
|
||||
void onClickOwner();
|
||||
void onClickLastOwner();
|
||||
void onCommitName();
|
||||
void onCommitDescription();
|
||||
void onCommitPermissions();
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#include "llcachename.h"
|
||||
#include "lldir.h"
|
||||
#include "lldispatcher.h"
|
||||
#include "llglheaders.h"
|
||||
@@ -69,6 +68,7 @@
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llregioninfomodel.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lltabcontainer.h"
|
||||
@@ -355,7 +355,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
||||
// extract message
|
||||
std::string sim_name;
|
||||
std::string sim_type = LLTrans::getString("land_type_unknown");
|
||||
U32 region_flags;
|
||||
U64 region_flags;
|
||||
U8 agent_limit;
|
||||
F32 object_bonus_factor;
|
||||
U8 sim_access;
|
||||
@@ -365,7 +365,6 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
||||
BOOL use_estate_sun;
|
||||
F32 sun_hour;
|
||||
msg->getString("RegionInfo", "SimName", sim_name);
|
||||
msg->getU32("RegionInfo", "RegionFlags", region_flags);
|
||||
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
|
||||
msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
|
||||
msg->getU8("RegionInfo", "SimAccess", sim_access);
|
||||
@@ -384,6 +383,17 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
||||
LLTrans::findString(sim_type, sim_type); // try localizing sim product name
|
||||
}
|
||||
|
||||
if (msg->has(_PREHASH_RegionInfo3))
|
||||
{
|
||||
msg->getU64("RegionInfo3", "RegionFlagsExtended", region_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
U32 flags = 0;
|
||||
msg->getU32("RegionInfo", "RegionFlags", flags);
|
||||
region_flags = flags;
|
||||
}
|
||||
|
||||
// Disable Environment Tab when not supported
|
||||
if (region)
|
||||
{
|
||||
@@ -1081,8 +1091,10 @@ void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
|
||||
strings_t strings;
|
||||
strings.push_back("1"); // one physics step
|
||||
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
|
||||
LLFloaterTopObjects::show();
|
||||
LLFloaterTopObjects::clearList();
|
||||
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
|
||||
if(!instance) return;
|
||||
instance->open();
|
||||
instance->clearList();
|
||||
self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
|
||||
}
|
||||
|
||||
@@ -1093,8 +1105,10 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
|
||||
strings_t strings;
|
||||
strings.push_back("6"); // top 5 scripts
|
||||
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
|
||||
LLFloaterTopObjects::show();
|
||||
LLFloaterTopObjects::clearList();
|
||||
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
|
||||
if(!instance) return;
|
||||
instance->open();
|
||||
instance->clearList();
|
||||
self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
|
||||
}
|
||||
|
||||
@@ -1493,7 +1507,8 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re
|
||||
LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
|
||||
if (widget)
|
||||
{
|
||||
widget->setSelectCallback(addAllowedGroup2, NULL);
|
||||
widget->removeNoneOption();
|
||||
widget->setSelectGroupCallback(boost::bind(&LLPanelEstateInfo::addAllowedGroup2, this, _1));
|
||||
if (parent_floater)
|
||||
{
|
||||
LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
|
||||
@@ -1683,9 +1698,8 @@ struct LLEstateAccessChangeInfo
|
||||
uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change
|
||||
};
|
||||
|
||||
// static
|
||||
// Special case callback for groups, since it has different callback format than names
|
||||
void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void*)
|
||||
void LLPanelEstateInfo::addAllowedGroup2(LLUUID id)
|
||||
{
|
||||
LLSD payload;
|
||||
payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
|
||||
@@ -2339,8 +2353,8 @@ public:
|
||||
// if we get an error response
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
{
|
||||
llinfos << "LLEstateChangeInfoResponder::error "
|
||||
<< status << ": " << reason << llendl;
|
||||
llinfos << "LLEstateChangeInfoResponder::error [status:"
|
||||
<< status << "]: " << reason << llendl;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return estateChangeInfoResponder_timeout; }
|
||||
@@ -2698,7 +2712,7 @@ BOOL LLPanelEstateCovenant::sendUpdate()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const std::string& LLPanelEstateCovenant::getEstateName() const
|
||||
std::string LLPanelEstateCovenant::getEstateName() const
|
||||
{
|
||||
return mEstateNameText->getText();
|
||||
}
|
||||
@@ -2749,7 +2763,7 @@ void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name)
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& LLPanelEstateCovenant::getOwnerName() const
|
||||
std::string LLPanelEstateCovenant::getOwnerName() const
|
||||
{
|
||||
return mEstateOwnerText->getText();
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
virtual BOOL postBuild(); // LLPanel
|
||||
|
||||
virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator
|
||||
|
||||
|
||||
BOOL validateTextureSizes();
|
||||
|
||||
protected:
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
|
||||
// Group picker callback is different, can't use core methods below
|
||||
bool addAllowedGroup(const LLSD& notification, const LLSD& response);
|
||||
static void addAllowedGroup2(LLUUID id, void*);
|
||||
void addAllowedGroup2(LLUUID id);
|
||||
|
||||
// Core methods for all above add/remove button clicks
|
||||
static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
virtual BOOL postBuild();
|
||||
virtual void updateChild(LLUICtrl* child_ctrl);
|
||||
virtual void refresh();
|
||||
|
||||
|
||||
void refreshFromEstate();
|
||||
|
||||
static bool isLindenEstate();
|
||||
@@ -369,9 +369,9 @@ public:
|
||||
|
||||
const LLUUID& getCovenantID() const { return mCovenantID; }
|
||||
void setCovenantID(const LLUUID& id) { mCovenantID = id; }
|
||||
const std::string& getEstateName() const;
|
||||
std::string getEstateName() const;
|
||||
void setEstateName(const std::string& name);
|
||||
const std::string& getOwnerName() const;
|
||||
std::string getOwnerName() const;
|
||||
void setOwnerName(const std::string& name);
|
||||
void setCovenantTextEditor(const std::string& text);
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
|
||||
// library includes
|
||||
@@ -39,7 +38,9 @@
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llregionhandle.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llparcel.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lltracker.h"
|
||||
@@ -223,7 +224,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
|
||||
|
||||
void fetchScriptLimitsRegionInfoResponder::error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "Error from responder " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << reason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
|
||||
@@ -310,7 +311,7 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
|
||||
|
||||
void fetchScriptLimitsRegionSummaryResponder::error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "Error from responder " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << reason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionDetailsResponder::result(const LLSD& content_ref)
|
||||
@@ -419,7 +420,7 @@ result (map)
|
||||
|
||||
void fetchScriptLimitsRegionDetailsResponder::error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "Error from responder " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << reason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
|
||||
@@ -515,7 +516,7 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
|
||||
|
||||
void fetchScriptLimitsAttachmentInfoResponder::error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "Error from responder " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << reason << llendl;
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
@@ -603,14 +604,7 @@ void LLPanelScriptLimitsRegionMemory::onNameCache(
|
||||
}
|
||||
|
||||
std::string name;
|
||||
if (LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
name = LLCacheName::buildUsername(full_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = full_name;
|
||||
}
|
||||
LLAvatarNameCache::getPNSName(id, name);
|
||||
|
||||
std::vector<LLSD>::iterator id_itor;
|
||||
for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor)
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
#include "llcolorswatch.h"
|
||||
//#include "llfirstuse.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvextensions.h"
|
||||
// [/RLVa:KB]
|
||||
@@ -56,6 +56,12 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug()
|
||||
, mOldControlVariable(NULL)
|
||||
, mOldSearchTerm(std::string("---"))
|
||||
{
|
||||
mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this));
|
||||
mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
|
||||
mCommitCallbackRegistrar.add("UpdateFilter", boost::bind(&LLFloaterSettingsDebug::onUpdateFilter, this, _2));
|
||||
mCommitCallbackRegistrar.add("ClickCopy", boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this));
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
|
||||
}
|
||||
|
||||
@@ -96,19 +102,9 @@ BOOL LLFloaterSettingsDebug::postBuild()
|
||||
}
|
||||
}
|
||||
mSettingsScrollList->sortByColumnIndex(0, true);
|
||||
mSettingsScrollList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this));
|
||||
|
||||
llinfos << mSettingsScrollList->getItemCount() << " total debug settings displayed." << llendl;
|
||||
|
||||
getChild<LLUICtrl>("val_spinner_1")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("val_spinner_2")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("val_spinner_3")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("val_spinner_4")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("val_text")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("boolean_combo")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
|
||||
getChild<LLUICtrl>("copy_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this));
|
||||
getChild<LLUICtrl>("default_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
|
||||
getChild<LLFilterEditor>("search_settings_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onUpdateFilter, this, _2));
|
||||
mComment = getChild<LLTextEditor>("comment_text");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -32,28 +32,19 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
//MK
|
||||
#include "llworld.h"
|
||||
#include "lleventpoll.h"
|
||||
#include "llagent.h"
|
||||
//mk
|
||||
#include "llappviewer.h"
|
||||
#include "llfloaterteleporthistory.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llslurl.h"
|
||||
#include "lltimer.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llurlaction.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llweb.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llurlaction.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
|
||||
@@ -34,16 +34,17 @@
|
||||
|
||||
#include "llfloatertopobjects.h"
|
||||
|
||||
// library includes
|
||||
#include "message.h"
|
||||
#include "llfontgl.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfloatergodtools.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llparcel.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltracker.h"
|
||||
@@ -55,13 +56,13 @@
|
||||
#include "llagentcamera.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
void cmdline_printchat(std::string message);
|
||||
#include "llavataractions.h"
|
||||
|
||||
LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
|
||||
//LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
|
||||
|
||||
// Globals
|
||||
// const U32 TIME_STR_LENGTH = 30;
|
||||
|
||||
/*
|
||||
// static
|
||||
void LLFloaterTopObjects::show()
|
||||
{
|
||||
@@ -72,89 +73,76 @@ void LLFloaterTopObjects::show()
|
||||
}
|
||||
|
||||
sInstance = new LLFloaterTopObjects();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml");
|
||||
sInstance->center();
|
||||
}
|
||||
|
||||
*/
|
||||
LLFloaterTopObjects::LLFloaterTopObjects()
|
||||
: LLFloater(std::string("top_objects")),
|
||||
mInitialized(FALSE),
|
||||
mtotalScore(0.f)
|
||||
{
|
||||
sInstance = this;
|
||||
mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.ReturnSelected", boost::bind(&LLFloaterTopObjects::onReturnSelected, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.ReturnAll", boost::bind(&LLFloaterTopObjects::onReturnAll, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.DisableSelected", boost::bind(&LLFloaterTopObjects::onDisableSelected, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.DisableAll", boost::bind(&LLFloaterTopObjects::onDisableAll, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.GetByParcelName", boost::bind(&LLFloaterTopObjects::onGetByParcelName, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this));
|
||||
|
||||
mCommitCallbackRegistrar.add("TopObjects.TeleportToObject", boost::bind(&LLFloaterTopObjects::onTeleportToObject, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.Kick", boost::bind(&LLFloaterTopObjects::onKick, this));
|
||||
mCommitCallbackRegistrar.add("TopObjects.Profile", boost::bind(&LLFloaterTopObjects::onProfile, this));
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_top_objects.xml");
|
||||
}
|
||||
|
||||
LLFloaterTopObjects::~LLFloaterTopObjects()
|
||||
{
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFloaterTopObjects::postBuild()
|
||||
{
|
||||
|
||||
LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (objects_list)
|
||||
{
|
||||
objects_list->setCommitCallback(boost::bind(&LLFloaterTopObjects::onCommitObjectsList,_1,this));
|
||||
objects_list->setDoubleClickCallback(boost::bind(&LLFloaterTopObjects::onDoubleClickObjectsList,this));
|
||||
objects_list->setFocus(true);
|
||||
objects_list->setCommitOnSelectionChange(TRUE);
|
||||
}
|
||||
getChild<LLUICtrl>("objects_list")->setFocus(TRUE);
|
||||
objects_list->setDoubleClickCallback(onDoubleClickObjectsList, this);
|
||||
objects_list->setCommitOnSelectionChange(TRUE);
|
||||
|
||||
childSetAction("show_beacon_btn", onClickShowBeacon, this);
|
||||
setDefaultBtn("show_beacon_btn");
|
||||
|
||||
childSetAction("return_selected_btn", onReturnSelected, this);
|
||||
childSetAction("return_all_btn", onReturnAll, this);
|
||||
childSetAction("disable_selected_btn", onDisableSelected, this);
|
||||
childSetAction("disable_all_btn", onDisableAll, this);
|
||||
childSetAction("refresh_btn", onRefresh, this);
|
||||
|
||||
childSetAction("lagwarning", onLagWarningBtn, this);
|
||||
childSetAction("profile", onProfileBtn, this);
|
||||
childSetAction("kick", onKickBtn, this);
|
||||
childSetAction("tpto", onTPBtn, this);
|
||||
|
||||
|
||||
childSetAction("filter_object_btn", onGetByObjectNameClicked, this);
|
||||
childSetAction("filter_owner_btn", onGetByOwnerNameClicked, this);
|
||||
|
||||
|
||||
/*
|
||||
LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor");
|
||||
if (line_editor)
|
||||
{
|
||||
line_editor->setCommitOnFocusLost(FALSE);
|
||||
line_editor->setCommitCallback(onGetByOwnerName, this);
|
||||
}
|
||||
|
||||
line_editor = getChild<LLLineEditor>("object_name_editor");
|
||||
if (line_editor)
|
||||
{
|
||||
line_editor->setCommitOnFocusLost(FALSE);
|
||||
line_editor->setCommitCallback(onGetByObjectName, this);
|
||||
}*/
|
||||
|
||||
mCurrentMode = STAT_REPORT_TOP_SCRIPTS;
|
||||
mFlags = 0;
|
||||
mFilter.clear();
|
||||
center();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// static
|
||||
void LLFloaterTopObjects::setMode(U32 mode)
|
||||
{
|
||||
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
|
||||
if(!instance) return;
|
||||
instance->mCurrentMode = mode;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
|
||||
{
|
||||
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
|
||||
if(!instance) return;
|
||||
// Make sure dialog is on screen
|
||||
show();
|
||||
sInstance->handleReply(msg, data);
|
||||
instance->open();
|
||||
instance->handleReply(msg, data);
|
||||
|
||||
//HACK: for some reason sometimes top scripts originally comes back
|
||||
//with no results even though they're there
|
||||
if (!sInstance->mObjectListIDs.size() && !sInstance->mInitialized)
|
||||
if (!instance->mObjectListIDs.size() && !instance->mInitialized)
|
||||
{
|
||||
sInstance->onRefresh(NULL);
|
||||
sInstance->mInitialized = TRUE;
|
||||
instance->onRefresh();
|
||||
instance->mInitialized = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -169,7 +157,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
||||
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode);
|
||||
|
||||
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("objects_list");
|
||||
|
||||
|
||||
S32 block_count = msg->getNumberOfBlocks("ReportData");
|
||||
for (S32 block = 0; block < block_count; ++block)
|
||||
{
|
||||
@@ -180,9 +168,11 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
||||
F32 score;
|
||||
std::string name_buf;
|
||||
std::string owner_buf;
|
||||
std::string parcel_buf("unknown");
|
||||
F32 mono_score = 0.f;
|
||||
bool have_extended_data = false;
|
||||
S32 public_urls = 0;
|
||||
F32 script_memory = 0.f;
|
||||
|
||||
msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block);
|
||||
msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block);
|
||||
@@ -192,53 +182,66 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
||||
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block);
|
||||
msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block);
|
||||
msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block);
|
||||
|
||||
if(msg->has("DataExtended"))
|
||||
{
|
||||
have_extended_data = true;
|
||||
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
|
||||
msg->getF32("DataExtended", "MonoScore", mono_score, block);
|
||||
msg->getS32(_PREHASH_ReportData,"PublicURLs",public_urls,block);
|
||||
msg->getS32("DataExtended", "PublicURLs", public_urls, block);
|
||||
if (msg->getSize("DataExtended", "ParcelName") > 0)
|
||||
{
|
||||
msg->getString("DataExtended", "ParcelName", parcel_buf, block);
|
||||
msg->getF32("DataExtended", "Size", script_memory, block);
|
||||
}
|
||||
}
|
||||
|
||||
LLSD element;
|
||||
|
||||
element["id"] = task_id;
|
||||
element["object_name"] = name_buf;
|
||||
element["owner_name"] = owner_buf;
|
||||
element["columns"][0]["column"] = "score";
|
||||
element["columns"][0]["value"] = llformat("%0.3f", score);
|
||||
element["columns"][0]["font"] = "SANSSERIF";
|
||||
|
||||
LLSD columns;
|
||||
S32 column_num = 0;
|
||||
columns[column_num]["column"] = "score";
|
||||
columns[column_num]["value"] = llformat("%0.3f", score);
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
element["columns"][1]["column"] = "name";
|
||||
element["columns"][1]["value"] = name_buf;
|
||||
element["columns"][1]["font"] = "SANSSERIF";
|
||||
if (name_buf == owner_buf)
|
||||
{
|
||||
element["columns"][1]["color"] = LLColor4::red.getValue();
|
||||
}
|
||||
element["columns"][2]["column"] = "owner";
|
||||
element["columns"][2]["value"] = owner_buf;
|
||||
element["columns"][2]["font"] = "SANSSERIF";
|
||||
element["columns"][3]["column"] = "location";
|
||||
element["columns"][3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
|
||||
element["columns"][3]["font"] = "SANSSERIF";
|
||||
element["columns"][4]["column"] = "time";
|
||||
element["columns"][4]["value"] = formatted_time((time_t)time_stamp);
|
||||
element["columns"][4]["font"] = "SANSSERIF";
|
||||
columns[column_num]["column"] = "name";
|
||||
columns[column_num]["value"] = name_buf;
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
columns[column_num]["column"] = "owner";
|
||||
columns[column_num]["value"] = owner_buf;
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
columns[column_num]["column"] = "location";
|
||||
columns[column_num]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
columns[column_num]["column"] = "parcel";
|
||||
columns[column_num]["value"] = parcel_buf;
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
columns[column_num]["column"] = "time";
|
||||
columns[column_num]["value"] = formatted_time((time_t)time_stamp);
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS
|
||||
&& have_extended_data)
|
||||
{
|
||||
element["columns"][5]["column"] = "mono_time";
|
||||
element["columns"][5]["value"] = llformat("%0.3f", mono_score);
|
||||
element["columns"][5]["font"] = "SANSSERIF";
|
||||
columns[column_num]["column"] = "memory";
|
||||
columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f));
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
|
||||
element["columns"][6]["column"] = "URLs";
|
||||
element["columns"][6]["value"] = llformat("%d", public_urls);
|
||||
element["columns"][6]["font"] = "SANSSERIF";
|
||||
columns[column_num]["column"] = "URLs";
|
||||
columns[column_num]["value"] = llformat("%d", public_urls);
|
||||
columns[column_num++]["font"] = "SANSSERIF";
|
||||
}
|
||||
|
||||
element["columns"] = columns;
|
||||
// Singu Note: We diverge slightly here to retain the legacy coloring of avatar names. when updating be sure that getColumn uses the same number as "name"
|
||||
LLScrollListItem* item =
|
||||
list->addElement(element);
|
||||
if (name_buf == owner_buf) item->getColumn(1)->setColor(LLColor4::red);
|
||||
|
||||
mObjectListData.append(element);
|
||||
mObjectListIDs.push_back(task_id);
|
||||
@@ -259,30 +262,27 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
||||
{
|
||||
setTitle(getString("top_scripts_title"));
|
||||
list->setColumnLabel("score", getString("scripts_score_label"));
|
||||
list->setColumnLabel("mono_time", getString("scripts_mono_time_label"));
|
||||
|
||||
LLUIString format = getString("top_scripts_text");
|
||||
format.setArg("[COUNT]", llformat("%d", total_count));
|
||||
format.setArg("[TIME]", llformat("%0.1f", mtotalScore));
|
||||
childSetValue("title_text", LLSD(format));
|
||||
format.setArg("[TIME]", llformat("%0.3f", mtotalScore));
|
||||
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
|
||||
}
|
||||
else
|
||||
{
|
||||
setTitle(getString("top_colliders_title"));
|
||||
list->setColumnLabel("score", getString("colliders_score_label"));
|
||||
list->setColumnLabel("mono_time", "");
|
||||
list->setColumnLabel("URLs", "");
|
||||
list->setColumnLabel("memory", "");
|
||||
LLUIString format = getString("top_colliders_text");
|
||||
format.setArg("[COUNT]", llformat("%d", total_count));
|
||||
childSetValue("title_text", LLSD(format));
|
||||
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTopObjects::onCommitObjectsList(LLUICtrl* ctrl, void* data)
|
||||
void LLFloaterTopObjects::onCommitObjectsList()
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
|
||||
self->updateSelectionInfo();
|
||||
updateSelectionInfo();
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::updateSelectionInfo()
|
||||
@@ -296,9 +296,15 @@ void LLFloaterTopObjects::updateSelectionInfo()
|
||||
|
||||
std::string object_id_string = object_id.asString();
|
||||
|
||||
childSetValue("id_editor", LLSD(object_id_string));
|
||||
childSetValue("object_name_editor", list->getFirstSelected()->getColumn(1)->getValue().asString());
|
||||
childSetValue("owner_name_editor", list->getFirstSelected()->getColumn(2)->getValue().asString());
|
||||
getChild<LLUICtrl>("id_editor")->setValue(LLSD(object_id_string));
|
||||
LLScrollListItem* sli = list->getFirstSelected();
|
||||
llassert(sli);
|
||||
if (sli)
|
||||
{
|
||||
getChild<LLUICtrl>("object_name_editor")->setValue(sli->getColumn(1)->getValue().asString());
|
||||
getChild<LLUICtrl>("owner_name_editor")->setValue(sli->getColumn(2)->getValue().asString());
|
||||
getChild<LLUICtrl>("parcel_name_editor")->setValue(sli->getColumn(4)->getValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -306,36 +312,12 @@ void LLFloaterTopObjects::onDoubleClickObjectsList(void* data)
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
self->showBeacon();
|
||||
self->lookAtAvatar();
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::lookAtAvatar()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
LLUUID taskid = first_selected->getUUID();
|
||||
|
||||
LLVOAvatar* voavatar = gObjectList.findAvatar(taskid);
|
||||
if(voavatar)
|
||||
{
|
||||
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
|
||||
gAgentCamera.changeCameraToThirdPerson();
|
||||
gAgentCamera.setFocusGlobal(voavatar->getPositionGlobal(),taskid);
|
||||
gAgentCamera.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal()
|
||||
+ LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(),
|
||||
voavatar->getPositionGlobal(),
|
||||
taskid );
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTopObjects::onClickShowBeacon(void* data)
|
||||
void LLFloaterTopObjects::onClickShowBeacon()
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
if (!self) return;
|
||||
self->showBeacon();
|
||||
showBeacon();
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::doToObjects(int action, bool all)
|
||||
@@ -345,10 +327,10 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region) return;
|
||||
|
||||
LLCtrlListInterface *list = childGetListInterface("objects_list");
|
||||
LLCtrlListInterface *list = getChild<LLUICtrl>("objects_list")->getListInterface();
|
||||
if (!list || list->getItemCount() == 0) return;
|
||||
|
||||
std::vector<LLUUID>::iterator id_itor;
|
||||
uuid_vec_t::iterator id_itor;
|
||||
|
||||
bool start_message = true;
|
||||
|
||||
@@ -399,194 +381,76 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
|
||||
bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
|
||||
if(!instance) return false;
|
||||
if (option == 0)
|
||||
{
|
||||
sInstance->doToObjects(ACTION_RETURN, true);
|
||||
instance->doToObjects(ACTION_RETURN, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onReturnAll(void* data)
|
||||
void LLFloaterTopObjects::onReturnAll()
|
||||
{
|
||||
LLNotificationsUtil::add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll);
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTopObjects::onReturnSelected(void* data)
|
||||
void LLFloaterTopObjects::onReturnSelected()
|
||||
{
|
||||
sInstance->doToObjects(ACTION_RETURN, false);
|
||||
doToObjects(ACTION_RETURN, false);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onLagWarningBtn(void* data)
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
|
||||
self->onLagWarning(data);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onLagWarning(void* data)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
LLUUID taskid = first_selected->getUUID();
|
||||
|
||||
std::string name = first_selected->getColumn(1)->getValue().asString();
|
||||
std::string score = first_selected->getColumn(0)->getValue().asString();
|
||||
|
||||
std::istringstream stm;
|
||||
stm.str(score);
|
||||
F32 f_score;
|
||||
stm >> f_score;
|
||||
F32 percentage = 100.f * (f_score / 22);
|
||||
|
||||
std::string message = llformat(
|
||||
"Hello %s, you are receiving this automated message because you are wearing heavily scripted attachments/HUDs, "
|
||||
"causing excessive script lag (%5.2f ms, that's ca. %5.2f%% of the region's resources.)\n\n"
|
||||
"Please remove resizer scripts or attachments to reduce your script time, thank you.",
|
||||
name.c_str(),
|
||||
(F32)f_score,
|
||||
(F32)percentage
|
||||
);
|
||||
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
|
||||
cmdline_printchat(llformat("Script time warning sent to %s: (%5.2f ms)",
|
||||
name.c_str(),(F32)f_score));
|
||||
|
||||
send_improved_im(LLUUID(taskid),
|
||||
my_name,
|
||||
message,
|
||||
IM_ONLINE,
|
||||
IM_NOTHING_SPECIAL,
|
||||
LLUUID::null,
|
||||
NO_TIMESTAMP,
|
||||
(U8*)EMPTY_BINARY_BUCKET,
|
||||
EMPTY_BINARY_BUCKET_SIZE);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onProfileBtn(void* data)
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
self->onProfile(data);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onProfile(void* data)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
LLAvatarActions::showProfile(first_selected->getUUID());
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onKickBtn(void* data)
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
self->onKick(data);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onKick(void* data)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
LLUUID taskid = first_selected->getUUID();
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("EstateOwnerMessage");
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
|
||||
msg->nextBlock("MethodData");
|
||||
msg->addString("Method", "kickestate");
|
||||
msg->addUUID("Invoice", LLUUID::null);
|
||||
msg->nextBlock("ParamList");
|
||||
msg->addString("Parameter", taskid.asString().c_str());
|
||||
msg->sendReliable(gAgent.getRegionHost());
|
||||
}
|
||||
void LLFloaterTopObjects::onTPBtn(void* data)
|
||||
{
|
||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||
self->onTP(data);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onTP(void* data)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
|
||||
std::string name = first_selected->getColumn(1)->getValue().asString();
|
||||
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
|
||||
|
||||
F32 x, y, z;
|
||||
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
|
||||
if (matched != 3) return;
|
||||
|
||||
LLVector3 pos_agent(x, y, z);
|
||||
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
|
||||
|
||||
gAgent.teleportViaLocation( pos_global );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//static
|
||||
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
|
||||
if(!instance) return false;
|
||||
if (option == 0)
|
||||
{
|
||||
sInstance->doToObjects(ACTION_DISABLE, true);
|
||||
instance->doToObjects(ACTION_DISABLE, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onDisableAll(void* data)
|
||||
void LLFloaterTopObjects::onDisableAll()
|
||||
{
|
||||
LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll);
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onDisableSelected(void* data)
|
||||
void LLFloaterTopObjects::onDisableSelected()
|
||||
{
|
||||
sInstance->doToObjects(ACTION_DISABLE, false);
|
||||
doToObjects(ACTION_DISABLE, false);
|
||||
}
|
||||
|
||||
//static
|
||||
|
||||
void LLFloaterTopObjects::clearList()
|
||||
{
|
||||
LLCtrlListInterface *list = sInstance->childGetListInterface("objects_list");
|
||||
LLCtrlListInterface *list = childGetListInterface("objects_list");
|
||||
|
||||
if (list)
|
||||
{
|
||||
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||
}
|
||||
|
||||
sInstance->mObjectListData.clear();
|
||||
sInstance->mObjectListIDs.clear();
|
||||
sInstance->mtotalScore = 0.f;
|
||||
mObjectListData.clear();
|
||||
mObjectListIDs.clear();
|
||||
mtotalScore = 0.f;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterTopObjects::onRefresh(void* data)
|
||||
|
||||
void LLFloaterTopObjects::onRefresh()
|
||||
{
|
||||
U32 mode = STAT_REPORT_TOP_SCRIPTS;
|
||||
U32 flags = 0;
|
||||
std::string filter = "";
|
||||
|
||||
if (sInstance)
|
||||
{
|
||||
mode = sInstance->mCurrentMode;
|
||||
flags = sInstance->mFlags;
|
||||
filter = sInstance->mFilter;
|
||||
sInstance->clearList();
|
||||
}
|
||||
mode = mCurrentMode;
|
||||
flags = mFlags;
|
||||
filter = mFilter;
|
||||
clearList();
|
||||
|
||||
LLMessageSystem *msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_LandStatRequest);
|
||||
@@ -601,35 +465,35 @@ void LLFloaterTopObjects::onRefresh(void* data)
|
||||
|
||||
msg->sendReliable(gAgent.getRegionHost());
|
||||
|
||||
if (sInstance)
|
||||
{
|
||||
sInstance->mFilter.clear();
|
||||
sInstance->mFlags = 0;
|
||||
}
|
||||
mFilter.clear();
|
||||
mFlags = 0;
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onGetByObjectName(LLUICtrl* ctrl, void* data)
|
||||
void LLFloaterTopObjects::onGetByObjectName()
|
||||
{
|
||||
if (sInstance)
|
||||
{
|
||||
sInstance->mFlags = STAT_FILTER_BY_OBJECT;
|
||||
sInstance->mFilter = sInstance->childGetText("object_name_editor");
|
||||
onRefresh(NULL);
|
||||
}
|
||||
mFlags = STAT_FILTER_BY_OBJECT;
|
||||
mFilter = getChild<LLUICtrl>("object_name_editor")->getValue().asString();
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onGetByOwnerName(LLUICtrl* ctrl, void* data)
|
||||
void LLFloaterTopObjects::onGetByOwnerName()
|
||||
{
|
||||
if (sInstance)
|
||||
{
|
||||
sInstance->mFlags = STAT_FILTER_BY_OWNER;
|
||||
sInstance->mFilter = sInstance->childGetText("owner_name_editor");
|
||||
onRefresh(NULL);
|
||||
}
|
||||
mFlags = STAT_FILTER_BY_OWNER;
|
||||
mFilter = getChild<LLUICtrl>("owner_name_editor")->getValue().asString();
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTopObjects::onGetByParcelName()
|
||||
{
|
||||
mFlags = STAT_FILTER_BY_PARCEL_NAME;
|
||||
mFilter = getChild<LLUICtrl>("parcel_name_editor")->getValue().asString();
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTopObjects::showBeacon()
|
||||
{
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
|
||||
@@ -647,4 +511,68 @@ void LLFloaterTopObjects::showBeacon()
|
||||
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
|
||||
std::string tooltip("");
|
||||
LLTracker::trackLocation(pos_global, name, tooltip, LLTracker::LOCATION_ITEM);
|
||||
|
||||
const LLUUID& taskid = first_selected->getUUID();
|
||||
if(LLVOAvatar* voavatar = gObjectList.findAvatar(taskid))
|
||||
{
|
||||
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
|
||||
gAgentCamera.changeCameraToThirdPerson();
|
||||
gAgentCamera.setFocusGlobal(voavatar->getPositionGlobal(),taskid);
|
||||
gAgentCamera.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal() + LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(), voavatar->getPositionGlobal(), taskid);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onTeleportToObject()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
|
||||
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
|
||||
|
||||
F32 x, y, z;
|
||||
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
|
||||
if (matched != 3) return;
|
||||
|
||||
LLVector3 pos_agent(x, y, z);
|
||||
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
|
||||
|
||||
gAgent.teleportViaLocation( pos_global );
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onKick()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
|
||||
const LLUUID& objectId = first_selected->getUUID();
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("EstateOwnerMessage");
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
|
||||
msg->nextBlock("MethodData");
|
||||
msg->addString("Method", "kickestate");
|
||||
msg->addUUID("Invoice", LLUUID::null);
|
||||
msg->nextBlock("ParamList");
|
||||
msg->addString("Parameter", objectId.asString().c_str());
|
||||
msg->sendReliable(gAgent.getRegionHost());
|
||||
}
|
||||
|
||||
void LLFloaterTopObjects::onProfile()
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
|
||||
if (!list) return;
|
||||
|
||||
LLScrollListItem* first_selected = list->getFirstSelected();
|
||||
if (!first_selected) return;
|
||||
|
||||
const LLUUID& objectId = first_selected->getUUID();
|
||||
LLAvatarActions::showProfile(objectId);
|
||||
}
|
||||
|
||||
@@ -37,29 +37,25 @@
|
||||
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterTopObjects : public LLFloater
|
||||
class LLFloaterTopObjects : public LLFloater, public LLSingleton<LLFloaterTopObjects>
|
||||
{
|
||||
friend class LLSingleton;
|
||||
public:
|
||||
// Opens the floater on screen.
|
||||
static void show();
|
||||
// static void show();
|
||||
|
||||
// Opens the floater if it's not on-screen.
|
||||
// Juggles the UI based on method = "scripts" or "colliders"
|
||||
static void handle_land_reply(LLMessageSystem* msg, void** data);
|
||||
void handleReply(LLMessageSystem* msg, void** data);
|
||||
|
||||
static void clearList();
|
||||
void clearList();
|
||||
void updateSelectionInfo();
|
||||
virtual BOOL postBuild();
|
||||
|
||||
static void onRefresh(void* data);
|
||||
void onRefresh();
|
||||
|
||||
static void setMode(U32 mode) { if (sInstance) sInstance->mCurrentMode = mode; }
|
||||
|
||||
void onProfile(void* data);
|
||||
void onKick(void* data);
|
||||
void onTP(void* data);
|
||||
void onLagWarning(void* data);
|
||||
static void setMode(U32 mode);
|
||||
|
||||
private:
|
||||
LLFloaterTopObjects();
|
||||
@@ -67,31 +63,27 @@ private:
|
||||
|
||||
void initColumns(LLCtrlListInterface *list);
|
||||
|
||||
static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
|
||||
void onCommitObjectsList();
|
||||
static void onDoubleClickObjectsList(void* data);
|
||||
void lookAtAvatar();
|
||||
static void onClickShowBeacon(void* data);
|
||||
void onClickShowBeacon();
|
||||
|
||||
void doToObjects(int action, bool all);
|
||||
|
||||
static void onReturnAll(void* data);
|
||||
static void onReturnSelected(void* data);
|
||||
static void onDisableAll(void* data);
|
||||
static void onDisableSelected(void* data);
|
||||
void onReturnAll();
|
||||
void onReturnSelected();
|
||||
void onDisableAll();
|
||||
void onDisableSelected();
|
||||
|
||||
void onTeleportToObject();
|
||||
void onKick();
|
||||
void onProfile();
|
||||
|
||||
static void onProfileBtn(void* data);
|
||||
static void onKickBtn(void* data);
|
||||
static void onTPBtn(void* data);
|
||||
static void onLagWarningBtn(void* data);
|
||||
|
||||
static bool callbackReturnAll(const LLSD& notification, const LLSD& response);
|
||||
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
|
||||
|
||||
static void onGetByOwnerName(LLUICtrl* ctrl, void* data);
|
||||
static void onGetByObjectName(LLUICtrl* ctrl, void* data);
|
||||
|
||||
static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); };
|
||||
static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
|
||||
void onGetByOwnerName();
|
||||
void onGetByObjectName();
|
||||
void onGetByParcelName();
|
||||
|
||||
void showBeacon();
|
||||
|
||||
@@ -99,7 +91,7 @@ private:
|
||||
std::string mMethod;
|
||||
|
||||
LLSD mObjectListData;
|
||||
std::vector<LLUUID> mObjectListIDs;
|
||||
uuid_vec_t mObjectListIDs;
|
||||
|
||||
U32 mCurrentMode;
|
||||
U32 mFlags;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "llfloatervoiceeffect.h"
|
||||
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltexteditor.h" // For linked text hack
|
||||
#include "lltrans.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
@@ -37,10 +37,11 @@
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
|
||||
#include "llcachename.h"
|
||||
#include "llagent.h"
|
||||
#include "llinventory.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
static LLRegisterWidget<LLNameListCtrl> r("name_list");
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "llpreviewtexture.h"
|
||||
#include "llpluginclassmedia.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "llcombobox.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "lluiconstants.h"
|
||||
|
||||
@@ -518,7 +518,6 @@ void LLPanelFace::getState()
|
||||
BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced();
|
||||
|
||||
// only turn on auto-adjust button if there is a media renderer and the media is loaded
|
||||
getChildView("textbox autofix")->setEnabled(editable);
|
||||
getChildView("button align")->setEnabled(editable);
|
||||
|
||||
//if ( LLMediaEngine::getInstance()->getMediaRenderer () )
|
||||
@@ -579,7 +578,6 @@ void LLPanelFace::getState()
|
||||
|
||||
if(LLViewerMedia::textureHasMedia(id))
|
||||
{
|
||||
getChildView("textbox autofix")->setEnabled(editable);
|
||||
getChildView("button align")->setEnabled(editable);
|
||||
}
|
||||
|
||||
@@ -997,9 +995,6 @@ void LLPanelFace::getState()
|
||||
getChildView("tex gen")->setEnabled(FALSE);
|
||||
getChildView("label shininess")->setEnabled(FALSE);
|
||||
getChildView("label bumpiness")->setEnabled(FALSE);
|
||||
|
||||
getChildView("textbox autofix")->setEnabled(FALSE);
|
||||
|
||||
getChildView("button align")->setEnabled(FALSE);
|
||||
getChildView("button apply")->setEnabled(FALSE);
|
||||
//getChildView("has media")->setEnabled(FALSE);
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "llgroupmgr.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewerobject.h"
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "lllineeditor.h"
|
||||
#include "llproductinforequest.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lltexteditor.h"
|
||||
|
||||
@@ -41,10 +41,9 @@
|
||||
#include "llviewerinventory.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llagent.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
|
||||
#include "lllineeditor.h"
|
||||
#include "lltexteditor.h"
|
||||
@@ -52,11 +51,11 @@
|
||||
#include "lliconctrl.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltextbox.h"
|
||||
|
||||
#include "roles_constants.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llgiveinventory.h"
|
||||
@@ -86,16 +85,15 @@ public:
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory);
|
||||
void setPanel(LLPanelGroupNotices* panel) { mGroupNoticesPanel = panel; }
|
||||
|
||||
void setGroupNoticesPanel(LLPanelGroupNotices* panel) { mGroupNoticesPanel = panel; }
|
||||
protected:
|
||||
LLPanelGroupNotices* mGroupNoticesPanel;
|
||||
};
|
||||
|
||||
LLGroupDropTarget::LLGroupDropTarget(const LLDropTarget::Params& p)
|
||||
: LLDropTarget(p)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
// static
|
||||
LLView* LLGroupDropTarget::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory)
|
||||
@@ -144,6 +142,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
case DAD_BODYPART:
|
||||
case DAD_ANIMATION:
|
||||
case DAD_GESTURE:
|
||||
case DAD_CALLINGCARD:
|
||||
{
|
||||
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
|
||||
if(gInventory.getItem(inv_item->getUUID())
|
||||
@@ -167,7 +166,6 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
break;
|
||||
}
|
||||
case DAD_CATEGORY:
|
||||
case DAD_CALLINGCARD:
|
||||
default:
|
||||
*accept = ACCEPT_NO;
|
||||
break;
|
||||
@@ -269,9 +267,9 @@ BOOL LLPanelGroupNotices::postBuild()
|
||||
mPanelCreateNotice = getChild<LLPanel>("panel_create_new_notice",recurse);
|
||||
mPanelViewNotice = getChild<LLPanel>("panel_view_past_notice",recurse);
|
||||
|
||||
LLGroupDropTarget* group_drop_target = getChild<LLGroupDropTarget>("drop_target",recurse);
|
||||
group_drop_target->setEntityID(mGroupID);
|
||||
group_drop_target->setGroupNoticesPanel(this);
|
||||
LLGroupDropTarget* target = getChild<LLGroupDropTarget>("drop_target",recurse);
|
||||
target->setPanel(this);
|
||||
target->setEntityID(mGroupID);
|
||||
|
||||
arrangeNoticeView(VIEW_PAST_NOTICE);
|
||||
|
||||
@@ -538,8 +536,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject,
|
||||
mInventoryOffer = inventory_offer;
|
||||
|
||||
std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType,
|
||||
LLInventoryType::IT_TEXTURE,
|
||||
0, FALSE);
|
||||
LLInventoryType::IT_TEXTURE);
|
||||
|
||||
mViewInventoryIcon->setImage(icon_name);
|
||||
mViewInventoryIcon->setVisible(TRUE);
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelgrouproles.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltexteditor.h"
|
||||
@@ -503,13 +504,11 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
|
||||
|
||||
void LLPanelGroupSubTab::activate()
|
||||
{
|
||||
lldebugs << "LLPanelGroupSubTab::activate()" << llendl;
|
||||
setOthersVisible(TRUE);
|
||||
}
|
||||
|
||||
void LLPanelGroupSubTab::deactivate()
|
||||
{
|
||||
lldebugs << "LLPanelGroupSubTab::deactivate()" << llendl;
|
||||
setOthersVisible(FALSE);
|
||||
}
|
||||
|
||||
@@ -519,19 +518,11 @@ void LLPanelGroupSubTab::setOthersVisible(BOOL b)
|
||||
{
|
||||
mHeader->setVisible( b );
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLPanelGroupSubTab missing header!" << llendl;
|
||||
}
|
||||
|
||||
if (mFooter)
|
||||
{
|
||||
mFooter->setVisible( b );
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLPanelGroupSubTab missing footer!" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)
|
||||
@@ -1068,7 +1059,7 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
|
||||
void LLPanelGroupMembersSubTab::handleEjectMembers()
|
||||
{
|
||||
//send down an eject message
|
||||
std::vector<LLUUID> selected_members;
|
||||
uuid_vec_t selected_members;
|
||||
|
||||
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
|
||||
if (selection.empty()) return;
|
||||
@@ -1111,6 +1102,7 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
|
||||
for (std::vector<LLScrollListItem*>::iterator itor = selection.begin() ;
|
||||
itor != selection.end(); ++itor)
|
||||
{
|
||||
|
||||
member_id = (*itor)->getUUID();
|
||||
|
||||
//see if we requested a change for this member before
|
||||
@@ -1403,7 +1395,7 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
|
||||
|
||||
if ( role_change_datap )
|
||||
{
|
||||
std::vector<LLUUID> roles_to_be_removed;
|
||||
uuid_vec_t roles_to_be_removed;
|
||||
|
||||
for (role_change_data_map_t::iterator role = role_change_datap->begin();
|
||||
role != role_change_datap->end(); ++ role)
|
||||
@@ -1678,6 +1670,7 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab(const std::string& name, const
|
||||
mMemberVisibleCheck(NULL),
|
||||
mDeleteRoleButton(NULL),
|
||||
mCreateRoleButton(NULL),
|
||||
|
||||
mHasRoleChange(FALSE)
|
||||
{
|
||||
}
|
||||
@@ -2084,8 +2077,8 @@ void LLPanelGroupRolesSubTab::buildMembersList()
|
||||
LLGroupRoleData* rdatap = (*rit).second;
|
||||
if (rdatap)
|
||||
{
|
||||
std::vector<LLUUID>::const_iterator mit = rdatap->getMembersBegin();
|
||||
std::vector<LLUUID>::const_iterator end = rdatap->getMembersEnd();
|
||||
uuid_vec_t::const_iterator mit = rdatap->getMembersBegin();
|
||||
uuid_vec_t::const_iterator end = rdatap->getMembersEnd();
|
||||
for ( ; mit != end; ++mit)
|
||||
{
|
||||
mAssignedMembersList->addNameItem((*mit));
|
||||
@@ -2423,9 +2416,7 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
|
||||
void LLPanelGroupActionsSubTab::activate()
|
||||
{
|
||||
LLPanelGroupSubTab::activate();
|
||||
lldebugs << "LLPanelGroupActionsSubTab::activate()" << llendl;
|
||||
|
||||
|
||||
update(GC_ALL);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,24 +32,19 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "roles_constants.h"
|
||||
#include "llpanelgroupvoting.h"
|
||||
|
||||
#include "lllineeditor.h"
|
||||
#include "llbutton.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "llpanelgroupvoting.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llbutton.h"
|
||||
#include "llnotify.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
@@ -33,10 +33,12 @@
|
||||
|
||||
#include "llpanelmsgs.h"
|
||||
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llnotificationtemplate.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llfirstuse.h"
|
||||
|
||||
LLPanelMsgs::LLPanelMsgs()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
#include "llcombobox.h"
|
||||
#include "llresizebar.h"
|
||||
#include "llresizehandle.h"
|
||||
#include "llscrolllistcolumn.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llslider.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llagent.h"
|
||||
@@ -475,7 +477,7 @@ void LLPanelNearByMedia::updateListItem(LLScrollListItem* item,
|
||||
{
|
||||
cell->setValue(name);
|
||||
}
|
||||
item->setToolTip(item_tooltip);
|
||||
cell->setToolTip(item_tooltip);
|
||||
|
||||
// *TODO: Make these font styles/colors configurable via XUI
|
||||
U8 font_style = LLFontGL::NORMAL;
|
||||
|
||||
@@ -381,16 +381,25 @@ void LLPanelPermissions::refresh()
|
||||
|
||||
// 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;
|
||||
bool creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, 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);
|
||||
getChildView("button creator profile")->setEnabled(creators_identical && mCreatorID.notNull());
|
||||
// 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);
|
||||
|
||||
@@ -419,31 +428,52 @@ void LLPanelPermissions::refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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: 2009-07-08 (RLVa-1.0.0e)
|
||||
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
bool fRlvEnableOwner = true;
|
||||
if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
bool fRlvEnableCreator = true;
|
||||
bool fRlvEnableLastOwner = true;
|
||||
if (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()) )
|
||||
// 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);
|
||||
fRlvEnableOwner = 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;
|
||||
fRlvEnableCreator = false;
|
||||
}
|
||||
|
||||
if (RlvUtil::isNearbyAgent(mLastOwnerID))
|
||||
{
|
||||
creator_name = RlvStrings::getAnonym(creator_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)
|
||||
childSetEnabled("button owner profile",
|
||||
fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
|
||||
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);
|
||||
getChildView("button last owner profile")->setEnabled(owners_identical && mLastOwnerID.notNull());
|
||||
|
||||
// update group text field
|
||||
getChildView("Group:")->setEnabled(TRUE);
|
||||
@@ -620,12 +650,10 @@ void LLPanelPermissions::refresh()
|
||||
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);
|
||||
@@ -1037,10 +1065,9 @@ void LLPanelPermissions::onClickGroup()
|
||||
if(owners_identical && (owner_id == gAgent.getID()))
|
||||
{
|
||||
LLFloaterGroupPicker* fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
|
||||
|
||||
if (fg)
|
||||
{
|
||||
fg->setSelectCallback( cbGroupID, this );
|
||||
fg->setSelectGroupCallback( boost::bind(&LLPanelPermissions::cbGroupID, this, _1) );
|
||||
|
||||
if (parent_floater)
|
||||
{
|
||||
@@ -1059,13 +1086,11 @@ void LLPanelPermissions::onClickOpenGroup()
|
||||
LLGroupActions::show(group_id);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelPermissions::cbGroupID(LLUUID group_id, void* userdata)
|
||||
void LLPanelPermissions::cbGroupID(LLUUID group_id)
|
||||
{
|
||||
LLPanelPermissions* self = (LLPanelPermissions*)userdata;
|
||||
if(self->mLabelGroupName)
|
||||
if(mLabelGroupName)
|
||||
{
|
||||
self->mLabelGroupName->setNameID(group_id, TRUE);
|
||||
mLabelGroupName->setNameID(group_id, TRUE);
|
||||
}
|
||||
LLSelectMgr::getInstance()->sendGroup(group_id);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ protected:
|
||||
void onClickLastOwner();
|
||||
void onClickGroup();
|
||||
static void onClickOpenGroup();
|
||||
static void cbGroupID(LLUUID group_id, void* userdata);
|
||||
void cbGroupID(LLUUID group_id);
|
||||
static void onClickDeedToGroup(void*);
|
||||
static void onClickCopyObjKey();
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "llmutelist.h"
|
||||
#include "llparticipantlist.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llspeakers.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoiceclient.h"
|
||||
|
||||
@@ -31,49 +31,38 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "llpreviewgesture.h"
|
||||
|
||||
// libraries
|
||||
#include "lldatapacker.h"
|
||||
#include "lldarray.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llstring.h"
|
||||
#include "lldir.h"
|
||||
#include "llmultigesture.h"
|
||||
#include "llvfile.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
// newview
|
||||
#include "llagent.h" // todo: remove
|
||||
#include "llagent.h"
|
||||
#include "llanimstatelabels.h"
|
||||
#include "llanimationstates.h"
|
||||
#include "llappviewer.h" // gVFS
|
||||
#include "llassetuploadresponders.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldatapacker.h"
|
||||
#include "lldelayedgestureerror.h"
|
||||
#include "llfloatergesture.h" // for some label constants
|
||||
#include "llgesturemgr.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llmultigesture.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llvfile.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewerwindow.h" // busycount
|
||||
#include "llappviewer.h" // gVFS
|
||||
#include "llanimstatelabels.h"
|
||||
#include "llresmgr.h"
|
||||
|
||||
|
||||
// *TODO: Translate?
|
||||
@@ -98,7 +87,7 @@ void LLInventoryGestureAvailable::done()
|
||||
{
|
||||
for(uuid_vec_t::iterator it = mComplete.begin(); it != mComplete.end(); ++it)
|
||||
{
|
||||
LLPreview *preview = LLPreview::find((*it));
|
||||
LLPreview* preview = LLPreview::find((*it));
|
||||
if(preview)
|
||||
{
|
||||
preview->refresh();
|
||||
@@ -557,6 +546,7 @@ static const std::string valid_key_to_string(KEY key)
|
||||
void LLPreviewGesture::addKeys()
|
||||
{
|
||||
LLComboBox* combo = mKeyCombo;
|
||||
|
||||
combo->add( NONE_LABEL );
|
||||
for (KEY key = ' '; key < KEY_NONE; key++)
|
||||
{
|
||||
@@ -686,7 +676,7 @@ void LLPreviewGesture::refresh()
|
||||
if (mPreviewGesture || !is_complete)
|
||||
{
|
||||
|
||||
childSetEnabled("desc", FALSE);
|
||||
getChildView("desc")->setEnabled(FALSE);
|
||||
//mDescEditor->setEnabled(FALSE);
|
||||
mTriggerEditor->setEnabled(FALSE);
|
||||
mReplaceText->setEnabled(FALSE);
|
||||
@@ -720,7 +710,7 @@ void LLPreviewGesture::refresh()
|
||||
|
||||
BOOL modifiable = item->getPermissions().allowModifyBy(gAgent.getID());
|
||||
|
||||
childSetEnabled("desc", modifiable);
|
||||
getChildView("desc")->setEnabled(modifiable);
|
||||
mTriggerEditor->setEnabled(TRUE);
|
||||
mLibraryList->setEnabled(modifiable);
|
||||
mStepList->setEnabled(modifiable);
|
||||
|
||||
@@ -40,28 +40,28 @@
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldir.h"
|
||||
#include "llexternaleditor.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "lllineeditor.h"
|
||||
|
||||
#include "lllivefile.h"
|
||||
#include "llexternaleditor.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llscrollbar.h"
|
||||
#include "llscrollcontainer.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llslider.h"
|
||||
//#include "lscript_rt_interface.h"
|
||||
//#include "lscript_library.h"
|
||||
//#include "lscript_export.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llvfile.h"
|
||||
#include "statemachine/aifilepicker.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llnotify.h"
|
||||
#include "llmenugl.h"
|
||||
#include "roles_constants.h"
|
||||
#include "llselectmgr.h"
|
||||
@@ -80,7 +80,6 @@
|
||||
#include "llslider.h"
|
||||
#include "lldir.h"
|
||||
#include "llcombobox.h"
|
||||
//#include "llfloaterchat.h"
|
||||
#include "llfloatersearchreplace.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewertexteditor.h"
|
||||
@@ -91,7 +90,6 @@
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
|
||||
#include "llsdserialize.h"
|
||||
|
||||
@@ -750,7 +748,7 @@ BOOL LLScriptEdCore::canClose()
|
||||
|
||||
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch( option )
|
||||
{
|
||||
case 0: // "Yes"
|
||||
@@ -782,7 +780,7 @@ bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLS
|
||||
// static
|
||||
bool LLScriptEdCore::onHelpWebDialog(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
switch(option)
|
||||
{
|
||||
@@ -1142,8 +1140,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
|
||||
LLScrollListItem* item = self->mErrorList->getFirstSelected();
|
||||
if(item)
|
||||
{
|
||||
// *FIX: This fucked up little hack is here because we don't
|
||||
// have a grep library. This is very brittle code.
|
||||
// *FIX: replace with boost grep
|
||||
S32 row = 0;
|
||||
S32 column = 0;
|
||||
const LLScrollListCell* cell = item->getColumn(0);
|
||||
@@ -1161,7 +1158,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
|
||||
|
||||
bool LLScriptEdCore::handleReloadFromServerDialog(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch( option )
|
||||
{
|
||||
case 0: // "Yes"
|
||||
@@ -1454,8 +1451,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save)
|
||||
|
||||
// Save needs to compile the text in the buffer. If the compile
|
||||
// succeeds, then save both assets out to the database. If the compile
|
||||
// fails, go ahead and save the text anyway so that the user doesn't
|
||||
// get too fucked.
|
||||
// fails, go ahead and save the text anyway.
|
||||
void LLPreviewLSL::saveIfNeeded()
|
||||
{
|
||||
// llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl;
|
||||
|
||||
@@ -3297,6 +3297,7 @@ void LLSelectMgr::selectDelete()
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 deleteable_count = 0;
|
||||
|
||||
BOOL locked_but_deleteable_object = FALSE;
|
||||
@@ -4074,7 +4075,6 @@ void LLSelectMgr::deselectUnused()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::convertTransient()
|
||||
{
|
||||
LLObjectSelection::iterator node_it;
|
||||
@@ -4085,23 +4085,23 @@ void LLSelectMgr::convertTransient()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::deselectAllIfTooFar()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) )
|
||||
{
|
||||
struct NotTransientOrEditable : public LLSelectedNodeFunctor
|
||||
struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor
|
||||
{
|
||||
bool apply(LLSelectNode* pNode)
|
||||
{
|
||||
const LLViewerObject* pObj = pNode->getObject();
|
||||
return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj));
|
||||
}
|
||||
} f;
|
||||
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
|
||||
deselectAll();
|
||||
}
|
||||
return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) &&
|
||||
(pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID());
|
||||
}
|
||||
} f;
|
||||
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
|
||||
deselectAll();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (mSelectedObjects->isEmpty() || mSelectedObjects->mSelectType == SELECT_TYPE_HUD)
|
||||
@@ -4128,9 +4128,8 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
}
|
||||
|
||||
LLVector3d selectionCenter = getSelectionCenterGlobal();
|
||||
|
||||
// if (gSavedSettings.getBOOL("LimitSelectDistance")
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f
|
||||
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
|
||||
BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible();
|
||||
if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) )
|
||||
// [/RLVa:KB]
|
||||
@@ -4140,7 +4139,7 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
&& !selectionCenter.isExactlyZero())
|
||||
{
|
||||
// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f
|
||||
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
|
||||
F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f;
|
||||
// [/RLVa:KB]
|
||||
F32 deselect_dist_sq = deselect_dist * deselect_dist;
|
||||
@@ -4162,6 +4161,7 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::selectionSetObjectName(const std::string& name)
|
||||
{
|
||||
// we only work correctly if 1 object is selected.
|
||||
@@ -4339,6 +4339,7 @@ void LLSelectMgr::sendDelink()
|
||||
} sendfunc;
|
||||
getSelection()->applyToObjects(&sendfunc);
|
||||
|
||||
|
||||
// Delink needs to send individuals so you can unlink a single object from
|
||||
// a linked set.
|
||||
sendListToRegions(
|
||||
@@ -5052,6 +5053,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Iterate through nodes at end, since it can be on both the regular AND hover list
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
@@ -5064,7 +5066,11 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
} func(id);
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
|
||||
|
||||
if (node)
|
||||
if (!node)
|
||||
{
|
||||
llwarns << "Couldn't find object " << id << " selected." << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node->mInventorySerial != inv_serial)
|
||||
{
|
||||
@@ -5575,13 +5581,18 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
}
|
||||
if (mSelectedObjects->getNumNodes())
|
||||
{
|
||||
LLUUID inspect_item_id = LLFloaterInspect::getSelectedUUID();
|
||||
LLUUID inspect_item_id= LLUUID::null;
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
if(inspect_instance && inspect_instance->getVisible())
|
||||
{
|
||||
inspect_item_id = inspect_instance->getSelectedUUID();
|
||||
}
|
||||
|
||||
LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID();
|
||||
// <edit>
|
||||
//for (S32 pass = 0; pass < 2; pass++)
|
||||
//{
|
||||
// </edit>
|
||||
{
|
||||
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
|
||||
iter != mSelectedObjects->end(); iter++)
|
||||
{
|
||||
@@ -5617,9 +5628,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
node->renderOneSilhouette(sSilhouetteChildColor);
|
||||
}
|
||||
}
|
||||
// <edit>
|
||||
//}
|
||||
// </edit>
|
||||
}
|
||||
}
|
||||
|
||||
if (mHighlightedObjects->getNumNodes())
|
||||
@@ -6276,7 +6285,6 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
|
||||
// Update everyone who cares about the selection list
|
||||
void dialog_refresh_all()
|
||||
|
||||
{
|
||||
// This is the easiest place to fire the update signal, as it will
|
||||
// make cleaning up the functions below easier. Also, sometimes entities
|
||||
@@ -6305,7 +6313,12 @@ void dialog_refresh_all()
|
||||
}
|
||||
|
||||
LLFloaterProperties::dirtyAll();
|
||||
LLFloaterInspect::dirty();
|
||||
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
if(inspect_instance)
|
||||
{
|
||||
inspect_instance->dirty();
|
||||
}
|
||||
}
|
||||
|
||||
S32 get_family_count(LLViewerObject *parent)
|
||||
|
||||
@@ -111,7 +111,6 @@ LLSD LLSpeakerUpdateModeratorEvent::getValue()
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
LLSpeakerTextModerationEvent::LLSpeakerTextModerationEvent(LLSpeaker* source)
|
||||
: LLEvent(source, "Speaker text moderation event")
|
||||
{
|
||||
@@ -254,15 +253,58 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// ModerationResponder
|
||||
//
|
||||
|
||||
class ModerationResponder : public LLHTTPClient::ResponderIgnoreBody
|
||||
{
|
||||
public:
|
||||
ModerationResponder(const LLUUID& session_id)
|
||||
{
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "ModerationResponder error [status:" << status << "]: " << reason << llendl;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(mSessionID);
|
||||
if (!floaterp) return;
|
||||
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_mod_error");
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"generic_request_error");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return moderationResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "ModerationResponder"; }
|
||||
|
||||
private:
|
||||
LLUUID mSessionID;
|
||||
};
|
||||
|
||||
//
|
||||
// LLSpeakerMgr
|
||||
//
|
||||
|
||||
LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) :
|
||||
mVoiceChannel(channelp)
|
||||
, mVoiceModerated(false)
|
||||
, mModerateModeHandledFirstTime(false)
|
||||
mVoiceChannel(channelp),
|
||||
mVoiceModerated(false),
|
||||
mModerateModeHandledFirstTime(false)
|
||||
{
|
||||
static LLUICachedControl<F32> remove_delay ("SpeakerParticipantRemoveDelay", 10.0);
|
||||
|
||||
@@ -276,7 +318,10 @@ LLSpeakerMgr::~LLSpeakerMgr()
|
||||
|
||||
LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type)
|
||||
{
|
||||
if (id.isNull()) return NULL;
|
||||
if (id.isNull())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLPointer<LLSpeaker> speakerp;
|
||||
if (mSpeakers.find(id) == mSpeakers.end())
|
||||
@@ -358,13 +403,11 @@ void LLSpeakerMgr::update(BOOL resort_ok)
|
||||
|
||||
// update status of all current speakers
|
||||
BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
|
||||
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();)
|
||||
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++)
|
||||
{
|
||||
LLUUID speaker_id = speaker_it->first;
|
||||
LLSpeaker* speakerp = speaker_it->second;
|
||||
|
||||
speaker_it++;
|
||||
|
||||
if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id))
|
||||
{
|
||||
speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id);
|
||||
@@ -461,22 +504,18 @@ void LLSpeakerMgr::update(BOOL resort_ok)
|
||||
|
||||
void LLSpeakerMgr::updateSpeakerList()
|
||||
{
|
||||
// are we bound to the currently active voice channel?
|
||||
// Are we bound to the currently active voice channel?
|
||||
if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
|
||||
{
|
||||
std::set<LLUUID> participants;
|
||||
LLVoiceClient::getInstance()->getParticipantList(participants);
|
||||
// add new participants to our list of known speakers
|
||||
for (std::set<LLUUID>::iterator participant_it = participants.begin();
|
||||
participant_it != participants.end();
|
||||
++participant_it)
|
||||
// If we are, add all voice client participants to our list of known speakers
|
||||
for (std::set<LLUUID>::iterator participant_it = participants.begin(); participant_it != participants.end(); ++participant_it)
|
||||
{
|
||||
setSpeaker(*participant_it,
|
||||
LLVoiceClient::getInstance()->getDisplayName(*participant_it),
|
||||
LLSpeaker::STATUS_VOICE_ACTIVE,
|
||||
(LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -730,47 +769,10 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ModerationResponder : public LLHTTPClient::ResponderIgnoreBody
|
||||
{
|
||||
public:
|
||||
ModerationResponder(const LLUUID& session_id)
|
||||
{
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << "ModerationResponder error [status:" << status << "]: " << reason << llendl;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(mSessionID);
|
||||
if (!floaterp) return;
|
||||
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_mod_error");
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"generic_request_error");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return moderationResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "ModerationResponder"; }
|
||||
|
||||
private:
|
||||
LLUUID mSessionID;
|
||||
};
|
||||
|
||||
/*prep#
|
||||
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
||||
llwarns << "ModerationResponder error [status:" << status << "]: " << content << llendl;
|
||||
*/
|
||||
void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
|
||||
{
|
||||
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
|
||||
@@ -957,4 +959,3 @@ void LLLocalSpeakerMgr::updateSpeakerList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,41 +35,30 @@
|
||||
|
||||
#include "lltoolbar.h"
|
||||
|
||||
#include "imageids.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llparcel.h"
|
||||
#include "llbutton.h"
|
||||
#include "llflyoutbutton.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llui.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llagentwearables.h"
|
||||
#include "llbutton.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "llimview.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llui.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llimpanel.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llimpanel.h"
|
||||
#include "llimview.h"
|
||||
#include "llmenucommands.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolgrab.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
@@ -78,6 +67,7 @@
|
||||
#if LL_DARWIN
|
||||
|
||||
#include "llresizehandle.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
// This class draws like an LLResizeHandle but has no interactivity.
|
||||
// It's just there to provide a cue to the user that the lower right corner of the window functions as a resize handle.
|
||||
@@ -343,7 +333,7 @@ void LLToolBar::refresh()
|
||||
mBuildBtn->setEnabled(!(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)));
|
||||
|
||||
mMapBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
|
||||
mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP));
|
||||
mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
mInventoryBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -2058,7 +2058,7 @@ class LLObjectInspect : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterInspect::show();
|
||||
LLFloaterInspect::showInstance();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -964,4 +964,3 @@ void LLVoiceChannelP2P::setState(EState state)
|
||||
LLRecentPeople::instance().add(mOtherUserID);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoicevivox.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llhttpnode.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsdserialize.h"
|
||||
@@ -42,6 +43,38 @@ const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f;
|
||||
const F32 LLVoiceClient::VOLUME_MAX = 1.0f;
|
||||
|
||||
|
||||
// Support for secondlife:///app/voice SLapps
|
||||
class LLVoiceHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requests will be throttled from a non-trusted browser
|
||||
LLVoiceHandler() : LLCommandHandler("voice", UNTRUSTED_THROTTLE) {}
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
|
||||
{
|
||||
if (params[0].asString() == "effects")
|
||||
{
|
||||
LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface();
|
||||
// If the voice client doesn't support voice effects, we can't handle effects SLapps
|
||||
if (!effect_interface)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Support secondlife:///app/voice/effects/refresh to update the voice effect list with new effects
|
||||
if (params[1].asString() == "refresh")
|
||||
{
|
||||
effect_interface->refreshVoiceEffectLists(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
LLVoiceHandler gVoiceHandler;
|
||||
|
||||
|
||||
|
||||
std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus)
|
||||
{
|
||||
std::string result = "UNKNOWN";
|
||||
|
||||
@@ -330,6 +330,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
||||
mCaptureDeviceDirty(false),
|
||||
mRenderDeviceDirty(false),
|
||||
mSpatialCoordsDirty(false),
|
||||
mIsInitialized(false),
|
||||
|
||||
mMuteMic(false),
|
||||
mMuteMicDirty(false),
|
||||
@@ -354,7 +355,9 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
||||
mCaptureBufferRecording(false),
|
||||
mCaptureBufferRecorded(false),
|
||||
mCaptureBufferPlaying(false),
|
||||
mPlayRequestCount(0)
|
||||
mPlayRequestCount(0),
|
||||
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
mSpeakerVolume = scale_speaker_volume(0);
|
||||
|
||||
@@ -387,6 +390,10 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
||||
|
||||
LLVivoxVoiceClient::~LLVivoxVoiceClient()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
@@ -568,7 +575,7 @@ void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries)
|
||||
{
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
|
||||
if ( region && mVoiceEnabled )
|
||||
if ( region && (mVoiceEnabled || !mIsInitialized))
|
||||
{
|
||||
std::string url =
|
||||
region->getCapability("ProvisionVoiceAccountRequest");
|
||||
@@ -739,7 +746,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
setVoiceEnabled(false);
|
||||
}
|
||||
|
||||
if(mVoiceEnabled)
|
||||
if(mVoiceEnabled || !mIsInitialized)
|
||||
{
|
||||
updatePosition();
|
||||
}
|
||||
@@ -784,7 +791,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
|
||||
//MARK: stateDisabled
|
||||
case stateDisabled:
|
||||
if(mTuningMode || (mVoiceEnabled && !mAccountName.empty()))
|
||||
if(mTuningMode || ((mVoiceEnabled || !mIsInitialized) && !mAccountName.empty()))
|
||||
{
|
||||
setState(stateStart);
|
||||
}
|
||||
@@ -1039,7 +1046,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
mTuningExitState = stateIdle;
|
||||
setState(stateMicTuningStart);
|
||||
}
|
||||
else if(!mVoiceEnabled)
|
||||
else if(!mVoiceEnabled && mIsInitialized)
|
||||
{
|
||||
// We never started up the connector. This will shut down the daemon.
|
||||
setState(stateConnectorStopped);
|
||||
@@ -1233,7 +1240,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
|
||||
//MARK: stateConnectorStart
|
||||
case stateConnectorStart:
|
||||
if(!mVoiceEnabled)
|
||||
if(!mVoiceEnabled && mIsInitialized)
|
||||
{
|
||||
// We were never logged in. This will shut down the connector.
|
||||
setState(stateLoggedOut);
|
||||
@@ -1251,7 +1258,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
|
||||
//MARK: stateConnectorStarted
|
||||
case stateConnectorStarted: // connector handle received
|
||||
if(!mVoiceEnabled)
|
||||
if(!mVoiceEnabled && mIsInitialized)
|
||||
{
|
||||
// We were never logged in. This will shut down the connector.
|
||||
setState(stateLoggedOut);
|
||||
@@ -1388,7 +1395,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
|
||||
//MARK: stateCreatingSessionGroup
|
||||
case stateCreatingSessionGroup:
|
||||
if(mSessionTerminateRequested || !mVoiceEnabled)
|
||||
if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized))
|
||||
{
|
||||
// *TODO: Question: is this the right way out of this state
|
||||
setState(stateSessionTerminated);
|
||||
@@ -1404,7 +1411,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
//MARK: stateRetrievingParcelVoiceInfo
|
||||
case stateRetrievingParcelVoiceInfo:
|
||||
// wait until parcel voice info is received.
|
||||
if(mSessionTerminateRequested || !mVoiceEnabled)
|
||||
if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized))
|
||||
{
|
||||
// if a terminate request has been received,
|
||||
// bail and go to the stateSessionTerminated
|
||||
@@ -1424,7 +1431,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
// Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync.
|
||||
sendFriendsListUpdates();
|
||||
|
||||
if(mSessionTerminateRequested || !mVoiceEnabled)
|
||||
if(mSessionTerminateRequested || (!mVoiceEnabled && mIsInitialized))
|
||||
{
|
||||
// TODO: Question: Is this the right way out of this state?
|
||||
setState(stateSessionTerminated);
|
||||
@@ -1505,7 +1512,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
}
|
||||
|
||||
// joinedAudioSession() will transition from here to stateSessionJoined.
|
||||
if(!mVoiceEnabled)
|
||||
if(!mVoiceEnabled && mIsInitialized)
|
||||
{
|
||||
// User bailed out during connect -- jump straight to teardown.
|
||||
setState(stateSessionTerminated);
|
||||
@@ -1552,7 +1559,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED);
|
||||
|
||||
}
|
||||
else if(!mVoiceEnabled)
|
||||
else if(!mVoiceEnabled && mIsInitialized)
|
||||
{
|
||||
// User bailed out during connect -- jump straight to teardown.
|
||||
setState(stateSessionTerminated);
|
||||
@@ -1572,7 +1579,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
//MARK: stateRunning
|
||||
case stateRunning: // steady state
|
||||
// Disabling voice or disconnect requested.
|
||||
if(!mVoiceEnabled || mSessionTerminateRequested)
|
||||
if((!mVoiceEnabled && mIsInitialized) || mSessionTerminateRequested)
|
||||
{
|
||||
leaveAudioSession();
|
||||
}
|
||||
@@ -1619,6 +1626,8 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS);
|
||||
sendPositionalUpdate();
|
||||
}
|
||||
|
||||
mIsInitialized = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1652,7 +1661,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
// Always reset the terminate request flag when we get here.
|
||||
mSessionTerminateRequested = false;
|
||||
|
||||
if(mVoiceEnabled && !mRelogRequested)
|
||||
if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested)
|
||||
{
|
||||
// Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state).
|
||||
setState(stateNoChannel);
|
||||
@@ -1680,7 +1689,7 @@ void LLVivoxVoiceClient::stateMachine()
|
||||
mAccountHandle.clear();
|
||||
cleanUp();
|
||||
|
||||
if(mVoiceEnabled && !mRelogRequested)
|
||||
if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested)
|
||||
{
|
||||
// User was logged out, but wants to be logged in. Send a new login request.
|
||||
setState(stateNeedsLogin);
|
||||
@@ -2804,29 +2813,15 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id)
|
||||
LLAvatarName av_name;
|
||||
if(LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
// *NOTE: For now, we feed legacy names to Vivox because I don't know
|
||||
// if their service can support a mix of new and old clients with
|
||||
// different sorts of names.
|
||||
// *NOTE: We feed legacy names to Vivox because we don't know if their service
|
||||
// can support a mix of new and old clients with different sorts of names.
|
||||
std::string name = av_name.getLegacyName();
|
||||
|
||||
const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id);
|
||||
bool canSeeMeOnline = false;
|
||||
if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS))
|
||||
canSeeMeOnline = true;
|
||||
|
||||
// When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary.
|
||||
|
||||
if(buddy)
|
||||
{
|
||||
// This buddy is already in both lists.
|
||||
|
||||
if(name != buddy->mDisplayName)
|
||||
{
|
||||
// The buddy is in the list with the wrong name. Update it with the correct name.
|
||||
LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL;
|
||||
// This buddy is already in both lists (vivox buddies and avatar cache).
|
||||
// Trust the avatar cache more for the display name (vivox display name are notoriously wrong)
|
||||
buddy->mDisplayName = name;
|
||||
buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2835,20 +2830,19 @@ void LLVivoxVoiceClient::checkFriend(const LLUUID& id)
|
||||
buddy->mUUID = id;
|
||||
}
|
||||
|
||||
// In all the above cases, the buddy is in the SL friends list (which is how we got here).
|
||||
buddy->mInSLFriends = true;
|
||||
buddy->mCanSeeMeOnline = canSeeMeOnline;
|
||||
const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id);
|
||||
buddy->mCanSeeMeOnline = (relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS));
|
||||
// In all the above cases, the buddy is in the SL friends list and tha name has been resolved (which is how we got here).
|
||||
buddy->mNameResolved = true;
|
||||
|
||||
buddy->mInSLFriends = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has.
|
||||
// This name hasn't been looked up yet in the avatar cache. Don't do anything with this buddy list entry until it has.
|
||||
if(buddy)
|
||||
{
|
||||
buddy->mNameResolved = false;
|
||||
}
|
||||
|
||||
// Initiate a lookup.
|
||||
// The "lookup completed" callback will ensure that the friends list is rechecked after it completes.
|
||||
lookupName(id);
|
||||
@@ -2956,13 +2950,12 @@ void LLVivoxVoiceClient::sendFriendsListUpdates()
|
||||
{
|
||||
std::ostringstream stream;
|
||||
|
||||
if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate))
|
||||
if(buddy->mInSLFriends && !buddy->mInVivoxBuddies)
|
||||
{
|
||||
if(mNumberOfAliases > 0)
|
||||
{
|
||||
// Add (or update) this entry in the vivox buddy list
|
||||
buddy->mInVivoxBuddies = true;
|
||||
buddy->mNeedsNameUpdate = false;
|
||||
LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL;
|
||||
stream
|
||||
<< "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddySet.1\">"
|
||||
@@ -3847,8 +3840,7 @@ void LLVivoxVoiceClient::participantUpdatedEvent(
|
||||
voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager
|
||||
and event is not fired.
|
||||
|
||||
So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it
|
||||
in LLCallFloater::draw()
|
||||
So, we have to call LLSpeakerMgr::update() here.
|
||||
*/
|
||||
LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel();
|
||||
|
||||
@@ -4078,7 +4070,7 @@ void LLVivoxVoiceClient::messageEvent(
|
||||
sessionState *session = findSession(sessionHandle);
|
||||
if(session)
|
||||
{
|
||||
bool is_busy = gAgent.getBusy();
|
||||
bool is_do_not_disturb = gAgent.getBusy();
|
||||
bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat);
|
||||
bool is_linden = LLMuteList::getInstance()->isLinden(session->mName);
|
||||
LLChat chat;
|
||||
@@ -4091,9 +4083,9 @@ void LLVivoxVoiceClient::messageEvent(
|
||||
chat.mFromName = session->mName;
|
||||
chat.mSourceType = CHAT_SOURCE_AGENT;
|
||||
|
||||
if(is_busy && !is_linden)
|
||||
if(is_do_not_disturb && !is_linden)
|
||||
{
|
||||
// TODO: Question: Return busy mode response here? Or maybe when session is started instead?
|
||||
// TODO: Question: Return do not disturb mode response here? Or maybe when session is started instead?
|
||||
}
|
||||
|
||||
LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL;
|
||||
@@ -5985,7 +5977,6 @@ LLVivoxVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) :
|
||||
mNameResolved = false;
|
||||
mInVivoxBuddies = false;
|
||||
mInSLFriends = false;
|
||||
mNeedsNameUpdate = false;
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName)
|
||||
@@ -6024,11 +6015,7 @@ LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::stri
|
||||
result = new buddyListEntry(uri);
|
||||
result->mDisplayName = displayName;
|
||||
|
||||
if(IDFromName(uri, result->mUUID))
|
||||
{
|
||||
// Extracted UUID from name successfully.
|
||||
}
|
||||
else
|
||||
if (!IDFromName(uri, result->mUUID))
|
||||
{
|
||||
LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL;
|
||||
}
|
||||
@@ -6328,18 +6315,19 @@ void LLVivoxVoiceClient::notifyFriendObservers()
|
||||
|
||||
void LLVivoxVoiceClient::lookupName(const LLUUID &id)
|
||||
{
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&LLVivoxVoiceClient::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLVivoxVoiceClient::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
// For Vivox, we use the legacy name because I'm uncertain whether or
|
||||
// not their service can tolerate switching to Username or Display Name
|
||||
std::string legacy_name = av_name.getLegacyName();
|
||||
avatarNameResolved(agent_id, legacy_name);
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
std::string display_name = av_name.mDisplayName;
|
||||
avatarNameResolved(agent_id, display_name);
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name)
|
||||
@@ -7401,6 +7389,8 @@ void LLVivoxProtocolParser::EndTag(const char *tag)
|
||||
}
|
||||
else if (!stricmp("Buddy", tag))
|
||||
{
|
||||
// NOTE : Vivox does *not* give reliable display name for Buddy tags
|
||||
// We don't take those very seriously as a result...
|
||||
LLVivoxVoiceClient::getInstance()->processBuddyListEntry(uriString, displayNameString);
|
||||
}
|
||||
else if (!stricmp("BlockRule", tag))
|
||||
|
||||
@@ -564,7 +564,6 @@ protected:
|
||||
bool mNameResolved;
|
||||
bool mInSLFriends;
|
||||
bool mInVivoxBuddies;
|
||||
bool mNeedsNameUpdate;
|
||||
};
|
||||
|
||||
typedef std::map<std::string, buddyListEntry*> buddyListMap;
|
||||
@@ -623,6 +622,7 @@ protected:
|
||||
void lookupName(const LLUUID &id);
|
||||
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
|
||||
void avatarNameResolved(const LLUUID &id, const std::string &name);
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
|
||||
/////////////////////////////
|
||||
// Voice fonts
|
||||
@@ -724,6 +724,8 @@ private:
|
||||
bool mCaptureDeviceDirty;
|
||||
bool mRenderDeviceDirty;
|
||||
|
||||
bool mIsInitialized;
|
||||
|
||||
|
||||
bool checkParcelChanged(bool update = false);
|
||||
// This should be called when the code detects we have changed parcels.
|
||||
@@ -1014,3 +1016,4 @@ protected:
|
||||
|
||||
|
||||
#endif //LL_VIVOX_VOICE_CLIENT_H
|
||||
|
||||
|
||||
BIN
indra/newview/skins/default/textures/menu_separator.png
Normal file
BIN
indra/newview/skins/default/textures/menu_separator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -4,5 +4,4 @@
|
||||
|
||||
<button label="OK" label_selected="OK" name="OK"/>
|
||||
<button label="Abbrechen" label_selected="Abbrechen" name="Cancel"/>
|
||||
<string name="none">keine</string>
|
||||
</floater>
|
||||
|
||||
@@ -1,40 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="top_objects" title="wird geladen...">
|
||||
<text name="title_text">Wird geladen...</text>
|
||||
<floater name="top_objects" title="Top-Objekte" min_width="690">
|
||||
<string name="top_scripts_title">
|
||||
Top-Skripte
|
||||
</string>
|
||||
<string name="top_scripts_text">
|
||||
[COUNT] Skripts benötigen insgesamt [TIME] ms
|
||||
</string>
|
||||
<string name="scripts_score_label">
|
||||
Zeit
|
||||
</string>
|
||||
<string name="top_colliders_title">
|
||||
Top-Kollisionsobjekte
|
||||
</string>
|
||||
<string name="top_colliders_text">
|
||||
Top [COUNT] Objekte mit vielen potenziellen Kollisionen
|
||||
</string>
|
||||
<string name="colliders_score_label">
|
||||
Wertung
|
||||
</string>
|
||||
<string name="none_descriptor">
|
||||
Nicht gefunden.
|
||||
</string>
|
||||
<text name="title_text">
|
||||
Wird geladen...
|
||||
</text>
|
||||
<scroll_list name="objects_list">
|
||||
<column label="Wertung" name="score"/>
|
||||
<column label="Wertung" name="score" width="65"/>
|
||||
<column label="Name" name="name"/>
|
||||
<column label="Eigentümer" name="owner"/>
|
||||
<column label="Position" name="location"/>
|
||||
<column label="Parzelle" name="parcel"/>
|
||||
<column label="Uhrzeit" name="time"/>
|
||||
<column label="Mono-Uhrzeit:" name="mono_time"/>
|
||||
<column label="URLs" name="URLs"/>
|
||||
</scroll_list>
|
||||
<text name="id_text">Objekt-ID:</text>
|
||||
|
||||
<column label="URLs" name="URLs"/>
|
||||
<column label="Speicher (KB)" name="memory"/>
|
||||
</scroll_list>
|
||||
<text name="id_text">
|
||||
Objekt-ID:
|
||||
</text>
|
||||
<line_editor name="id_editor" width="560"/>
|
||||
<button label="Beacon anzeigen" name="show_beacon_btn"/>
|
||||
<text name="obj_name_text">Objektname:</text>
|
||||
|
||||
<text name="obj_name_text">
|
||||
Objektname:
|
||||
</text>
|
||||
<line_editor name="object_name_editor" width="560"/>
|
||||
<button label="Filter" name="filter_object_btn"/>
|
||||
<text name="owner_name_text">Eigentümername:</text>
|
||||
|
||||
<text name="owner_name_text">
|
||||
Eigentümer:
|
||||
</text>
|
||||
<line_editor name="owner_name_editor" width="560"/>
|
||||
<button label="Filter" name="filter_owner_btn"/>
|
||||
<button label="Auswahl zurückgeben" name="return_selected_btn"/>
|
||||
<button label="Alle zurückgeben" name="return_all_btn"/>
|
||||
<button label="Lag-Warnung" name="lagwarning"/>
|
||||
<button label="Hinauswerfen" name="kick"/>
|
||||
<button label="Auswahl deaktivieren" name="disable_selected_btn"/>
|
||||
<button label="Alle deaktivieren" name="disable_all_btn"/>
|
||||
<button label="Profil" name="profile"/>
|
||||
<button label="TP zu" name="tpto"/>
|
||||
|
||||
<text name="parcel_name_text">
|
||||
Parzelle:
|
||||
</text>
|
||||
<line_editor name="parcel_name_editor" width="560"/>
|
||||
<button label="Filter" name="filter_parcel_btn"/>
|
||||
<button label="Aktualisieren" name="refresh_btn"/>
|
||||
<string name="top_scripts_title">Top-Skripts</string>
|
||||
<string name="top_scripts_text">[COUNT] Skripts benötigen insgesamt [TIME] ms</string>
|
||||
<string name="scripts_score_label">Uhrzeit</string>
|
||||
<string name="scripts_mono_time_label">Mono-Uhrzeit:</string>
|
||||
<string name="top_colliders_title">Top-Kollisionsobjekte</string>
|
||||
<string name="top_colliders_text">Top [COUNT] Objekte mit vielen potenziellen Kollisionen</string>
|
||||
<string name="colliders_score_label">Wertung</string>
|
||||
<string name="none_descriptor">Nicht gefunden.</string>
|
||||
<button label="Auswahl zurückgeben" name="return_selected_btn" width="150"/>
|
||||
<button label="Alle zurückgeben" left_delta="150" name="return_all_btn" width="150"/>
|
||||
<button label="Teleportieren zu" left_delta="150" name="teleport_to_btn" width="150"/>
|
||||
<button label="Profil" left_delta="150" name="profile_btn" width="150"/>
|
||||
<button label="Auswahl deaktivieren" name="disable_selected_btn" width="150"/>
|
||||
<button label="Alle deaktivieren" left_delta="150" name="disable_all_btn" width="150"/>
|
||||
<button label="Estate: Hinauswerfen" left_delta="150" name="estate_kick_btn" width="150"/>
|
||||
</floater>
|
||||
|
||||
@@ -19,5 +19,4 @@
|
||||
<button label="Suchen..." name="Search..."/>
|
||||
<button label="Invite..." name="Invite..."/>
|
||||
<button label="Titles..." name="Titles..."/>
|
||||
<string name="none">keine</string>
|
||||
</panel>
|
||||
|
||||
@@ -18,5 +18,4 @@
|
||||
<button label="Suchen..." name="Search..."/>
|
||||
<button label="Invite..." name="Invite..."/>
|
||||
<button label="Titles..." name="Titles..."/>
|
||||
<string name="none">keine</string>
|
||||
</panel>
|
||||
|
||||
@@ -1972,7 +1972,9 @@ Where tag = tag string to match. Removes bot's matching the tag.
|
||||
<string name="GodToolsObjectOwnedBy">Objekt [OBJECT], Besitzer [OWNER]</string>
|
||||
|
||||
<!-- groups -->
|
||||
|
||||
<string name="GroupsNone">
|
||||
keine
|
||||
</string>
|
||||
<string name="Unknown">(unbekannt)</string>
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,10 @@
|
||||
</text>
|
||||
<button bottom_delta="-3" left_delta="25" width="90" height="20" follows="top|right"
|
||||
label="Refresh List" label_selected="Refresh List" halign="center"
|
||||
font="SansSerif" mouse_opaque="true" name="RefreshFriends" scale_image="TRUE" />
|
||||
font="SansSerif" mouse_opaque="true" name="RefreshFriends" scale_image="TRUE">
|
||||
<button.commit_callback
|
||||
function="Refresh.FriendList"/>
|
||||
</button>
|
||||
<scroll_list background_visible="true" bottom_delta="-115" column_padding="5"
|
||||
draw_border="true" draw_heading="false" draw_stripes="true"
|
||||
follows="left|top|right|bottom" height="110" left="10" mouse_opaque="true"
|
||||
|
||||
@@ -72,10 +72,16 @@
|
||||
|
||||
<button bottom_delta="-27" enabled="true" follows="left|top" font="SansSerif"
|
||||
halign="center" height="20" label="Check All" label_selected="All" left="8"
|
||||
mouse_opaque="true" name="check_all" scale_image="true" width="100" />
|
||||
mouse_opaque="true" name="check_all" scale_image="true" width="100" >
|
||||
<button.commit_callback
|
||||
function="BulkPermission.CheckAll" />
|
||||
</button>
|
||||
<button bottom_delta="-24" enabled="true" follows="left|top" font="SansSerif"
|
||||
halign="center" height="20" label="Uncheck All" label_selected="None" left="8"
|
||||
mouse_opaque="true" name="check_none" scale_image="true" width="100" />
|
||||
mouse_opaque="true" name="check_none" scale_image="true" width="100" >
|
||||
<button.commit_callback
|
||||
function="BulkPermission.UncheckAll"/>
|
||||
</button>
|
||||
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-40" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
@@ -103,7 +109,10 @@
|
||||
<check_box bottom_delta="0" follows="left|top" width="88" height="16"
|
||||
left_delta="78" radio_style="false" font="SansSerifSmall"
|
||||
initial_value="false" label="Copy" mouse_opaque="true"
|
||||
name="next_owner_copy" control_name="BulkChangeNextOwnerCopy" />
|
||||
name="next_owner_copy" control_name="BulkChangeNextOwnerCopy" >
|
||||
<check_box.commit_callback
|
||||
function="BulkPermission.CommitCopy"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="0" follows="left|top" width="106" height="16"
|
||||
left_delta="88" radio_style="false" font="SansSerifSmall"
|
||||
initial_value="true" label="Resell/Give away" mouse_opaque="true" enabled="false"
|
||||
@@ -117,14 +126,23 @@
|
||||
|
||||
<button bottom="10" left="10" width="90" height="20" follows="left|top"
|
||||
label="Help" name="help" enabled="true"
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" />
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" >
|
||||
<button.commit_callback
|
||||
function="BulkPermission.Help"/>
|
||||
</button>
|
||||
|
||||
<button bottom="10" left="265" width="100" height="20" follows="left|top"
|
||||
label="Apply" name="apply" enabled="true"
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" />
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" >
|
||||
<button.commit_callback
|
||||
function="BulkPermission.Apply"/>
|
||||
</button>
|
||||
<button bottom_delta="0" left_delta="105" width="100" height="20" follows="left|top"
|
||||
label="Close" name="close" enabled="true"
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" />
|
||||
mouse_opaque="true" font="SansSerif" scale_image="true" halign="center" >
|
||||
<button.commit_callback
|
||||
function="BulkPermission.Close"/>
|
||||
</button>
|
||||
|
||||
<string name="nothing_to_modify_text">Selection contains no editable contents.</string>
|
||||
<string name="status_text">Setting permissions on [NAME]</string>
|
||||
|
||||
@@ -18,7 +18,4 @@
|
||||
<button bottom="-236" font="SansSerif" halign="center" height="20" label="Cancel"
|
||||
label_selected="Cancel" left_delta="88" mouse_opaque="true" name="Cancel"
|
||||
width="80" />
|
||||
<string name="none">
|
||||
none
|
||||
</string>
|
||||
</floater>
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
label="Grid" left="1" mouse_opaque="false" name="grid" width="398">
|
||||
<button bottom="-28" follows="left|top" font="SansSerif" halign="center" height="20"
|
||||
label="Kick all users" label_selected="Kick all users" left="10"
|
||||
mouse_opaque="true" name="Kick all users" width="100" />
|
||||
mouse_opaque="true" name="Kick all users" width="100">
|
||||
<button.commit_callback
|
||||
function="GridTools.KickAllUsers" />
|
||||
</button>
|
||||
<button bottom_delta="-28" follows="left|top" font="SansSerif" halign="center"
|
||||
height="20" label="Flush This Region's Map Visibility Caches"
|
||||
label_selected="Flush This Region's Map Visibility Caches" left="10"
|
||||
mouse_opaque="true" name="Flush This Region's Map Visibility Caches"
|
||||
width="250" />
|
||||
width="250">
|
||||
<button.commit_callback
|
||||
function="GridTools.FlushMapVisibilityCaches" />
|
||||
</button>
|
||||
</panel>
|
||||
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
|
||||
label="Region" left="1" mouse_opaque="false" name="region" width="398">
|
||||
@@ -25,55 +31,97 @@
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-26"
|
||||
follows="left|top|right" font="SansSerifSmall" height="16" left="70"
|
||||
max_length="63" mouse_opaque="true" name="region name" width="208" />
|
||||
max_length="63" mouse_opaque="true" name="region name" width="208">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Prelude" left="10" mouse_opaque="true"
|
||||
name="check prelude" tool_tip="Set this to make the region a prelude."
|
||||
width="180" />
|
||||
width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangePrelude" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Fixed Sun" left="10" mouse_opaque="true"
|
||||
name="check fixed sun"
|
||||
tool_tip="Fix the sun position (like in Region/Estate > Terrain."
|
||||
width="180" />
|
||||
width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Reset Home On Teleport" left="10"
|
||||
mouse_opaque="true" name="check reset home"
|
||||
tool_tip="When resident teleports out, reset their home to the destination position."
|
||||
width="180" />
|
||||
width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Visible" left="10" mouse_opaque="true"
|
||||
name="check visible"
|
||||
tool_tip="Set this to make the region visible to non-gods." width="180" />
|
||||
tool_tip="Set this to make the region visible to non-gods." width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Damage" left="10" mouse_opaque="true"
|
||||
name="check damage" tool_tip="Set this to enable damage in this region."
|
||||
width="180" />
|
||||
width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Block Traffic Tracking" left="10"
|
||||
mouse_opaque="true" name="block dwell"
|
||||
tool_tip="Set this to make the region not compute traffic." width="180" />
|
||||
tool_tip="Set this to make the region not compute traffic." width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Block Terraform" left="10" mouse_opaque="true"
|
||||
name="block terraform"
|
||||
tool_tip="Set this to disallow people terraforming their land" width="180" />
|
||||
tool_tip="Set this to disallow people terraforming their land" width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Sandbox" left="10" mouse_opaque="true"
|
||||
name="is sandbox" tool_tip="Toggle whether this is a sandbox region."
|
||||
width="180" />
|
||||
<check_box name="is gaming" label="Gaming" tool_tip="Toggle whether this is a gaming region." bottom_delta="-20" follows="left|top"/>
|
||||
<check_box name="hide from search" label="Hide region from search" tool_tip="Toggle whether this region is searchable at all." bottom_delta="-20" follows="left|top"/>
|
||||
width="180">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box name="is gaming" label="Gaming" tool_tip="Toggle whether this is a gaming region." bottom_delta="-20" follows="left|top">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box name="hide from search" label="Hide region from search" tool_tip="Toggle whether this region is searchable at all." bottom_delta="-20" follows="left|top">
|
||||
<check_box.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<button bottom_delta="-32" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Bake Terrain" label_selected="Bake Terrain" left="8"
|
||||
mouse_opaque="true" name="Bake Terrain"
|
||||
tool_tip="Save the current terrain as default." width="110" />
|
||||
tool_tip="Save the current terrain as default." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.BakeTerrain" />
|
||||
</button>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Revert Terrain" label_selected="Revert Terrain" left="8"
|
||||
mouse_opaque="true" name="Revert Terrain"
|
||||
tool_tip="Replace the current terrain with default." width="110" />
|
||||
tool_tip="Replace the current terrain with default." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.RevertTerrain" />
|
||||
</button>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Swap Terrain" label_selected="Swap Terrain" left="8"
|
||||
mouse_opaque="true" name="Swap Terrain"
|
||||
tool_tip="Swap current terrain with default." width="110" />
|
||||
tool_tip="Swap current terrain with default." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.SwapTerrain" />
|
||||
</button>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-46" drop_shadow_visible="true" follows="left|top" font="SansSerif"
|
||||
h_pad="0" halign="left" height="16" left="200" mouse_opaque="true"
|
||||
@@ -82,7 +130,10 @@
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-46"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="108"
|
||||
max_length="10" mouse_opaque="true" name="estate" width="50" />
|
||||
max_length="10" mouse_opaque="true" name="estate" width="50">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-66" drop_shadow_visible="true" follows="left|top" font="SansSerif"
|
||||
h_pad="0" halign="left" height="16" left="200" mouse_opaque="true"
|
||||
@@ -92,7 +143,10 @@
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-66"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="108"
|
||||
max_length="10" mouse_opaque="true" name="parentestate"
|
||||
tool_tip="This is the parent estate for this region" width="50" />
|
||||
tool_tip="This is the parent estate for this region" width="50">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-86" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="200"
|
||||
@@ -102,11 +156,17 @@
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-86"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="88"
|
||||
max_length="10" mouse_opaque="true" name="gridposx"
|
||||
tool_tip="This is the grid x position for this region" width="50" />
|
||||
tool_tip="This is the grid x position for this region" width="50">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-86"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="60"
|
||||
max_length="10" mouse_opaque="true" name="gridposy"
|
||||
tool_tip="This is the grid y position for this region" width="40" />
|
||||
tool_tip="This is the grid y position for this region" width="40">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-106" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="200"
|
||||
@@ -115,13 +175,22 @@
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-106"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="88"
|
||||
max_length="10" mouse_opaque="true" name="redirectx" width="50" />
|
||||
max_length="10" mouse_opaque="true" name="redirectx" width="50">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-106"
|
||||
follows="top|right" font="SansSerifSmall" height="16" left_delta="60"
|
||||
max_length="10" mouse_opaque="true" name="redirecty" width="40" />
|
||||
max_length="10" mouse_opaque="true" name="redirecty" width="40">
|
||||
<line_editor.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</line_editor>
|
||||
<spinner bottom="-126" decimal_digits="3" follows="top|right" height="16"
|
||||
increment="0.1" initial_val="1" left="308" max_val="4" min_val="0"
|
||||
mouse_opaque="true" name="billable factor" width="80" />
|
||||
mouse_opaque="true" name="billable factor" width="80">
|
||||
<spinner.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</spinner>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-126" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"
|
||||
@@ -130,7 +199,10 @@
|
||||
</text>
|
||||
<spinner bottom="-146" decimal_digits="3" follows="top|right" height="16" increment="1"
|
||||
initial_val="1" left="308" max_val="100" min_val="0" mouse_opaque="true"
|
||||
name="land cost" width="80" />
|
||||
name="land cost" width="80">
|
||||
<spinner.commit_callback
|
||||
function="RegionTools.ChangeAnything" />
|
||||
</spinner>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-146" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"
|
||||
@@ -140,19 +212,31 @@
|
||||
<button bottom="-170" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Refresh" label_selected="Refresh" left="278"
|
||||
mouse_opaque="true" name="Refresh"
|
||||
tool_tip="Click here to refresh the above information." width="110" />
|
||||
tool_tip="Click here to refresh the above information." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.Refresh" />
|
||||
</button>
|
||||
<button bottom_delta="-56" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Apply" label_selected="Apply" left="278"
|
||||
mouse_opaque="true" name="Apply"
|
||||
tool_tip="Click here to apply any changes from above." width="110" />
|
||||
tool_tip="Click here to apply any changes from above." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.ApplyChanges" />
|
||||
</button>
|
||||
<button bottom="-258" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Select Region" label_selected="Select Region" left="128"
|
||||
mouse_opaque="true" name="Select Region"
|
||||
tool_tip="Select the whole region with the land tool." width="110" />
|
||||
tool_tip="Select the whole region with the land tool." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.SelectRegion" />
|
||||
</button>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Autosave now" label_selected="Autosave now" left="128"
|
||||
mouse_opaque="true" name="Autosave now"
|
||||
tool_tip="Save gzipped state to autosave directory." width="110" />
|
||||
tool_tip="Save gzipped state to autosave directory." width="110">
|
||||
<button.commit_callback
|
||||
function="RegionTools.SaveState" />
|
||||
</button>
|
||||
</panel>
|
||||
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
|
||||
label="Objects" left="1" mouse_opaque="false" name="objects" width="398">
|
||||
@@ -175,24 +259,39 @@
|
||||
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Disable Scripts" left="10" mouse_opaque="true"
|
||||
name="disable scripts"
|
||||
tool_tip="Set this to disable all scripts in this region" width="110" />
|
||||
tool_tip="Set this to disable all scripts in this region" width="110">
|
||||
<check_box.commit_callback
|
||||
function="ObjectTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Disable Collisions" left_delta="120"
|
||||
mouse_opaque="true" name="disable collisions"
|
||||
tool_tip="Set this to disable non-agent collisions in this region"
|
||||
width="121" />
|
||||
width="121">
|
||||
<check_box.commit_callback
|
||||
function="ObjectTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Disable Physics" left_delta="120"
|
||||
mouse_opaque="true" name="disable physics"
|
||||
tool_tip="Set this to disable all physics in this region" width="130" />
|
||||
tool_tip="Set this to disable all physics in this region" width="130">
|
||||
<check_box.commit_callback
|
||||
function="ObjectTools.ChangeAnything" />
|
||||
</check_box>
|
||||
<button bottom="-74" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Apply" label_selected="Apply" left="278"
|
||||
mouse_opaque="true" name="Apply"
|
||||
tool_tip="Click here to apply any changes from above." width="110" />
|
||||
tool_tip="Click here to apply any changes from above." width="110">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.ApplyChanges" />
|
||||
</button>
|
||||
<button bottom="-98" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Set Target" label_selected="Set Target" left="8"
|
||||
mouse_opaque="true" name="Set Target"
|
||||
tool_tip="Set the target avatar for object deletion." width="110" />
|
||||
tool_tip="Set the target avatar for object deletion." width="110">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.Set" />
|
||||
</button>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-88" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="130"
|
||||
@@ -205,35 +304,53 @@
|
||||
left="8" mouse_opaque="true"
|
||||
name="Delete Target's Scripted Objects On Others Land"
|
||||
tool_tip="Delete all scripted objects owned by the target on land not owned by the target. (no copy) objects will be returned."
|
||||
width="380" />
|
||||
width="380">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.DeletePublicOwnedBy" />
|
||||
</button>
|
||||
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Delete Target's Scripted Objects On *Any* Land"
|
||||
label_selected="Delete Target's Scripted Objects On *Any* Land"
|
||||
left="8" mouse_opaque="true"
|
||||
name="Delete Target's Scripted Objects On *Any* Land"
|
||||
tool_tip="Delete all scripted objects owned by the target in this region. (no copy) objects will be returned."
|
||||
width="380" />
|
||||
width="380">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.DeleteAllScriptedOwnedBy" />
|
||||
</button>
|
||||
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Delete *ALL* Of Target's Objects"
|
||||
label_selected="Delete *ALL* Of Target's Objects" left="8"
|
||||
mouse_opaque="true" name="Delete *ALL* Of Target's Objects"
|
||||
tool_tip="Delete all objects owned by the target in this region. (no copy) objects will be returned."
|
||||
width="380" />
|
||||
width="380">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.DeleteAllOwnedBy" />
|
||||
</button>
|
||||
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Get Top Colliders" label_selected="Get Top Colliders"
|
||||
left="8" mouse_opaque="true" name="Get Top Colliders"
|
||||
tool_tip="Gets list of objects experiencing the most narrowphase callbacks."
|
||||
width="110" />
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.GetTopColliders" />
|
||||
</button>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Get Top Scripts" label_selected="Get Top Scripts"
|
||||
left="8" mouse_opaque="true" name="Get Top Scripts"
|
||||
tool_tip="Gets list of objects spending the most time running scripts."
|
||||
width="110" />
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="ObjectTools.GetTopScripts" />
|
||||
</button>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Scripts digest" label_selected="Scripts digest" left="8"
|
||||
mouse_opaque="true" name="Scripts digest"
|
||||
tool_tip="Gets a list of all scripts and number of occurences of each."
|
||||
width="110" />
|
||||
width="110" >
|
||||
<button.commit_callback
|
||||
function="ObjectTools.GetScriptDigest" />
|
||||
</button>
|
||||
</panel>
|
||||
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
|
||||
label="Request" left="1" mouse_opaque="true" name="request" width="398">
|
||||
@@ -285,7 +402,10 @@
|
||||
max_length="63" mouse_opaque="true" name="parameter" width="290" />
|
||||
<button bottom="-116" follows="left|top" font="SansSerif" halign="center" height="20"
|
||||
label="Make Request" label_selected="Make Request" left="10"
|
||||
mouse_opaque="true" name="Make Request" width="100" />
|
||||
mouse_opaque="true" name="Make Request" width="100">
|
||||
<button.commit_callback
|
||||
function="GodTools.Request" />
|
||||
</button>
|
||||
</panel>
|
||||
</tab_container>
|
||||
</floater>
|
||||
|
||||
@@ -16,14 +16,22 @@
|
||||
<column label="Scripts" name="script_num" width="35" />
|
||||
<column label="Inv Total" name="inv_num" width="35" />
|
||||
<column label="Creation Date" name="creation_date" width="150" />
|
||||
<scroll_list.commit_callback
|
||||
function="Inspect.SelectObject" />
|
||||
</scroll_list>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Owner Profile..." label_selected="" left="10"
|
||||
mouse_opaque="true" name="button owner"
|
||||
tool_tip="See profile of the highlighted object's owner" width="150" />
|
||||
tool_tip="See profile of the highlighted object's owner" width="150" >
|
||||
<button.commit_callback
|
||||
function="Inspect.OwnerProfile" />
|
||||
</button>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Creator Profile..." label_selected="" left="170"
|
||||
mouse_opaque="true" name="button creator"
|
||||
tool_tip="See profile of the highlighted object's original creator"
|
||||
width="150" />
|
||||
width="150" >
|
||||
<button.commit_callback
|
||||
function="Inspect.CreatorProfile" />
|
||||
</button>
|
||||
</floater>
|
||||
|
||||
@@ -1,74 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="false" height="320" min_height="100" min_width="100"
|
||||
can_resize="false" height="340" min_height="100" min_width="100"
|
||||
name="item properties" rect_control="PropertiesRect"
|
||||
title="Inventory Item Properties" width="350">
|
||||
<icon bottom="-21" follows="top|right" height="16" image_name="icon_lock.tga"
|
||||
left="294" mouse_opaque="true" name="IconLocked" width="16" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-35" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-14" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="LabelItemNameTitle" v_pad="0" width="78">
|
||||
Name:
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-41"
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-6"
|
||||
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
|
||||
is_unicode="false" left="88" max_length="63" mouse_opaque="true"
|
||||
name="LabelItemName" width="252" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-55" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-14" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="LabelItemDescTitle" v_pad="0" width="78">
|
||||
Description:
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-61"
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-6"
|
||||
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
|
||||
is_unicode="false" left="88" max_length="127" mouse_opaque="true"
|
||||
name="LabelItemDesc" width="252" spell_check="true" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-81" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
|
||||
mouse_opaque="true" name="LabelCreatorTitle" v_pad="0" width="78">
|
||||
Creator:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-81" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
|
||||
mouse_opaque="true" name="LabelCreatorName" v_pad="0" width="200">
|
||||
Nicole Linden
|
||||
</text>
|
||||
<button bottom="-81" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Profile..." label_selected="" left_delta="174"
|
||||
mouse_opaque="true" name="BtnCreator" width="78" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-101" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
|
||||
mouse_opaque="true" name="LabelOwnerTitle" v_pad="0" width="78">
|
||||
Owner:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-101" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
|
||||
mouse_opaque="true" name="LabelOwnerName" v_pad="0" width="200">
|
||||
Thrax Linden
|
||||
</text>
|
||||
<button bottom="-101" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Profile..." label_selected="" left_delta="174"
|
||||
mouse_opaque="true" name="BtnOwner" width="78" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-121" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
|
||||
mouse_opaque="true" name="LabelLastOwnerTitle" v_pad="0" width="78">
|
||||
Last Owner:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
|
||||
mouse_opaque="true" name="LabelLastOwnerName" v_pad="0" width="200">
|
||||
OnceUponA Linden
|
||||
</text>
|
||||
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Profile..." label_selected="" left_delta="174"
|
||||
mouse_opaque="true" name="BtnOwner" width="78" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
|
||||
mouse_opaque="true" name="LabelAcquiredTitle" v_pad="0" width="78">
|
||||
Acquired:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-121" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
|
||||
mouse_opaque="true" name="LabelAcquiredDate" v_pad="0" width="252">
|
||||
Wed May 24 12:50:46 2006
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-135" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-10" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="OwnerLabel" v_pad="0" width="78">
|
||||
You can:
|
||||
@@ -76,40 +91,40 @@
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Modify" left="10" mouse_opaque="true"
|
||||
name="CheckOwnerModify" radio_style="false" width="78" />
|
||||
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
||||
name="CheckOwnerCopy" radio_style="false" width="88" />
|
||||
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
|
||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Transfer" left_delta="88"
|
||||
mouse_opaque="true" name="CheckOwnerTransfer" radio_style="false"
|
||||
width="106" />
|
||||
<check_box name="CheckOwnerExport" label="Export" bottom_delta="0" follows="left|top" left_delta="88" enabled="false"/>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-10" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="BaseMaskDebug" v_pad="0" width="330">
|
||||
B:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
|
||||
mouse_opaque="true" name="OwnerMaskDebug" v_pad="0" width="270">
|
||||
O:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
|
||||
mouse_opaque="true" name="GroupMaskDebug" v_pad="0" width="210">
|
||||
G:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
|
||||
mouse_opaque="true" name="EveryoneMaskDebug" v_pad="0" width="150">
|
||||
E:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
|
||||
mouse_opaque="true" name="NextMaskDebug" v_pad="0" width="90">
|
||||
N:
|
||||
@@ -159,7 +174,7 @@
|
||||
mouse_opaque="true" name="CheckNextOwnerTransfer" radio_style="false"
|
||||
width="106" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-275" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="SaleLabel" v_pad="0" width="330">
|
||||
Mark Item:
|
||||
@@ -167,7 +182,7 @@
|
||||
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="For Sale" left="10" mouse_opaque="true"
|
||||
name="CheckPurchase" radio_style="false" width="78" />
|
||||
<radio_group bottom="-295" draw_border="false" follows="left|top|right" height="16"
|
||||
<radio_group bottom_delta="0" draw_border="false" follows="left|top|right" height="16"
|
||||
left_delta="78" mouse_opaque="true" name="RadioSaleType" width="252">
|
||||
<radio_item bottom="-16" follows="left|top" height="16" left="0" mouse_opaque="true"
|
||||
name="radio" width="70">
|
||||
@@ -179,12 +194,12 @@
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-315" drop_shadow_visible="true" follows="left|top"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="42"
|
||||
mouse_opaque="true" name="TextPrice" v_pad="0" width="56">
|
||||
Price: [CURRENCY]
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-315"
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
|
||||
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
|
||||
is_unicode="false" left_delta="56" max_length="25" mouse_opaque="true"
|
||||
name="Edit Cost" width="242" />
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
can_resize="true" enabled="true" height="500" left="176" title="Notifications Console" min_height="50"
|
||||
min_width="100" mouse_opaque="true" name="notifications_console" width="500">
|
||||
<combo_box name="notification_types" left="2" bottom="-40" height="18" width="440" follows="left|right|top" label="Select notification type"/>
|
||||
<button name="add_notification" left="445" bottom="-40" height="18" width="50" follows="right|top" label="Add"/>
|
||||
<layout_stack name="notification_channels" left="5" right="-5" top="-42" bottom="5" follows="left|right|top|bottom" orientation="vertical">
|
||||
</layout_stack>
|
||||
<button name="add_notification" left="445" bottom="-40" height="18" width="50" follows="right|top" label="Add">
|
||||
<button.commit_callback
|
||||
function="ClickAdd" />
|
||||
</button>
|
||||
<layout_stack name="notification_channels" left="5" right="-5" top="-42" bottom="5" follows="left|right|top|bottom" orientation="vertical"/>
|
||||
</floater>
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnClientHidden" name="hide_client" label="Client"/>
|
||||
</panel>
|
||||
</tab_container>
|
||||
<string name="Out Of Range">Out Of Range</string>
|
||||
<string name="Moving">Moving</string>
|
||||
<string name="Playing a gesture">Playing a gesture</string>
|
||||
<string name="Playing a sound">Playing a sound</string>
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="false"
|
||||
can_resize="true" height="220" name="settings_debug" min_height="220" min_width="285"
|
||||
title="Debug Settings" width="300" rect_control="FloaterDebugSettingsRect">
|
||||
<filter_editor bottom="-40" follows="top|left|right" height="20" label="Search" left="10" right="-10" max_chars="255" name="search_settings_input" tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the setting's name or comment."/>
|
||||
<scroll_list height="20" bottom_delta="-24" follows="all" left="10" right="-10" name="settings_scroll_list" />
|
||||
<filter_editor bottom="-40" follows="top|left|right" height="20" label="Search" left="10" right="-10" max_chars="255" name="search_settings_input" tool_tip="Type the search term you are interested in here. Results will be displayed for partial fulltext matches within the setting's name or comment.">
|
||||
<filter_editor.commit_callback function="UpdateFilter"/>
|
||||
</filter_editor>
|
||||
<scroll_list height="20" bottom_delta="-24" follows="all" left="10" right="-10" name="settings_scroll_list">
|
||||
<scroll_list.commit_callback function="SettingSelect"/>
|
||||
</scroll_list>
|
||||
<text_editor follows="left|right" bottom_delta="-64" enabled="false" height="60" width="320" left="10" right="-10" hide_scrollbar="true"
|
||||
name="comment_text" word_wrap="true" />
|
||||
<radio_group bottom_delta="-48" draw_border="false" follows="bottom|left|right" height="36"
|
||||
@@ -14,20 +18,37 @@
|
||||
<radio_item bottom="-36" height="15" name="FALSE" value="">
|
||||
False
|
||||
</radio_item>
|
||||
<radio_group.commit_callback function="CommitSettings"/>
|
||||
</radio_group>
|
||||
<line_editor follows="bottom|left|right" bottom="52" left="15" right="-15" height="20" name="val_text" visible="false" width="300" />
|
||||
<line_editor follows="bottom|left|right" bottom="52" left="15" right="-15" height="20" name="val_text" visible="false" width="300">
|
||||
<line_editor.commit_callback function="CommitSettings"/>
|
||||
</line_editor>
|
||||
<color_swatch bottom="30" can_apply_immediately="true" height="55" label="Color"
|
||||
name="val_color_swatch" visible="false" width="37" />
|
||||
name="val_color_swatch" visible="false" width="37">
|
||||
<color_swatch.commit_callback function="CommitSettings"/>
|
||||
</color_swatch>
|
||||
<spinner bottom_delta="31" height="24" label="x" label_width="40" max_val="10000000"
|
||||
name="val_spinner_1" visible="false" width="120" />
|
||||
name="val_spinner_1" visible="false" width="120">
|
||||
<spinner.commit_callback function="CommitSettings"/>
|
||||
</spinner>
|
||||
<spinner bottom_delta="0" height="24" label="x" label_width="40" left_delta="135"
|
||||
max_val="10000000" name="val_spinner_2" visible="false" width="120" />
|
||||
max_val="10000000" name="val_spinner_2" visible="false" width="120">
|
||||
<spinner.commit_callback function="CommitSettings"/>
|
||||
</spinner>
|
||||
<spinner bottom_delta="-23" height="24" label="x" label_width="40" left="15"
|
||||
max_val="10000000" name="val_spinner_3" visible="false" width="120" />
|
||||
max_val="10000000" name="val_spinner_3" visible="false" width="120">
|
||||
<spinner.commit_callback function="CommitSettings"/>
|
||||
</spinner>
|
||||
<spinner bottom_delta="0" height="24" label="x" label_width="40" left_delta="135"
|
||||
max_val="10000000" name="val_spinner_4" visible="false" width="120" />
|
||||
max_val="10000000" name="val_spinner_4" visible="false" width="120">
|
||||
<spinner.commit_callback function="CommitSettings"/>
|
||||
</spinner>
|
||||
<button bottom="10" height="20" label="Copy Name" left="10" name="copy_btn" tool_tip="Copy the name of this setting."
|
||||
width="130" />
|
||||
width="130">
|
||||
<button.commit_callback function="ClickCopy"/>
|
||||
</button>
|
||||
<button follows="right" bottom_delta="0" height="20" label="Reset to default" right="-10" name="default_btn"
|
||||
width="130" />
|
||||
width="130">
|
||||
<button.commit_callback function="ClickDefault"/>
|
||||
</button>
|
||||
</floater>
|
||||
|
||||
@@ -1,90 +1,299 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
height="400" min_height="300" min_width="580" name="top_objects"
|
||||
title="loading..." width="580">
|
||||
<text bottom="-50" follows="left|top" font="SansSerif" height="20" left="10"
|
||||
name="title_text" width="400">
|
||||
Loading...
|
||||
</text>
|
||||
<scroll_list bottom_delta="-200" draw_border="true" draw_heading="true"
|
||||
follows="left|top|bottom|right" height="200" left="10" multi_select="true"
|
||||
name="objects_list" width="560">
|
||||
<column label="Score" name="score" width="43" />
|
||||
<column label="Name" name="name" dynamicwidth="true" />
|
||||
<column label="Owner" name="owner" width="100" />
|
||||
<column label="Location" name="location" width="100" />
|
||||
<column label="Time" name="time" width="105" />
|
||||
<column label="Mono Time" name="mono_time" width="50" />
|
||||
<column label="URLs" name="URLs" width="50" />
|
||||
</scroll_list>
|
||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||
left="10" name="id_text" width="100">
|
||||
Object ID:
|
||||
</text>
|
||||
<line_editor bottom_delta="3" enabled="false"
|
||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
||||
name="id_editor" width="385" />
|
||||
<button bottom_delta="0" follows="bottom|right" height="20" label="Show Beacon"
|
||||
name="show_beacon_btn" right="-10" width="100" />
|
||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||
left="10" name="obj_name_text" width="100">
|
||||
Object Name:
|
||||
</text>
|
||||
<line_editor bottom_delta="3" enabled="true"
|
||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
||||
name="object_name_editor" width="385" />
|
||||
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
|
||||
name="filter_object_btn" right="-10" width="100" />
|
||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||
left="10" name="owner_name_text" width="100">
|
||||
Owner Name:
|
||||
</text>
|
||||
<line_editor bottom_delta="3" enabled="true"
|
||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
||||
name="owner_name_editor" width="385" />
|
||||
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
|
||||
name="filter_owner_btn" right="-10" width="100" />
|
||||
<button bottom="35" follows="bottom|left" height="20" label="Return Selected" left="10"
|
||||
name="return_selected_btn" width="110" />
|
||||
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="125"
|
||||
name="return_all_btn" width="110" />
|
||||
<button bottom="35" follows="bottom|left" height="20" label="Lag Warning" left="240"
|
||||
name="lagwarning" width="110" />
|
||||
<button bottom="35" follows="bottom|left" height="20" label="Kick" left="355"
|
||||
name="kick" width="110" />
|
||||
<button bottom="10" follows="bottom|left" height="20" label="Disable Selected"
|
||||
left="10" name="disable_selected_btn" width="110" />
|
||||
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="125"
|
||||
name="disable_all_btn" width="110" />
|
||||
<button bottom="10" follows="bottom|left" height="20" label="Profile" left="240"
|
||||
name="profile" width="110" />
|
||||
<button bottom="10" follows="bottom|left" height="20" label="TP to" left="355"
|
||||
name="tpto" width="110" />
|
||||
|
||||
<button bottom="35" follows="bottom|right" height="20" label="Refresh"
|
||||
name="refresh_btn" right="-10" width="100" />
|
||||
<string name="top_scripts_title">
|
||||
Top Scripts
|
||||
</string>
|
||||
<string name="top_scripts_text">
|
||||
[COUNT] scripts taking a total of [TIME] ms
|
||||
</string>
|
||||
<string name="scripts_score_label">
|
||||
Time
|
||||
</string>
|
||||
<string name="scripts_mono_time_label">
|
||||
Mono Time
|
||||
<floater
|
||||
can_close="true"
|
||||
can_drag_on_left="false"
|
||||
can_minimize="true"
|
||||
can_resize="true"
|
||||
height="372"
|
||||
min_height="300"
|
||||
min_width="572"
|
||||
name="top_objects"
|
||||
help_topic="top_objects"
|
||||
title="Top Objects"
|
||||
width="800">
|
||||
<string
|
||||
name="top_scripts_title">
|
||||
Top Scripts
|
||||
</string>
|
||||
<string
|
||||
name="top_scripts_text">
|
||||
[COUNT] scripts taking a total of [TIME] ms
|
||||
</string>
|
||||
<string
|
||||
name="scripts_score_label">
|
||||
Time
|
||||
</string>
|
||||
<string
|
||||
name="top_colliders_title">
|
||||
Top Colliders
|
||||
</string>
|
||||
<string name="top_colliders_text">
|
||||
Top [COUNT] objects experiencing many potential collisions
|
||||
</string>
|
||||
<string name="colliders_score_label">
|
||||
Score
|
||||
</string>
|
||||
<string name="top_colliders_title">
|
||||
Top Colliders
|
||||
</string>
|
||||
<string name="top_colliders_text">
|
||||
Top [COUNT] objects experiencing many potential collisions
|
||||
</string>
|
||||
<string name="colliders_score_label">
|
||||
Score
|
||||
</string>
|
||||
<string name="none_descriptor">
|
||||
None found.
|
||||
</string>
|
||||
None found.
|
||||
</string>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="20"
|
||||
left="10"
|
||||
name="title_text"
|
||||
bottom="-40"
|
||||
width="400">
|
||||
Loading...
|
||||
</text>
|
||||
<scroll_list
|
||||
draw_heading="true"
|
||||
follows="all"
|
||||
height="170"
|
||||
left_delta="0"
|
||||
multi_select="true"
|
||||
name="objects_list"
|
||||
bottom_delta="-170"
|
||||
width="780">
|
||||
<column
|
||||
label="Score"
|
||||
name="score"
|
||||
width="45" />
|
||||
<column
|
||||
label="Name"
|
||||
name="name"
|
||||
width="130" />
|
||||
<column
|
||||
label="Owner"
|
||||
name="owner"
|
||||
width="100" />
|
||||
<column
|
||||
label="Location"
|
||||
name="location"
|
||||
width="120" />
|
||||
<column
|
||||
label="Parcel"
|
||||
name="parcel"
|
||||
width="120" />
|
||||
<column
|
||||
label="Time"
|
||||
name="time"
|
||||
width="130" />
|
||||
<column
|
||||
label="URLs"
|
||||
name="URLs"
|
||||
width="40" />
|
||||
<column
|
||||
label="Memory (KB)"
|
||||
name="memory"
|
||||
width="40" />
|
||||
<scroll_list.commit_callback
|
||||
function="TopObjects.CommitObjectsList" />
|
||||
</scroll_list>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
left_delta="0"
|
||||
name="id_text"
|
||||
bottom_delta="-30"
|
||||
width="107">
|
||||
Object ID:
|
||||
</text>
|
||||
<line_editor
|
||||
enabled="false"
|
||||
follows="left|bottom|right"
|
||||
height="20"
|
||||
left="107"
|
||||
name="id_editor"
|
||||
bottom_delta="3"
|
||||
width="568" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="20"
|
||||
label="Show Beacon"
|
||||
right="-10"
|
||||
name="show_beacon_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.ShowBeacon" />
|
||||
</button>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
left="10"
|
||||
bottom_delta="-30"
|
||||
name="obj_name_text"
|
||||
width="107">
|
||||
Object name:
|
||||
</text>
|
||||
<line_editor
|
||||
follows="left|bottom|right"
|
||||
height="20"
|
||||
left="107"
|
||||
name="object_name_editor"
|
||||
bottom_delta="3"
|
||||
width="568" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="20"
|
||||
label="Filter"
|
||||
right="-10"
|
||||
name="filter_object_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.GetByObjectName" />
|
||||
</button>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
left="10"
|
||||
bottom_delta="-30"
|
||||
name="owner_name_text"
|
||||
width="107">
|
||||
Owner:
|
||||
</text>
|
||||
<line_editor
|
||||
follows="left|bottom|right"
|
||||
height="20"
|
||||
left="107"
|
||||
name="owner_name_editor"
|
||||
bottom_delta="3"
|
||||
width="568" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="20"
|
||||
label="Filter"
|
||||
right="-10"
|
||||
name="filter_owner_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.GetByOwnerName" />
|
||||
</button>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|bottom"
|
||||
height="20"
|
||||
left="10"
|
||||
bottom_delta="-30"
|
||||
name="parcel_name_text"
|
||||
width="107">
|
||||
Parcel:
|
||||
</text>
|
||||
<line_editor
|
||||
follows="left|bottom|right"
|
||||
height="20"
|
||||
left="107"
|
||||
name="parcel_name_editor"
|
||||
bottom_delta="3"
|
||||
width="568" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="20"
|
||||
label="Filter"
|
||||
right="-10"
|
||||
name="filter_parcel_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.GetByParcelName" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="20"
|
||||
label="Refresh"
|
||||
name="refresh_btn"
|
||||
right="-10"
|
||||
bottom_delta="-27"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.Refresh" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Return Selected"
|
||||
left="10"
|
||||
bottom_delta="0"
|
||||
name="return_selected_btn"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.ReturnSelected" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Return All"
|
||||
left_delta="110"
|
||||
name="return_all_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.ReturnAll" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Teleport to"
|
||||
left_delta="110"
|
||||
name="teleport_to_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.TeleportToObject" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Profile"
|
||||
left_delta="110"
|
||||
name="profile_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.Profile" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Disable Selected"
|
||||
bottom_delta="-20"
|
||||
left="10"
|
||||
name="disable_selected_btn"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.DisableSelected" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Disable All"
|
||||
left_delta="110"
|
||||
name="disable_all_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.DisableAll" />
|
||||
</button>
|
||||
<button
|
||||
follows="bottom|left"
|
||||
height="20"
|
||||
label="Estate Kick"
|
||||
left_delta="110"
|
||||
name="estate_kick_btn"
|
||||
bottom_delta="0"
|
||||
width="110">
|
||||
<button.commit_callback
|
||||
function="TopObjects.Kick" />
|
||||
</button>
|
||||
</floater>
|
||||
|
||||
@@ -46,7 +46,4 @@
|
||||
label="Invite..." name="Invite..." width="80" />
|
||||
<button bottom_delta="-25" follows="top|right" font="SansSerif" height="22"
|
||||
label="Titles..." name="Titles..." width="80" />
|
||||
<string name="none">
|
||||
none
|
||||
</string>
|
||||
</panel>
|
||||
|
||||
@@ -45,7 +45,4 @@
|
||||
label="Invite..." name="Invite..." width="80" />
|
||||
<button bottom_delta="0" left_delta="82" follows="left|bottom" font="SansSerif" height="22"
|
||||
label="Titles..." name="Titles..." width="80" />
|
||||
<string name="none">
|
||||
none
|
||||
</string>
|
||||
</panel>
|
||||
|
||||
@@ -3208,6 +3208,7 @@ The
|
||||
<string name="GodToolsObjectOwnedBy">Object [OBJECT] owned by [OWNER]</string>
|
||||
|
||||
<!-- groups -->
|
||||
<string name="GroupsNone">none</string>
|
||||
<string name="Group" value=" (group)" />
|
||||
<string name="Unknown">(Unknown)</string>
|
||||
<string name="SummaryForTheWeek" value="Summary for this week, beginning on " />
|
||||
|
||||
@@ -5,7 +5,4 @@
|
||||
</text>
|
||||
<button label="OK" label_selected="OK" name="OK"/>
|
||||
<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
|
||||
<string name="none">
|
||||
ninguno
|
||||
</string>
|
||||
</floater>
|
||||
|
||||
@@ -667,10 +667,6 @@
|
||||
</text>
|
||||
<spinner label="Horizontal (U)" name="TexOffsetU"/>
|
||||
<spinner label="Vertical (V)" name="TexOffsetV"/>
|
||||
<text name="textbox autofix">
|
||||
Alinear textura para Media
|
||||
(Se debe subir primero)
|
||||
</text>
|
||||
<button label="Alinear" label_selected="Alinear" name="button align" left="150" width="50"/>
|
||||
<text name="textbox params" left="195" height="40">
|
||||
Parámetros
|
||||
|
||||
@@ -1,40 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater name="top_objects" title="cargando...">
|
||||
<text name="title_text">
|
||||
Cargando...
|
||||
</text>
|
||||
<scroll_list name="objects_list">
|
||||
<column label="Puntuación" name="score"/>
|
||||
<column label="Nombre" name="name"/>
|
||||
<column label="Propietario" name="owner"/>
|
||||
<column label="Ubicación" name="location"/>
|
||||
<column label="Tiempo" name="time" width="60"/>
|
||||
<column label="Tiempo en Mono" name="mono_time" width="100"/>
|
||||
<column label="URLs" name="URLs"/>
|
||||
</scroll_list>
|
||||
<text name="id_text">
|
||||
ID del Objeto:
|
||||
</text>
|
||||
<button label="Mostrar Balizas" name="show_beacon_btn"/>
|
||||
<text name="obj_name_text">
|
||||
Objeto:
|
||||
</text>
|
||||
<button label="Filtro" name="filter_object_btn"/>
|
||||
<text name="owner_name_text">
|
||||
Propietario:
|
||||
</text>
|
||||
<button label="Filtro" name="filter_owner_btn"/>
|
||||
<button label="Devolver Seleccionado" name="return_selected_btn" width="152"/>
|
||||
<button label="Devolver Todo" left="165" name="return_all_btn" width="110" />
|
||||
<button label="Advertencia de Lag" left="280" name="lagwarning" width="130" />
|
||||
<button label="Expulsar" left="415" name="kick" width="80" />
|
||||
<button label="Desactivar Seleccionado" name="disable_selected_btn" width="152" />
|
||||
<button label="Desactivar Todo" left="165" name="disable_all_btn" width="110" />
|
||||
<button label="Perfil" left="280" name="profile" width="130" />
|
||||
<button label="TP a" left="415" name="tpto" width="80" />
|
||||
<button label="Actualizar" name="refresh_btn" right="-10" width="70" />
|
||||
<floater name="top_objects" title="Objetos superiores">
|
||||
<string name="top_scripts_title">
|
||||
Top Scripts
|
||||
Scripts según su uso
|
||||
</string>
|
||||
<string name="top_scripts_text">
|
||||
[COUNT] scripts usando un total de [TIME] ms
|
||||
@@ -42,19 +9,53 @@
|
||||
<string name="scripts_score_label">
|
||||
Tiempo
|
||||
</string>
|
||||
<string name="scripts_mono_time_label">
|
||||
Tiempo en Mono
|
||||
</string>
|
||||
<string name="top_colliders_title">
|
||||
Top Colisionadores
|
||||
Objetos que colisionan
|
||||
</string>
|
||||
<string name="top_colliders_text">
|
||||
Top [COUNT] objetos con muchas potenciales colisiones
|
||||
[COUNT] objetos con muchas posibles colisiones
|
||||
</string>
|
||||
<string name="colliders_score_label">
|
||||
Puntaje
|
||||
Resultado
|
||||
</string>
|
||||
<string name="none_descriptor">
|
||||
Ninguno Encontrado.
|
||||
No se ha encontrado ninguno.
|
||||
</string>
|
||||
<text name="title_text">
|
||||
Cargando...
|
||||
</text>
|
||||
<scroll_list name="objects_list">
|
||||
<column label="Resultado" name="score"/>
|
||||
<column label="Nombre" name="name"/>
|
||||
<column label="Propietario" name="owner"/>
|
||||
<column label="Posición" name="location"/>
|
||||
<column label="Parcela" name="parcel"/>
|
||||
<column label="Tiempo" name="time"/>
|
||||
<column label="URLs" name="URLs"/>
|
||||
<column label="Memoria (KB)" name="memory"/>
|
||||
</scroll_list>
|
||||
<text name="id_text">
|
||||
ID del objeto:
|
||||
</text>
|
||||
<button label="Mostrar baliza" name="show_beacon_btn"/>
|
||||
<text name="obj_name_text">
|
||||
Nombre del objeto:
|
||||
</text>
|
||||
<button label="Filtro" name="filter_object_btn"/>
|
||||
<text name="owner_name_text">
|
||||
Propietario:
|
||||
</text>
|
||||
<button label="Filtro" name="filter_owner_btn"/>
|
||||
<text name="parcel_name_text">
|
||||
Parcela:
|
||||
</text>
|
||||
<button label="Filtro" name="filter_parcel_btn"/>
|
||||
<button label="Actualizar" name="refresh_btn"/>
|
||||
<button label="Devolver lo seleccionado" name="return_selected_btn" width="190"/>
|
||||
<button label="Devolver todo" left_delta="190" name="return_all_btn"/>
|
||||
<button label="Teleportarse" name="teleport_to_btn"/>
|
||||
<button label="Perfil" name="profile_btn"/>
|
||||
<button label="Desactivar lo seleccionado" name="disable_selected_btn" width="190"/>
|
||||
<button label="Desactivar todo" left_delta="190" name="disable_all_btn"/>
|
||||
<button label="Expulsar del Estado" name="estate_kick_btn"/>
|
||||
</floater>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user