summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmachineid.cpp35
-rw-r--r--indra/newview/llpreviewnotecard.h16
-rw-r--r--indra/newview/llsearchableui.cpp19
-rw-r--r--indra/newview/llsearchableui.h2
-rw-r--r--indra/newview/llselectmgr.cpp40
-rw-r--r--indra/newview/llselectmgr.h2
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml18
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_item_info.xml15
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml40
10 files changed, 122 insertions, 67 deletions
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index b0ee8e7fcb..2001359e50 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -65,11 +65,11 @@ public:
S32 LLMachineID::init()
{
- memset(static_unique_id,0,sizeof(static_unique_id));
+ size_t len = sizeof(static_unique_id);
+ memset(static_unique_id, 0, len);
S32 ret_code = 0;
#if LL_WINDOWS
# pragma comment(lib, "wbemuuid.lib")
- size_t len = sizeof(static_unique_id);
// algorithm to detect BIOS serial number found at:
// http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx
@@ -218,16 +218,19 @@ S32 LLMachineID::init()
// Get the value of the Name property
hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0);
LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
+
// use characters in the returned Serial Number to create a byte array of size len
BSTR serialNumber ( vtProp.bstrVal);
+ unsigned int serial_size = SysStringLen(serialNumber);
unsigned int j = 0;
- while( vtProp.bstrVal[j] != 0)
+
+ while (j < serial_size)
{
for (unsigned int i = 0; i < len; i++)
{
- if (vtProp.bstrVal[j] == 0)
+ if (j >= serial_size)
break;
-
+
static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]);
j++;
}
@@ -254,16 +257,8 @@ S32 LLMachineID::init()
ret_code = LLUUID::getNodeID(staticPtr);
#endif
has_static_unique_id = true;
- return ret_code;
-}
-
-S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
-{
- if (has_static_unique_id)
- {
- memcpy ( unique_id, &static_unique_id, len);
- LL_INFOS_ONCE("AppInit") << "UniqueID: 0x";
+ LL_INFOS("AppInit") << "UniqueID: 0x";
// Code between here and LL_ENDL is not executed unless the LL_DEBUGS
// actually produces output
for (size_t i = 0; i < len; ++i)
@@ -271,11 +266,21 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
// Copy each char to unsigned int to hexify. Sending an unsigned
// char to a std::ostream tries to represent it as a char, not
// what we want here.
- unsigned byte = unique_id[i];
+ unsigned byte = static_unique_id[i];
LL_CONT << std::hex << std::setw(2) << std::setfill('0') << byte;
}
// Reset default output formatting to avoid nasty surprises!
LL_CONT << std::dec << std::setw(0) << std::setfill(' ') << LL_ENDL;
+
+ return ret_code;
+}
+
+
+S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
+{
+ if (has_static_unique_id)
+ {
+ memcpy ( unique_id, &static_unique_id, len);
return 1;
}
return 0;
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 46a6d0ef50..8908078c63 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -47,18 +47,18 @@ public:
virtual ~LLPreviewNotecard();
bool saveItem();
- void setObjectID(const LLUUID& object_id);
+ void setObjectID(const LLUUID& object_id) override;
// llview
- virtual void draw();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
- virtual void setEnabled( BOOL enabled );
+ void draw() override;
+ BOOL handleKeyHere(KEY key, MASK mask) override;
+ void setEnabled( BOOL enabled ) override;
// llfloater
- virtual BOOL canClose();
+ BOOL canClose() override;
// llpanel
- virtual BOOL postBuild();
+ BOOL postBuild() override;
// reach into the text editor, and grab the drag item
const LLInventoryItem* getDragItem();
@@ -74,8 +74,8 @@ public:
protected:
- void updateTitleButtons();
- virtual void loadAsset();
+ void updateTitleButtons() override;
+ void loadAsset() override;
bool saveIfNeeded(LLInventoryItem* copyitem = NULL);
void deleteNotecard();
diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp
index de90896548..93143eb33f 100644
--- a/indra/newview/llsearchableui.cpp
+++ b/indra/newview/llsearchableui.cpp
@@ -125,17 +125,13 @@ void ll::statusbar::SearchableItem::setNotHighlighted( )
}
}
-bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter )
+bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, bool hide)
{
- if( mMenu && !mMenu->getVisible() && !mWasHiddenBySearch )
+ if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu))
return false;
setNotHighlighted( );
- bool bVisible(false);
- for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr )
- bVisible |= (*itr)->hightlightAndHide( aFilter );
-
if( aFilter.empty() )
{
if( mCtrl )
@@ -143,17 +139,22 @@ bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter
return true;
}
+ bool bHighlighted(!hide);
if( mLabel.find( aFilter ) != LLWString::npos )
{
if( mCtrl )
mCtrl->setHighlighted( true );
- return true;
+ bHighlighted = true;
}
- if( mCtrl && !bVisible )
+ bool bVisible(false);
+ for (tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr)
+ bVisible |= (*itr)->hightlightAndHide(aFilter, !bHighlighted);
+
+ if (mCtrl && !bVisible && !bHighlighted)
{
mWasHiddenBySearch = true;
mMenu->setVisible(FALSE);
}
- return bVisible;
+ return bVisible || bHighlighted;
}
diff --git a/indra/newview/llsearchableui.h b/indra/newview/llsearchableui.h
index 42b2866fb6..9741557e49 100644
--- a/indra/newview/llsearchableui.h
+++ b/indra/newview/llsearchableui.h
@@ -107,7 +107,7 @@ namespace ll
SearchableItem();
void setNotHighlighted( );
- bool hightlightAndHide( LLWString const &aFilter );
+ bool hightlightAndHide( LLWString const &aFilter, bool hide = true );
};
struct SearchData
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 4a2d545b33..56be902254 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3857,6 +3857,14 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r
return TRUE;
}
+BOOL LLSelectMgr::isSelfAvatarSelected()
+{
+ if (mAllowSelectAvatar)
+ {
+ return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject() == gAgentAvatarp);
+ }
+ return FALSE;
+}
//--------------------------------------------------------------------
// Duplicate objects
@@ -6796,8 +6804,28 @@ void LLSelectMgr::pauseAssociatedAvatars()
mSelectedObjects->mSelectType = getSelectTypeForObject(object);
+ bool is_attached = false;
if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT &&
- isAgentAvatarValid() && object->getParent() != NULL)
+ isAgentAvatarValid())
+ {
+ // Selection can be obsolete, confirm that this is an attachment
+ LLViewerObject* parent = (LLViewerObject*)object->getParent();
+ while (parent != NULL)
+ {
+ if (parent->isAvatar())
+ {
+ is_attached = true;
+ break;
+ }
+ else
+ {
+ parent = (LLViewerObject*)parent->getParent();
+ }
+ }
+ }
+
+
+ if (is_attached)
{
if (object->isAnimatedObject())
{
@@ -6815,14 +6843,12 @@ void LLSelectMgr::pauseAssociatedAvatars()
mPauseRequests.push_back(gAgentAvatarp->requestPause());
}
}
- else
+ else if (object && object->isAnimatedObject() && object->getControlAvatar())
{
- if (object && object->isAnimatedObject() && object->getControlAvatar())
- {
- // Is a non-attached animated object. Pause the control avatar.
- mPauseRequests.push_back(object->getControlAvatar()->requestPause());
- }
+ // Is a non-attached animated object. Pause the control avatar.
+ mPauseRequests.push_back(object->getControlAvatar()->requestPause());
}
+
}
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index caf104178f..9f2ac857a5 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -709,6 +709,8 @@ public:
LLPermissions* findObjectPermissions(const LLViewerObject* object);
+ BOOL isSelfAvatarSelected();
+
void selectDelete(); // Delete on simulator
void selectForceDelete(); // just delete, no into trash
void selectDuplicate(const LLVector3& offset, BOOL select_copy); // Duplicate on simulator
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 43e803fe7a..0f086711d9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3848,7 +3848,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
BOOL draw_handles = TRUE;
- if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move)
+ if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isSelfAvatarSelected())
{
draw_handles = FALSE;
}
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index ae0820c3ac..0abee2ff80 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -915,7 +915,8 @@
name="Object Name"
select_on_focus="true"
top_delta="0"
- width="170" />
+ width="170"
+ tool_tip="The name is limited to 63 characters. Longer prim names are cut short. Names can only consist of printable characters found in the ASCII-7 (non-extended) character set, with the exception of the vertical bar/pipe &apos;|&apos;." />
<text
follows="left|top"
height="10"
@@ -933,7 +934,8 @@
name="Object Description"
select_on_focus="true"
top_delta="0"
- width="170" />
+ width="170"
+ tool_tip="When people have &apos;Hover Tips on All Objects&apos; selected in the viewer's settings, they'll see the object description pop-up for any object under their mouse pointer. The prim description is limited to 127 bytes any string longer then that will be truncated." />
<text
type="string"
left="10"
@@ -1090,7 +1092,8 @@
layout="topleft"
name="clickaction"
width="130"
- left_pad="10">
+ left_pad="10"
+ tool_tip="A click action enables you to interact with an object with a single left click. Each click action has a special cursor indicating what it does. Some click actions have requirements to function. For example Touch and Pay require scripts" >
<combo_box.item
label="Touch (default)"
name="Touch/grab(default)"
@@ -1126,7 +1129,8 @@
layout="topleft"
name="checkbox for sale"
left="7"
- width="97" />
+ width="97"
+ tool_tip="Lets people buy this object, its content or it copy inworld for specified price." />
<!-- NEW PRICE SPINNER
Objects are allowed to be for sale for L$0 to invoke buy UI behavior
even though the user gets a free copy.
@@ -1144,7 +1148,8 @@ even though the user gets a free copy.
width="85"
min_val="0"
height="20"
- max_val="999999999" />
+ max_val="999999999"
+ tool_tip="Object cost." />
<!-- NEW SALE TYPE COMBO BOX -->
<combo_box
left_pad="8"
@@ -1157,7 +1162,8 @@ even though the user gets a free copy.
max_chars="20"
mouse_opaque="true"
name="sale type"
- width="89">
+ width="89"
+ tool_tip="Select whether purchaser will receive a copy, copy of the content or item itself." >
<combo_box.item
name="Copy"
label="Copy"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index ca1dc87134..acb6f5b42a 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -130,7 +130,8 @@
max_length_bytes="63"
name="LabelItemName"
top_delta="0"
- width="210" />
+ width="210"
+ tool_tip="The name is limited to 63 characters. Longer prim names are cut short. Names can only consist of printable characters found in the ASCII-7 (non-extended) character set, with the exception of the vertical bar/pipe &apos;|&apos;." />
<text
type="string"
length="1"
@@ -153,7 +154,8 @@
max_length_bytes="127"
name="LabelItemDesc"
top_delta="-5"
- width="210" />
+ width="210"
+ tool_tip="When people have &apos;Hover Tips on All Objects&apos; selected in the viewer's settings, they'll see the object description pop-up for any object under their mouse pointer. The prim description is limited to 127 bytes any string longer then that will be truncated." />
<text
type="string"
length="1"
@@ -421,14 +423,16 @@
left="20"
name="CheckPurchase"
top_pad="20"
- width="100" />
+ width="100"
+ tool_tip="Lets people buy this object, its content or it copy inworld for specified price." />
<combo_box
height="23"
left_pad="0"
layout="topleft"
follows="left|top"
name="ComboBoxSaleType"
- width="170">
+ width="170"
+ tool_tip="Select whether purchaser will receive a copy, copy of the content or item itself." >
<combo_box.item
name="Copy"
label="Copy"
@@ -455,7 +459,8 @@
min_val="0"
height="23"
max_val="999999999"
- top_pad="10"/>
+ top_pad="10"
+ tool_tip="Object cost." />
</panel>
</scroll_container>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index 713d5f94bb..8a3e18707f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -130,7 +130,8 @@
max_length_bytes="63"
name="Object Name"
top_delta="0"
- width="225" />
+ width="225"
+ tool_tip="The name is limited to 63 characters. Longer prim names are cut short. Names can only consist of printable characters found in the ASCII-7 (non-extended) character set, with the exception of the vertical bar/pipe &apos;|&apos;." />
<text
type="string"
length="1"
@@ -154,7 +155,8 @@
left_delta="78"
max_length_bytes="127"
top_delta="-5"
- width="225"/>
+ width="225"
+ tool_tip="When people have &apos;Hover Tips on All Objects&apos; selected in the viewer's settings, they'll see the object description pop-up for any object under their mouse pointer. The prim description is limited to 127 bytes any string longer then that will be truncated." />
<text
type="string"
length="1"
@@ -271,23 +273,24 @@
layout="topleft"
name="clickaction"
width="168"
- left="81">
+ left="81"
+ tool_tip="A click action enables you to interact with an object with a single left click. Each click action has a special cursor indicating what it does. Some click actions have requirements to function. For example Touch and Pay require scripts" >
<combo_box.item
label="Touch (default)"
name="Touch/grab(default)"
- value="Touch" />
+ value="Touch" />
<combo_box.item
label="Sit on object"
name="Sitonobject"
- value="Sit" />
+ value="Sit" />
<combo_box.item
label="Buy object"
name="Buyobject"
- value="Buy" />
+ value="Buy" />
<combo_box.item
label="Pay object"
name="Payobject"
- value="Pay" />
+ value="Pay" />
<combo_box.item
label="Open"
name="Open"
@@ -422,14 +425,16 @@
left="20"
name="checkbox for sale"
top_pad="10"
- width="100" />
+ width="100"
+ tool_tip="Lets people buy this object, its content or it copy inworld for specified price." />
<combo_box
height="23"
left_pad="0"
layout="topleft"
follows="left|top"
- name="sale type"
- width="170">
+ name="sale type"
+ width="170"
+ tool_tip="Select whether purchaser will receive a copy, copy of the content or item itself.">
<combo_box.item
name="Copy"
label="Copy"
@@ -456,7 +461,8 @@
width="150"
min_val="1"
height="20"
- max_val="999999999" />
+ max_val="999999999"
+ tool_tip="Object cost." />
<check_box
height="20"
width="110"
@@ -573,7 +579,8 @@
left="5"
name="open_btn"
top="0"
- width="73" />
+ width="73"
+ tool_tip="Open to view the Object Contents." />
<button
follows="bottom|left"
height="23"
@@ -582,7 +589,8 @@
left_pad="5"
name="pay_btn"
top="0"
- width="73" />
+ width="73"
+ tool_tip="Open Pay Window. Object must have pay script for this to work." />
<button
follows="bottom|left"
height="23"
@@ -591,7 +599,8 @@
left_pad="5"
name="buy_btn"
top="0"
- width="73" />
+ width="73"
+ tool_tip="Open Buy Window. Requires the object to be set for sale." />
<button
follows="bottom|left"
height="23"
@@ -600,7 +609,8 @@
left_pad="5"
name="details_btn"
top="0"
- width="74" />
+ width="74"
+ tool_tip="Open Inspect Object Window." />
</panel>
</panel>