summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llbutton.cpp20
-rw-r--r--indra/llui/llbutton.h5
-rw-r--r--indra/llui/llcommandmanager.cpp8
-rw-r--r--indra/llui/llcommandmanager.h16
-rw-r--r--indra/llui/llfloater.cpp27
-rw-r--r--indra/llui/llfloater.h2
-rw-r--r--indra/llui/llfloaterreg.cpp6
-rw-r--r--indra/llui/llhelp.h1
-rw-r--r--indra/llui/llnotifications.cpp72
-rw-r--r--indra/llui/llresizehandle.cpp12
-rw-r--r--indra/llui/llresizehandle.h7
-rw-r--r--indra/llui/llsdparam.cpp264
-rw-r--r--indra/llui/llsdparam.h68
-rw-r--r--indra/llui/lltoolbar.cpp89
-rw-r--r--indra/llui/lltoolbar.h18
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp2
-rw-r--r--indra/llui/tests/llurlentry_test.cpp1
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp4
-rw-r--r--indra/llxuixml/llinitparam.cpp52
-rw-r--r--indra/llxuixml/llinitparam.h155
-rw-r--r--indra/llxuixml/llxuiparser.cpp76
-rw-r--r--indra/llxuixml/llxuiparser.h38
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/app_settings/commands.xml26
-rw-r--r--indra/newview/app_settings/settings.xml2
-rwxr-xr-xindra/newview/llagent.cpp79
-rw-r--r--indra/newview/llagent.h25
-rw-r--r--indra/newview/llappviewer.cpp47
-rwxr-xr-xindra/newview/llavataractions.cpp19
-rw-r--r--indra/newview/llavataractions.h3
-rw-r--r--indra/newview/llbottomtray.cpp3
-rw-r--r--indra/newview/llcallfloater.cpp19
-rw-r--r--indra/newview/llcallfloater.h2
-rw-r--r--indra/newview/llfloateravatar.cpp54
-rw-r--r--indra/newview/llfloateravatar.h43
-rw-r--r--indra/newview/llfloaterdestinations.cpp1
-rw-r--r--indra/newview/llfloaterhelpbrowser.cpp17
-rw-r--r--indra/newview/llfloaterhelpbrowser.h2
-rw-r--r--indra/newview/llfloatertoybox.cpp17
-rw-r--r--indra/newview/llfloatertoybox.h5
-rw-r--r--indra/newview/llfloaterwebcontent.cpp39
-rw-r--r--indra/newview/llmediactrl.cpp11
-rw-r--r--indra/newview/llnearbychatbar.cpp7
-rwxr-xr-xindra/newview/llpanelprofile.cpp2
-rw-r--r--indra/newview/lltoolbarview.cpp130
-rw-r--r--indra/newview/lltoolbarview.h17
-rw-r--r--indra/newview/llviewerfloaterreg.cpp7
-rw-r--r--indra/newview/llviewerhelp.cpp37
-rw-r--r--indra/newview/llviewerhelp.h6
-rw-r--r--indra/newview/llviewermedia.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp32
-rw-r--r--indra/newview/llweb.cpp4
-rw-r--r--indra/newview/llweb.h10
-rw-r--r--indra/newview/skins/default/colors.xml4
-rw-r--r--indra/newview/skins/default/textures/textures.xml50
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/appearance.pngbin0 -> 1205 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/avatars.pngbin0 -> 1432 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/build.pngbin0 -> 1246 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_bottom.pngbin0 -> 139 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_left.pngbin0 -> 893 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_right.pngbin0 -> 892 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/chat.pngbin0 -> 1277 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/destinations.pngbin0 -> 1297 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/gestures.pngbin0 -> 1675 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/howto.pngbin0 -> 1306 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/inventory.pngbin0 -> 1114 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/land.pngbin0 -> 1123 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/map.pngbin0 -> 1206 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/marketplace.pngbin0 -> 1311 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/mini_map.pngbin0 -> 1645 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/move.pngbin0 -> 1322 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.pngbin0 -> 1280 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/people.pngbin0 -> 1313 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/picks.pngbin0 -> 1396 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/places.pngbin0 -> 1391 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/preferences.pngbin0 -> 1427 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/profile.pngbin0 -> 1180 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/search.pngbin0 -> 1406 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/snapshot.pngbin0 -> 1142 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/speak.pngbin0 -> 1253 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/view.pngbin0 -> 1618 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_destinations.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_toybox.xml1
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml63
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/toolbar.xml11
88 files changed, 1106 insertions, 666 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 68cb5164b6..2e9c7a5d3d 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -296,6 +296,24 @@ void LLButton::onCommit()
LLUICtrl::onCommit();
}
+boost::signals2::connection LLButton::setClickedCallback(const CommitCallbackParam& cb)
+{
+ return setClickedCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setMouseDownCallback(const CommitCallbackParam& cb)
+{
+ return setMouseDownCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setMouseUpCallback(const CommitCallbackParam& cb)
+{
+ return setMouseUpCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setHeldDownCallback(const CommitCallbackParam& cb)
+{
+ return setHeldDownCallback(initCommitCallback(cb));
+}
+
+
boost::signals2::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
{
if (!mCommitSignal) mCommitSignal = new commit_signal_t();
@@ -1002,7 +1020,7 @@ void LLButton::resize(LLUIString label)
if (mImageOverlay)
{
S32 overlay_width = mImageOverlay->getWidth();
- F32 scale_factor = getRect().getHeight() / (F32)mImageOverlay->getHeight();
+ F32 scale_factor = (getRect().getHeight() - (mImageOverlayBottomPad + mImageOverlayTopPad)) / (F32)mImageOverlay->getHeight();
overlay_width = llround((F32)overlay_width * scale_factor);
switch(mImageOverlayAlignment)
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index a0a7b4e372..ba0345f610 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -170,6 +170,11 @@ public:
void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; }
+ boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setMouseDownCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setMouseUpCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setHeldDownCallback(const CommitCallbackParam& cb);
+
boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 9ce7533e1b..128ba609cb 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -41,7 +41,7 @@
// LLCommandId class
//
-const LLCommandId LLCommandId::null("null command");
+const LLCommandId LLCommandId::null = LLCommandId();
//
// LLCommand class
@@ -55,6 +55,8 @@ LLCommand::Params::Params()
, tooltip_ref("tooltip_ref")
, execute_function("execute_function")
, execute_parameters("execute_parameters")
+ , execute_stop_function("execute_stop_function")
+ , execute_stop_parameters("execute_stop_parameters")
, is_enabled_function("is_enabled_function")
, is_enabled_parameters("is_enabled_parameters")
, is_running_function("is_running_function")
@@ -72,6 +74,8 @@ LLCommand::LLCommand(const LLCommand::Params& p)
, mTooltipRef(p.tooltip_ref)
, mExecuteFunction(p.execute_function)
, mExecuteParameters(p.execute_parameters)
+ , mExecuteStopFunction(p.execute_stop_function)
+ , mExecuteStopParameters(p.execute_stop_parameters)
, mIsEnabledFunction(p.is_enabled_function)
, mIsEnabledParameters(p.is_enabled_parameters)
, mIsRunningFunction(p.is_running_function)
@@ -152,7 +156,7 @@ bool LLCommandManager::load()
if (!commandsParams.validateBlock())
{
- llerrs << "Unable to validate commands param block from file: " << commands_file << llendl;
+ llerrs << "Invalid commands file: " << commands_file << llendl;
return false;
}
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
index 8f9f956ec7..9b93ab735a 100644
--- a/indra/llui/llcommandmanager.h
+++ b/indra/llui/llcommandmanager.h
@@ -50,6 +50,12 @@ public:
{}
};
+ LLCommandId()
+ : mName("null command")
+ {
+ mUUID = LLUUID::generateNewID(mName);
+ }
+
LLCommandId(const std::string& name)
: mName(name)
{
@@ -65,7 +71,6 @@ public:
LLCommandId(const LLUUID& uuid)
: mName(""),
mUUID(uuid)
-
{
}
@@ -111,6 +116,9 @@ public:
Mandatory<std::string> execute_function;
Optional<LLSD> execute_parameters;
+ Optional<std::string> execute_stop_function;
+ Optional<LLSD> execute_stop_parameters;
+
Optional<std::string> is_enabled_function;
Optional<LLSD> is_enabled_parameters;
@@ -134,6 +142,9 @@ public:
const std::string& executeFunctionName() const { return mExecuteFunction; }
const LLSD& executeParameters() const { return mExecuteParameters; }
+ const std::string& executeStopFunctionName() const { return mExecuteStopFunction; }
+ const LLSD& executeStopParameters() const { return mExecuteStopParameters; }
+
const std::string& isEnabledFunctionName() const { return mIsEnabledFunction; }
const LLSD& isEnabledParameters() const { return mIsEnabledParameters; }
@@ -154,6 +165,9 @@ private:
std::string mExecuteFunction;
LLSD mExecuteParameters;
+ std::string mExecuteStopFunction;
+ LLSD mExecuteStopParameters;
+
std::string mIsEnabledFunction;
LLSD mIsEnabledParameters;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index c28bcc2ec9..90c41e99dc 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -459,15 +459,24 @@ void LLFloater::layoutResizeCtrls()
mResizeHandle[3]->setRect(rect);
}
-void LLFloater::enableResizeCtrls(bool enable)
+void LLFloater::enableResizeCtrls(bool enable, bool width, bool height)
{
+ mResizeBar[LLResizeBar::LEFT]->setVisible(enable && width);
+ mResizeBar[LLResizeBar::LEFT]->setEnabled(enable && width);
+
+ mResizeBar[LLResizeBar::TOP]->setVisible(enable && height);
+ mResizeBar[LLResizeBar::TOP]->setEnabled(enable && height);
+
+ mResizeBar[LLResizeBar::RIGHT]->setVisible(enable && width);
+ mResizeBar[LLResizeBar::RIGHT]->setEnabled(enable && width);
+
+ mResizeBar[LLResizeBar::BOTTOM]->setVisible(enable && height);
+ mResizeBar[LLResizeBar::BOTTOM]->setEnabled(enable && height);
+
for (S32 i = 0; i < 4; ++i)
{
- mResizeBar[i]->setVisible(enable);
- mResizeBar[i]->setEnabled(enable);
-
- mResizeHandle[i]->setVisible(enable);
- mResizeHandle[i]->setEnabled(enable);
+ mResizeHandle[i]->setVisible(enable && width && height);
+ mResizeHandle[i]->setEnabled(enable && width && height);
}
}
@@ -840,9 +849,9 @@ void LLFloater::applyRectControl()
if (mRectControl.size() > 1)
{
const LLRect& rect = getControlGroup()->getRect(mRectControl);
- if (rect.getWidth() > 0 && rect.getHeight() > 0)
+ if (rect.notEmpty())
{
- translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom);
+ setOrigin(rect.mLeft, rect.mBottom);
if (mResizable)
{
reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
@@ -2549,7 +2558,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
}
// move window fully onscreen
- if (floater->translateIntoRect( getLocalRect(), allow_partial_outside ))
+ if (floater->translateIntoRect( getSnapRect(), allow_partial_outside ))
{
floater->clearSnapTarget();
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 5aff542049..af9665e599 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -291,6 +291,7 @@ public:
void updateTransparency(ETypeTransparency transparency_type);
+ void enableResizeCtrls(bool enable, bool width = true, bool height = true);
protected:
virtual void applySavedVariables();
@@ -340,7 +341,6 @@ private:
BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);
void addResizeCtrls();
void layoutResizeCtrls();
- void enableResizeCtrls(bool enable);
void addDragHandle();
void layoutDragHandle(); // repair layout
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index d0ae9413a3..ae06eb74ac 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -110,7 +110,11 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
int index = list.size();
res = build_func(key);
-
+ if (!res)
+ {
+ llwarns << "Failed to build floater type: '" << name << "'." << llendl;
+ return NULL;
+ }
bool success = res->buildFromFile(xui_file, NULL);
if (!success)
{
diff --git a/indra/llui/llhelp.h b/indra/llui/llhelp.h
index 83317bd03c..1726347a78 100644
--- a/indra/llui/llhelp.h
+++ b/indra/llui/llhelp.h
@@ -32,6 +32,7 @@ class LLHelp
{
public:
virtual void showTopic(const std::string &topic) = 0;
+ virtual std::string getURL(const std::string &topic) = 0;
// return default (fallback) topic name suitable for showTopic()
virtual std::string defaultTopic() = 0;
// return topic to use before the user logs in
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index ffe5908a9d..8f7025a9a6 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -46,6 +46,7 @@
#include <algorithm>
#include <boost/regex.hpp>
+#include <boost/foreach.hpp>
const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
@@ -416,23 +417,17 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mSoundEffect = LLUUID(LLUI::sSettingGroups["config"]->getString(p.sound));
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::UniquenessContext>::const_iterator it = p.unique.contexts.begin(),
- end_it = p.unique.contexts.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts)
{
- mUniqueContext.push_back(it->value);
+ mUniqueContext.push_back(context.value);
}
lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl;
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Tag>::const_iterator it = p.tags.begin(),
- end_it = p.tags.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
{
- lldebugs << " tag \"" << std::string(it->value) << "\"" << llendl;
- mTags.push_back(it->value);
+ lldebugs << " tag \"" << std::string(tag.value) << "\"" << llendl;
+ mTags.push_back(tag.value);
}
mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form));
@@ -1397,14 +1392,12 @@ void replaceFormText(LLNotificationForm::Params& form, const std::string& patter
{
form.ignore.text = replace;
}
- for (LLInitParam::ParamIterator<LLNotificationForm::FormElement>::iterator it = form.form_elements.elements.begin(),
- end_it = form.form_elements.elements.end();
- it != end_it;
- ++it)
+
+ BOOST_FOREACH(LLNotificationForm::FormElement& element, form.form_elements.elements)
{
- if (it->button.isChosen() && it->button.text() == pattern)
+ if (element.button.isChosen() && element.button.text() == pattern)
{
- it->button.text = replace;
+ element.button.text = replace;
}
}
}
@@ -1453,48 +1446,42 @@ bool LLNotifications::loadTemplates()
mTemplates.clear();
- for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings.begin(), end_it = params.strings.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::GlobalString& string, params.strings)
{
- mGlobalStrings[it->name] = it->value;
+ mGlobalStrings[string.name] = string.value;
}
std::map<std::string, LLNotificationForm::Params> form_templates;
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Template>::const_iterator it = params.templates.begin(), end_it = params.templates.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::Template& notification_template, params.templates)
{
- form_templates[it->name] = it->form;
+ form_templates[notification_template.name] = notification_template.form;
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Params>::iterator it = params.notifications.begin(), end_it = params.notifications.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::Params& notification, params.notifications)
{
- if (it->form_ref.form_template.isChosen())
+ if (notification.form_ref.form_template.isChosen())
{
// replace form contents from template
- it->form_ref.form = form_templates[it->form_ref.form_template.name];
- if(it->form_ref.form_template.yes_text.isProvided())
+ notification.form_ref.form = form_templates[notification.form_ref.form_template.name];
+ if(notification.form_ref.form_template.yes_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$yestext", it->form_ref.form_template.yes_text);
+ replaceFormText(notification.form_ref.form, "$yestext", notification.form_ref.form_template.yes_text);
}
- if(it->form_ref.form_template.no_text.isProvided())
+ if(notification.form_ref.form_template.no_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$notext", it->form_ref.form_template.no_text);
+ replaceFormText(notification.form_ref.form, "$notext", notification.form_ref.form_template.no_text);
}
- if(it->form_ref.form_template.cancel_text.isProvided())
+ if(notification.form_ref.form_template.cancel_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$canceltext", it->form_ref.form_template.cancel_text);
+ replaceFormText(notification.form_ref.form, "$canceltext", notification.form_ref.form_template.cancel_text);
}
- if(it->form_ref.form_template.ignore_text.isProvided())
+ if(notification.form_ref.form_template.ignore_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$ignoretext", it->form_ref.form_template.ignore_text);
+ replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text);
}
}
- mTemplates[it->name] = LLNotificationTemplatePtr(new LLNotificationTemplate(*it));
+ mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification));
}
return true;
@@ -1517,12 +1504,9 @@ bool LLNotifications::loadVisibilityRules()
mVisibilityRules.clear();
- for(LLInitParam::ParamIterator<LLNotificationVisibilityRule::Rule>::iterator it = params.rules.begin(),
- end_it = params.rules.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationVisibilityRule::Rule& rule, params.rules)
{
- mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(*it)));
+ mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule)));
}
return true;
diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp
index 942e84eeb6..c3a51c36c9 100644
--- a/indra/llui/llresizehandle.cpp
+++ b/indra/llui/llresizehandle.cpp
@@ -55,8 +55,6 @@ LLResizeHandle::LLResizeHandle(const LLResizeHandle::Params& p)
mImage( NULL ),
mMinWidth( p.min_width ),
mMinHeight( p.min_height ),
- mMaxWidth(S32_MAX),
- mMaxHeight(S32_MAX),
mCorner( p.corner )
{
if( RIGHT_BOTTOM == mCorner)
@@ -179,11 +177,6 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
new_width = mMinWidth;
delta_x = x_multiple * (mMinWidth - orig_rect.getWidth());
}
- else if (new_width > mMaxWidth)
- {
- new_width = mMaxWidth;
- delta_x = x_multiple * (mMaxWidth - orig_rect.getWidth());
- }
S32 new_height = orig_rect.getHeight() + y_multiple * delta_y;
if( new_height < mMinHeight )
@@ -191,11 +184,6 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
new_height = mMinHeight;
delta_y = y_multiple * (mMinHeight - orig_rect.getHeight());
}
- else if (new_height > mMaxHeight)
- {
- new_height = mMaxHeight;
- delta_y = y_multiple * (mMaxHeight - orig_rect.getHeight());
- }
switch( mCorner )
{
diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h
index 5cfe3fb63c..7541b9e6c0 100644
--- a/indra/llui/llresizehandle.h
+++ b/indra/llui/llresizehandle.h
@@ -55,10 +55,7 @@ public:
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; }
-
- void setMaxWidth(S32 width) { mMaxWidth = width;}
- void setMaxHeight(S32 height) { mMaxHeight = height;}
-
+
private:
BOOL pointInHandle( S32 x, S32 y );
@@ -69,9 +66,7 @@ private:
LLCoordGL mLastMouseDir;
LLPointer<LLUIImage> mImage;
S32 mMinWidth;
- S32 mMaxWidth;
S32 mMinHeight;
- S32 mMaxHeight;
const ECorner mCorner;
};
diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp
index 4b69360e33..242b1fca7f 100644
--- a/indra/llui/llsdparam.cpp
+++ b/indra/llui/llsdparam.cpp
@@ -34,6 +34,7 @@
static LLInitParam::Parser::parser_read_func_map_t sReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs;
static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs;
+static const LLSD NO_VALUE_MARKER;
//
// LLParamSDParser
@@ -60,29 +61,34 @@ LLParamSDParser::LLParamSDParser()
}
// special case handling of U32 due to ambiguous LLSD::assign overload
-bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ parser_t::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLSD& sd_to_write = LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
+ sd_to_write.assign((S32)*((const U32*)val_ptr));
- sd_to_write->assign((S32)*((const U32*)val_ptr));
return true;
}
-bool LLParamSDParser::writeFlag(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+bool LLParamSDParser::writeFlag(LLParamSDParser::parser_t& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ parser_t::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
return true;
}
+void LLParamSDParser::submit(LLInitParam::BaseBlock& block, const LLSD& sd, LLInitParam::Parser::name_stack_t& name_stack)
+{
+ mCurReadSD = &sd;
+ block.submitValue(name_stack, *this);
+}
void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent)
{
@@ -90,7 +96,8 @@ void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool
mNameStack.clear();
setParseSilently(silent);
- readSDValues(sd, block);
+ LLParamSDParserUtilities::readSDValues(boost::bind(&LLParamSDParser::submit, this, boost::ref(block), _1, _2), sd, mNameStack);
+ //readSDValues(sd, block);
}
void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
@@ -100,43 +107,6 @@ void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
block.serializeBlock(*this);
}
-const LLSD NO_VALUE_MARKER;
-
-void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block)
-{
- if (sd.isMap())
- {
- for (LLSD::map_const_iterator it = sd.beginMap();
- it != sd.endMap();
- ++it)
- {
- mNameStack.push_back(make_pair(it->first, newParseGeneration()));
- readSDValues(it->second, block);
- mNameStack.pop_back();
- }
- }
- else if (sd.isArray())
- {
- for (LLSD::array_const_iterator it = sd.beginArray();
- it != sd.endArray();
- ++it)
- {
- mNameStack.back().second = newParseGeneration();
- readSDValues(*it, block);
- }
- }
- else if (sd.isUndefined())
- {
- mCurReadSD = &NO_VALUE_MARKER;
- block.submitValue(mNameStack, *this);
- }
- else
- {
- mCurReadSD = &sd;
- block.submitValue(mNameStack, *this);
- }
-}
-
/*virtual*/ std::string LLParamSDParser::getCurrentElementName()
{
std::string full_name = "sd";
@@ -150,81 +120,6 @@ void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block
return full_name;
}
-LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack)
-{
- //TODO: implement nested LLSD writing
- LLSD* sd_to_write = mWriteRootSD;
- bool new_traversal = false;
- for (name_stack_t::const_iterator it = name_stack.begin(), prev_it = mNameStack.begin();
- it != name_stack.end();
- ++it)
- {
- bool new_array_entry = false;
- if (prev_it == mNameStack.end())
- {
- new_traversal = true;
- }
- else
- {
- if (!new_traversal // have not diverged yet from previous trace
- && prev_it->first == it->first // names match
- && prev_it->second != it->second) // versions differ
- {
- // name stacks match, but version numbers differ in last place.
- // create a different entry at this point using an LLSD array
- new_array_entry = true;
- }
- if (prev_it->first != it->first // names differ
- || prev_it->second != it->second) // versions differ
- {
- // at this point we have diverged from our last trace
- // so any elements referenced here are new
- new_traversal = true;
- }
- }
-
- LLSD* child_sd = it->first.empty() ? sd_to_write : &(*sd_to_write)[it->first];
-
- if (child_sd->isArray())
- {
- if (new_traversal)
- {
- // write to new element at end
- sd_to_write = &(*child_sd)[child_sd->size()];
- }
- else
- {
- // write to last of existing elements, or first element if empty
- sd_to_write = &(*child_sd)[llmax(0, child_sd->size() - 1)];
- }
- }
- else
- {
- if (new_array_entry && !child_sd->isArray())
- {
- // copy child contents into first element of an array
- LLSD new_array = LLSD::emptyArray();
- new_array.append(*child_sd);
- // assign array to slot that previously held the single value
- *child_sd = new_array;
- // return next element in that array
- sd_to_write = &((*child_sd)[1]);
- }
- else
- {
- sd_to_write = child_sd;
- }
- }
- if (prev_it != mNameStack.end())
- {
- ++prev_it;
- }
- }
- mNameStack = name_stack;
-
- //llinfos << ll_pretty_print_sd(*mWriteRootSD) << llendl;
- return sd_to_write;
-}
bool LLParamSDParser::readFlag(Parser& parser, void* val_ptr)
{
@@ -312,3 +207,132 @@ bool LLParamSDParser::readSD(Parser& parser, void* val_ptr)
*((LLSD*)val_ptr) = *self.mCurReadSD;
return true;
}
+
+// static
+LLSD& LLParamSDParserUtilities::getSDWriteNode(LLSD& input, LLInitParam::Parser::name_stack_range_t& name_stack_range)
+{
+ LLSD* sd_to_write = &input;
+
+ for (LLInitParam::Parser::name_stack_t::iterator it = name_stack_range.first;
+ it != name_stack_range.second;
+ ++it)
+ {
+ bool new_traversal = it->second;
+
+ LLSD* child_sd = it->first.empty() ? sd_to_write : &(*sd_to_write)[it->first];
+
+ if (child_sd->isArray())
+ {
+ if (new_traversal)
+ {
+ // write to new element at end
+ sd_to_write = &(*child_sd)[child_sd->size()];
+ }
+ else
+ {
+ // write to last of existing elements, or first element if empty
+ sd_to_write = &(*child_sd)[llmax(0, child_sd->size() - 1)];
+ }
+ }
+ else
+ {
+ if (new_traversal
+ && child_sd->isDefined()
+ && !child_sd->isArray())
+ {
+ // copy child contents into first element of an array
+ LLSD new_array = LLSD::emptyArray();
+ new_array.append(*child_sd);
+ // assign array to slot that previously held the single value
+ *child_sd = new_array;
+ // return next element in that array
+ sd_to_write = &((*child_sd)[1]);
+ }
+ else
+ {
+ sd_to_write = child_sd;
+ }
+ }
+ it->second = false;
+ }
+
+ return *sd_to_write;
+}
+
+//static
+void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLInitParam::Parser::name_stack_t& stack)
+{
+ if (sd.isMap())
+ {
+ for (LLSD::map_const_iterator it = sd.beginMap();
+ it != sd.endMap();
+ ++it)
+ {
+ stack.push_back(make_pair(it->first, true));
+ readSDValues(cb, it->second, stack);
+ stack.pop_back();
+ }
+ }
+ else if (sd.isArray())
+ {
+ for (LLSD::array_const_iterator it = sd.beginArray();
+ it != sd.endArray();
+ ++it)
+ {
+ stack.back().second = true;
+ readSDValues(cb, *it, stack);
+ }
+ }
+ else if (sd.isUndefined())
+ {
+ if (!cb.empty())
+ {
+ cb(NO_VALUE_MARKER, stack);
+ }
+ }
+ else
+ {
+ if (!cb.empty())
+ {
+ cb(sd, stack);
+ }
+ }
+}
+
+//static
+void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd)
+{
+ LLInitParam::Parser::name_stack_t stack = LLInitParam::Parser::name_stack_t();
+ readSDValues(cb, sd, stack);
+}
+namespace LLInitParam
+{
+ // LLSD specialization
+ // block param interface
+ bool ParamValue<LLSD, TypeValues<LLSD>, false>::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name)
+ {
+ LLSD& sd = LLParamSDParserUtilities::getSDWriteNode(mValue, name_stack);
+
+ LLSD::String string;
+
+ if (p.readValue<LLSD::String>(string))
+ {
+ sd = string;
+ return true;
+ }
+ return false;
+ }
+
+ //static
+ void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack)
+ {
+ p.writeValue<LLSD::String>(sd.asString(), name_stack);
+ }
+
+ void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeBlock(Parser& p, Parser::name_stack_t name_stack, const BaseBlock* diff_block) const
+ {
+ // read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc)
+ Parser::name_stack_t stack;
+ LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, stack);
+ }
+}
diff --git a/indra/llui/llsdparam.h b/indra/llui/llsdparam.h
index a371c28f68..c1cfa98399 100644
--- a/indra/llui/llsdparam.h
+++ b/indra/llui/llsdparam.h
@@ -29,6 +29,16 @@
#define LL_LLSDPARAM_H
#include "llinitparam.h"
+#include "boost/function.hpp"
+
+struct LLParamSDParserUtilities
+{
+ static LLSD& getSDWriteNode(LLSD& input, LLInitParam::Parser::name_stack_range_t& name_stack_range);
+
+ typedef boost::function<void (const LLSD&, LLInitParam::Parser::name_stack_t&)> read_sd_cb_t;
+ static void readSDValues(read_sd_cb_t cb, const LLSD& sd, LLInitParam::Parser::name_stack_t& stack);
+ static void readSDValues(read_sd_cb_t cb, const LLSD& sd);
+};
class LLParamSDParser
: public LLInitParam::Parser
@@ -45,25 +55,23 @@ public:
/*virtual*/ std::string getCurrentElementName();
private:
- void readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block);
+ void submit(LLInitParam::BaseBlock& block, const LLSD& sd, LLInitParam::Parser::name_stack_t& name_stack);
template<typename T>
- static bool writeTypedValue(Parser& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+ static bool writeTypedValue(Parser& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ LLInitParam::Parser::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLSD& sd_to_write = LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
- sd_to_write->assign(*((const T*)val_ptr));
+ sd_to_write.assign(*((const T*)val_ptr));
return true;
}
- LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack);
-
- static bool writeU32Param(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
- static bool writeFlag(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
+ static bool writeU32Param(Parser& parser, const void* value_ptr, parser_t::name_stack_t& name_stack);
+ static bool writeFlag(Parser& parser, const void* value_ptr, parser_t::name_stack_t& name_stack);
static bool readFlag(Parser& parser, void* val_ptr);
static bool readS32(Parser& parser, void* val_ptr);
@@ -85,29 +93,29 @@ private:
template<typename T>
class LLSDParamAdapter : public T
+{
+public:
+ LLSDParamAdapter() {}
+ LLSDParamAdapter(const LLSD& sd)
{
- public:
- LLSDParamAdapter() {}
- LLSDParamAdapter(const LLSD& sd)
- {
- LLParamSDParser parser;
- parser.readSD(sd, *this);
- }
-
- operator LLSD() const
- {
- LLParamSDParser parser;
- LLSD sd;
- parser.writeSD(sd, *this);
- return sd;
- }
+ LLParamSDParser parser;
+ parser.readSD(sd, *this);
+ }
+
+ operator LLSD() const
+ {
+ LLParamSDParser parser;
+ LLSD sd;
+ parser.writeSD(sd, *this);
+ return sd;
+ }
- LLSDParamAdapter(const T& val)
- : T(val)
- {
- T::operator=(val);
- }
- };
+ LLSDParamAdapter(const T& val)
+ : T(val)
+ {
+ T::operator=(val);
+ }
+};
#endif // LL_LLSDPARAM_H
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 1f5fa5f361..e74aab6e21 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -33,6 +33,7 @@
#include "llcommandmanager.h"
#include "llmenugl.h"
#include "lltrans.h"
+#include "llinventory.h"
// uncomment this and remove the one in llui.cpp when there is an external reference to this translation unit
// thanks, MSVC!
@@ -86,6 +87,7 @@ LLToolBar::Params::Params()
pad_right("pad_right"),
pad_bottom("pad_bottom"),
pad_between("pad_between"),
+ min_girth("min_girth"),
button_panel("button_panel")
{}
@@ -103,6 +105,7 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
mPadTop(p.pad_top),
mPadBottom(p.pad_bottom),
mPadBetween(p.pad_between),
+ mMinGirth(p.min_girth),
mPopupMenuHandle(),
mStartDragItemCallback(NULL),
mHandleDragItemCallback(NULL),
@@ -201,14 +204,16 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
{
LLCommand * command = LLCommandManager::instance().getCommand(commandId);
if (!command) return false;
-
+ llinfos << "Merov debug : addCommand, " << commandId.name() << ", " << commandId.uuid() << llendl;
+
// Create the button and do the things that don't need ordering
LLToolBarButton* button = createButton(commandId);
mButtonPanel->addChild(button);
- mButtonMap.insert(std::make_pair(commandId, button));
+ mButtonMap.insert(std::make_pair(commandId.uuid(), button));
+
// Insert the command and button in the right place in their respective lists
- if ((rank >= mButtonCommands.size()) || (rank < 0))
+ if ((rank >= mButtonCommands.size()) || (rank == RANK_NONE))
{
// In that case, back load
mButtonCommands.push_back(commandId);
@@ -235,21 +240,28 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
return true;
}
-bool LLToolBar::removeCommand(const LLCommandId& commandId)
+// Remove a command from the list
+// Returns the rank of the command in the original list so that doing addCommand(id,rank) right after
+// a removeCommand(id) would leave the list unchanged.
+// Returns RANK_NONE if the command is not found in the list
+int LLToolBar::removeCommand(const LLCommandId& commandId)
{
- if (!hasCommand(commandId)) return false;
+ if (!hasCommand(commandId)) return RANK_NONE;
+ llinfos << "Merov debug : removeCommand, " << commandId.name() << ", " << commandId.uuid() << llendl;
// First erase the map record
- command_id_map::iterator it = mButtonMap.find(commandId);
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
mButtonMap.erase(it);
// Now iterate on the commands and buttons to identify the relevant records
+ int rank = 0;
std::list<LLToolBarButton*>::iterator it_button = mButtons.begin();
command_id_list_t::iterator it_command = mButtonCommands.begin();
while (*it_command != commandId)
{
++it_button;
++it_command;
+ ++rank;
}
// Delete the button and erase the command and button records
@@ -259,7 +271,7 @@ bool LLToolBar::removeCommand(const LLCommandId& commandId)
mNeedsLayout = true;
- return true;
+ return rank;
}
void LLToolBar::clearCommandsList()
@@ -274,7 +286,7 @@ bool LLToolBar::hasCommand(const LLCommandId& commandId) const
{
if (commandId != LLCommandId::null)
{
- command_id_map::const_iterator it = mButtonMap.find(commandId);
+ command_id_map::const_iterator it = mButtonMap.find(commandId.uuid());
return (it != mButtonMap.end());
}
@@ -287,7 +299,7 @@ bool LLToolBar::enableCommand(const LLCommandId& commandId, bool enabled)
if (commandId != LLCommandId::null)
{
- command_id_map::iterator it = mButtonMap.find(commandId);
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
if (it != mButtonMap.end())
{
it->second->setEnabled(enabled);
@@ -382,6 +394,10 @@ void LLToolBar::resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row
}
}
+// Returns the position of the coordinates as a rank in the button list.
+// The rank is the position a tool dropped in (x,y) would assume in the button list.
+// The value returned is between 0 and mButtons.size(), 0 being the first element to the left
+// (or top) and mButtons.size() the last one to the right (or bottom).
int LLToolBar::getRankFromPosition(S32 x, S32 y)
{
int rank = 0;
@@ -505,7 +521,7 @@ void LLToolBar::updateLayoutAsNeeded()
button_rect.setLeftTopAndSize(cur_row, panel_rect.mTop - cur_start, button_clamped_width, button->getRect().getHeight());
}
button->setShape(button_rect);
-
+
buttons_in_row.push_back(button);
row_running_length += button_length + mPadBetween;
@@ -517,6 +533,8 @@ void LLToolBar::updateLayoutAsNeeded()
S32 total_girth = cur_row // current row position...
+ max_row_girth // ...incremented by size of final row...
+ girth_pad_end; // ...plus padding reserved on end
+ total_girth = llmax(total_girth,mMinGirth);
+
max_row_length = llmax(max_row_length, row_running_length - mPadBetween + row_pad_end);
resizeButtonsInRow(buttons_in_row, max_row_girth);
@@ -618,7 +636,7 @@ void LLToolBar::createButtons()
LLToolBarButton* button = createButton(command_id);
mButtons.push_back(button);
mButtonPanel->addChild(button);
- mButtonMap.insert(std::make_pair(command_id, button));
+ mButtonMap.insert(std::make_pair(command_id.uuid(), button));
}
mNeedsLayout = true;
}
@@ -641,11 +659,25 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
if (!mReadOnly)
{
- LLUICtrl::CommitCallbackParam cbParam;
- cbParam.function_name = commandp->executeFunctionName();
- cbParam.parameter = commandp->executeParameters();
+ LLUICtrl::CommitCallbackParam executeParam;
+ executeParam.function_name = commandp->executeFunctionName();
+ executeParam.parameter = commandp->executeParameters();
- button->setCommitCallback(cbParam);
+ // If we have a "stop" function then we map the command to mouse down / mouse up otherwise commit
+ const std::string& executeStopFunction = commandp->executeStopFunctionName();
+ if (executeStopFunction.length() > 0)
+ {
+ LLUICtrl::CommitCallbackParam executeStopParam;
+ executeStopParam.function_name = executeStopFunction;
+ executeStopParam.parameter = commandp->executeStopParameters();
+
+ button->setMouseDownCallback(executeParam);
+ button->setMouseUpCallback(executeStopParam);
+ }
+ else
+ {
+ button->setCommitCallback(executeParam);
+ }
const std::string& isEnabledFunction = commandp->isEnabledFunctionName();
if (isEnabledFunction.length() > 0)
@@ -695,7 +727,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EAcceptance* accept,
std::string& tooltip_msg)
{
- //llinfos << "Merov debug : handleDragAndDrop. drop = " << drop << ", x = " << x << ", y = " << y << llendl;
+ llinfos << "Merov debug : handleDragAndDrop. drop = " << drop << ", x = " << x << ", y = " << y << llendl;
// If we have a drop callback, that means that we can handle the drop
BOOL handled = (mHandleDropCallback ? TRUE : FALSE);
@@ -709,7 +741,25 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
*accept = (handled ? ACCEPT_YES_SINGLE : ACCEPT_NO);
// We'll use that flag to change the visual aspect of the toolbar target on draw()
- mDragAndDropTarget = handled;
+ mDragAndDropTarget = false;
+
+ // HACK!!!
+ if (!isReadOnly() && handled)
+ {
+ if (!drop)
+ {
+ LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
+ LLAssetType::EType type = inv_item->getType();
+ if (type == LLAssetType::AT_WIDGET)
+ {
+ LLCommandId dragged_command(inv_item->getUUID());
+ int rank = getRankFromPosition(x, y);
+ removeCommand(dragged_command);
+ addCommand(dragged_command,rank);
+ mDragAndDropTarget = true;
+ }
+ }
+ }
return handled;
}
@@ -787,3 +837,8 @@ void LLToolBarButton::onMouseCaptureLost()
{
mIsDragged = false;
}
+
+void LLToolBarButton::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLButton::reshape(mWidthRange.clamp(width), height, called_from_parent);
+}
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index e4534dea5f..d9ea0f57d3 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -47,7 +47,7 @@ class LLToolBarButton : public LLButton
public:
struct Params : public LLInitParam::Block<Params, LLButton::Params>
{
- Optional<LLUI::RangeS32> button_width;
+ Optional<LLUI::RangeS32::Params> button_width;
Optional<S32> desired_height;
Params()
@@ -62,6 +62,8 @@ public:
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
+ void reshape(S32 width, S32 height, BOOL called_from_parent = true);
+
void setCommandId(const LLCommandId& id) { mId = id; }
void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; }
@@ -141,7 +143,8 @@ public:
pad_top,
pad_right,
pad_bottom,
- pad_between;
+ pad_between,
+ min_girth;
// get rid of this
Multiple<LLCommandId::Params> commands;
@@ -161,8 +164,10 @@ public:
EAcceptance* accept,
std::string& tooltip_msg);
- bool addCommand(const LLCommandId& commandId, int rank = -1);
- bool removeCommand(const LLCommandId& commandId);
+ static const int RANK_NONE = -1;
+
+ bool addCommand(const LLCommandId& commandId, int rank = RANK_NONE);
+ int removeCommand(const LLCommandId& commandId); // Returns the rank the removed command was at, RANK_NONE if not found
bool hasCommand(const LLCommandId& commandId) const;
bool enableCommand(const LLCommandId& commandId, bool enabled);
@@ -206,7 +211,7 @@ private:
typedef std::list<LLToolBarButton*> toolbar_button_list;
toolbar_button_list mButtons;
command_id_list_t mButtonCommands;
- typedef std::map<LLCommandId, LLToolBarButton*> command_id_map;
+ typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
command_id_map mButtonMap;
LLToolBarEnums::ButtonType mButtonType;
@@ -221,7 +226,8 @@ private:
mPadRight,
mPadTop,
mPadBottom,
- mPadBetween;
+ mPadBetween,
+ mMinGirth;
LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp
index d522123260..c8303bfc89 100644
--- a/indra/llui/tests/llurlentry_stub.cpp
+++ b/indra/llui/tests/llurlentry_stub.cpp
@@ -124,7 +124,7 @@ namespace LLInitParam
{
descriptor.mCurrentBlockPtr = this;
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; }
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name){ return true; }
void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {}
bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_value, S32 max_value) const { return true; }
bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; }
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 2f814f4200..c1fb050206 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -72,7 +72,6 @@ S32 LLUIImage::getHeight() const
namespace LLInitParam
{
- S32 Parser::sNextParseGeneration = 0;
BlockDescriptor::BlockDescriptor() {}
ParamDescriptor::ParamDescriptor(param_handle_t p,
merge_func_t merge_func,
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index fb6a2eabf1..9dbccf125a 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -66,8 +66,6 @@ namespace LLInitParam
BaseBlock::BaseBlock() {}
BaseBlock::~BaseBlock() {}
- S32 Parser::sNextParseGeneration = 0;
-
BlockDescriptor::BlockDescriptor() {}
ParamDescriptor::ParamDescriptor(param_handle_t p,
merge_func_t merge_func,
@@ -98,7 +96,7 @@ namespace LLInitParam
mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; }
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name){ return true; }
void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {}
bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_count, S32 max_count) const { return true; }
bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; }
diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp
index 99016205c8..2520502cf1 100644
--- a/indra/llxuixml/llinitparam.cpp
+++ b/indra/llxuixml/llinitparam.cpp
@@ -62,7 +62,6 @@ namespace LLInitParam
mInspectFunc(inspect_func),
mMinCount(min_count),
mMaxCount(max_count),
- mGeneration(0),
mUserData(NULL)
{}
@@ -75,7 +74,6 @@ namespace LLInitParam
mInspectFunc(NULL),
mMinCount(0),
mMaxCount(0),
- mGeneration(0),
mUserData(NULL)
{}
@@ -87,8 +85,6 @@ namespace LLInitParam
//
// Parser
//
- S32 Parser::sNextParseGeneration = 0;
-
Parser::~Parser()
{}
@@ -162,9 +158,9 @@ namespace LLInitParam
return (param_address - baseblock_address);
}
- bool BaseBlock::submitValue(const Parser::name_stack_t& name_stack, Parser& p, bool silent)
+ bool BaseBlock::submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent)
{
- if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()), -1))
+ if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()), true))
{
if (!silent)
{
@@ -213,8 +209,7 @@ namespace LLInitParam
// each param descriptor remembers its serial number
// so we can inspect the same param under different names
// and see that it has the same number
- (*it)->mGeneration = parser.newParseGeneration();
- name_stack.push_back(std::make_pair("", (*it)->mGeneration));
+ name_stack.push_back(std::make_pair("", true));
serialize_func(*param, parser, name_stack, diff_param);
name_stack.pop_back();
}
@@ -250,12 +245,7 @@ namespace LLInitParam
continue;
}
- if (!duplicate)
- {
- it->second->mGeneration = parser.newParseGeneration();
- }
-
- name_stack.push_back(std::make_pair(it->first, it->second->mGeneration));
+ name_stack.push_back(std::make_pair(it->first, !duplicate));
const Param* diff_param = diff_block ? diff_block->getParamFromHandle(param_handle) : NULL;
serialize_func(*param, parser, name_stack, diff_param);
name_stack.pop_back();
@@ -278,8 +268,7 @@ namespace LLInitParam
ParamDescriptor::inspect_func_t inspect_func = (*it)->mInspectFunc;
if (inspect_func)
{
- (*it)->mGeneration = parser.newParseGeneration();
- name_stack.push_back(std::make_pair("", (*it)->mGeneration));
+ name_stack.push_back(std::make_pair("", true));
inspect_func(*param, parser, name_stack, (*it)->mMinCount, (*it)->mMaxCount);
name_stack.pop_back();
}
@@ -307,11 +296,7 @@ namespace LLInitParam
}
}
- if (!duplicate)
- {
- it->second->mGeneration = parser.newParseGeneration();
- }
- name_stack.push_back(std::make_pair(it->first, it->second->mGeneration));
+ name_stack.push_back(std::make_pair(it->first, !duplicate));
inspect_func(*param, parser, name_stack, it->second->mMinCount, it->second->mMaxCount);
name_stack.pop_back();
}
@@ -320,16 +305,18 @@ namespace LLInitParam
return true;
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 parent_generation)
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool ignored)
{
BlockDescriptor& block_data = mostDerivedBlockDescriptor();
- bool names_left = name_stack.first != name_stack.second;
+ bool names_left = name_stack_range.first != name_stack_range.second;
- S32 parse_generation = name_stack.first == name_stack.second ? -1 : name_stack.first->second;
+ bool new_name = names_left
+ ? name_stack_range.first->second
+ : true;
if (names_left)
{
- const std::string& top_name = name_stack.first->first;
+ const std::string& top_name = name_stack_range.first->first;
ParamDescriptor::deserialize_func_t deserialize_func = NULL;
Param* paramp = NULL;
@@ -341,9 +328,18 @@ namespace LLInitParam
paramp = getParamFromHandle(found_it->second->mParamHandle);
deserialize_func = found_it->second->mDeserializeFunc;
- Parser::name_stack_range_t new_name_stack(name_stack.first, name_stack.second);
+ Parser::name_stack_range_t new_name_stack(name_stack_range.first, name_stack_range.second);
++new_name_stack.first;
- return deserialize_func(*paramp, p, new_name_stack, parse_generation);
+ if (deserialize_func(*paramp, p, new_name_stack, new_name))
+ {
+ // value is no longer new, we know about it now
+ name_stack_range.first->second = false;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
}
@@ -355,7 +351,7 @@ namespace LLInitParam
Param* paramp = getParamFromHandle((*it)->mParamHandle);
ParamDescriptor::deserialize_func_t deserialize_func = (*it)->mDeserializeFunc;
- if (deserialize_func && deserialize_func(*paramp, p, name_stack, parse_generation))
+ if (deserialize_func && deserialize_func(*paramp, p, name_stack_range, new_name))
{
return true;
}
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h
index 1a131d15a3..06140d0931 100644
--- a/indra/llxuixml/llinitparam.h
+++ b/indra/llxuixml/llinitparam.h
@@ -214,13 +214,13 @@ namespace LLInitParam
}
};
- typedef std::vector<std::pair<std::string, S32> > name_stack_t;
- typedef std::pair<name_stack_t::const_iterator, name_stack_t::const_iterator> name_stack_range_t;
- typedef std::vector<std::string> possible_values_t;
+ typedef std::vector<std::pair<std::string, bool> > name_stack_t;
+ typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
+ typedef std::vector<std::string> possible_values_t;
typedef bool (*parser_read_func_t)(Parser& parser, void* output);
- typedef bool (*parser_write_func_t)(Parser& parser, const void*, const name_stack_t&);
- typedef boost::function<void (const name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
+ typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
+ typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
typedef std::map<const std::type_info*, parser_read_func_t, CompareTypeID> parser_read_func_map_t;
typedef std::map<const std::type_info*, parser_write_func_t, CompareTypeID> parser_write_func_map_t;
@@ -228,7 +228,6 @@ namespace LLInitParam
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),
- mParseGeneration(sNextParseGeneration),
mParserReadFuncs(&read_map),
mParserWriteFuncs(&write_map),
mParserInspectFuncs(&inspect_map)
@@ -245,7 +244,7 @@ namespace LLInitParam
return false;
}
- template <typename T> bool writeValue(const T& param, const name_stack_t& name_stack)
+ template <typename T> bool writeValue(const T& param, name_stack_t& name_stack)
{
parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T));
if (found_it != mParserWriteFuncs->end())
@@ -256,7 +255,7 @@ namespace LLInitParam
}
// dispatch inspection to registered inspection functions, for each parameter in a param block
- template <typename T> bool inspectValue(const name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values)
+ template <typename T> bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values)
{
parser_inspect_func_map_t::iterator found_it = mParserInspectFuncs->find(&typeid(T));
if (found_it != mParserInspectFuncs->end())
@@ -272,10 +271,6 @@ namespace LLInitParam
virtual void parserError(const std::string& message);
void setParseSilently(bool silent) { mParseSilently = silent; }
- S32 getParseGeneration() { return mParseGeneration; }
- S32 newParseGeneration() { return mParseGeneration = ++sNextParseGeneration; }
-
-
protected:
template <typename T>
void registerParserFuncs(parser_read_func_t read_func, parser_write_func_t write_func = NULL)
@@ -296,9 +291,6 @@ namespace LLInitParam
parser_read_func_map_t* mParserReadFuncs;
parser_write_func_map_t* mParserWriteFuncs;
parser_inspect_func_map_t* mParserInspectFuncs;
- S32 mParseGeneration;
-
- static S32 sNextParseGeneration;
};
class BaseBlock;
@@ -341,7 +333,7 @@ namespace LLInitParam
};
typedef bool(*merge_func_t)(Param&, const Param&, bool);
- typedef bool(*deserialize_func_t)(Param&, Parser&, const Parser::name_stack_range_t&, S32);
+ typedef bool(*deserialize_func_t)(Param&, Parser&, const Parser::name_stack_range_t&, bool);
typedef void(*serialize_func_t)(const Param&, Parser&, Parser::name_stack_t&, const Param* diff_param);
typedef void(*inspect_func_t)(const Param&, Parser&, Parser::name_stack_t&, S32 min_count, S32 max_count);
typedef bool(*validation_func_t)(const Param*);
@@ -366,7 +358,6 @@ namespace LLInitParam
validation_func_t mValidationFunc;
S32 mMinCount;
S32 mMaxCount;
- S32 mGeneration;
S32 mNumRefs;
UserData* mUserData;
};
@@ -447,7 +438,7 @@ namespace LLInitParam
BaseBlock();
virtual ~BaseBlock();
- bool submitValue(const Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
+ bool submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
param_handle_t getHandleFromParam(const Param* param) const;
bool validateBlock(bool emit_errors = true) const;
@@ -473,7 +464,7 @@ namespace LLInitParam
S32 getLastChangeVersion() const { return mChangeVersion; }
- bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation);
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
void serializeBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const;
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const;
@@ -593,8 +584,7 @@ namespace LLInitParam
mKeyVersion(0),
mValidatedVersion(-1),
mValidated(false)
- {
- }
+ {}
void setValue(value_assignment_t val)
{
@@ -672,11 +662,11 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
// no further names in stack, attempt to parse value now
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
if (parser.readValue(typed_param.getValue()))
{
@@ -715,7 +705,7 @@ namespace LLInitParam
if (!name_stack.empty())
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
}
std::string key = typed_param.getValueName();
@@ -811,11 +801,11 @@ namespace LLInitParam
}
}
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
// attempt to parse block...
- if(typed_param.deserializeBlock(parser, name_stack, generation))
+ if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
{
typed_param.clearValueName();
typed_param.enclosingBlock().paramChanged(param, true);
@@ -851,7 +841,7 @@ namespace LLInitParam
if (!name_stack.empty())
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
}
std::string key = typed_param.getValueName();
@@ -943,7 +933,7 @@ namespace LLInitParam
public:
typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, false> self_t;
typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t;
- typedef typename std::vector<param_value_t> container_t;
+ typedef typename std::vector<param_value_t> container_t;
typedef const container_t& value_assignment_t;
typedef VALUE_TYPE value_t;
@@ -970,12 +960,12 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
value_t value;
// no further names in stack, attempt to parse value now
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
// attempt to read value directly
if (parser.readValue(value))
@@ -1015,7 +1005,7 @@ namespace LLInitParam
++it)
{
std::string key = it->getValue();
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
if(key.empty())
// not parsed via name values, write out value directly
@@ -1132,8 +1122,7 @@ namespace LLInitParam
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
- : Param(block_descriptor.mCurrentBlockPtr),
- mLastParseGeneration(0)
+ : Param(block_descriptor.mCurrentBlockPtr)
{
std::copy(value.begin(), value.end(), back_inserter(mValues));
@@ -1153,13 +1142,12 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
bool new_value = false;
- if (generation != typed_param.mLastParseGeneration
- || typed_param.mValues.empty())
+ if (new_name || typed_param.mValues.empty())
{
new_value = true;
typed_param.mValues.push_back(value_t());
@@ -1168,12 +1156,8 @@ namespace LLInitParam
param_value_t& value = typed_param.mValues.back();
// attempt to parse block...
- if(value.deserializeBlock(parser, name_stack, generation))
+ if(value.deserializeBlock(parser, name_stack_range, new_name))
{
- if (new_value)
- { // successfully parsed new value, let's keep it
- typed_param.mLastParseGeneration = generation;
- }
typed_param.enclosingBlock().paramChanged(param, true);
typed_param.setProvided(true);
return true;
@@ -1187,11 +1171,6 @@ namespace LLInitParam
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, value.getValue()))
{
- if (new_value)
- { // successfully parsed new value, let's keep it
- typed_param.mLastParseGeneration = generation;
- }
-
typed_param.mValues.back().setValueName(name);
typed_param.mValues.back().mKeyVersion = value.getLastChangeVersion();
typed_param.enclosingBlock().paramChanged(param, true);
@@ -1219,7 +1198,7 @@ namespace LLInitParam
it != end_it;
++it)
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
std::string key = it->getValueName();
if (!key.empty() && it->mKeyVersion == it->getLastChangeVersion())
@@ -1317,8 +1296,6 @@ namespace LLInitParam
}
container_t mValues;
-
- S32 mLastParseGeneration;
};
template <typename DERIVED_BLOCK>
@@ -1625,9 +1602,9 @@ namespace LLInitParam
}
}
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
//std::string message = llformat("Deprecated value %s ignored", getName().c_str());
//parser.parserWarning(message);
@@ -1669,18 +1646,16 @@ namespace LLInitParam
typedef Block<DERIVED_BLOCK, BASE_BLOCK> super_t;
BatchBlock()
- : mLastParseGeneration(-1)
{}
- bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation)
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name)
{
- if (generation != mLastParseGeneration)
+ if (new_name)
{
// reset block
*static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue();
- mLastParseGeneration = generation;
}
- return super_t::deserializeBlock(p, name_stack, generation);
+ return super_t::deserializeBlock(p, name_stack_range, new_name);
}
bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
@@ -1688,7 +1663,6 @@ namespace LLInitParam
if (overwrite)
{
*static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue();
- mLastParseGeneration = -1;
// merge individual parameters into destination
return super_t::mergeBlock(super_t::selfBlockDescriptor(), other, overwrite);
}
@@ -1700,19 +1674,20 @@ namespace LLInitParam
static DERIVED_BLOCK default_value;
return default_value;
}
-
- S32 mLastParseGeneration;
};
+ // FIXME: this specialization is not currently used, as it only matches against the BatchBlock base class
+ // and not the derived class with the actual params
template<typename DERIVED_BLOCK,
typename BASE_BLOCK,
typename NAME_VALUE_LOOKUP>
class ParamValue <BatchBlock<DERIVED_BLOCK, BASE_BLOCK>,
NAME_VALUE_LOOKUP,
true>
- : public Param,
+ : public NAME_VALUE_LOOKUP,
protected BatchBlock<DERIVED_BLOCK, BASE_BLOCK>
{
+ public:
typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> block_t;
typedef const BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& value_assignment_t;
@@ -1734,7 +1709,6 @@ namespace LLInitParam
void setValue(value_assignment_t val)
{
*this = val;
- block_t::mLastParseGeneration = -1;
}
value_assignment_t getValue() const
@@ -1764,6 +1738,59 @@ namespace LLInitParam
mutable bool mValidated; // lazy validation flag
};
+ template <>
+ class ParamValue <LLSD,
+ TypeValues<LLSD>,
+ false>
+ : public TypeValues<LLSD>,
+ public BaseBlock
+ {
+ public:
+ typedef ParamValue<LLSD, TypeValues<LLSD>, false> self_t;
+ typedef const LLSD& value_assignment_t;
+
+ ParamValue()
+ : mKeyVersion(0),
+ mValidatedVersion(-1),
+ mValidated(false)
+ {}
+
+ ParamValue(value_assignment_t other)
+ : mValue(other),
+ mKeyVersion(0),
+ mValidatedVersion(-1),
+ mValidated(false)
+ {}
+
+ void setValue(value_assignment_t val) { mValue = val; }
+
+ value_assignment_t getValue() const { return mValue; }
+ LLSD& getValue() { return mValue; }
+
+ operator value_assignment_t() const { return mValue; }
+ value_assignment_t operator()() const { return mValue; }
+
+ S32 mKeyVersion;
+
+ // block param interface
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
+ void serializeBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const;
+ bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
+ {
+ //TODO: implement LLSD params as schema type Any
+ return true;
+ }
+
+ protected:
+ mutable S32 mValidatedVersion;
+ mutable bool mValidated; // lazy validation flag
+
+ private:
+ static void serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack);
+
+ LLSD mValue;
+ };
+
template<typename T>
class CustomParamValue
: public Block<ParamValue<T, TypeValues<T> > >,
@@ -1790,11 +1817,11 @@ namespace LLInitParam
mValidated(false)
{}
- bool deserializeBlock(Parser& parser, Parser::name_stack_range_t name_stack, S32 generation)
+ bool deserializeBlock(Parser& parser, Parser::name_stack_range_t name_stack_range, bool new_name)
{
derived_t& typed_param = static_cast<derived_t&>(*this);
// try to parse direct value T
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
if(parser.readValue(typed_param.mValue))
{
@@ -1808,7 +1835,7 @@ namespace LLInitParam
}
// fall back on parsing block components for T
- return typed_param.BaseBlock::deserializeBlock(parser, name_stack, generation);
+ return typed_param.BaseBlock::deserializeBlock(parser, name_stack_range, new_name);
}
void serializeBlock(Parser& parser, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp
index c60f656c2c..aee8fa8d8f 100644
--- a/indra/llxuixml/llxuiparser.cpp
+++ b/indra/llxuixml/llxuiparser.cpp
@@ -513,7 +513,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sXUIInspectFuncs;
//
LLXUIParser::LLXUIParser()
: Parser(sXUIReadFuncs, sXUIWriteFuncs, sXUIInspectFuncs),
- mLastWriteGeneration(-1),
mCurReadDepth(0)
{
if (sXUIReadFuncs.empty())
@@ -583,7 +582,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
if (!text_contents.empty())
{
mCurReadNode = nodep;
- mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+ mNameStack.push_back(std::make_pair(std::string("value"), true));
// child nodes are not necessarily valid parameters (could be a child widget)
// so don't complain once we've recursed
if (!block.submitValue(mNameStack, *this, true))
@@ -618,7 +617,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
// since there is no widget named "rect"
if (child_name.find(".") == std::string::npos)
{
- mNameStack.push_back(std::make_pair(child_name, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(child_name, true));
num_tokens_pushed++;
}
else
@@ -654,7 +653,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_token_it; token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
}
@@ -704,7 +703,7 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_tokens.begin(); token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
@@ -728,24 +727,13 @@ void LLXUIParser::writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock &bloc
}
// go from a stack of names to a specific XML node
-LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
+LLXMLNodePtr LLXUIParser::getNode(name_stack_t& stack)
{
- name_stack_t name_stack;
- for (name_stack_t::const_iterator it = stack.begin();
- it != stack.end();
- ++it)
- {
- if (!it->first.empty())
- {
- name_stack.push_back(*it);
- }
- }
-
LLXMLNodePtr out_node = mWriteRootNode;
- name_stack_t::const_iterator next_it = name_stack.begin();
- for (name_stack_t::const_iterator it = name_stack.begin();
- it != name_stack.end();
+ name_stack_t::iterator next_it = stack.begin();
+ for (name_stack_t::iterator it = stack.begin();
+ it != stack.end();
it = next_it)
{
++next_it;
@@ -754,17 +742,18 @@ LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
continue;
}
- out_nodes_t::iterator found_it = mOutNodes.lower_bound(it->second);
+ out_nodes_t::iterator found_it = mOutNodes.find(it->first);
// node with this name not yet written
- if (found_it == mOutNodes.end() || mOutNodes.key_comp()(found_it->first, it->second))
+ if (found_it == mOutNodes.end() || it->second)
{
// make an attribute if we are the last element on the name stack
- bool is_attribute = next_it == name_stack.end();
+ bool is_attribute = next_it == stack.end();
LLXMLNodePtr new_node = new LLXMLNode(it->first.c_str(), is_attribute);
out_node->addChild(new_node);
- mOutNodes.insert(found_it, std::make_pair(it->second, new_node));
+ mOutNodes[it->first] = new_node;
out_node = new_node;
+ it->second = false;
}
else
{
@@ -781,7 +770,7 @@ bool LLXUIParser::readFlag(Parser& parser, void* val_ptr)
return self.mCurReadNode == DUMMY_NODE;
}
-bool LLXUIParser::writeFlag(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeFlag(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
// just create node
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
@@ -798,7 +787,7 @@ bool LLXUIParser::readBoolValue(Parser& parser, void* val_ptr)
return success;
}
-bool LLXUIParser::writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeBoolValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -817,7 +806,7 @@ bool LLXUIParser::readStringValue(Parser& parser, void* val_ptr)
return true;
}
-bool LLXUIParser::writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeStringValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -855,7 +844,7 @@ bool LLXUIParser::readU8Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getByteValue(1, (U8*)val_ptr);
}
-bool LLXUIParser::writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU8Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -879,7 +868,7 @@ bool LLXUIParser::readS8Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeS8Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS8Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -903,7 +892,7 @@ bool LLXUIParser::readU16Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeU16Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU16Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -927,7 +916,7 @@ bool LLXUIParser::readS16Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeS16Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS16Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -945,7 +934,7 @@ bool LLXUIParser::readU32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getUnsignedValue(1, (U32*)val_ptr);
}
-bool LLXUIParser::writeU32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -963,7 +952,7 @@ bool LLXUIParser::readS32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getIntValue(1, (S32*)val_ptr);
}
-bool LLXUIParser::writeS32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -981,7 +970,7 @@ bool LLXUIParser::readF32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getFloatValue(1, (F32*)val_ptr);
}
-bool LLXUIParser::writeF32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeF32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -999,7 +988,7 @@ bool LLXUIParser::readF64Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getDoubleValue(1, (F64*)val_ptr);
}
-bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -1023,7 +1012,7 @@ bool LLXUIParser::readColor4Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeColor4Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeColor4Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -1050,7 +1039,7 @@ bool LLXUIParser::readUIColorValue(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeUIColorValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeUIColorValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -1079,7 +1068,7 @@ bool LLXUIParser::readUUIDValue(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeUUIDValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeUUIDValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -1098,7 +1087,7 @@ bool LLXUIParser::readSDValue(Parser& parser, void* val_ptr)
return true;
}
-bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
@@ -1207,7 +1196,6 @@ const char* NO_VALUE_MARKER = "no_value";
LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t element_cb)
: Parser(sSimpleXUIReadFuncs, sSimpleXUIWriteFuncs, sSimpleXUIInspectFuncs),
- mLastWriteGeneration(-1),
mCurReadDepth(0),
mElementCB(element_cb)
{
@@ -1338,7 +1326,7 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
{ // compound attribute
if (child_name.find(".") == std::string::npos)
{
- mNameStack.push_back(std::make_pair(child_name, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(child_name, true));
num_tokens_pushed++;
mScope.push_back(child_name);
}
@@ -1365,7 +1353,7 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_token_it; token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
mScope.push_back(mNameStack.back().first);
@@ -1398,7 +1386,7 @@ bool LLSimpleXUIParser::readAttributes(const char **atts)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_tokens.begin(); token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
@@ -1420,7 +1408,7 @@ bool LLSimpleXUIParser::processText()
LLStringUtil::trim(mTextContents);
if (!mTextContents.empty())
{
- mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+ mNameStack.push_back(std::make_pair(std::string("value"), true));
mCurAttributeValueBegin = mTextContents.c_str();
mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
mNameStack.pop_back();
diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h
index 42a79b4100..d7cd256967 100644
--- a/indra/llxuixml/llxuiparser.h
+++ b/indra/llxuixml/llxuiparser.h
@@ -133,23 +133,23 @@ private:
static bool readSDValue(Parser& parser, void* val_ptr);
//writer helper functions
- static bool writeFlag(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU16Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS16Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeF32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeF64Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeColor4Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeUIColorValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeUUIDValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeSDValue(Parser& parser, const void* val_ptr, const name_stack_t&);
-
- LLXMLNodePtr getNode(const name_stack_t& stack);
+ static bool writeFlag(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeBoolValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeStringValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU8Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS8Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU16Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS16Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeF32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeF64Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeColor4Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeUIColorValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeUUIDValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeSDValue(Parser& parser, const void* val_ptr, name_stack_t&);
+
+ LLXMLNodePtr getNode(name_stack_t& stack);
private:
Parser::name_stack_t mNameStack;
@@ -157,9 +157,8 @@ private:
// Root of the widget XML sub-tree, for example, "line_editor"
LLXMLNodePtr mWriteRootNode;
- typedef std::map<S32, LLXMLNodePtr> out_nodes_t;
+ typedef std::map<std::string, LLXMLNodePtr> out_nodes_t;
out_nodes_t mOutNodes;
- S32 mLastWriteGeneration;
LLXMLNodePtr mLastWrittenChild;
S32 mCurReadDepth;
std::string mCurFileName;
@@ -226,7 +225,6 @@ private:
Parser::name_stack_t mNameStack;
struct XML_ParserStruct* mParser;
- S32 mLastWriteGeneration;
LLXMLNodePtr mLastWrittenChild;
S32 mCurReadDepth;
std::string mCurFileName;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 941cb6b9f9..97ccfeac29 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -168,6 +168,7 @@ set(viewer_SOURCE_FILES
llfloaterabout.cpp
llfloateranimpreview.cpp
llfloaterauction.cpp
+ llfloateravatar.cpp
llfloateravatarpicker.cpp
llfloateravatartextures.cpp
llfloaterbeacons.cpp
@@ -733,6 +734,7 @@ set(viewer_HEADER_FILES
llfloaterabout.h
llfloateranimpreview.h
llfloaterauction.h
+ llfloateravatar.h
llfloateravatarpicker.h
llfloateravatartextures.h
llfloaterbeacons.h
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index ae8471aa15..296d992b34 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -37,6 +37,8 @@
tooltip_ref="Command_Build_Tooltip"
execute_function="Floater.ToolbarToggle"
execute_parameters="build"
+ is_enabled_function="Agent.IsActionAllowed"
+ is_enabled_parameters="build"
is_running_function="Floater.IsOpen"
is_running_parameters="build"
/>
@@ -150,6 +152,16 @@
is_running_function="Floater.IsOpen"
is_running_parameters="people"
/>
+ <command name="picks"
+ available_in_toybox="true"
+ icon="Command_Picks_Icon"
+ label_ref="Command_Picks_Label"
+ tooltip_ref="Command_Picks_Tooltip"
+ execute_function="Floater.ToolbarToggle"
+ execute_parameters="picks"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="picks"
+ />
<command name="places"
available_in_toybox="true"
icon="Command_Places_Icon"
@@ -175,10 +187,8 @@
icon="Command_Profile_Icon"
label_ref="Command_Profile_Label"
tooltip_ref="Command_Profile_Tooltip"
- execute_function="Floater.ToolbarToggle"
- execute_parameters="my_profile"
- is_running_function="Floater.IsOpen"
- is_running_parameters="my_profile"
+ execute_function="Avatar.ToggleMyProfile"
+ is_running_function="Avatar.IsMyProfileOpen"
/>
<command name="search"
available_in_toybox="true"
@@ -205,9 +215,13 @@
icon="Command_Speak_Icon"
label_ref="Command_Speak_Label"
tooltip_ref="Command_Speak_Tooltip"
- execute_function="Floater.ToolbarToggle"
+ execute_function="Agent.ToggleMicrophone"
execute_parameters="speak"
- is_running_function="Floater.IsOpen"
+ execute_stop_function=""
+ execute_stop_parameters="speak"
+ is_enabled_function="Agent.IsActionAllowed"
+ is_enabled_parameters="speak"
+ is_running_function="Agent.IsMicrophoneOn"
is_running_parameters="speak"
/>
<command name="view"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 092e69952c..aa2ff646a8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4246,7 +4246,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>InventoryDisplayOutbox</key>
<map>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index ba42126985..8303a5942d 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -71,6 +71,7 @@
#include "lltoolpie.h"
#include "lltoolmgr.h"
#include "lltrans.h"
+#include "lluictrl.h"
#include "llurlentry.h"
#include "llviewercontrol.h"
#include "llviewerdisplay.h"
@@ -152,6 +153,65 @@ bool handleSlowMotionAnimation(const LLSD& newvalue)
return true;
}
+// static
+void LLAgent::parcelChangedCallback()
+{
+ bool can_edit = LLToolMgr::getInstance()->canEdit();
+
+ gAgent.mCanEditParcel = can_edit;
+}
+
+// static
+bool LLAgent::isActionAllowed(const LLSD& sdname)
+{
+ bool retval = false;
+
+ const std::string& param = sdname.asString();
+
+ if (param == "build")
+ {
+ retval = gAgent.canEditParcel();
+ }
+ else if (param == "speak")
+ {
+ if ( gAgent.isVoiceConnected() )
+ {
+ retval = true;
+ }
+ else
+ {
+ retval = false;
+ }
+ }
+
+ return retval;
+}
+
+// static
+void LLAgent::toggleMicrophone(const LLSD& name)
+{
+ gAgent.mMicrophoneOn = ! gAgent.mMicrophoneOn;
+
+ if ( gAgent.mMicrophoneOn )
+ {
+ LLFirstUse::speak(false);
+
+ LLVoiceClient::getInstance()->inputUserControlState(true);
+ LLVoiceClient::getInstance()->inputUserControlState(false);
+ }
+ else
+ {
+ LLVoiceClient::getInstance()->inputUserControlState(false);
+ LLVoiceClient::getInstance()->inputUserControlState(true);
+ }
+}
+
+// static
+bool LLAgent::isMicrophoneOn(const LLSD& sdname)
+{
+ return gAgent.mMicrophoneOn;
+}
+
// ************************************************************
// Enabled this definition to compile a 'hacked' viewer that
// locally believes the end user has godlike powers.
@@ -183,6 +243,7 @@ LLAgent::LLAgent() :
mbTeleportKeepsLookAt(false),
mAgentAccess(new LLAgentAccess(gSavedSettings)),
+ mCanEditParcel(false),
mTeleportSourceSLURL(new LLSLURL),
mTeleportState( TELEPORT_NONE ),
mRegionp(NULL),
@@ -231,6 +292,9 @@ LLAgent::LLAgent() :
mCurrentFidget(0),
mFirstLogin(FALSE),
mGenderChosen(FALSE),
+
+ mVoiceConnected(false),
+ mMicrophoneOn(false),
mAppearanceSerialNum(0),
@@ -246,6 +310,12 @@ LLAgent::LLAgent() :
mListener.reset(new LLAgentListener(*this));
mMoveTimer.stop();
+
+ LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback));
+
+ LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
+ LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
+ LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
}
// Requires gSavedSettings to be initialized.
@@ -3361,7 +3431,14 @@ bool LLAgent::teleportCore(bool is_local)
LLFloaterReg::hideInstance("region_info");
// minimize the Search floater (STORM-1474)
- LLFloaterReg::getInstance("search")->setMinimized(TRUE);
+ {
+ LLFloater* instance = LLFloaterReg::getInstance("search");
+
+ if (instance && instance->getVisible())
+ {
+ instance->setMinimized(TRUE);
+ }
+ }
LLViewerParcelMgr::getInstance()->deselectLand();
LLViewerMediaFocus::getInstance()->clearFocus();
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 5e23ced424..0355e68b6e 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -282,7 +282,21 @@ public:
static void toggleFlying();
static bool enableFlying();
BOOL canFly(); // Does this parcel allow you to fly?
-
+
+ //--------------------------------------------------------------------
+ // Voice
+ //--------------------------------------------------------------------
+public:
+ bool isVoiceConnected() const { return mVoiceConnected; }
+ void setVoiceConnected(const bool b) { mVoiceConnected = b; }
+
+ static void toggleMicrophone(const LLSD& name);
+ static bool isMicrophoneOn(const LLSD& sdname);
+
+private:
+ bool mVoiceConnected;
+ bool mMicrophoneOn;
+
//--------------------------------------------------------------------
// Chat
//--------------------------------------------------------------------
@@ -575,6 +589,15 @@ private:
** **
*******************************************************************************/
+ // Build
+public:
+ bool canEditParcel() const { return mCanEditParcel; }
+private:
+ bool mCanEditParcel;
+
+ static bool isActionAllowed(const LLSD& sdname);
+ static void parcelChangedCallback();
+
/********************************************************************************
** **
** ACCESS
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fa0b392f1b..5077a0a596 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -109,6 +109,7 @@
// Third party library includes
#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
#if LL_WINDOWS
@@ -2041,42 +2042,37 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
llerrs << "Invalid settings location list" << llendl;
}
- for(LLInitParam::ParamIterator<SettingsGroup>::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
{
// skip settings groups that aren't the one we requested
- if (it->name() != location_key) continue;
+ if (group.name() != location_key) continue;
- ELLPath path_index = (ELLPath)it->path_index();
+ ELLPath path_index = (ELLPath)group.path_index();
if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST)
{
llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl;
return false;
}
- LLInitParam::ParamIterator<SettingsFile>::const_iterator file_it, end_file_it;
- for (file_it = it->files.begin(), end_file_it = it->files.end();
- file_it != end_file_it;
- ++file_it)
+ BOOST_FOREACH(const SettingsFile& file, group.files)
{
- llinfos << "Attempting to load settings for the group " << file_it->name()
+ llinfos << "Attempting to load settings for the group " << file.name()
<< " - from location " << location_key << llendl;
- LLControlGroup* settings_group = LLControlGroup::getInstance(file_it->name);
+ LLControlGroup* settings_group = LLControlGroup::getInstance(file.name);
if(!settings_group)
{
- llwarns << "No matching settings group for name " << file_it->name() << llendl;
+ llwarns << "No matching settings group for name " << file.name() << llendl;
continue;
}
std::string full_settings_path;
- if (file_it->file_name_setting.isProvided()
- && gSavedSettings.controlExists(file_it->file_name_setting))
+ if (file.file_name_setting.isProvided()
+ && gSavedSettings.controlExists(file.file_name_setting))
{
// try to find filename stored in file_name_setting control
- full_settings_path = gSavedSettings.getString(file_it->file_name_setting);
+ full_settings_path = gSavedSettings.getString(file.file_name_setting);
if (full_settings_path.empty())
{
continue;
@@ -2090,16 +2086,16 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
else
{
// by default, use specified file name
- full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file_it->file_name());
+ full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file.file_name());
}
- if(settings_group->loadFromFile(full_settings_path, set_defaults, file_it->persistent))
+ if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent))
{ // success!
llinfos << "Loaded settings file " << full_settings_path << llendl;
}
else
{ // failed to load
- if(file_it->required)
+ if(file.required)
{
llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl;
return false;
@@ -2122,20 +2118,15 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
const std::string& file)
{
- for(LLInitParam::ParamIterator<SettingsGroup>::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
{
- if (it->name() == location_key)
+ if (group.name() == location_key)
{
- LLInitParam::ParamIterator<SettingsFile>::const_iterator file_it, end_file_it;
- for (file_it = it->files.begin(), end_file_it = it->files.end();
- file_it != end_file_it;
- ++file_it)
+ BOOST_FOREACH(const SettingsFile& settings_file, group.files)
{
- if (file_it->name() == file)
+ if (settings_file.name() == file)
{
- return file_it->file_name;
+ return settings_file.file_name;
}
}
}
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index b14c02a5d6..b54f622986 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -316,12 +316,13 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
// PROFILES: open in webkit window
const bool show_chrome = false;
static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
- LLFloaterWebContent::create(LLFloaterWebContent::Params().
- url(url).
- id(agent_id.asString()).
- show_chrome(show_chrome).
- window_class("profile").
- preferred_media_size(profile_rect));
+ LLFloaterWebContent::Params p;
+ p.url(url).
+ id(agent_id.asString()).
+ show_chrome(show_chrome).
+ window_class("profile").
+ preferred_media_size(profile_rect);
+ LLFloaterReg::showInstance("profile", p);
}
// static
@@ -342,6 +343,12 @@ bool LLAvatarActions::profileVisible(const LLUUID& id)
return browser && browser->isShown();
}
+//static
+LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
+{
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", LLSD().with("id", id)));
+ return browser;
+}
//static
void LLAvatarActions::hideProfile(const LLUUID& id)
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index fbfd815f41..748b7cb3d1 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -35,7 +35,7 @@
#include <vector>
class LLInventoryPanel;
-
+class LLFloater;
/**
* Friend-related actions (add, remove, offer teleport, etc)
@@ -96,6 +96,7 @@ public:
static void showProfile(const LLUUID& id);
static void hideProfile(const LLUUID& id);
static bool profileVisible(const LLUUID& id);
+ static LLFloater* getProfileFloater(const LLUUID& id);
/**
* Show avatar on world map.
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 98712f1334..af91702f9b 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -387,6 +387,9 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b
if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL)
{
bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
+
+ gAgent.setVoiceConnected(voice_status);
+
getChild<LLButton>("speak_flyout_btn")->setEnabled(voice_status);
gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(voice_status);
if (voice_status)
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 945a760d05..4c6ddc8be7 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -44,7 +44,6 @@
#include "llparticipantlist.h"
#include "llspeakers.h"
#include "lltextutil.h"
-#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
#include "llviewerdisplayname.h"
#include "llviewerwindow.h"
@@ -97,7 +96,7 @@ static void* create_non_avatar_caller(void*)
LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL;
LLCallFloater::LLCallFloater(const LLSD& key)
-: LLTransientDockableFloater(NULL, false, key)
+: LLFloater(key)
, mSpeakerManager(NULL)
, mParticipants(NULL)
, mAvatarList(NULL)
@@ -113,10 +112,6 @@ LLCallFloater::LLCallFloater(const LLSD& key)
mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
LLVoiceClient::instance().addObserver(this);
- LLTransientFloaterMgr::getInstance()->addControlView(this);
-
- // force docked state since this floater doesn't save it between recreations
- setDocked(true);
// update the agent's name if display name setting change
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this));
@@ -139,13 +134,11 @@ LLCallFloater::~LLCallFloater()
{
LLVoiceClient::getInstance()->removeObserver(this);
}
- LLTransientFloaterMgr::getInstance()->removeControlView(this);
}
// virtual
BOOL LLCallFloater::postBuild()
{
- LLTransientDockableFloater::postBuild();
mAvatarList = getChild<LLAvatarList>("speakers_list");
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this));
@@ -154,12 +147,6 @@ BOOL LLCallFloater::postBuild()
mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller");
mNonAvatarCaller->setVisible(FALSE);
- LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn");
-
- setDockControl(new LLDockControl(
- anchor_panel, this,
- getDockTongue(), LLDockControl::TOP));
-
initAgentData();
connectToChannel(LLVoiceChannel::getCurrentVoiceChannel());
@@ -204,13 +191,13 @@ void LLCallFloater::draw()
if (mParticipants)
mParticipants->updateRecentSpeakersOrder();
- LLTransientDockableFloater::draw();
+ LLFloater::draw();
}
// virtual
void LLCallFloater::setFocus( BOOL b )
{
- LLTransientDockableFloater::setFocus(b);
+ LLFloater::setFocus(b);
// Force using active floater transparency (STORM-730).
// We have to override setFocus() for LLCallFloater because selecting an item
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 00a3f76e56..ea78cd53b7 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -52,7 +52,7 @@ class LLSpeakersDelayActionsStorage;
* When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel
* also provides a 'Leave Call' button to allow the Resident to leave that voice channel.
*/
-class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver
+class LLCallFloater : public LLFloater, LLVoiceClientParticipantObserver
{
public:
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
new file mode 100644
index 0000000000..bdc5b581a9
--- /dev/null
+++ b/indra/newview/llfloateravatar.cpp
@@ -0,0 +1,54 @@
+/**
+ * @file llfloateravatar.h
+ * @author Leyla Farazha
+ * @brief floater for the avatar changer
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, 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$
+ */
+
+/**
+ * Floater that appears when buying an object, giving a preview
+ * of its contents and their permissions.
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloateravatar.h"
+#include "lluictrlfactory.h"
+
+
+LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
+ : LLFloater(key)
+{
+}
+
+LLFloaterAvatar::~LLFloaterAvatar()
+{
+}
+
+BOOL LLFloaterAvatar::postBuild()
+{
+ enableResizeCtrls(true, true, false);
+ return TRUE;
+}
+
+
diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h
new file mode 100644
index 0000000000..cadc5e4028
--- /dev/null
+++ b/indra/newview/llfloateravatar.h
@@ -0,0 +1,43 @@
+/**
+ * @file llfloateravatar.h
+ * @author Leyla Farazha
+ * @brief floater for the avatar changer
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, 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 LL_FLOATER_AVATAR_H
+#define LL_FLOATER_AVATAR_H
+
+#include "llfloater.h"
+
+class LLFloaterAvatar:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+private:
+ LLFloaterAvatar(const LLSD& key);
+ /*virtual*/ ~LLFloaterAvatar();
+ /*virtual*/ BOOL postBuild();
+};
+
+#endif
diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp
index 52d1f67c36..af21cb593f 100644
--- a/indra/newview/llfloaterdestinations.cpp
+++ b/indra/newview/llfloaterdestinations.cpp
@@ -47,6 +47,7 @@ LLFloaterDestinations::~LLFloaterDestinations()
BOOL LLFloaterDestinations::postBuild()
{
+ enableResizeCtrls(true, true, false);
return TRUE;
}
diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp
index 3012638d44..fd9c37ae73 100644
--- a/indra/newview/llfloaterhelpbrowser.cpp
+++ b/indra/newview/llfloaterhelpbrowser.cpp
@@ -39,6 +39,7 @@
#include "llurlhistory.h"
#include "llmediactrl.h"
#include "llviewermedia.h"
+#include "llviewerhelp.h"
LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key)
@@ -74,6 +75,17 @@ void LLFloaterHelpBrowser::buildURLHistory()
void LLFloaterHelpBrowser::onOpen(const LLSD& key)
{
gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+
+ std::string topic = key.asString();
+
+ if (topic == "__local")
+ {
+ mBrowser->navigateToLocalPage( "help-offline" , "index.html" );
+ }
+ else
+ {
+ mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic));
+ }
}
//virtual
@@ -148,8 +160,3 @@ void LLFloaterHelpBrowser::openMedia(const std::string& media_url)
mBrowser->navigateTo(media_url, "text/html");
setCurrentURL(media_url);
}
-
-void LLFloaterHelpBrowser::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
-{
- mBrowser->navigateToLocalPage(subdir, filename_in);
-}
diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h
index afe0f4df69..80b0ecc06b 100644
--- a/indra/newview/llfloaterhelpbrowser.h
+++ b/indra/newview/llfloaterhelpbrowser.h
@@ -48,8 +48,6 @@ class LLFloaterHelpBrowser :
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
void openMedia(const std::string& media_url);
-
- void navigateToLocalPage( const std::string& subdir, const std::string& filename_in );
private:
void buildURLHistory();
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index 58bb417b71..fa60022911 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -62,9 +62,9 @@ BOOL LLFloaterToybox::postBuild()
mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults");
mToolBar = getChild<LLToolBar>("toybox_toolbar");
- mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3));
- mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4));
- mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4));
+ mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
LLCommandManager& cmdMgr = LLCommandManager::instance();
@@ -120,5 +120,16 @@ void LLFloaterToybox::onBtnRestoreDefaults()
LLToolBarView::loadDefaultToolbars();
}
+BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ S32 local_x = x - mToolBar->getRect().mLeft;
+ S32 local_y = y - mToolBar->getRect().mBottom;
+ return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+}
+
// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index f7245506c5..f0a6cf1a8b 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -43,6 +43,11 @@ public:
// virtuals
BOOL postBuild();
void draw();
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
protected:
void onBtnRestoreDefaults();
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 2c9a736aff..c76aeb0498 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -88,20 +88,6 @@ BOOL LLFloaterWebContent::postBuild()
return TRUE;
}
-bool LLFloaterWebContent::matchesKey(const LLSD& key)
-{
- LLUUID id = key["id"];
- if (id.notNull())
- {
- return id == mKey["id"].asUUID();
- }
- else
- {
- return key["target"].asString() == mKey["target"].asString();
- }
-}
-
-
void LLFloaterWebContent::initializeURLHistory()
{
// start with an empty list
@@ -123,6 +109,20 @@ void LLFloaterWebContent::initializeURLHistory()
}
}
+bool LLFloaterWebContent::matchesKey(const LLSD& key)
+{
+ Params p(mKey);
+ Params other_p(key);
+ if (!other_p.target().empty() && other_p.target() != "_blank")
+ {
+ return other_p.target() == p.target();
+ }
+ else
+ {
+ return other_p.id() == p.id();
+ }
+}
+
//static
LLFloater* LLFloaterWebContent::create( Params p)
{
@@ -139,14 +139,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
}
S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
-
- LLSD sd;
- sd["target"] = p.target;
- if(LLFloaterReg::findInstance(p.window_class, sd) != NULL)
- {
- // There's already a web browser for this tag, so we won't be opening a new window.
- }
- else if(browser_window_limit != 0)
+ if(browser_window_limit != 0)
{
// showInstance will open a new window. Figure out how many web browsers are already open,
// and close the least recently opened one if this will put us over the limit.
@@ -166,7 +159,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
}
}
- return LLFloaterReg::showInstance(p.window_class, p);
+ return new LLFloaterWebContent(p);
}
//static
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 0bdeb114f5..1f1e49726d 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -1122,16 +1122,7 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response)
lldebugs << "No gFloaterView for onPopuup()" << llendl;
};
- // (for now) open web content floater if that's our parent, otherwise, open the current media floater
- // (this will change soon)
- if ( floater_name == "web_content" )
- {
- LLWeb::loadWebURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
- }
- else
- {
- LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
- }
+ LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
}
else
{
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index cba4fafe42..caa20b767c 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -452,6 +452,8 @@ BOOL LLNearbyChatBar::postBuild()
mExpandedHeight = getMinHeight() + EXPANDED_HEIGHT;
+ enableResizeCtrls(true, true, false);
+
return TRUE;
}
@@ -462,6 +464,7 @@ void LLNearbyChatBar::applyRectControl()
{
getChildView("nearby_chat")->setVisible(true);
mExpandedHeight = getRect().getHeight();
+ enableResizeCtrls(true);
}
}
@@ -707,13 +710,13 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
mExpandedHeight = getRect().getHeight();
nearby_chat->setVisible(FALSE);
reshape(getRect().getWidth(), getMinHeight());
- mResizeHandle[0]->setMaxHeight(getMinHeight());
+ enableResizeCtrls(true, true, false);
}
else
{
nearby_chat->setVisible(TRUE);
reshape(getRect().getWidth(), mExpandedHeight);
- mResizeHandle[0]->setMaxHeight(S32_MAX);
+ enableResizeCtrls(true);
}
}
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index fd5c3362bb..27390fca78 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -72,7 +72,7 @@ public:
std::string agent_name = params[0];
llinfos << "Profile, agent_name " << agent_name << llendl;
std::string url = getProfileURL(agent_name);
- LLWeb::loadWebURLInternal(url);
+ LLWeb::loadURLInternal(url);
return true;
}
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 95ed603bbf..7977faeab7 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -41,7 +41,11 @@
LLToolBarView* gToolBarView = NULL;
static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
-bool LLToolBarView::sDragStarted = false;
+
+bool isToolDragged()
+{
+ return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER);
+}
LLToolBarView::Toolbar::Toolbar()
: button_display_mode("button_display_mode"),
@@ -80,17 +84,17 @@ BOOL LLToolBarView::postBuild()
mToolbarRight = getChild<LLToolBar>("toolbar_right");
mToolbarBottom = getChild<LLToolBar>("toolbar_bottom");
- mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3));
- mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4));
- mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4));
+ mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3));
- mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4));
- mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4));
+ mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3));
- mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4));
- mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4));
+ mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
return TRUE;
}
@@ -147,7 +151,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLXMLNodePtr root;
if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
- llerrs << "Unable to load toolbars from file: " << toolbar_file << llendl;
+ llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
return false;
}
if(!root->hasName("toolbars"))
@@ -306,41 +310,45 @@ void LLToolBarView::draw()
mToolbarRight->localRectToOtherView(mToolbarRight->getLocalRect(), &right_rect, this);
}
- // Debug draw
- LLColor4 back_color = LLColor4::blue;
- LLColor4 back_color_vert = LLColor4::red;
- LLColor4 back_color_hori = LLColor4::yellow;
- back_color[VALPHA] = 0.5f;
- back_color_hori[VALPHA] = 0.5f;
- back_color_vert[VALPHA] = 0.5f;
- //gl_rect_2d(getLocalRect(), back_color, TRUE);
- //gl_rect_2d(bottom_rect, back_color_hori, TRUE);
- //gl_rect_2d(left_rect, back_color_vert, TRUE);
- //gl_rect_2d(right_rect, back_color_vert, TRUE);
+ // Draw drop zones if drop of a tool is active
+ if (isToolDragged())
+ {
+ LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
+ gl_rect_2d(bottom_rect, drop_color, TRUE);
+ gl_rect_2d(left_rect, drop_color, TRUE);
+ gl_rect_2d(right_rect, drop_color, TRUE);
+ }
LLUICtrl::draw();
}
// ----------------------------------------
-// Drag and Drop hacks (under construction)
+// Drag and Drop Handling
// ----------------------------------------
-void LLToolBarView::startDragItem( S32 x, S32 y, const LLUUID& uuid)
+void LLToolBarView::startDragTool( S32 x, S32 y, const LLUUID& uuid)
{
- //llinfos << "Merov debug: startDragItem() : x = " << x << ", y = " << y << llendl;
+ llinfos << "Merov debug: startDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl;
+ // Flag the tool dragging but don't start it yet
+ gToolBarView->mDragStarted = false;
+ gToolBarView->mDragCommand = LLCommandId::null;
+ gToolBarView->mDragRank = LLToolBar::RANK_NONE;
+ gToolBarView->mDragToolbar = NULL;
LLToolDragAndDrop::getInstance()->setDragStart( x, y );
- sDragStarted = false;
}
-BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)
+BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)
{
-// llinfos << "Merov debug: handleDragItem() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl;
if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y ))
{
- if (!sDragStarted)
+ if (!gToolBarView->mDragStarted)
{
+ llinfos << "Merov debug: handleDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl;
+ // Start the tool dragging:
+
+ // First, create the global drag and drop object
std::vector<EDragAndDropType> types;
uuid_vec_t cargo_ids;
types.push_back(DAD_WIDGET);
@@ -348,9 +356,35 @@ BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET);
LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER;
LLUUID srcID;
- //llinfos << "Merov debug: handleDragItem() : beginMultiDrag()" << llendl;
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID);
- sDragStarted = true;
+ llinfos << "Merov debug: beginMultiDrag() launched" << llendl;
+
+ // Second, check if the command is present in one of the 3 toolbars
+ // If it is, store the command, the toolbar and the rank in the toolbar and
+ // set a callback on end drag so that we reinsert the command if no drop happened
+ /*
+ gToolBarView->mDragCommand = LLCommandId(uuid);
+ if ((gToolBarView->mDragRank = gToolBarView->mToolbarLeft->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE)
+ {
+ gToolBarView->mDragToolbar = gToolBarView->mToolbarLeft;
+ }
+ else if ((gToolBarView->mDragRank = gToolBarView->mToolbarRight->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE)
+ {
+ gToolBarView->mDragToolbar = gToolBarView->mToolbarRight;
+ }
+ else if ((gToolBarView->mDragRank = gToolBarView->mToolbarBottom->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE)
+ {
+ gToolBarView->mDragToolbar = gToolBarView->mToolbarBottom;
+ }
+ if (gToolBarView->mDragRank != LLToolBar::RANK_NONE)
+ {
+ llinfos << "Merov debug: rank of dragged tool = " << gToolBarView->mDragRank << llendl;
+ LLToolDragAndDrop::getInstance()->setEndDragCallback(boost::bind(&LLToolBarView::onEndDrag, gToolBarView));
+ }
+ */
+
+ llinfos << "Merov debug: Drag started cleanly" << llendl;
+ gToolBarView->mDragStarted = true;
return TRUE;
}
else
@@ -362,15 +396,15 @@ BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
return FALSE;
}
-BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
+BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
{
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
- //llinfos << "Merov debug : handleDrop. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << llendl;
-
+ //llinfos << "Merov debug : handleDropTool. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << llendl;
+
LLAssetType::EType type = inv_item->getType();
if (type == LLAssetType::AT_WIDGET)
{
- //llinfos << "Merov debug : handleDrop. Drop source is a widget -> drop it in place..." << llendl;
+ //llinfos << "Merov debug : handleDropTool. Drop source is a widget -> drop it in place..." << llendl;
// Get the command from its uuid
LLCommandManager& mgr = LLCommandManager::instance();
LLCommandId command_id(inv_item->getUUID());
@@ -385,9 +419,10 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb
}
// Suppress the command from the toolbars (including the one it's dropped in,
// this will handle move position).
- gToolBarView->mToolbarLeft->removeCommand(command->id());
- gToolBarView->mToolbarRight->removeCommand(command->id());
- gToolBarView->mToolbarBottom->removeCommand(command->id());
+ llinfos << "Merov debug : handleDropTool, " << command_id.name() << ", " << command_id.uuid() << llendl;
+ gToolBarView->mToolbarLeft->removeCommand(command_id);
+ gToolBarView->mToolbarRight->removeCommand(command_id);
+ gToolBarView->mToolbarBottom->removeCommand(command_id);
// Now insert it in the toolbar at the detected rank
if (!toolbar->isReadOnly())
{
@@ -399,8 +434,25 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb
llwarns << "Command couldn't be found in command manager" << llendl;
}
}
-
+ stopDragTool();
return TRUE;
}
+void LLToolBarView::stopDragTool()
+{
+ // Clear the saved command, toolbar and rank
+ gToolBarView->mDragStarted = false;
+ gToolBarView->mDragCommand = LLCommandId::null;
+ gToolBarView->mDragRank = LLToolBar::RANK_NONE;
+ gToolBarView->mDragToolbar = NULL;
+}
+void LLToolBarView::onEndDrag()
+{
+ // If there's a saved command, reinsert it in the saved toolbar
+ if (gToolBarView->mDragRank != LLToolBar::RANK_NONE)
+ {
+ gToolBarView->mDragToolbar->addCommand(gToolBarView->mDragCommand,gToolBarView->mDragRank);
+ }
+ stopDragTool();
+}
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 414fcd8751..6623e63f8a 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -74,9 +74,11 @@ public:
static bool loadDefaultToolbars();
- static void startDragItem( S32 x, S32 y, const LLUUID& uuid);
- static BOOL handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
- static BOOL handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
+ static void startDragTool( S32 x, S32 y, const LLUUID& uuid);
+ static BOOL handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
+ static BOOL handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
+ static void stopDragTool();
+ void onEndDrag();
protected:
friend class LLUICtrlFactory;
@@ -93,12 +95,11 @@ private:
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
LLToolBar* mToolbarBottom;
- bool mDragging;
- LLToolBarButton* mDragButton;
- S32 mMouseX;
- S32 mMouseY;
- static bool sDragStarted;
+ LLCommandId mDragCommand;
+ int mDragRank;
+ LLToolBar* mDragToolbar;
+ bool mDragStarted;
};
extern LLToolBarView* gToolBarView;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index b0daf9f3c2..3463eec5d8 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -37,6 +37,7 @@
#include "llfloaterabout.h"
#include "llfloateranimpreview.h"
#include "llfloaterauction.h"
+#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
#include "llfloateravatartextures.h"
#include "llfloaterbeacons.h"
@@ -168,7 +169,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
- LLFloaterReg::add("avatar", "floater_avatar.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
@@ -287,7 +288,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
- LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>);
+ LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterUIPreviewUtil::registerFloater();
@@ -300,7 +301,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>);
- LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>);
+ LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
LLFloaterWindowSizeUtil::registerFloater();
LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 3a3d4f3881..d1120b6269 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -69,15 +69,12 @@ LLHelpHandler gHelpHandler;
//////////////////////////////
// implement LLHelp interface
-void LLViewerHelp::showTopic(const std::string &topic)
+std::string LLViewerHelp::getURL(const std::string &topic)
{
// allow overriding the help server with a local help file
if( gSavedSettings.getBOOL("HelpUseLocal") )
{
- showHelp();
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- helpbrowser->navigateToLocalPage( "help-offline" , "index.html" );
- return;
+ return "__local";
}
// if the help topic is empty, use the default topic
@@ -99,11 +96,12 @@ void LLViewerHelp::showTopic(const std::string &topic)
}
}
- // work out the URL for this topic and display it
- showHelp();
-
- std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic );
- setRawURL(helpURL);
+ return LLViewerHelpUtil::buildHelpURL( help_topic );
+}
+
+void LLViewerHelp::showTopic(const std::string& topic)
+{
+ LLFloaterReg::showInstance("help_browser", topic);
}
std::string LLViewerHelp::defaultTopic()
@@ -146,23 +144,4 @@ std::string LLViewerHelp::getTopicFromFocus()
return defaultTopic();
}
-// static
-void LLViewerHelp::showHelp()
-{
- LLFloaterReg::showInstance("help_browser");
-}
-
-// static
-void LLViewerHelp::setRawURL(std::string url)
-{
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- if (helpbrowser)
- {
- helpbrowser->openMedia(url);
- }
- else
- {
- llwarns << "Eep, help_browser floater not found" << llendl;
- }
-}
diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h
index 7612986227..a983012e2e 100644
--- a/indra/newview/llviewerhelp.h
+++ b/indra/newview/llviewerhelp.h
@@ -45,6 +45,8 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
/// display the specified help topic in the help viewer
/*virtual*/ void showTopic(const std::string &topic);
+ std::string getURL(const std::string& topic);
+
// return topic derived from viewer UI focus, else default topic
std::string getTopicFromFocus();
@@ -56,10 +58,6 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
// return topic to use for the top-level help, invoked by F1
/*virtual*/ std::string f1HelpTopic();
-
- private:
- static void showHelp(); // make sure help UI is visible & raised
- static void setRawURL(std::string url); // send URL to help UI
};
#endif // header guard
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 13dbc5e386..41b4dc01e8 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1488,7 +1488,8 @@ void LLViewerMedia::setOpenIDCookie()
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
- doOnetimeEarlyHTTPRequests();
+ // FUI: No longer perform the user_status query
+ //doOnetimeEarlyHTTPRequests();
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index fbfde711a9..bc0f38dd77 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5370,6 +5370,34 @@ class LLAvatarAddFriend : public view_listener_t
}
};
+
+class LLAvatarToggleMyProfile : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID());
+ if (LLFloater::isMinimized(instance))
+ {
+ instance->setMinimized(FALSE);
+ instance->setFocus(TRUE);
+ }
+ else if (!LLFloater::isShown(instance))
+ {
+ LLAvatarActions::showProfile(gAgent.getID());
+ }
+ else if (!instance->hasFocus() && !instance->getIsChrome())
+ {
+ instance->setFocus(TRUE);
+ }
+ else
+ {
+ instance->closeFloater();
+ }
+ return true;
+ }
+};
+
+
class LLAvatarAddContact : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -7229,7 +7257,7 @@ void handle_web_browser_test(const LLSD& param)
void handle_web_content_test(const LLSD& param)
{
std::string url = param.asString();
- LLWeb::loadWebURLInternal(url);
+ LLWeb::loadURLInternal(url);
}
void handle_buy_currency_test(void*)
@@ -8165,6 +8193,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
+ view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
+ enable.add("Avatar.IsMyProfileOpen", boost::bind(&LLAvatarActions::profileVisible, gAgent.getID()));
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2));
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 6f7115ff6d..7bc5453688 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -125,7 +125,9 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c
// Explicitly open a Web URL using the Web content floater
void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
{
- LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(uuid));
+ LLFloaterWebContent::Params p;
+ p.url(url).target(target).id(uuid);
+ LLFloaterReg::showInstance("web_content", p);
}
// static
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index dc5958e57f..376abc0ece 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -46,21 +46,19 @@ public:
static void loadURL(const std::string& url, const std::string& target, const std::string& uuid = LLStringUtil::null);
static void loadURL(const std::string& url) { loadURL(url, LLStringUtil::null); }
/// Load the given url in the user's preferred web browser
- static void loadURL(const char* url, const std::string& target) { loadURL( ll_safe_string(url), target); }
- static void loadURL(const char* url) { loadURL( ll_safe_string(url), LLStringUtil::null ); }
+ static void loadURL(const char* url, const std::string& target = LLStringUtil::null) { loadURL( ll_safe_string(url), target); }
/// Load the given url in the Second Life internal web browser
static void loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
- static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null); }
+ static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null, LLStringUtil::null);}
/// Load the given url in the operating system's web browser, async if we want to return immediately
/// before browser has spawned
- static void loadURLExternal(const std::string& url) { loadURLExternal(url, LLStringUtil::null); };
+ static void loadURLExternal(const std::string& url) {loadURLExternal(url, LLStringUtil::null);}
static void loadURLExternal(const std::string& url, const std::string& uuid);
static void loadURLExternal(const std::string& url, bool async, const std::string& uuid = LLStringUtil::null);
// Explicitly open a Web URL using the Web content floater vs. the more general media browser
static void loadWebURL(const std::string& url, const std::string& target, const std::string& uuid);
- static void loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid);
- static void loadWebURLInternal(const std::string &url) { loadWebURLInternal(url, LLStringUtil::null, LLStringUtil::null); }
+ static void loadWebURLInternal(const std::string &url, const std::string& target = LLStringUtil::null, const std::string& uuid = LLStringUtil::null);
/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
static std::string escapeURL(const std::string& url);
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index b5cc949ebf..8baaa14595 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -795,6 +795,10 @@
<color
name="DirectChatColor"
reference="LtOrange" />
+
+ <color
+ name="ToolbarDropZoneColor"
+ value=".48 .69 1 .5" />
<!-- Generic color names (legacy) -->
<color
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index a98ef58f50..27577d42ea 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -125,29 +125,33 @@ with the same filename but different name
<texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" />
<texture name="Check_Mark" file_name="icons/check_mark" preload="true" />
- <texture name="Command_AboutLand_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Appearance_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Avatar_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Build_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Chat_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Compass_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Destinations_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Gestures_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_HowTo_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Inventory_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Map_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Marketplace_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_MiniMap_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Move_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_People_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Places_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Preferences_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Profile_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Search_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Snapshot_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Speak_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_View_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
- <texture name="Command_Voice_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
+ <texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" />
+ <texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" />
+ <texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" />
+ <texture name="Command_Build_Icon" file_name="toolbar_icons/build.png" preload="true" />
+ <texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" />
+ <texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" />
+ <texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" />
+ <texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" />
+ <texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" />
+ <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" />
+ <texture name="Command_Map_Icon" file_name="toolbar_icons/map.png" preload="true" />
+ <texture name="Command_Marketplace_Icon" file_name="toolbar_icons/marketplace.png" preload="true" />
+ <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" />
+ <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" />
+ <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" />
+ <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" />
+ <texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" />
+ <texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" />
+ <texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" />
+ <texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" />
+ <texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" />
+ <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" />
+ <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" />
+ <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" />
+ <texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" />
+ <texture name="Caret_Right_Icon" file_name="toolbar_icons/caret_right.png" preload="true" />
+ <texture name="Caret_Left_Icon" file_name="toolbar_icons/caret_left.png" preload="true" />
<texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
diff --git a/indra/newview/skins/default/textures/toolbar_icons/appearance.png b/indra/newview/skins/default/textures/toolbar_icons/appearance.png
new file mode 100644
index 0000000000..e6b1365388
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/appearance.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/avatars.png b/indra/newview/skins/default/textures/toolbar_icons/avatars.png
new file mode 100644
index 0000000000..8fa0600cee
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/avatars.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/build.png b/indra/newview/skins/default/textures/toolbar_icons/build.png
new file mode 100644
index 0000000000..e21ab3f0e4
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/build.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png
new file mode 100644
index 0000000000..82f58b22b9
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_left.png b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png
new file mode 100644
index 0000000000..75eecc84ed
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_right.png b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png
new file mode 100644
index 0000000000..677459ae1c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/chat.png b/indra/newview/skins/default/textures/toolbar_icons/chat.png
new file mode 100644
index 0000000000..e0dbac495f
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/chat.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/destinations.png b/indra/newview/skins/default/textures/toolbar_icons/destinations.png
new file mode 100644
index 0000000000..e2325f083a
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/destinations.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/gestures.png b/indra/newview/skins/default/textures/toolbar_icons/gestures.png
new file mode 100644
index 0000000000..2404bb4e25
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/gestures.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/howto.png b/indra/newview/skins/default/textures/toolbar_icons/howto.png
new file mode 100644
index 0000000000..8594d71113
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/howto.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/inventory.png b/indra/newview/skins/default/textures/toolbar_icons/inventory.png
new file mode 100644
index 0000000000..ab3191255e
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/inventory.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/land.png b/indra/newview/skins/default/textures/toolbar_icons/land.png
new file mode 100644
index 0000000000..89ea7604a4
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/land.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/map.png b/indra/newview/skins/default/textures/toolbar_icons/map.png
new file mode 100644
index 0000000000..ed1049b7db
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/map.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/marketplace.png b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png
new file mode 100644
index 0000000000..62bad20be6
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_map.png b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png
new file mode 100644
index 0000000000..b66af223bb
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/move.png b/indra/newview/skins/default/textures/toolbar_icons/move.png
new file mode 100644
index 0000000000..5854110782
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/move.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png
new file mode 100644
index 0000000000..5bdcb22aa5
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/people.png b/indra/newview/skins/default/textures/toolbar_icons/people.png
new file mode 100644
index 0000000000..7228ae8e2f
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/people.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/picks.png b/indra/newview/skins/default/textures/toolbar_icons/picks.png
new file mode 100644
index 0000000000..befda04b42
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/picks.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/places.png b/indra/newview/skins/default/textures/toolbar_icons/places.png
new file mode 100644
index 0000000000..97d9fa066c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/places.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/preferences.png b/indra/newview/skins/default/textures/toolbar_icons/preferences.png
new file mode 100644
index 0000000000..df80d926b5
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/preferences.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/profile.png b/indra/newview/skins/default/textures/toolbar_icons/profile.png
new file mode 100644
index 0000000000..32fe2bf8ac
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/profile.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/search.png b/indra/newview/skins/default/textures/toolbar_icons/search.png
new file mode 100644
index 0000000000..bcb11e950d
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/search.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/snapshot.png b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png
new file mode 100644
index 0000000000..d26da9b1d2
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/speak.png b/indra/newview/skins/default/textures/toolbar_icons/speak.png
new file mode 100644
index 0000000000..10cd354c5c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/speak.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/view.png b/indra/newview/skins/default/textures/toolbar_icons/view.png
new file mode 100644
index 0000000000..5425af87e0
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/view.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index a0c1f4c021..666aa2d164 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -3,11 +3,9 @@
legacy_header_height="225"
can_minimize="true"
can_close="true"
- user_resize="true"
can_resize="true"
min_height="230"
- min_width="455"
- max_height="230"
+ min_width="445"
height="230"
layout="topleft"
name="Avatar"
@@ -19,7 +17,7 @@
<web_browser
top="25"
height="200"
- width="435"
+ width="445"
follows="all"
name="avatar_picker_contents"
trusted_content="true"/>
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 9dd9338f37..669b7eb15a 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -7,7 +7,6 @@
can_resize="true"
min_height="230"
min_width="525"
- max_height="230"
height="230"
layout="topleft"
name="Destinations"
@@ -15,11 +14,11 @@
help_topic="destinations"
save_rect="true"
title="Destinations"
- width="445">
+ width="525">
<web_browser
top="25"
height="200"
- width="435"
+ width="525"
follows="all"
name="destination_guide_contents"
start_url="http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/guide.html"
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index 653788bd3c..90b7e906a5 100644
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -74,6 +74,7 @@
image_color="ButtonImageColor"
image_color_disabled="ButtonImageColor"
flash_color="ButtonUnselectedFgColor"
+ halign="left"
hover_glow_amount="0.15"
display_pressed_state="false" />
</toolbar>
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index cf566d7d23..96d070ae50 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -74,13 +74,6 @@
user_resize="false"
name="hud container"
width="500">
- <view top="0"
- follows="all"
- height="500"
- left="0"
- mouse_opaque="false"
- name="floater_snap_region"
- width="500"/>
<panel follows="left|top"
height="19"
left="0"
@@ -90,15 +83,6 @@
top="0"
visible="false"
width="1024"/>
- <panel bottom="500"
- follows="left|right|bottom"
- height="25"
- left="0"
- mouse_opaque="false"
- tab_stop="false"
- name="stand_stop_flying_container"
- visible="false"
- width="500"/>
</layout_panel>
<!--<layout_panel auto_resize="false"
min_height="33"
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index 44da813f61..5d6967ed32 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -41,18 +41,47 @@
<toolbar follows="left|top|bottom"
button_panel.bg_opaque_image="Rounded_Rect_Right"
name="toolbar_left"
- height="500"
width="30"
left="0"
- top="0"
+ top="10"
+ bottom="-10"
side="left"
button_display_mode="icons_only">
+ <icon layout="topleft"
+ height="7"
+ width="5"
+ follows="left|top"
+ top="20"
+ left="10"
+ tab_stop="false"
+ visible="false"
+ image_name="Caret_Left_Icon"
+ name="caret" />
</toolbar>
</layout_panel>
<layout_panel name="non_toolbar_panel"
auto_resize="true"
user_resize="false"
- mouse_opaque="false"/>
+ mouse_opaque="false"
+ height="100"
+ width="100">
+ <view top="0"
+ follows="all"
+ height="100"
+ left="0"
+ mouse_opaque="false"
+ name="floater_snap_region"
+ width="100"/>
+ <panel bottom="100"
+ follows="left|right|bottom"
+ height="25"
+ left="0"
+ mouse_opaque="false"
+ tab_stop="false"
+ name="stand_stop_flying_container"
+ visible="false"
+ width="100"/>
+ </layout_panel>
<layout_panel name="right_toolbar_panel"
auto_resize="false"
user_resize="false"
@@ -63,12 +92,22 @@
button_panel.bg_opaque_image="Rounded_Rect_Left"
follows="right|top|bottom"
name="toolbar_right"
- height="500"
width="30"
left="0"
- top="0"
+ top="10"
+ bottom="-10"
side="right"
button_display_mode="icons_only">
+ <icon layout="topleft"
+ height="7"
+ width="5"
+ follows="left|top"
+ top="20"
+ left="10"
+ tab_stop="false"
+ visible="false"
+ image_name="Caret_Right_Icon"
+ name="caret" />
</toolbar>
</layout_panel>
</layout_stack>
@@ -83,13 +122,23 @@
button_panel.bg_opaque_image="Rounded_Rect_Top"
name="toolbar_bottom"
height="30"
- width="1024"
- left="0"
+ left="40"
+ right="-40"
top="0"
side="bottom"
follows="left|right|bottom"
button_display_mode="icons_with_text"
visible="true">
+ <icon layout="topleft"
+ height="5"
+ width="7"
+ follows="left|top"
+ top="20"
+ left="10"
+ tab_stop="false"
+ visible="false"
+ image_name="Caret_Bottom_Icon"
+ name="caret" />
</toolbar>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index be1ed234fc..f19cfa19f2 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3670,6 +3670,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Label">Mini-map</string>
<string name="Command_Move_Label">Move</string>
<string name="Command_People_Label">People</string>
+ <string name="Command_Picks_Label">Picks</string>
<string name="Command_Places_Label">Places</string>
<string name="Command_Preferences_Label">Preferences</string>
<string name="Command_Profile_Label">Profile</string>
@@ -3694,6 +3695,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Tooltip">Show nearby people</string>
<string name="Command_Move_Tooltip">Moving your avatar</string>
<string name="Command_People_Tooltip">Friends, groups, and nearby people</string>
+ <string name="Command_Picks_Tooltip">Favorite places</string>
<string name="Command_Places_Tooltip">Places you've saved</string>
<string name="Command_Preferences_Tooltip">Preferences</string>
<string name="Command_Profile_Tooltip">Edit or view your profile</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 613dc66762..be5dfaf18c 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -4,6 +4,7 @@
pad_top="1"
pad_bottom="1"
pad_between="1"
+ min_girth="24"
mouse_opaque="false"
read_only="false">
<button_panel name="button_panel"
@@ -13,6 +14,7 @@
background_opaque="true"/>
<button_icon_and_text imgoverlay_label_space="7"
label_color_selected="White"
+ halign="left"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
@@ -29,14 +31,17 @@
flash_color="EmphasisColor"/>
<button_icon pad_left="10"
pad_right="10"
+ image_bottom_pad="10"
+ image_top_pad="10"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
- desired_height="35"
- button_width.min="35"
- button_width.max="35"
+ desired_height="38"
+ button_width.min="38"
+ button_width.max="38"
follows="left|top"
label=""
+ halign="left"
chrome="true"
use_ellipses="true"
auto_resize="true"