summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-10-07 12:22:00 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-10-07 12:22:00 -0700
commit1965e32238927ee675253af412223d36fe19d803 (patch)
tree61ff961ca846dc2d8d698725481db5c019e67d01 /indra
parent3ba9bd536b036fda89d467729870cfac0c5727b8 (diff)
parentca2f043ffeb0b6f7c0a5ea171411c45f6dcc0bf4 (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llcommandmanager.cpp2
-rw-r--r--indra/llui/llfloater.cpp4
-rw-r--r--indra/llui/lltoolbar.cpp25
-rw-r--r--indra/llui/lltoolbar.h1
-rw-r--r--indra/newview/app_settings/commands.xml4
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/lltooldraganddrop.cpp26
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewerwindow.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml26
-rw-r--r--indra/newview/skins/default/xui/en/floater_destinations.xml2
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml26
13 files changed, 98 insertions, 36 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 9ce7533e1b..1b87f20d12 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -152,7 +152,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/llfloater.cpp b/indra/llui/llfloater.cpp
index c28bcc2ec9..cc49238a0b 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -840,9 +840,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()));
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 63a1706fe4..1f5fa5f361 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -177,6 +177,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
center_panel_p.rect = getLocalRect();
center_panel_p.auto_resize = false;
center_panel_p.user_resize = false;
+ center_panel_p.mouse_opaque = false;
LLLayoutPanel* center_panel = LLUICtrlFactory::create<LLLayoutPanel>(center_panel_p);
mCenteringStack->addChild(center_panel);
@@ -557,7 +558,13 @@ void LLToolBar::draw()
{
if (mButtons.empty())
{
- return;
+ mButtonPanel->setVisible(FALSE);
+ mButtonPanel->setMouseOpaque(FALSE);
+ }
+ else
+ {
+ mButtonPanel->setVisible(TRUE);
+ mButtonPanel->setMouseOpaque(TRUE);
}
// Update enable/disable state and highlight state for editable toolbars
@@ -716,7 +723,10 @@ LLToolBarButton::LLToolBarButton(const Params& p)
mId(""),
mIsEnabledSignal(NULL),
mIsRunningSignal(NULL),
- mIsStartingSignal(NULL)
+ mIsStartingSignal(NULL),
+ mIsDragged(false),
+ mStartDragItemCallback(NULL),
+ mHandleDragItemCallback(NULL)
{
mButtonFlashRate = 0.0;
mButtonFlashCount = 0;
@@ -741,7 +751,11 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
// llinfos << "Merov debug: handleHover, x = " << x << ", y = " << y << ", mouse = " << hasMouseCapture() << llendl;
BOOL handled = FALSE;
- if (hasMouseCapture() && mStartDragItemCallback && mHandleDragItemCallback)
+ S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
+ S32 drag_threshold = LLUI::sSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
+ if (mouse_distance_squared > drag_threshold * drag_threshold
+ && hasMouseCapture() &&
+ mStartDragItemCallback && mHandleDragItemCallback)
{
if (!mIsDragged)
{
@@ -768,3 +782,8 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask)
// Always highlight toolbar buttons, even if they are disabled
mNeedsHighlight = TRUE;
}
+
+void LLToolBarButton::onMouseCaptureLost()
+{
+ mIsDragged = false;
+}
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 3fbe5a7703..4fac081130 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -68,6 +68,7 @@ public:
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
void onMouseEnter(S32 x, S32 y, MASK mask);
+ void onMouseCaptureLost();
private:
LLCommandId mId;
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index a59642b2d8..dab57d44bd 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -26,9 +26,9 @@
label_ref="Command_Avatar_Label"
tooltip_ref="Command_Avatar_Tooltip"
execute_function="Floater.ToolbarToggle"
- execute_parameters="avatar_picker"
+ execute_parameters="avatar"
is_running_function="Floater.IsOpen"
- is_running_parameters="avatar_picker"
+ is_running_parameters="avatar"
/>
<command name="build"
available_in_toybox="true"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 203bcab03a..092e69952c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -619,7 +619,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string></string>
+ <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/avatars.html</string>
</map>
<key>AvatarBakedTextureUploadTimeout</key>
<map>
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index a8014b8cde..6910b8eced 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -803,7 +803,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
LLViewerObject* hit_obj = pick_info.getObject();
LLSelectMgr::getInstance()->unhighlightAll();
-
+ bool highlight_object = false;
// Treat attachments as part of the avatar they are attached to.
if (hit_obj != NULL)
{
@@ -845,16 +845,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
{
target = DT_OBJECT;
hit_face = pick_info.mObjectFace;
- // if any item being dragged will be applied to the object under our cursor
- // highlight that object
- for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
- {
- if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
- {
- LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
- break;
- }
- }
+ highlight_object = true;
}
}
else if (pick_info.mPickType == LLPickInfo::PICK_LAND)
@@ -900,6 +891,19 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
}
}
+ if (highlight_object && mLastAccept > ACCEPT_NO_LOCKED)
+ {
+ // if any item being dragged will be applied to the object under our cursor
+ // highlight that object
+ for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
+ {
+ if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
+ {
+ LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
+ break;
+ }
+ }
+ }
ECursorType cursor = acceptanceToCursor( mLastAccept );
gViewerWindow->getWindow()->setCursor( cursor );
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 7befc741e3..b0daf9f3c2 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -168,6 +168,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_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a28950f376..fae3ee9081 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1945,6 +1945,12 @@ void LLViewerWindow::initWorldUI()
destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html");
}
+ LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (avatar_picker)
+ {
+ avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
+ avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html");
+ }
}
// Destroy the UI
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
new file mode 100644
index 0000000000..a0c1f4c021
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ 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"
+ height="230"
+ layout="topleft"
+ name="Avatar"
+ single_instance="true"
+ help_topic="avatar"
+ save_rect="true"
+ title="Avatar Picker"
+ width="445">
+ <web_browser
+ top="25"
+ height="200"
+ width="435"
+ follows="all"
+ name="avatar_picker_contents"
+ trusted_content="true"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 50a279c046..9dd9338f37 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -6,6 +6,8 @@
user_resize="true"
can_resize="true"
min_height="230"
+ min_width="525"
+ max_height="230"
height="230"
layout="topleft"
name="Destinations"
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index cf566d7d23..57baa7cdd3 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -90,15 +90,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..03d45887d4 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -41,10 +41,10 @@
<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">
</toolbar>
@@ -52,7 +52,19 @@
<layout_panel name="non_toolbar_panel"
auto_resize="true"
user_resize="false"
- mouse_opaque="false"/>
+ mouse_opaque="false"
+ height="100"
+ 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,10 +75,10 @@
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">
</toolbar>
@@ -83,8 +95,8 @@
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"