Commit a4c6c705 authored by Andrey Lihatskiy's avatar Andrey Lihatskiy
Browse files

Merge branch 'master' into DRTVWR-516-maint

# Conflicts:
#	indra/newview/app_settings/settings.xml
#	indra/newview/llvoicevivox.cpp
parents abf8c4b3 467d8339
......@@ -362,6 +362,8 @@ Chaser Zaks
BUG-227485
Cherry Cheevers
ChickyBabes Zuzu
Chorazin Allen
BUG-229753
Christopher Organiser
Ciaran Laval
Cinder Roxley
......
......@@ -295,7 +295,6 @@ public:
void setAllowTerraform(BOOL b){setParcelFlag(PF_ALLOW_TERRAFORM, b); }
void setAllowDamage(BOOL b) { setParcelFlag(PF_ALLOW_DAMAGE, b); }
void setAllowFly(BOOL b) { setParcelFlag(PF_ALLOW_FLY, b); }
void setAllowLandmark(BOOL b){ setParcelFlag(PF_ALLOW_LANDMARK, b); }
void setAllowGroupScripts(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, b); }
void setAllowOtherScripts(BOOL b) { setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, b); }
void setAllowDeedToGroup(BOOL b) { setParcelFlag(PF_ALLOW_DEED_TO_GROUP, b); }
......@@ -476,11 +475,6 @@ public:
BOOL getAllowFly() const
{ return (mParcelFlags & PF_ALLOW_FLY) ? TRUE : FALSE; }
// Remove permission restrictions for creating landmarks.
// We should eventually remove this flag completely.
BOOL getAllowLandmark() const
{ return TRUE; }
BOOL getAllowGroupScripts() const
{ return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? TRUE : FALSE; }
......
......@@ -33,7 +33,7 @@ const U32 PF_ALLOW_FLY = 1 << 0;// Can start flying
const U32 PF_ALLOW_OTHER_SCRIPTS= 1 << 1;// Scripts by others can run.
const U32 PF_FOR_SALE = 1 << 2;// Can buy this land
const U32 PF_FOR_SALE_OBJECTS = 1 << 7;// Can buy all objects on this land
const U32 PF_ALLOW_LANDMARK = 1 << 3;
const U32 PF_ALLOW_LANDMARK = 1 << 3;// Always true/deprecated
const U32 PF_ALLOW_TERRAFORM = 1 << 4;
const U32 PF_ALLOW_DAMAGE = 1 << 5;
const U32 PF_CREATE_OBJECTS = 1 << 6;
......
......@@ -122,6 +122,7 @@ set(llui_SOURCE_FILES
lluictrl.cpp
lluictrlfactory.cpp
lluistring.cpp
lluiusage.cpp
llundo.cpp
llurlaction.cpp
llurlentry.cpp
......@@ -241,6 +242,7 @@ set(llui_HEADER_FILES
llui.h
lluicolor.h
lluistring.h
lluiusage.h
llundo.h
llurlaction.h
llurlentry.h
......
......@@ -47,6 +47,7 @@
#include "llnotificationsutil.h"
#include "llrender.h"
#include "lluictrlfactory.h"
#include "lluiusage.h"
#include "llhelp.h"
#include "lldockablefloater.h"
#include "llviewereventrecorder.h"
......@@ -437,6 +438,13 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
setFocus(TRUE);
}
if (!mFunctionName.empty())
{
LL_DEBUGS("UIUsage") << "calling mouse down function " << mFunctionName << LL_ENDL;
LLUIUsage::instance().logCommand(mFunctionName);
LLUIUsage::instance().logControl(getPathname());
}
/*
* ATTENTION! This call fires another mouse down callback.
* If you wish to remove this call emit that signal directly
......
......@@ -37,7 +37,8 @@ typedef enum e_chat_source_type
CHAT_SOURCE_SYSTEM = 0,
CHAT_SOURCE_AGENT = 1,
CHAT_SOURCE_OBJECT = 2,
CHAT_SOURCE_UNKNOWN = 3
CHAT_SOURCE_TELEPORT = 3,
CHAT_SOURCE_UNKNOWN = 4
} EChatSourceType;
typedef enum e_chat_type
......@@ -64,7 +65,8 @@ typedef enum e_chat_style
{
CHAT_STYLE_NORMAL,
CHAT_STYLE_IRC,
CHAT_STYLE_HISTORY
CHAT_STYLE_HISTORY,
CHAT_STYLE_TELEPORT_SEP
}EChatStyle;
// A piece of chat
......
......@@ -58,6 +58,7 @@
#include "llhelp.h"
#include "llmultifloater.h"
#include "llsdutil.h"
#include "lluiusage.h"
#include <boost/foreach.hpp>
......@@ -198,7 +199,9 @@ LLFloater::Params::Params()
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
close_callback("close_callback"),
follows("follows")
follows("follows"),
rel_x("rel_x", 0),
rel_y("rel_y", 0)
{
changeDefault(visible, false);
}
......@@ -267,6 +270,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0),
mDefaultRelativeX(p.rel_x),
mDefaultRelativeY(p.rel_y),
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
......@@ -507,7 +512,12 @@ void LLFloater::destroy()
// virtual
LLFloater::~LLFloater()
{
LLFloaterReg::removeInstance(mInstanceName, mKey);
if (!isDead())
{
// If it's dead, instance is supposed to be already removed, and
// in case of single instance we can remove new one by accident
LLFloaterReg::removeInstance(mInstanceName, mKey);
}
if( gFocusMgr.childHasKeyboardFocus(this))
{
......@@ -936,6 +946,15 @@ bool LLFloater::applyRectControl()
saved_rect = true;
}
else if ((mDefaultRelativeX != 0) && (mDefaultRelativeY != 0))
{
mPosition.mX = mDefaultRelativeX;
mPosition.mY = mDefaultRelativeY;
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
applyRelativePosition();
saved_rect = true;
}
// remember updated position
if (rect_specified)
......@@ -1633,6 +1652,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
{
LLUIUsage::instance().logFloater(getInstanceName());
LLMultiFloater* hostp = getHost();
if (hostp)
{
......@@ -3200,6 +3220,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mSingleInstance = p.single_instance;
mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
mDefaultRelativeX = p.rel_x;
mDefaultRelativeY = p.rel_y;
mPositioning = p.positioning;
mSaveRect = p.save_rect;
......
......@@ -172,6 +172,9 @@ public:
Optional<S32> header_height,
legacy_header_height; // HACK see initFromXML()
Optional<F32> rel_x,
rel_y;
// Images for top-right controls
Optional<LLUIImage*> close_image,
restore_image,
......@@ -521,6 +524,9 @@ private:
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
F32 mDefaultRelativeX;
F32 mDefaultRelativeY;
};
......
......@@ -32,6 +32,7 @@
#include "llfloater.h"
#include "llmultifloater.h"
#include "llfloaterreglistener.h"
#include "lluiusage.h"
//*******************************************************
......@@ -56,6 +57,12 @@ void LLFloaterReg::add(const std::string& name, const std::string& filename, con
sGroupMap[groupname] = groupname; // for referencing directly by group name
}
//static
bool LLFloaterReg::isRegistered(const std::string& name)
{
return sBuildMap.find(name) != sBuildMap.end();
}
//static
LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name)
{
......@@ -472,7 +479,6 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
std::string name = sdname.asString();
LLFloater* instance = getInstance(name, key);
if (!instance)
{
LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL;
......
......@@ -85,6 +85,7 @@ public:
static void add(const std::string& name, const std::string& file, const LLFloaterBuildFunc& func,
const std::string& groupname = LLStringUtil::null);
static bool isRegistered(const std::string& name);
// Helpers
static LLFloater* getLastFloaterInGroup(const std::string& name);
......
......@@ -283,6 +283,9 @@ public:
void resetContextMenu() { setContextMenu(NULL); };
void setBgImage(LLPointer<LLUIImage> image) { mBgImage = image; }
void setBgImageFocused(LLPointer<LLUIImage> image) { mBgImageFocused = image; }
private:
// private helper methods
......
......@@ -79,7 +79,7 @@ const U32 LEFT_PAD_PIXELS = 3;
const U32 LEFT_WIDTH_PIXELS = 15;
const U32 LEFT_PLAIN_PIXELS = LEFT_PAD_PIXELS + LEFT_WIDTH_PIXELS;
const U32 RIGHT_PAD_PIXELS = 2;
const U32 RIGHT_PAD_PIXELS = 7;
const U32 RIGHT_WIDTH_PIXELS = 15;
const U32 RIGHT_PLAIN_PIXELS = RIGHT_PAD_PIXELS + RIGHT_WIDTH_PIXELS;
......@@ -95,7 +95,7 @@ const std::string SEPARATOR_NAME("separator");
const std::string VERTICAL_SEPARATOR_LABEL( "|" );
const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
const std::string LLMenuGL::BRANCH_SUFFIX( "\xe2\x96\xb8" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
const std::string LLMenuGL::ARROW_UP ("^^^^^^^");
const std::string LLMenuGL::ARROW_DOWN("vvvvvvv");
......
......@@ -77,6 +77,7 @@ LLNotificationForm::FormButton::FormButton()
text("text"),
ignore("ignore"),
is_default("default"),
width("width", 0),
type("type")
{
// set type here so it gets serialized
......
......@@ -190,6 +190,7 @@ public:
Mandatory<std::string> text;
Optional<std::string> ignore;
Optional<bool> is_default;
Optional<S32> width;
Mandatory<std::string> type;
......
......@@ -34,7 +34,11 @@
LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
: LLUICtrl(p),
mSearchButton(NULL),
mClearButton(NULL)
mClearButton(NULL),
mEditorImage(p.background_image),
mEditorImageFocused(p.background_image_focused),
mEditorSearchImage(p.background_image_highlight),
mHighlightTextField(p.highlight_text_field)
{
S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height;
S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad;
......@@ -57,6 +61,8 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
// Set up line editor.
LLLineEditor::Params line_editor_params(p);
line_editor_params.name("filter edit box");
line_editor_params.background_image(p.background_image);
line_editor_params.background_image_focused(p.background_image_focused);
line_editor_params.rect(getLocalRect());
line_editor_params.follows.flags(FOLLOWS_ALL);
line_editor_params.text_pad_left(text_pad_left);
......@@ -104,6 +110,20 @@ void LLSearchEditor::draw()
if (mClearButton)
mClearButton->setVisible(!mSearchEditor->getWText().empty());
if (mHighlightTextField)
{
if (!mSearchEditor->getWText().empty())
{
mSearchEditor->setBgImage(mEditorSearchImage);
mSearchEditor->setBgImageFocused(mEditorSearchImage);
}
else
{
mSearchEditor->setBgImage(mEditorImage);
mSearchEditor->setBgImageFocused(mEditorImageFocused);
}
}
LLUICtrl::draw();
}
......
......@@ -47,14 +47,23 @@ public:
Optional<LLButton::Params> search_button,
clear_button;
Optional<bool> search_button_visible,
clear_button_visible;
clear_button_visible,
highlight_text_field;
Optional<commit_callback_t> keystroke_callback;
Optional<LLUIImage*> background_image,
background_image_focused,
background_image_highlight;
Params()
: search_button("search_button"),
search_button_visible("search_button_visible"),
clear_button("clear_button"),
clear_button_visible("clear_button_visible")
clear_button_visible("clear_button_visible"),
highlight_text_field("highlight_text_field"),
background_image("background_image"),
background_image_focused("background_image_focused"),
background_image_highlight("background_image_highlight")
{}
};
......@@ -93,6 +102,13 @@ protected:
LLLineEditor* mSearchEditor;
LLButton* mSearchButton;
LLButton* mClearButton;
LLPointer<LLUIImage> mEditorImage;
LLPointer<LLUIImage> mEditorImageFocused;
LLPointer<LLUIImage> mEditorSearchImage;
LLPointer<LLUIImage> mEditorSearchImageFocused;
bool mHighlightTextField;
};
#endif // LL_SEARCHEDITOR_H
......@@ -38,6 +38,7 @@
#include "llrender.h"
#include "llfloater.h"
#include "lltrans.h"
#include "lluiusage.h"
//----------------------------------------------------------------------------
......@@ -1556,6 +1557,8 @@ BOOL LLTabContainer::setTab(S32 which)
if (is_selected)
{
LLUIUsage::instance().logPanel(tuple->mTabPanel->getName());
// Make sure selected tab is within scroll region
if (mIsVertical)
{
......
......@@ -967,6 +967,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
executeStopParam.function_name = executeStopFunction;
executeStopParam.parameter = commandp->executeStopParameters();
LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam);
button->setFunctionName(commandp->executeFunctionName());
LL_DEBUGS("UIUsage") << "button function name a -> " << commandp->executeFunctionName() << LL_ENDL;
LLUICtrl::commit_callback_t stop_func = initCommitCallback(executeStopParam);
button->setMouseDownCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2));
......@@ -974,6 +976,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
}
else
{
button->setFunctionName(commandp->executeFunctionName());
LL_DEBUGS("UIUsage") << "button function name b -> " << commandp->executeFunctionName() << LL_ENDL;
button->setCommitCallback(executeParam);
}
......
......@@ -35,6 +35,7 @@
#include "lluictrlfactory.h"
#include "lltabcontainer.h"
#include "llaccordionctrltab.h"
#include "lluiusage.h"
static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
......@@ -282,6 +283,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa
else
{
std::string function_name = cb.function_name;
setFunctionName(function_name);
commit_callback_t* func = (CommitCallbackRegistry::getValue(function_name));
if (func)
{
......@@ -422,7 +424,19 @@ BOOL LLUICtrl::canFocusChildren() const
void LLUICtrl::onCommit()
{
if (mCommitSignal)
(*mCommitSignal)(this, getValue());
{
if (!mFunctionName.empty())
{
LL_DEBUGS("UIUsage") << "calling commit function " << mFunctionName << LL_ENDL;
LLUIUsage::instance().logCommand(mFunctionName);
LLUIUsage::instance().logControl(getPathname());
}
else
{
//LL_DEBUGS("UIUsage") << "calling commit function " << "UNKNOWN" << LL_ENDL;
}
(*mCommitSignal)(this, getValue());
}
}
//virtual
......@@ -597,6 +611,12 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean()));
}
}
void LLUICtrl::setFunctionName(const std::string& function_name)
{
mFunctionName = function_name;
}
// static
bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
{
......
......@@ -183,6 +183,8 @@ public:
void setMakeVisibleControlVariable(LLControlVariable* control);
void setMakeInvisibleControlVariable(LLControlVariable* control);
void setFunctionName(const std::string& function_name);
virtual void setTentative(BOOL b);
virtual BOOL getTentative() const;
virtual void setValue(const LLSD& value);
......@@ -310,6 +312,8 @@ protected:
LLControlVariable* mMakeInvisibleControlVariable;
boost::signals2::connection mMakeInvisibleControlConnection;
std::string mFunctionName;
static F32 sActiveControlTransparency;
static F32 sInactiveControlTransparency;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment