diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2011-10-06 17:19:41 -0700 | 
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2011-10-06 17:19:41 -0700 | 
| commit | 1bd5fd7edc9019f4ab4dfd1c4d25967f23d14401 (patch) | |
| tree | 24bbd8a4d0d1c70630750989e4c7946536495faf | |
| parent | 23205bb535e446979471296c9fa26f2530a9abaf (diff) | |
| parent | 0f35bbbe9a084ef70b01a551f3262d8bf58ffb42 (diff) | |
merge
| -rw-r--r-- | indra/llui/lltoolbar.cpp | 20 | ||||
| -rw-r--r-- | indra/llui/lltoolbar.h | 1 | ||||
| -rw-r--r-- | indra/newview/app_settings/commands.xml | 4 | ||||
| -rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_about_land.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_gesture.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_appearance.xml | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_inventory.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_snapshot.xml | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_controls.xml | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_world_map.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 14 | 
12 files changed, 56 insertions, 34 deletions
| diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 63a1706fe4..c34fbcd4f5 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 @@ -741,7 +748,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 +779,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 e4fc008b4c..ae8471aa15 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -96,9 +96,9 @@             label_ref="Command_Inventory_Label"             tooltip_ref="Command_Inventory_Tooltip"             execute_function="Floater.ToolbarToggle" -           execute_parameters="inventory" +           execute_parameters="my_inventory"             is_running_function="Floater.IsOpen" -           is_running_parameters="inventory" +           is_running_parameters="my_inventory"             />    <command name="map"             available_in_toybox="true" 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/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index e5dcc9bcb5..9cd838318c 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -6,7 +6,7 @@   name="floaterland"   help_topic="floaterland"   save_rect="true" - title="ABOUT LAND" + title="About land"   width="490">      <floater.string        name="maturity_icon_general"> diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index 9f5e6828d2..c0424f4de3 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -5,7 +5,7 @@   height="465"   name="gestures"   help_topic="gestures" - title="GESTURES" + title="Gestures"   background_visible="true"   follows="all"   label="Places" diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml index 8f97887b3f..de2aa49c0c 100644 --- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml +++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml @@ -6,9 +6,10 @@    height="588"    layout="topleft"    name="floater_my_appearance" +  help_topic="appearance"    save_rect="true"    single_instance="true" -  title="MY APPEARANCE" +  title="Appearance"    width="333">      <panel        top="18" diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml index fd03a5324e..3f852c9ed5 100644 --- a/indra/newview/skins/default/xui/en/floater_my_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml @@ -9,7 +9,7 @@   name="floater_my_inventory"   save_rect="true"   save_visibility="true" - title="My Inventory" + title="Inventory"   width="333" >     <panel      class="sidepanel_inventory" diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 89a0c4c287..4ba513bf9c 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <floater   legacy_header_height="18" - can_minimize="false" + can_minimize="true"   can_close="true"   follows="left|top"   height="520" @@ -10,7 +10,7 @@   help_topic="snapshot"   save_rect="true"   save_visibility="true" - title="SNAPSHOT PREVIEW" + title="Snapshot preview"   width="245">      <floater.string       name="unknown"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index f017a7ace6..447549db44 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -2,14 +2,14 @@  <floater   can_resize="true"   can_minimize="true" - can_close="false" + can_close="true"   height="205"   layout="topleft"   min_height="124"   min_width="190"   name="floater_voice_controls"   help_topic="floater_voice_controls" - title="Voice Controls" + title="Voice controls"   save_dock_state="true"   save_visibility="true"   save_rect="true" @@ -17,15 +17,15 @@   width="282">      <string       name="title_nearby"> -        NEARBY VOICE +        Nearby voice      </string>      <string       name="title_group"> -        Group Call with [GROUP] +        Group call with [GROUP]      </string>      <string       name="title_adhoc"> -        Conference Call +        Conference call      </string>      <string       name="title_peer_2_peer"> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 019e7cd032..3d997a17f7 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -12,7 +12,7 @@   save_rect="true"   save_visibility="true"   single_instance="true" - title="WORLD MAP" + title="World map"   width="650">      <panel       filename="panel_world_map.xml" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 2b5e3143a4..b52784d6bc 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -93,10 +93,10 @@                        label=""                        height="200"                        width="330"> -                     <string name="InboxLabelWithArg">Received Items ([NUM])</string> -                     <string name="InboxLabelNoArg">Received Items</string> +                     <string name="InboxLabelWithArg">Received items ([NUM])</string> +                     <string name="InboxLabelNoArg">Received items</string>                       <button -                        label="Received Items" +                        label="Received items"  												font="SansSerifMedium"                          name="inbox_btn"                          height="35" @@ -124,7 +124,7 @@                          halign="right"                          top_pad="0"                          width="300"> -                        [NUM] New +                        [NUM] new                       </text>                       <panel                          follows="all" @@ -175,10 +175,10 @@                        label=""                        height="200"                        width="330"> -                     <string name="OutboxLabelWithArg">Merchant Outbox ([NUM])</string> -                     <string name="OutboxLabelNoArg">Merchant Outbox</string> +                     <string name="OutboxLabelWithArg">Merchant outbox ([NUM])</string> +                     <string name="OutboxLabelNoArg">Merchant outbox</string>                       <button -                        label="Merchant Outbox" +                        label="Merchant outbox"                          font="SansSerifMedium"                          name="outbox_btn"                          height="35" | 
