Pull merge from lindenlab/viewer-release
commit
4b80a5ed05
1
.hgtags
1
.hgtags
|
|
@ -488,3 +488,4 @@ a9f2d0cb11f73b06858e6083bb50083becc3f9cd 3.7.9-release
|
|||
d86a7e1bc96d27b683f951d3701d5b7042158c68 3.7.13-release
|
||||
a7872554f3665588f1e8347d472cec3a299254b3 3.7.14-release
|
||||
3f11f57f2b4d15a9f987d12bc70ef507eefb5018 3.7.15-release
|
||||
562e7dace7465060ac9adb2e8eca800b699ff024 3.7.16-release
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ LLFolderDictionary::LLFolderDictionary()
|
|||
addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE));
|
||||
|
||||
addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE));
|
||||
addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", FALSE));
|
||||
addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE));
|
||||
|
||||
addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE));
|
||||
|
||||
|
|
|
|||
|
|
@ -793,8 +793,6 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
|
|||
}
|
||||
}
|
||||
|
||||
removeFromBanList(agent_id);
|
||||
|
||||
LLAccessEntry new_entry;
|
||||
new_entry.mID = agent_id;
|
||||
new_entry.mTime = time;
|
||||
|
|
@ -838,8 +836,6 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
|
|||
}
|
||||
}
|
||||
|
||||
removeFromAccessList(agent_id);
|
||||
|
||||
LLAccessEntry new_entry;
|
||||
new_entry.mID = agent_id;
|
||||
new_entry.mTime = time;
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
|||
U32 tc_count = tc_source ? tc.getCount() : 0;
|
||||
U32 norm_count = norm_source ? n.getCount() : 0;
|
||||
|
||||
if (vertex_count == 0)
|
||||
if ((vertex_count == 0) || (tc_count == 0))
|
||||
{
|
||||
llwarns << "Unable to process mesh with empty position array; invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
|
|
|
|||
|
|
@ -1370,7 +1370,8 @@ BOOL LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
|
|||
}
|
||||
}
|
||||
|
||||
const std::string current_item_label(search_item->getViewModelItem()->getSearchableName());
|
||||
std::string current_item_label(search_item->getViewModelItem()->getSearchableName());
|
||||
LLStringUtil::toUpper(current_item_label);
|
||||
S32 search_string_length = llmin(upper_case_string.size(), current_item_label.size());
|
||||
if (!current_item_label.compare(0, search_string_length, upper_case_string))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -258,6 +258,24 @@ BOOL LLFolderViewItem::passedFilter(S32 filter_generation)
|
|||
return getViewModelItem()->passedFilter(filter_generation);
|
||||
}
|
||||
|
||||
BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation)
|
||||
{
|
||||
// Item should be visible if:
|
||||
// 1. item passed current filter
|
||||
// 2. item was updated (gen < 0) but has descendants that passed filter
|
||||
// 3. item was recently updated and was visible before update
|
||||
|
||||
LLFolderViewModelItem* model = getViewModelItem();
|
||||
if (model->getLastFilterGeneration() < 0 && !getFolderViewModel()->getFilter().isModified())
|
||||
{
|
||||
return model->descendantsPassedFilter(filter_generation) || getVisible();
|
||||
}
|
||||
else
|
||||
{
|
||||
return model->passedFilter(filter_generation);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFolderViewItem::refresh()
|
||||
{
|
||||
LLFolderViewModelItem& vmi = *getViewModelItem();
|
||||
|
|
@ -657,7 +675,7 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L
|
|||
//
|
||||
const S32 TOP_PAD = default_params.item_top_pad;
|
||||
|
||||
if (hasVisibleChildren() || getViewModelItem()->hasChildren())
|
||||
if (hasVisibleChildren())
|
||||
{
|
||||
LLUIImage* arrow_image = default_params.folder_arrow_image;
|
||||
gl_draw_scaled_rotated_image(
|
||||
|
|
@ -970,7 +988,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
getRoot()->getFolderViewModel()->sort(this);
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_ARRANGE);
|
||||
|
||||
|
||||
// evaluate mHasVisibleChildren
|
||||
mHasVisibleChildren = false;
|
||||
if (getViewModelItem()->descendantsPassedFilter())
|
||||
|
|
@ -981,7 +999,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
for (items_t::iterator iit = mItems.begin(); iit != mItems.end(); ++iit)
|
||||
{
|
||||
LLFolderViewItem* itemp = (*iit);
|
||||
found = itemp->passedFilter();
|
||||
found = itemp->isPotentiallyVisible();
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
|
|
@ -991,7 +1009,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
for (folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit)
|
||||
{
|
||||
LLFolderViewFolder* folderp = (*fit);
|
||||
found = folderp->passedFilter();
|
||||
found = folderp->isPotentiallyVisible();
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
|
|
@ -1024,7 +1042,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit)
|
||||
{
|
||||
LLFolderViewFolder* folderp = (*fit);
|
||||
folderp->setVisible(folderp->passedFilter()); // passed filter or has descendants that passed filter
|
||||
folderp->setVisible(folderp->isPotentiallyVisible());
|
||||
|
||||
if (folderp->getVisible())
|
||||
{
|
||||
|
|
@ -1043,7 +1061,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
|
|||
iit != mItems.end(); ++iit)
|
||||
{
|
||||
LLFolderViewItem* itemp = (*iit);
|
||||
itemp->setVisible(itemp->passedFilter());
|
||||
itemp->setVisible(itemp->isPotentiallyVisible());
|
||||
|
||||
if (itemp->getVisible())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ public:
|
|||
S32 getIndentation() { return mIndentation; }
|
||||
|
||||
virtual BOOL passedFilter(S32 filter_generation = -1);
|
||||
virtual BOOL isPotentiallyVisible(S32 filter_generation = -1);
|
||||
|
||||
// refresh information from the object being viewed.
|
||||
virtual void refresh();
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ void LLLineEditor::onCommit()
|
|||
|
||||
setControlValue(getValue());
|
||||
LLUICtrl::onCommit();
|
||||
resetDirty();
|
||||
|
||||
// Selection on commit needs to be turned off when evaluating maths
|
||||
// expressions, to allow indication of the error position
|
||||
|
|
|
|||
|
|
@ -44,9 +44,10 @@ LLStatGraph::LLStatGraph(const Params& p)
|
|||
: LLView(p),
|
||||
mMin(p.min),
|
||||
mMax(p.max),
|
||||
mPerSec(true),
|
||||
mPerSec(p.per_sec),
|
||||
mPrecision(p.precision),
|
||||
mValue(p.value),
|
||||
mUnits(p.units),
|
||||
mNewStatFloatp(p.stat.count_stat_float)
|
||||
{
|
||||
setToolTip(p.name());
|
||||
|
|
|
|||
|
|
@ -1307,14 +1307,14 @@ void LLTextBase::replaceWithSuggestion(U32 index)
|
|||
if ( (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) )
|
||||
{
|
||||
deselect();
|
||||
|
||||
// Delete the misspelled word
|
||||
removeStringNoUndo(it->first, it->second - it->first);
|
||||
|
||||
// Insert the suggestion in its place
|
||||
LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
|
||||
insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index]));
|
||||
|
||||
// Delete the misspelled word
|
||||
removeStringNoUndo(it->first + (S32)suggestion.length(), it->second - it->first);
|
||||
|
||||
|
||||
setCursorPos(it->first + (S32)suggestion.length());
|
||||
|
||||
break;
|
||||
|
|
@ -2381,7 +2381,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
|
|||
// binary search for line that starts before local_y
|
||||
line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), doc_y, compare_bottom());
|
||||
|
||||
if (line_iter == mLineInfoList.end())
|
||||
if (!mLineInfoList.size() || line_iter == mLineInfoList.end())
|
||||
{
|
||||
return getLength(); // past the end
|
||||
}
|
||||
|
|
@ -2473,7 +2473,6 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
|
|||
// clamp pos to valid values
|
||||
pos = llclamp(pos, 0, mLineInfoList.back().mDocIndexEnd - 1);
|
||||
|
||||
// find line that contains cursor
|
||||
line_list_t::const_iterator line_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), pos, line_end_compare());
|
||||
|
||||
doc_rect.mLeft = line_iter->mRect.mLeft;
|
||||
|
|
@ -2649,6 +2648,12 @@ void LLTextBase::changeLine( S32 delta )
|
|||
LLRect visible_region = getVisibleDocumentRect();
|
||||
S32 new_cursor_pos = getDocIndexFromLocalCoord(mDesiredXPixel,
|
||||
mLineInfoList[new_line].mRect.mBottom + mVisibleTextRect.mBottom - visible_region.mBottom, TRUE);
|
||||
S32 actual_line = getLineNumFromDocIndex(new_cursor_pos);
|
||||
if (actual_line != new_line)
|
||||
{
|
||||
// line edge, correcting position by 1 to move onto proper line
|
||||
new_cursor_pos += new_line - actual_line;
|
||||
}
|
||||
setCursorPos(new_cursor_pos, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,6 @@ void LLTextEditor::addChar(llwchar wc)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::addLineBreakChar(BOOL group_together)
|
||||
{
|
||||
if( !getEnabled() )
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ enum EAcceptance
|
|||
{
|
||||
ACCEPT_POSTPONED, // we are asynchronously determining acceptance
|
||||
ACCEPT_NO, // Uninformative, general purpose denial.
|
||||
ACCEPT_NO_CUSTOM, // Denial with custom message.
|
||||
ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it.
|
||||
ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item
|
||||
ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here.
|
||||
|
|
|
|||
|
|
@ -398,9 +398,35 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
}
|
||||
}
|
||||
|
||||
- (void)flagsChanged:(NSEvent *)theEvent {
|
||||
- (void)flagsChanged:(NSEvent *)theEvent
|
||||
{
|
||||
mModifiers = [theEvent modifierFlags];
|
||||
callModifier([theEvent modifierFlags]);
|
||||
|
||||
NSInteger mask = 0;
|
||||
switch([theEvent keyCode])
|
||||
{
|
||||
case 56:
|
||||
mask = NSShiftKeyMask;
|
||||
break;
|
||||
case 58:
|
||||
mask = NSAlternateKeyMask;
|
||||
break;
|
||||
case 59:
|
||||
mask = NSControlKeyMask;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (mModifiers & mask)
|
||||
{
|
||||
callKeyDown([theEvent keyCode], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
callKeyUp([theEvent keyCode], 0);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) acceptsFirstResponder
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterinspect.cpp
|
||||
llfloaterinventory.cpp
|
||||
llfloaterjoystick.cpp
|
||||
llfloaterlagmeter.cpp
|
||||
llfloaterland.cpp
|
||||
llfloaterlandholdings.cpp
|
||||
llfloatermarketplacelistings.cpp
|
||||
|
|
@ -860,6 +861,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterinspect.h
|
||||
llfloaterinventory.h
|
||||
llfloaterjoystick.h
|
||||
llfloaterlagmeter.h
|
||||
llfloaterland.h
|
||||
llfloaterlandholdings.h
|
||||
llfloatermap.h
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.16
|
||||
3.7.17
|
||||
|
|
|
|||
|
|
@ -628,22 +628,22 @@ RCERR_CAST_TIME_EXCEEDED TODO: add documentation
|
|||
RCERR_SIM_PERF_LOW TODO: add documentation
|
||||
RCERR_UNKNOWN TODO: add documentation
|
||||
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE TODO: add documentation
|
||||
ESTATE_ACCESS_BANNED_AGENT_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_BANNED_AGENT_REMOVE TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_ADD Passed to llManageEstateAccess to add the agent to this estate's Allowed Residents list
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Passed to llManageEstateAccess to remove the agent from this estate's Allowed Residents list
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_ADD Passed to llManageEstateAccess to add the group to this estate's Allowed groups list
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Passed to llManageEstateAccess to remove the group from this estate's Allowed groups list
|
||||
ESTATE_ACCESS_BANNED_AGENT_ADD Passed to llManageEstateAccess to add the agent to this estate's Banned residents list
|
||||
ESTATE_ACCESS_BANNED_AGENT_REMOVE Passed to llManageEstateAccess to remove the agent from this estate's Banned residents list
|
||||
|
||||
DENSITY TODO: add documentation
|
||||
FRICTION TODO: add documentation
|
||||
RESTITUTION TODO: add documentation
|
||||
GRAVITY_MULTIPLIER TODO: add documentation
|
||||
|
||||
KFM_COMMAND TODO: add documentation
|
||||
KFM_CMD_PLAY TODO: add documentation
|
||||
KFM_CMD_STOP TODO: add documentation
|
||||
KFM_CMD_PAUSE TODO: add documentation
|
||||
KFM_COMMAND Command used in the options parameter of llSetKeyframedMotion, followed by one of: KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE to play, stop or pause the motion
|
||||
KFM_CMD_PLAY Command used in the options parameter llSetKeyframedMotion. Resumes the animation previously stopped by KFM_CMD_STOP or KFM_CMD_PAUSE
|
||||
KFM_CMD_STOP Command used in the options parameter llSetKeyframedMotion. Stops the animation and resets it at the start of motion
|
||||
KFM_CMD_PAUSE Command used in the options parameter llSetKeyframedMotion. Stops the animation but doesn t reset it at the start of motion.
|
||||
KFM_CMD_SET_MODE TODO: add documentation
|
||||
KFM_MODE TODO: add documentation
|
||||
KFM_FORWARD TODO: add documentation
|
||||
|
|
@ -657,18 +657,18 @@ KFM_TRANSLATION TODO: add documentation
|
|||
CHARACTER_CMD_STOP TODO: add documentation
|
||||
CHARACTER_CMD_JUMP TODO: add documentation
|
||||
|
||||
CHARACTER_DESIRED_SPEED TODO: add documentation
|
||||
CHARACTER_RADIUS TODO: add documentation
|
||||
CHARACTER_LENGTH TODO: add documentation
|
||||
CHARACTER_ORIENTATION TODO: add documentation
|
||||
CHARACTER_AVOIDANCE_MODE TODO: add documentation
|
||||
CHARACTER_DESIRED_SPEED Constant used to indicate that the following argument is the desired speed for a Pathfinding character.
|
||||
CHARACTER_RADIUS Constant used to indicate that the following argument is the radius of the capsule for a Pathfinding character.
|
||||
CHARACTER_LENGTH Constant used to indicate that the following argument is the length of the capsule for a Pathfinding character.
|
||||
CHARACTER_ORIENTATION Constant used to indicate that the following argument is the orientation of the capsule for a Pathfinding character.
|
||||
CHARACTER_AVOIDANCE_MODE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles, or both. Is combined with a mask bit flags
|
||||
PURSUIT_OFFSET TODO: add documentation
|
||||
REQUIRE_LINE_OF_SIGHT TODO: add documentation
|
||||
PURSUIT_FUZZ_FACTOR TODO: add documentation
|
||||
PURSUIT_INTERCEPT TODO: add documentation
|
||||
FORCE_DIRECT_PATH TODO: add documentation
|
||||
VERTICAL TODO: add documentation
|
||||
HORIZONTAL TODO: add documentation
|
||||
VERTICAL Constant to indicate that the orientation of the capsule for a Pathfinding character is vertical.
|
||||
HORIZONTAL Constant to indicate that the orientation of the capsule for a Pathfinding character is horizontal.
|
||||
AVOID_CHARACTERS TODO: add documentation
|
||||
AVOID_DYNAMIC_OBSTACLES TODO: add documentation
|
||||
|
||||
|
|
@ -683,12 +683,12 @@ PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e
|
|||
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
|
||||
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
|
||||
|
||||
CHARACTER_TYPE TODO: add documentation
|
||||
CHARACTER_TYPE_A TODO: add documentation
|
||||
CHARACTER_TYPE_B TODO: add documentation
|
||||
CHARACTER_TYPE_C TODO: add documentation
|
||||
CHARACTER_TYPE_D TODO: add documentation
|
||||
CHARACTER_TYPE_NONE TODO: add documentation
|
||||
CHARACTER_TYPE Specifies which walkability coefficient will be used by this character. Used in combination with one of the character type flags.
|
||||
CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids.
|
||||
CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles.
|
||||
CHARACTER_TYPE_C Used for mechanical character types or road going vehicles.
|
||||
CHARACTER_TYPE_D Used for character types that are not consistent with the A, B, or C type.
|
||||
CHARACTER_TYPE_NONE Used to set no specific character type.
|
||||
|
||||
TRAVERSAL_TYPE TODO: add documentation
|
||||
TRAVERSAL_TYPE_SLOW TODO: add documentation
|
||||
|
|
|
|||
|
|
@ -13212,7 +13212,7 @@
|
|||
<key>Value</key>
|
||||
<string>Default</string>
|
||||
</map>
|
||||
<key>UseExternalBrowser</key>
|
||||
<key>UseExternalBrowser</key> <!-- deprecated (see MAINT-4127) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use default browser when opening web pages instead of in-world browser.</string>
|
||||
|
|
@ -13223,6 +13223,17 @@
|
|||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>PreferredBrowserBehavior</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use system browser for any links (0), use builtin browser for SL links and system one for others (1) or use builtin browser only (2).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>UseFreezeFrame</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -14213,6 +14224,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LeaveMouselook</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Exit Mouselook mode via S or Down Arrow keys while sitting </string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>TextureLoggingThreshold</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -15451,6 +15473,17 @@
|
|||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>WearFolderLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Limits number of items in the folder that can be replaced/added to current outfit</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>125</integer>
|
||||
</map>
|
||||
<key>EveryoneCopy</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -3712,6 +3712,12 @@ bool LLAgent::teleportCore(bool is_local)
|
|||
return false;
|
||||
}
|
||||
|
||||
// force stand up and stop a sitting animation (if any), see MAINT-3969
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent() && gAgentAvatarp->isSitting())
|
||||
{
|
||||
gAgentAvatarp->getOffObject();
|
||||
}
|
||||
|
||||
#if 0
|
||||
// This should not exist. It has been added, removed, added, and now removed again.
|
||||
// This change needs to come from the simulator. Otherwise, the agent ends up out of
|
||||
|
|
@ -3887,7 +3893,7 @@ void LLAgent::teleportRequest(
|
|||
bool look_at_from_camera)
|
||||
{
|
||||
LLViewerRegion* regionp = getRegion();
|
||||
bool is_local = (region_handle == to_region_handle(getPositionGlobal()));
|
||||
bool is_local = (region_handle == regionp->getHandle());
|
||||
if(regionp && teleportCore(is_local))
|
||||
{
|
||||
LL_INFOS("") << "TeleportLocationRequest: '" << region_handle << "':"
|
||||
|
|
@ -4054,7 +4060,12 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
|
|||
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
|
||||
{
|
||||
mbTeleportKeepsLookAt = true;
|
||||
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
|
||||
|
||||
if(!gAgentCamera.isfollowCamLocked())
|
||||
{
|
||||
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
|
||||
}
|
||||
|
||||
U64 region_handle = to_region_handle(pos_global);
|
||||
LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
|
||||
teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
|
||||
|
|
|
|||
|
|
@ -2721,6 +2721,11 @@ void LLAgentCamera::lookAtLastChat()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLAgentCamera::isfollowCamLocked()
|
||||
{
|
||||
return mFollowCam.getPositionLocked();
|
||||
}
|
||||
|
||||
BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
|
||||
{
|
||||
// disallow pointing at attachments and avatars
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ private:
|
|||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setUsingFollowCam(bool using_follow_cam);
|
||||
bool isfollowCamLocked();
|
||||
private:
|
||||
LLFollowCam mFollowCam; // Ventrella
|
||||
|
||||
|
|
|
|||
|
|
@ -1035,6 +1035,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
if (mismatched == 0)
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "no changes, bailing out" << LL_ENDL;
|
||||
mCOFChangeInProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -380,8 +380,15 @@ void AISUpdate::parseMeta(const LLSD& update)
|
|||
it != cat_ids.end(); ++it)
|
||||
{
|
||||
LLViewerInventoryCategory *cat = gInventory.getCategory(*it);
|
||||
mCatDescendentDeltas[cat->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
if(cat)
|
||||
{
|
||||
mCatDescendentDeltas[cat->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Inventory") << "removed category not found " << *it << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// parse _categories_items_removed -> mObjectsDeletedIds
|
||||
|
|
@ -392,8 +399,15 @@ void AISUpdate::parseMeta(const LLSD& update)
|
|||
it != item_ids.end(); ++it)
|
||||
{
|
||||
LLViewerInventoryItem *item = gInventory.getItem(*it);
|
||||
mCatDescendentDeltas[item->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
if(item)
|
||||
{
|
||||
mCatDescendentDeltas[item->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Inventory") << "removed item not found " << *it << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// parse _broken_links_removed -> mObjectsDeletedIds
|
||||
|
|
@ -403,8 +417,15 @@ void AISUpdate::parseMeta(const LLSD& update)
|
|||
it != broken_link_ids.end(); ++it)
|
||||
{
|
||||
LLViewerInventoryItem *item = gInventory.getItem(*it);
|
||||
mCatDescendentDeltas[item->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
if(item)
|
||||
{
|
||||
mCatDescendentDeltas[item->getParentUUID()]--;
|
||||
mObjectsDeletedIds.insert(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Inventory") << "broken link not found " << *it << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// parse _created_items
|
||||
|
|
@ -795,7 +816,7 @@ void AISUpdate::doUpdate()
|
|||
// Since this is a copy of the category *before* the accounting update, above,
|
||||
// we need to transfer back the updated version/descendent count.
|
||||
LLViewerInventoryCategory* curr_cat = gInventory.getCategory(new_category->getUUID());
|
||||
if (NULL == curr_cat)
|
||||
if (!curr_cat)
|
||||
{
|
||||
LL_WARNS("Inventory") << "Failed to update unknown category " << new_category->getUUID() << LL_ENDL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1710,8 +1710,16 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
return gInventory.hasMatchingDirectDescendent(outfit_cat_id, not_worn);
|
||||
gInventory.collectDescendentsIf(outfit_cat_id,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
not_worn);
|
||||
|
||||
return items.size() > 0;
|
||||
}
|
||||
|
||||
bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
||||
|
|
@ -1729,8 +1737,16 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
|||
}
|
||||
|
||||
// Check whether the outfit contains any wearables we aren't wearing already (STORM-702).
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
|
||||
return gInventory.hasMatchingDirectDescendent(outfit_cat_id, not_worn);
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx is_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
|
||||
gInventory.collectDescendentsIf(outfit_cat_id,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
is_worn);
|
||||
|
||||
return items.size() > 0;
|
||||
}
|
||||
|
||||
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> cb)
|
||||
|
|
|
|||
|
|
@ -3368,11 +3368,11 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
// TODO: Implement media plugin version query
|
||||
info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)";
|
||||
|
||||
if (gPacketsIn > 0)
|
||||
S32 packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
|
||||
if (packets_in > 0)
|
||||
{
|
||||
LLTrace::Recording& last_frame = LLTrace::get_frame_recording().getLastRecording();
|
||||
info["PACKETS_LOST"] = last_frame.getSum(LLStatViewer::PACKETS_LOST);
|
||||
info["PACKETS_IN"] = last_frame.getSum(LLStatViewer::PACKETS_IN);
|
||||
info["PACKETS_LOST"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
|
||||
info["PACKETS_IN"] = packets_in;
|
||||
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
|
|||
LLAvatarName av_name;
|
||||
if(LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
args["NAME"] = av_name.getDisplayName();
|
||||
args["NAME"] = av_name.getCompleteName();
|
||||
}
|
||||
|
||||
msgType = "RemoveFromFriends";
|
||||
|
|
@ -381,7 +381,7 @@ void LLAvatarActions::showOnMap(const LLUUID& id)
|
|||
}
|
||||
|
||||
gFloaterWorldMap->trackAvatar(id, av_name.getDisplayName());
|
||||
LLFloaterReg::showInstance("world_map");
|
||||
LLFloaterReg::showInstance("world_map", "center");
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -533,6 +533,14 @@ void LLAvatarActions::share(const LLUUID& id)
|
|||
{
|
||||
// we should always get here, but check to verify anyways
|
||||
LLIMModel::getInstance()->addMessage(session_id, SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
|
||||
|
||||
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
|
||||
if (session_floater && session_floater->isMinimized())
|
||||
{
|
||||
session_floater->setMinimized(false);
|
||||
}
|
||||
LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
im_container->selectConversationPair(session_id, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "llagent.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llclipboard.h"
|
||||
#include "llclipboard.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llfloatersidepanelcontainer.h"
|
||||
|
|
@ -51,7 +50,7 @@
|
|||
#include "lltoggleablemenu.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
|
|
@ -327,6 +326,7 @@ public:
|
|||
|
||||
gInventory.updateItem(item);
|
||||
gInventory.notifyObservers();
|
||||
LLFavoritesOrderStorage::instance().saveOrder();
|
||||
}
|
||||
|
||||
LLView::getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
|
|
@ -1452,6 +1452,18 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id)
|
|||
void LLFavoritesOrderStorage::destroyClass()
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().cleanup();
|
||||
|
||||
|
||||
std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
llifstream file;
|
||||
file.open(old_filename);
|
||||
if (file.is_open())
|
||||
{
|
||||
std::string new_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
|
||||
LLFile::copy(old_filename,new_filename);
|
||||
LLFile::remove(old_filename);
|
||||
}
|
||||
|
||||
if (gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"))
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesSLURLs();
|
||||
|
|
@ -1498,7 +1510,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
|
|||
return;
|
||||
}
|
||||
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
|
||||
llifstream in_file;
|
||||
in_file.open(filename);
|
||||
LLSD fav_llsd;
|
||||
|
|
@ -1546,7 +1558,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
|
|||
|
||||
void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
|
||||
{
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
|
||||
LLSD fav_llsd;
|
||||
llifstream file;
|
||||
file.open(filename);
|
||||
|
|
@ -1641,6 +1653,16 @@ void LLFavoritesOrderStorage::cleanup()
|
|||
mSortIndexes.swap(aTempMap);
|
||||
}
|
||||
|
||||
void LLFavoritesOrderStorage::saveOrder()
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLIsType is_type(LLAssetType::AT_LANDMARK);
|
||||
LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
|
||||
gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
|
||||
saveItemsOrder(items);
|
||||
}
|
||||
|
||||
void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array_t& items )
|
||||
{
|
||||
int sortField = 0;
|
||||
|
|
|
|||
|
|
@ -203,6 +203,8 @@ public:
|
|||
// Is used to save order for Favorites folder.
|
||||
void saveItemsOrder(const LLInventoryModel::item_array_t& items);
|
||||
|
||||
void saveOrder();
|
||||
|
||||
void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "llfloateravatar.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llmediactrl.h"
|
||||
|
||||
|
||||
LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
|
||||
|
|
@ -43,6 +44,13 @@ LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
|
|||
|
||||
LLFloaterAvatar::~LLFloaterAvatar()
|
||||
{
|
||||
LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
|
||||
if (avatar_picker)
|
||||
{
|
||||
avatar_picker->navigateStop();
|
||||
avatar_picker->clearCache(); //images are reloading each time already
|
||||
avatar_picker->unloadMediaSource();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterAvatar::postBuild()
|
||||
|
|
|
|||
|
|
@ -229,7 +229,9 @@ BOOL LLFloaterIMContainer::postBuild()
|
|||
mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
|
||||
mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
|
||||
mSpeakBtn = getChild<LLButton>("speak_btn");
|
||||
mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
|
||||
|
||||
mSpeakBtn->setMouseDownCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonPressed, this));
|
||||
mSpeakBtn->setMouseUpCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonReleased, this));
|
||||
|
||||
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
|
||||
|
||||
|
|
@ -352,11 +354,18 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()
|
|||
collapseMessagesPane(true);
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::onSpeakButtonClicked()
|
||||
void LLFloaterIMContainer::onSpeakButtonPressed()
|
||||
{
|
||||
LLAgent::toggleMicrophone("speak");
|
||||
LLVoiceClient::getInstance()->inputUserControlState(true);
|
||||
updateSpeakBtnState();
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::onSpeakButtonReleased()
|
||||
{
|
||||
LLVoiceClient::getInstance()->inputUserControlState(false);
|
||||
updateSpeakBtnState();
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
|
||||
{
|
||||
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
|
||||
|
|
@ -1398,6 +1407,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
|
|||
return LLAvatarActions::canCall();
|
||||
}
|
||||
else if ("can_open_voice_conversation" == item)
|
||||
{
|
||||
return is_single_select && LLAvatarActions::canCall();
|
||||
}
|
||||
else if ("can_open_voice_conversation" == item)
|
||||
{
|
||||
return is_single_select && LLAvatarActions::canCall();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ private:
|
|||
void onExpandCollapseButtonClicked();
|
||||
void onStubCollapseButtonClicked();
|
||||
void processParticipantsStyleUpdate();
|
||||
void onSpeakButtonClicked();
|
||||
void onSpeakButtonPressed();
|
||||
void onSpeakButtonReleased();
|
||||
/*virtual*/ void onClickCloseBtn(bool app_quitting = false);
|
||||
/*virtual*/ void closeHostedFloater();
|
||||
|
||||
|
|
|
|||
|
|
@ -927,8 +927,7 @@ void LLFloaterIMSession::onInputEditorFocusReceived( LLFocusableElement* caller,
|
|||
// Allow enabling the LLFloaterIMSession input editor only if session can accept text
|
||||
LLIMModel::LLIMSession* im_session =
|
||||
LLIMModel::instance().findIMSession(self->mSessionID);
|
||||
//TODO: While disabled lllineeditor can receive focus we need to check if it is enabled (EK)
|
||||
if( im_session && im_session->mTextIMPossible && self->mInputEditor->getEnabled())
|
||||
if( im_session && im_session->mTextIMPossible && !self->mInputEditor->getReadOnly())
|
||||
{
|
||||
//in disconnected state IM input editor should be disabled
|
||||
self->mInputEditor->setEnabled(!gDisconnected);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,378 @@
|
|||
/**
|
||||
* @file llfloaterlagmeter.cpp
|
||||
* @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, 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$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterlagmeter.h"
|
||||
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llappviewer.h"
|
||||
|
||||
#include "lltexturefetch.h"
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "lltextbox.h"
|
||||
|
||||
const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
|
||||
const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
|
||||
const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
|
||||
|
||||
LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
|
||||
}
|
||||
|
||||
BOOL LLFloaterLagMeter::postBuild()
|
||||
{
|
||||
// Don't let this window take keyboard focus -- it's confusing to
|
||||
// lose arrow-key driving when testing lag.
|
||||
setIsChrome(TRUE);
|
||||
|
||||
// were we shrunk last time?
|
||||
if (isShrunk())
|
||||
{
|
||||
onClickShrink();
|
||||
}
|
||||
|
||||
mClientButton = getChild<LLButton>("client_lagmeter");
|
||||
mClientText = getChild<LLTextBox>("client_text");
|
||||
mClientCause = getChild<LLTextBox>("client_lag_cause");
|
||||
|
||||
mNetworkButton = getChild<LLButton>("network_lagmeter");
|
||||
mNetworkText = getChild<LLTextBox>("network_text");
|
||||
mNetworkCause = getChild<LLTextBox>("network_lag_cause");
|
||||
|
||||
mServerButton = getChild<LLButton>("server_lagmeter");
|
||||
mServerText = getChild<LLTextBox>("server_text");
|
||||
mServerCause = getChild<LLTextBox>("server_lag_cause");
|
||||
|
||||
std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs);
|
||||
mClientFrameTimeCritical = F32Seconds(1.0f / (float)atof( config_string.c_str() ));
|
||||
config_string = getString("client_frame_rate_warning_fps", mStringArgs);
|
||||
mClientFrameTimeWarning = F32Seconds(1.0f / (float)atof( config_string.c_str() ));
|
||||
|
||||
config_string = getString("network_packet_loss_critical_pct", mStringArgs);
|
||||
mNetworkPacketLossCritical = F32Percent((float)atof( config_string.c_str() ));
|
||||
config_string = getString("network_packet_loss_warning_pct", mStringArgs);
|
||||
mNetworkPacketLossWarning = F32Percent((float)atof( config_string.c_str() ));
|
||||
|
||||
config_string = getString("network_ping_critical_ms", mStringArgs);
|
||||
mNetworkPingCritical = F32Milliseconds((float)atof( config_string.c_str() ));
|
||||
config_string = getString("network_ping_warning_ms", mStringArgs);
|
||||
mNetworkPingWarning = F32Milliseconds((float)atof( config_string.c_str() ));
|
||||
config_string = getString("server_frame_rate_critical_fps", mStringArgs);
|
||||
|
||||
mServerFrameTimeCritical = F32Seconds(1.0f / (float)atof( config_string.c_str() ));
|
||||
config_string = getString("server_frame_rate_warning_fps", mStringArgs);
|
||||
mServerFrameTimeWarning = F32Seconds(1.0f / (float)atof( config_string.c_str() ));
|
||||
config_string = getString("server_single_process_max_time_ms", mStringArgs);
|
||||
mServerSingleProcessMaxTime = F32Seconds((float)atof( config_string.c_str() ));
|
||||
|
||||
// mShrunk = false;
|
||||
config_string = getString("max_width_px", mStringArgs);
|
||||
mMaxWidth = atoi( config_string.c_str() );
|
||||
config_string = getString("min_width_px", mStringArgs);
|
||||
mMinWidth = atoi( config_string.c_str() );
|
||||
|
||||
mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps");
|
||||
mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps");
|
||||
|
||||
mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct");
|
||||
mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct");
|
||||
|
||||
mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms");
|
||||
mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms");
|
||||
|
||||
mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
|
||||
mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
|
||||
|
||||
// childSetAction("minimize", onClickShrink, this);
|
||||
updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
LLFloaterLagMeter::~LLFloaterLagMeter()
|
||||
{
|
||||
// save shrunk status for next time
|
||||
// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
|
||||
// expand so we save the large window rectangle
|
||||
if (isShrunk())
|
||||
{
|
||||
onClickShrink();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::draw()
|
||||
{
|
||||
determineClient();
|
||||
determineNetwork();
|
||||
determineServer();
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::determineClient()
|
||||
{
|
||||
F32Milliseconds client_frame_time = LLTrace::get_frame_recording().getPeriodMean(LLStatViewer::FRAME_STACKTIME);
|
||||
bool find_cause = false;
|
||||
|
||||
if (!gFocusMgr.getAppHasFocus())
|
||||
{
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) );
|
||||
mClientCause->setText( LLStringUtil::null );
|
||||
}
|
||||
else if(client_frame_time >= mClientFrameTimeCritical)
|
||||
{
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else if(client_frame_time >= mClientFrameTimeWarning)
|
||||
{
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) );
|
||||
mClientCause->setText( LLStringUtil::null );
|
||||
}
|
||||
|
||||
if(find_cause)
|
||||
{
|
||||
if(gSavedSettings.getF32("RenderFarClip") > 128)
|
||||
{
|
||||
mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(LLAppViewer::instance()->getTextureFetch()->getNumRequests() > 2)
|
||||
{
|
||||
mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(LLViewerTexture::sBoundTextureMemory > LLViewerTexture::sMaxBoundTextureMemory)
|
||||
{
|
||||
mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::determineNetwork()
|
||||
{
|
||||
LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
|
||||
F32Percent packet_loss = frame_recording.getPeriodMean(LLStatViewer::PACKETS_LOST_PERCENT);
|
||||
F32Milliseconds ping_time = frame_recording.getPeriodMean(LLStatViewer::SIM_PING);
|
||||
bool find_cause_loss = false;
|
||||
bool find_cause_ping = false;
|
||||
|
||||
// *FIXME: We can't blame a large ping time on anything in
|
||||
// particular if the frame rate is low, because a low frame
|
||||
// rate is a sure recipe for bad ping times right now until
|
||||
// the network handlers are de-synched from the rendering.
|
||||
F32Milliseconds client_frame_time = frame_recording.getPeriodMean(LLStatViewer::FRAME_STACKTIME);
|
||||
|
||||
if(packet_loss >= mNetworkPacketLossCritical)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) );
|
||||
find_cause_loss = true;
|
||||
}
|
||||
else if(ping_time >= mNetworkPingCritical)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
if (client_frame_time < mNetworkPingCritical)
|
||||
{
|
||||
mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) );
|
||||
find_cause_ping = true;
|
||||
}
|
||||
}
|
||||
else if(packet_loss >= mNetworkPacketLossWarning)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) );
|
||||
find_cause_loss = true;
|
||||
}
|
||||
else if(ping_time >= mNetworkPingWarning)
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
if (client_frame_time < mNetworkPingWarning)
|
||||
{
|
||||
mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) );
|
||||
find_cause_ping = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) );
|
||||
}
|
||||
|
||||
if(find_cause_loss)
|
||||
{
|
||||
mNetworkCause->setText( getString("network_packet_loss_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(find_cause_ping)
|
||||
{
|
||||
mNetworkCause->setText( getString("network_ping_cause_msg", mStringArgs) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mNetworkCause->setText( LLStringUtil::null );
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::determineServer()
|
||||
{
|
||||
F32Milliseconds sim_frame_time = LLTrace::get_frame_recording().getLastRecording().getLastValue(LLStatViewer::SIM_FRAME_TIME);
|
||||
bool find_cause = false;
|
||||
|
||||
if(sim_frame_time >= mServerFrameTimeCritical)
|
||||
{
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else if(sim_frame_time >= mServerFrameTimeWarning)
|
||||
{
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) );
|
||||
find_cause = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
|
||||
mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) );
|
||||
mServerCause->setText( LLStringUtil::null );
|
||||
}
|
||||
|
||||
if(find_cause)
|
||||
{
|
||||
LLTrace::Recording& last_recording = LLTrace::get_frame_recording().getLastRecording();
|
||||
|
||||
if(last_recording.getLastValue(LLStatViewer::SIM_PHYSICS_TIME) > mServerSingleProcessMaxTime)
|
||||
{
|
||||
mServerCause->setText( getString("server_physics_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(last_recording.getLastValue(LLStatViewer::SIM_SCRIPTS_TIME) > mServerSingleProcessMaxTime)
|
||||
{
|
||||
mServerCause->setText( getString("server_scripts_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(last_recording.getLastValue(LLStatViewer::SIM_NET_TIME) > mServerSingleProcessMaxTime)
|
||||
{
|
||||
mServerCause->setText( getString("server_net_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(last_recording.getLastValue(LLStatViewer::SIM_AGENTS_TIME) > mServerSingleProcessMaxTime)
|
||||
{
|
||||
mServerCause->setText( getString("server_agent_cause_msg", mStringArgs) );
|
||||
}
|
||||
else if(last_recording.getLastValue(LLStatViewer::SIM_IMAGES_TIME) > mServerSingleProcessMaxTime)
|
||||
{
|
||||
mServerCause->setText( getString("server_images_cause_msg", mStringArgs) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mServerCause->setText( getString("server_generic_cause_msg", mStringArgs) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::updateControls(bool shrink)
|
||||
{
|
||||
// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
|
||||
|
||||
LLButton * button = getChild<LLButton>("minimize");
|
||||
S32 delta_width = mMaxWidth -mMinWidth;
|
||||
LLRect r = getRect();
|
||||
|
||||
if(!shrink)
|
||||
{
|
||||
setTitle(getString("max_title_msg", mStringArgs) );
|
||||
// make left edge appear to expand
|
||||
r.translate(-delta_width, 0);
|
||||
setRect(r);
|
||||
reshape(mMaxWidth, getRect().getHeight());
|
||||
|
||||
getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) + ":");
|
||||
getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) + ":");
|
||||
getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) + ":");
|
||||
|
||||
// usually "<<"
|
||||
button->setLabel( getString("smaller_label", mStringArgs) );
|
||||
}
|
||||
else
|
||||
{
|
||||
setTitle( getString("min_title_msg", mStringArgs) );
|
||||
// make left edge appear to collapse
|
||||
r.translate(delta_width, 0);
|
||||
setRect(r);
|
||||
reshape(mMinWidth, getRect().getHeight());
|
||||
|
||||
getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) );
|
||||
getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) );
|
||||
getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) );
|
||||
|
||||
// usually ">>"
|
||||
button->setLabel( getString("bigger_label", mStringArgs) );
|
||||
}
|
||||
// Don't put keyboard focus on the button
|
||||
button->setFocus(FALSE);
|
||||
|
||||
// self->mClientText->setVisible(self->mShrunk);
|
||||
// self->mClientCause->setVisible(self->mShrunk);
|
||||
// self->getChildView("client_help")->setVisible( self->mShrunk);
|
||||
|
||||
// self->mNetworkText->setVisible(self->mShrunk);
|
||||
// self->mNetworkCause->setVisible(self->mShrunk);
|
||||
// self->getChildView("network_help")->setVisible( self->mShrunk);
|
||||
|
||||
// self->mServerText->setVisible(self->mShrunk);
|
||||
// self->mServerCause->setVisible(self->mShrunk);
|
||||
// self->getChildView("server_help")->setVisible( self->mShrunk);
|
||||
|
||||
// self->mShrunk = !self->mShrunk;
|
||||
}
|
||||
|
||||
BOOL LLFloaterLagMeter::isShrunk()
|
||||
{
|
||||
return gSavedSettings.getBOOL("LagMeterShrunk");
|
||||
}
|
||||
|
||||
void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
|
||||
{
|
||||
bool shrunk = isShrunk();
|
||||
updateControls(!shrunk);
|
||||
gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* @file llfloaterlagmeter.h
|
||||
* @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, 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 LLFLOATERLAGMETER_H
|
||||
#define LLFLOATERLAGMETER_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLTextBox;
|
||||
|
||||
class LLFloaterLagMeter : public LLFloater
|
||||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
public:
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
private:
|
||||
|
||||
LLFloaterLagMeter(const LLSD& key);
|
||||
/*virtual*/ ~LLFloaterLagMeter();
|
||||
void determineClient();
|
||||
void determineNetwork();
|
||||
void determineServer();
|
||||
void updateControls(bool shrink);
|
||||
BOOL isShrunk();
|
||||
|
||||
void onClickShrink();
|
||||
|
||||
bool mShrunk;
|
||||
S32 mMaxWidth, mMinWidth;
|
||||
|
||||
F32Milliseconds mClientFrameTimeCritical;
|
||||
F32Milliseconds mClientFrameTimeWarning;
|
||||
LLButton* mClientButton;
|
||||
LLTextBox* mClientText;
|
||||
LLTextBox* mClientCause;
|
||||
|
||||
F32Percent mNetworkPacketLossCritical;
|
||||
F32Percent mNetworkPacketLossWarning;
|
||||
F32Milliseconds mNetworkPingCritical;
|
||||
F32Milliseconds mNetworkPingWarning;
|
||||
LLButton* mNetworkButton;
|
||||
LLTextBox* mNetworkText;
|
||||
LLTextBox* mNetworkCause;
|
||||
|
||||
F32Milliseconds mServerFrameTimeCritical;
|
||||
F32Milliseconds mServerFrameTimeWarning;
|
||||
F32Milliseconds mServerSingleProcessMaxTime;
|
||||
LLButton* mServerButton;
|
||||
LLTextBox* mServerText;
|
||||
LLTextBox* mServerCause;
|
||||
|
||||
LLStringUtil::format_map_t mStringArgs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -2781,10 +2781,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
|
|||
{
|
||||
LLUUID id = ids[0];
|
||||
LLParcel* parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
if (parcel && parcel->addToAccessList(id, 0))
|
||||
{
|
||||
parcel->addToAccessList(id, 0);
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
|
||||
U32 lists_to_update = AL_ACCESS;
|
||||
// agent was successfully added to access list
|
||||
// but we also need to check ban list to ensure that agent will not be in two lists simultaneously
|
||||
if(parcel->removeFromBanList(id))
|
||||
{
|
||||
lists_to_update |= AL_BAN;
|
||||
}
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -2833,10 +2839,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
|
|||
{
|
||||
LLUUID id = ids[0];
|
||||
LLParcel* parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
if (parcel && parcel->addToBanList(id, 0))
|
||||
{
|
||||
parcel->addToBanList(id, 0);
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
|
||||
U32 lists_to_update = AL_BAN;
|
||||
// agent was successfully added to ban list
|
||||
// but we also need to check access list to ensure that agent will not be in two lists simultaneously
|
||||
if (parcel->removeFromAccessList(id))
|
||||
{
|
||||
lists_to_update |= AL_ACCESS;
|
||||
}
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel
|
|||
{
|
||||
public:
|
||||
LLNotificationChannelPanel(const Params& p);
|
||||
~LLNotificationChannelPanel();
|
||||
BOOL postBuild();
|
||||
|
||||
private:
|
||||
|
|
@ -57,6 +58,20 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChann
|
|||
buildFromFile( "panel_notifications_channel.xml");
|
||||
}
|
||||
|
||||
LLNotificationChannelPanel::~LLNotificationChannelPanel()
|
||||
{
|
||||
// Userdata for all records is a LLNotification* we need to clean up
|
||||
std::vector<LLScrollListItem*> data_list = getChild<LLScrollListCtrl>("notifications_list")->getAllData();
|
||||
std::vector<LLScrollListItem*>::iterator data_itor;
|
||||
for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
|
||||
{
|
||||
LLScrollListItem* item = *data_itor;
|
||||
LLNotification* notification = (LLNotification*)item->getUserdata();
|
||||
delete notification;
|
||||
notification = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLNotificationChannelPanel::postBuild()
|
||||
{
|
||||
LLButton* header_button = getChild<LLButton>("header");
|
||||
|
|
@ -124,7 +139,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload)
|
|||
row["columns"][2]["type"] = "date";
|
||||
|
||||
LLScrollListItem* sli = getChild<LLScrollListCtrl>("notifications_list")->addElement(row);
|
||||
sli->setUserdata(&(*notification));
|
||||
sli->setUserdata(new LLNotification(notification->asLLSD()));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
|
|||
getChild<LLPanel>(sMainPanelName)->onOpen(key);
|
||||
}
|
||||
|
||||
void LLFloaterSidePanelContainer::onClickCloseBtn(bool)
|
||||
void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
|
||||
{
|
||||
LLPanelOutfitEdit* panel_outfit_edit =
|
||||
dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
|
||||
|
|
@ -75,7 +75,7 @@ void LLFloaterSidePanelContainer::onClickCloseBtn(bool)
|
|||
}
|
||||
}
|
||||
|
||||
LLFloater::onClickCloseBtn();
|
||||
LLFloater::closeFloater(app_quitting);
|
||||
}
|
||||
|
||||
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
/*virtual*/ void onClickCloseBtn(bool app_quitting = false);
|
||||
/*virtual*/ void closeFloater(bool app_quitting = false);
|
||||
|
||||
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
|
||||
|
||||
|
|
|
|||
|
|
@ -888,6 +888,9 @@ void LLFloaterTools::onClose(bool app_quitting)
|
|||
|
||||
// hide the advanced object weights floater
|
||||
LLFloaterReg::hideInstance("object_weights");
|
||||
|
||||
// prepare content for next call
|
||||
mPanelContents->clearContents();
|
||||
}
|
||||
|
||||
void click_popup_info(void*)
|
||||
|
|
|
|||
|
|
@ -204,6 +204,10 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
|
|||
LLURLHistory::addURL("parcel", media_url);
|
||||
}
|
||||
|
||||
// show progress bar here?
|
||||
getWindow()->incBusyCount();
|
||||
self->getChildView("loading_label")->setVisible( true);
|
||||
|
||||
// leading whitespace causes problems with the MIME-type detection so strip it
|
||||
LLStringUtil::trim( media_url );
|
||||
|
||||
|
|
@ -233,10 +237,6 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
|
|||
self->getChildView("ok_btn")->setEnabled(false);
|
||||
self->getChildView("cancel_btn")->setEnabled(false);
|
||||
self->getChildView("media_entry")->setEnabled(false);
|
||||
|
||||
// show progress bar here?
|
||||
getWindow()->incBusyCount();
|
||||
self->getChildView("loading_label")->setVisible( true);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key)
|
|||
void LLFloaterWebContent::onClose(bool app_quitting)
|
||||
{
|
||||
// If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen
|
||||
LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web");
|
||||
LLFloater* fbc_web = LLFloaterReg::findInstance("fbc_web");
|
||||
if (fbc_web == this)
|
||||
{
|
||||
if (!LLFacebookConnect::instance().isConnected())
|
||||
|
|
|
|||
|
|
@ -134,9 +134,9 @@ void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_gen
|
|||
bool before = mPrevPassedAllFilters;
|
||||
mPrevPassedAllFilters = passedFilter(filter_generation);
|
||||
|
||||
if (before != mPrevPassedAllFilters)
|
||||
if (before != mPrevPassedAllFilters)
|
||||
{
|
||||
// Need to rearrange the folder if the filtered state of the item changed
|
||||
// Need to rearrange the folder if the filtered state of the item changed
|
||||
LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
|
||||
if (parent_folder)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1406,7 +1406,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
|||
}
|
||||
if (rest_of_match.compare("") == 0)
|
||||
{
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
if (buf.compare("") != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
|
|||
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
|
||||
void teleport_via_landmark(const LLUUID& asset_id);
|
||||
static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
|
||||
static BOOL can_move_to_landmarks(LLInventoryItem* inv_item);
|
||||
static bool check_category(LLInventoryModel* model,
|
||||
const LLUUID& cat_id,
|
||||
LLInventoryPanel* active_panel,
|
||||
|
|
@ -2373,13 +2374,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
|
||||
|
||||
BOOL accept = FALSE;
|
||||
U64 filter_types = filter->getFilterTypes();
|
||||
BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
|
||||
|
||||
if (is_agent_inventory)
|
||||
{
|
||||
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
|
||||
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
|
||||
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
|
||||
|
||||
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
|
||||
const BOOL move_is_into_outfit = getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
|
||||
const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
|
|
@ -2442,6 +2448,29 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
}
|
||||
}
|
||||
}
|
||||
U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit");
|
||||
if (is_movable
|
||||
&& move_is_into_current_outfit
|
||||
&& descendent_items.size() > max_items_to_wear)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
gInventory.collectDescendentsIf(cat_id,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
not_worn);
|
||||
|
||||
if (items.size() > max_items_to_wear)
|
||||
{
|
||||
// Can't move 'large' folders into current outfit: MAINT-4086
|
||||
is_movable = FALSE;
|
||||
LLStringUtil::format_map_t args;
|
||||
args["AMOUNT"] = llformat("%d", max_items_to_wear);
|
||||
tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args);
|
||||
}
|
||||
}
|
||||
if (is_movable && move_is_into_trash)
|
||||
{
|
||||
for (S32 i=0; i < descendent_items.size(); ++i)
|
||||
|
|
@ -2508,7 +2537,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
is_movable = active_folder_view != NULL;
|
||||
}
|
||||
|
||||
if (is_movable)
|
||||
if (is_movable && use_filter)
|
||||
{
|
||||
// Check whether the folder being dragged from active inventory panel
|
||||
// passes the filter of the destination panel.
|
||||
|
|
@ -2701,6 +2730,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
|
|||
|
||||
BOOL accept = FALSE;
|
||||
BOOL is_move = FALSE;
|
||||
BOOL use_filter = FALSE;
|
||||
if (filter)
|
||||
{
|
||||
U64 filter_types = filter->getFilterTypes();
|
||||
use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
|
||||
}
|
||||
|
||||
// coming from a task. Need to figure out if the person can
|
||||
// move/copy this item.
|
||||
|
|
@ -2733,7 +2768,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
|
|||
accept = TRUE;
|
||||
}
|
||||
|
||||
if (filter && accept)
|
||||
if (accept && use_filter)
|
||||
{
|
||||
accept = filter->check(item);
|
||||
}
|
||||
|
|
@ -2946,7 +2981,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
|
|||
mContentsCount)
|
||||
{
|
||||
gInventory.removeObserver(this);
|
||||
LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, FALSE);
|
||||
LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, TRUE);
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
|
@ -2964,7 +2999,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(mInventoryPanel.get()->getItemByID(mUUID));
|
||||
if (f)
|
||||
{
|
||||
f->setOpen(TRUE);
|
||||
f->toggleOpen();
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -3360,13 +3395,17 @@ void LLFolderBridge::perform_pasteFromClipboard()
|
|||
const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
|
||||
const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
|
||||
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
|
||||
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false);
|
||||
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
|
||||
|
||||
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
|
||||
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
|
||||
const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
|
||||
const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
|
||||
|
||||
std::vector<LLUUID> objects;
|
||||
const BOOL move_is_into_favorites = (mUUID == favorites_id);
|
||||
|
||||
std::vector<LLUUID> objects;
|
||||
LLClipboard::instance().pasteFromClipboard(objects);
|
||||
|
||||
if (move_is_into_outbox || move_is_into_marketplacelistings)
|
||||
|
|
@ -3412,11 +3451,18 @@ void LLFolderBridge::perform_pasteFromClipboard()
|
|||
{
|
||||
if (move_is_into_current_outfit || move_is_into_outfit)
|
||||
{
|
||||
if (can_move_to_outfit(item, move_is_into_current_outfit))
|
||||
if (item && can_move_to_outfit(item, move_is_into_current_outfit))
|
||||
{
|
||||
dropToOutfit(item, move_is_into_current_outfit);
|
||||
}
|
||||
}
|
||||
else if (move_is_into_favorites)
|
||||
{
|
||||
if (item && can_move_to_landmarks(item))
|
||||
{
|
||||
dropToFavorites(item);
|
||||
}
|
||||
}
|
||||
else if (LLClipboard::instance().isCutMode())
|
||||
{
|
||||
// Do a move to "paste" a "cut"
|
||||
|
|
@ -3526,9 +3572,11 @@ void LLFolderBridge::pasteLinkFromClipboard()
|
|||
const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
|
||||
const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
|
||||
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
|
||||
|
||||
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
|
||||
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
|
||||
const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
|
||||
const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id);
|
||||
|
||||
|
|
@ -4055,6 +4103,28 @@ void LLFolderBridge::modifyOutfit(BOOL append)
|
|||
LLViewerInventoryCategory* cat = getCategory();
|
||||
if(!cat) return;
|
||||
|
||||
// checking amount of items to wear
|
||||
U32 max_items = gSavedSettings.getU32("WearFolderLimit");
|
||||
if (cat->getDescendentCount() > max_items)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
gInventory.collectDescendentsIf(cat->getUUID(),
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
not_worn);
|
||||
|
||||
if (items.size() > max_items)
|
||||
{
|
||||
LLSD args;
|
||||
args["AMOUNT"] = llformat("%d", max_items);
|
||||
LLNotificationsUtil::add("TooManyWearables", args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );
|
||||
}
|
||||
|
||||
|
|
@ -4109,6 +4179,12 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
U32 flags = inv_item->getFlags();
|
||||
if(flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (move_is_into_current_outfit && get_is_item_worn(inv_item->getUUID()))
|
||||
{
|
||||
return FALSE;
|
||||
|
|
@ -4218,11 +4294,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
|
||||
const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
|
||||
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
|
||||
const LLUUID from_folder_uuid = inv_item->getParentUUID();
|
||||
|
||||
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
|
||||
const BOOL move_is_into_favorites = (mUUID == favorites_id);
|
||||
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
|
||||
const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
|
||||
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
|
||||
const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id);
|
||||
|
|
@ -4231,6 +4309,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
|
||||
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
|
||||
BOOL accept = FALSE;
|
||||
U64 filter_types = filter->getFilterTypes();
|
||||
// We shouldn't allow to drop non recent items into recent tab (or some similar transactions)
|
||||
// while we are allowing to interact with regular filtered inventory
|
||||
BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
|
||||
LLViewerObject* object = NULL;
|
||||
if(LLToolDragAndDrop::SOURCE_AGENT == source)
|
||||
{
|
||||
|
|
@ -4308,7 +4390,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
|
||||
// Check whether the item being dragged from active inventory panel
|
||||
// passes the filter of the destination panel.
|
||||
if (accept && active_panel)
|
||||
if (accept && active_panel && use_filter)
|
||||
{
|
||||
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
|
||||
if (!fv_item) return false;
|
||||
|
|
@ -4481,7 +4563,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
|
||||
// Check whether the item being dragged from in world
|
||||
// passes the filter of the destination panel.
|
||||
if (accept)
|
||||
if (accept && use_filter)
|
||||
{
|
||||
accept = filter->check(inv_item);
|
||||
}
|
||||
|
|
@ -4525,7 +4607,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
|
||||
// Check whether the item being dragged from notecard
|
||||
// passes the filter of the destination panel.
|
||||
if (accept)
|
||||
if (accept && use_filter)
|
||||
{
|
||||
accept = filter->check(inv_item);
|
||||
}
|
||||
|
|
@ -4565,7 +4647,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
|
||||
// Check whether the item being dragged from the library
|
||||
// passes the filter of the destination panel.
|
||||
if (accept && active_panel)
|
||||
if (accept && active_panel && use_filter)
|
||||
{
|
||||
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
|
||||
if (!fv_item) return false;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ protected:
|
|||
BOOL isAgentInventory() const; // false if lost or in the inventory library
|
||||
BOOL isCOFFolder() const; // true if COF or descendant of
|
||||
BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox
|
||||
BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox
|
||||
|
||||
BOOL isOutboxFolderDirectParent() const;
|
||||
BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder
|
||||
const LLUUID getOutboxFolder() const;
|
||||
|
|
@ -179,6 +179,10 @@ protected:
|
|||
|
||||
BOOL callback_cutToClipboard(const LLSD& notification, const LLSD& response);
|
||||
BOOL perform_cutToClipboard();
|
||||
|
||||
public:
|
||||
BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox
|
||||
|
||||
protected:
|
||||
LLHandle<LLInventoryPanel> mInventoryPanel;
|
||||
LLFolderView* mRoot;
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
|
|||
// Pass if this item's type is of the correct filter type
|
||||
if (filterTypes & FILTERTYPE_OBJECT)
|
||||
{
|
||||
|
||||
// If it has no type, pass it, unless it's a link.
|
||||
if (object_type == LLInventoryType::IT_NONE)
|
||||
{
|
||||
|
|
@ -288,9 +289,21 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
|
|||
bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType());
|
||||
if (is_hidden_if_empty)
|
||||
{
|
||||
// Force the fetching of those folders so they are hidden iff they really are empty...
|
||||
// Force the fetching of those folders so they are hidden if they really are empty...
|
||||
gInventory.fetchDescendentsOf(object_id);
|
||||
return FALSE;
|
||||
|
||||
LLInventoryModel::cat_array_t* cat_array = NULL;
|
||||
LLInventoryModel::item_array_t* item_array = NULL;
|
||||
gInventory.getDirectDescendentsOf(object_id,cat_array,item_array);
|
||||
S32 descendents_actual = 0;
|
||||
if(cat_array && item_array)
|
||||
{
|
||||
descendents_actual = cat_array->size() + item_array->size();
|
||||
}
|
||||
if (descendents_actual == 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1059,6 +1072,11 @@ void LLInventoryFilter::fromParams(const Params& params)
|
|||
setDateRangeLastLogoff(params.since_logoff);
|
||||
}
|
||||
|
||||
U64 LLInventoryFilter::getFilterTypes() const
|
||||
{
|
||||
return mFilterOps.mFilterTypes;
|
||||
}
|
||||
|
||||
U64 LLInventoryFilter::getFilterObjectTypes() const
|
||||
{
|
||||
return mFilterOps.mFilterObjectTypes;
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ public:
|
|||
// +-------------------------------------------------------------------+
|
||||
// + Parameters
|
||||
// +-------------------------------------------------------------------+
|
||||
U64 getFilterTypes() const;
|
||||
U64 getFilterObjectTypes() const;
|
||||
U64 getFilterCategoryTypes() const;
|
||||
U64 getFilterWearableTypes() const;
|
||||
|
|
|
|||
|
|
@ -1898,7 +1898,7 @@ bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* it
|
|||
if (!vitem) return false;
|
||||
|
||||
// Skip non-wearables.
|
||||
if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT)
|
||||
if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT && vitem->getType() != LLAssetType::AT_GESTURE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,7 +342,9 @@ LLInventoryFilter& LLInventoryPanel::getFilter()
|
|||
void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type)
|
||||
{
|
||||
if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT)
|
||||
{
|
||||
getFilter().setFilterObjectTypes(types);
|
||||
}
|
||||
if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY)
|
||||
getFilter().setFilterCategoryTypes(types);
|
||||
}
|
||||
|
|
@ -593,6 +595,22 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE))
|
||||
{
|
||||
// STRUCTURE and REMOVE model changes usually fail to update (clean)
|
||||
// mMostFilteredDescendantGeneration of parent folder and dirtyFilter()
|
||||
// is not sufficient for successful filter update, so we need to check
|
||||
// all already passed element over again to remove obsolete elements.
|
||||
// New items or moved items should be sufficiently covered by
|
||||
// dirtyFilter().
|
||||
LLInventoryFilter& filter = getFilter();
|
||||
if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE
|
||||
|| filter.isNotDefault())
|
||||
{
|
||||
filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID LLInventoryPanel::getRootFolderID()
|
||||
|
|
@ -1427,6 +1445,17 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
|
|||
// Open selected items if enter key hit on the inventory panel
|
||||
if (mask == MASK_NONE)
|
||||
{
|
||||
//Don't allow attaching or opening items from Merchant Outbox
|
||||
LLFolderViewItem* folder_item = mFolderRoot.get()->getCurSelectedItem();
|
||||
if(folder_item)
|
||||
{
|
||||
LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
|
||||
if(bridge && bridge->isOutboxFolder() && (bridge->getInventoryType() != LLInventoryType::IT_CATEGORY))
|
||||
{
|
||||
return handled;
|
||||
}
|
||||
}
|
||||
|
||||
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open");
|
||||
handled = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "pipeline.h"
|
||||
#include "llmaterialmgr.h"
|
||||
|
||||
#include "llimagedimensionsinfo.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltrans.h"
|
||||
/*=======================================*/
|
||||
/* Formal declarations, constants, etc. */
|
||||
/*=======================================*/
|
||||
|
|
@ -845,6 +847,12 @@ bool LLLocalBitmapMgr::addUnit()
|
|||
std::string filename = picker.getFirstFile();
|
||||
while(!filename.empty())
|
||||
{
|
||||
if(!checkTextureDimensions(filename))
|
||||
{
|
||||
filename = picker.getNextFile();
|
||||
continue;
|
||||
}
|
||||
|
||||
LLLocalBitmap* unit = new LLLocalBitmap(filename);
|
||||
|
||||
if (unit->getValid())
|
||||
|
|
@ -874,6 +882,37 @@ bool LLLocalBitmapMgr::addUnit()
|
|||
return add_successful;
|
||||
}
|
||||
|
||||
bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename)
|
||||
{
|
||||
std::string exten = gDirUtilp->getExtension(filename);
|
||||
U32 codec = LLImageBase::getCodecFromExtension(exten);
|
||||
std::string mImageLoadError;
|
||||
LLImageDimensionsInfo image_info;
|
||||
if (!image_info.load(filename,codec))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
S32 max_width = gSavedSettings.getS32("max_texture_dimension_X");
|
||||
S32 max_height = gSavedSettings.getS32("max_texture_dimension_Y");
|
||||
|
||||
if ((image_info.getWidth() > max_width) || (image_info.getHeight() > max_height))
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["WIDTH"] = llformat("%d", max_width);
|
||||
args["HEIGHT"] = llformat("%d", max_height);
|
||||
mImageLoadError = LLTrans::getString("texture_load_dimensions_error", args);
|
||||
|
||||
LLSD notif_args;
|
||||
notif_args["REASON"] = mImageLoadError;
|
||||
LLNotificationsUtil::add("CannotUploadTexture", notif_args);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLLocalBitmapMgr::delUnit(LLUUID tracking_id)
|
||||
{
|
||||
if (!sBitmapList.empty())
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ class LLLocalBitmapMgr
|
|||
static void cleanupClass();
|
||||
static bool addUnit();
|
||||
static void delUnit(LLUUID tracking_id);
|
||||
static bool checkTextureDimensions(std::string filename);
|
||||
|
||||
static LLUUID getWorldID(LLUUID tracking_id);
|
||||
static std::string getFilename(LLUUID tracking_id);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ F32 LLManip::sHelpTextFadeTime = 2.f;
|
|||
S32 LLManip::sNumTimesHelpTextShown = 0;
|
||||
S32 LLManip::sMaxTimesShowHelpText = 5;
|
||||
F32 LLManip::sGridMaxSubdivisionLevel = 32.f;
|
||||
F32 LLManip::sGridMinSubdivisionLevel = 1.f;
|
||||
F32 LLManip::sGridMinSubdivisionLevel = 1.f / 32.f;
|
||||
LLVector2 LLManip::sTickLabelSpacing(60.f, 25.f);
|
||||
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing)
|
||||
F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing, F32 min_subdivisions, F32 max_subdivisions)
|
||||
{
|
||||
//update current snap subdivision level
|
||||
LLVector3 cam_to_reference;
|
||||
|
|
@ -192,7 +192,8 @@ F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVecto
|
|||
|
||||
F32 projected_translation_axis_length = (translate_axis % cam_to_reference).magVec();
|
||||
F32 subdivisions = llmax(projected_translation_axis_length * grid_scale / (current_range / LLViewerCamera::getInstance()->getPixelMeterRatio() * min_pixel_spacing), 0.f);
|
||||
subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), 1.f / 32.f, 32.f);
|
||||
// figure out nearest power of 2 that subdivides grid_scale with result > min_pixel_spacing
|
||||
subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), min_subdivisions, max_subdivisions);
|
||||
|
||||
return subdivisions;
|
||||
}
|
||||
|
|
@ -548,37 +549,31 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
|
|||
BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
LLVector3 render_pos = pos;
|
||||
if (hud_selection)
|
||||
{
|
||||
F32 zoom_amt = gAgentCamera.mHUDCurZoom;
|
||||
F32 inv_zoom_amt = 1.f / zoom_amt;
|
||||
// scale text back up to counter-act zoom level
|
||||
render_pos = pos * zoom_amt;
|
||||
gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
|
||||
}
|
||||
LLVector3 render_pos = pos;
|
||||
if (hud_selection)
|
||||
{
|
||||
F32 zoom_amt = gAgentCamera.mHUDCurZoom;
|
||||
F32 inv_zoom_amt = 1.f / zoom_amt;
|
||||
// scale text back up to counter-act zoom level
|
||||
render_pos = pos * zoom_amt;
|
||||
gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
|
||||
}
|
||||
|
||||
LLColor4 shadow_color = LLColor4::black;
|
||||
shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
|
||||
LLColor4 shadow_color = LLColor4::black;
|
||||
shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
|
||||
|
||||
if (fractional_portion != 0)
|
||||
{
|
||||
fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
|
||||
if (fractional_portion != 0)
|
||||
{
|
||||
fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
|
||||
|
||||
gViewerWindow->setup3DViewport(1, -1);
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
|
||||
hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, shadow_color, hud_selection);
|
||||
|
||||
gViewerWindow->setup3DViewport();
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
|
||||
hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, color, hud_selection);
|
||||
}
|
||||
else
|
||||
{
|
||||
gViewerWindow->setup3DViewport(1, -1);
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
|
||||
gViewerWindow->setup3DViewport();
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
|
||||
hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
|
||||
}
|
||||
}
|
||||
gGL.popMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ protected:
|
|||
LLVector3 getPivotPoint();
|
||||
void getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 &normal);
|
||||
BOOL getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis);
|
||||
F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH);
|
||||
F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH, F32 min_subdivisions = sGridMinSubdivisionLevel, F32 max_subdivisions = sGridMaxSubdivisionLevel);
|
||||
void renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color);
|
||||
void renderTickText(const LLVector3& pos, const std::string& suffix, const LLColor4 &color);
|
||||
void updateGridSettings();
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
|
|||
//LLVector3 select_center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal());
|
||||
// TomY: The above should (?) be identical to the below
|
||||
LLVector3 select_center_agent = getPivotPoint();
|
||||
mSubdivisions = llclamp(getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
|
||||
mSubdivisions = getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale());
|
||||
|
||||
// if we clicked on a planar manipulator, recenter mouse cursor
|
||||
if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
|
||||
|
|
@ -516,7 +516,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
LLSelectMgr::getInstance()->updateSelectionCenter();
|
||||
LLVector3d current_pos_global = gAgent.getPosGlobalFromAgent(getPivotPoint());
|
||||
|
||||
mSubdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
|
||||
mSubdivisions = getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale());
|
||||
|
||||
// Project the cursor onto that plane
|
||||
LLVector3d relative_move;
|
||||
|
|
@ -606,7 +606,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
max_grid_scale = mGridScale.mV[VZ];
|
||||
}
|
||||
|
||||
F32 num_subdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
|
||||
F32 num_subdivisions = getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale);
|
||||
|
||||
F32 grid_scale_a;
|
||||
F32 grid_scale_b;
|
||||
|
|
@ -1254,6 +1254,7 @@ void LLManipTranslate::renderSnapGuides()
|
|||
for (S32 pass = 0; pass < 3; pass++)
|
||||
{
|
||||
LLColor4 line_color = setupSnapGuideRenderPass(pass);
|
||||
LLGLDepthTest gls_depth(pass != 1);
|
||||
|
||||
gGL.begin(LLRender::LINES);
|
||||
{
|
||||
|
|
@ -1285,7 +1286,7 @@ void LLManipTranslate::renderSnapGuides()
|
|||
{
|
||||
tick_start = selection_center + (translate_axis * (smallest_grid_unit_scale * (F32)i - offset_nearest_grid_unit));
|
||||
|
||||
F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
|
||||
F32 cur_subdivisions = getSubdivisionLevel(tick_start, translate_axis, getMinGridScale());
|
||||
|
||||
if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / cur_subdivisions)) != 0.f)
|
||||
{
|
||||
|
|
@ -1383,7 +1384,7 @@ void LLManipTranslate::renderSnapGuides()
|
|||
tick_scale *= 0.7f;
|
||||
}
|
||||
|
||||
if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing)))) == 0.f)
|
||||
if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing))) == 0.f)
|
||||
{
|
||||
F32 snap_offset_meters;
|
||||
|
||||
|
|
|
|||
|
|
@ -507,6 +507,16 @@ void LLMediaCtrl::navigateForward()
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLMediaCtrl::navigateStop()
|
||||
{
|
||||
if (mMediaSource && mMediaSource->hasMedia())
|
||||
{
|
||||
mMediaSource->getMediaPlugin()->browse_stop();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
bool LLMediaCtrl::canNavigateBack()
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ public:
|
|||
void navigateBack();
|
||||
void navigateHome();
|
||||
void navigateForward();
|
||||
void navigateStop();
|
||||
void navigateToLocalPage( const std::string& subdir, const std::string& filename_in );
|
||||
bool canNavigateBack();
|
||||
bool canNavigateForward();
|
||||
|
|
|
|||
|
|
@ -103,19 +103,21 @@ bool LLNotificationStorage::writeNotifications(const LLSD& pNotificationData) co
|
|||
return didFileOpen;
|
||||
}
|
||||
|
||||
bool LLNotificationStorage::readNotifications(LLSD& pNotificationData) const
|
||||
bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_new_filename) const
|
||||
{
|
||||
LL_INFOS("LLNotificationStorage") << "starting read '" << mFileName << "'" << LL_ENDL;
|
||||
std::string filename = is_new_filename? mFileName : mOldFileName;
|
||||
|
||||
LL_INFOS("LLNotificationStorage") << "starting read '" << filename << "'" << LL_ENDL;
|
||||
|
||||
bool didFileRead;
|
||||
|
||||
pNotificationData.clear();
|
||||
|
||||
llifstream notifyFile(mFileName.c_str());
|
||||
llifstream notifyFile(filename.c_str());
|
||||
didFileRead = notifyFile.is_open();
|
||||
if (!didFileRead)
|
||||
{
|
||||
LL_WARNS("LLNotificationStorage") << "Failed to open file '" << mFileName << "'" << LL_ENDL;
|
||||
LL_WARNS("LLNotificationStorage") << "Failed to open file '" << filename << "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -128,7 +130,19 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData) const
|
|||
}
|
||||
}
|
||||
|
||||
LL_INFOS("LLNotificationStorage") << "ending read '" << mFileName << "'" << LL_ENDL;
|
||||
LL_INFOS("LLNotificationStorage") << "ending read '" << filename << "'" << LL_ENDL;
|
||||
if (!didFileRead)
|
||||
{
|
||||
if(is_new_filename)
|
||||
{
|
||||
didFileRead = readNotifications(pNotificationData, false);
|
||||
if(didFileRead)
|
||||
{
|
||||
writeNotifications(pNotificationData);
|
||||
LLFile::remove(mOldFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return didFileRead;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,13 +43,15 @@ public:
|
|||
|
||||
protected:
|
||||
bool writeNotifications(const LLSD& pNotificationData) const;
|
||||
bool readNotifications(LLSD& pNotificationData) const;
|
||||
bool readNotifications(LLSD& pNotificationData, bool is_new_filename = true) const;
|
||||
void setFileName(std::string pFileName) {mFileName = pFileName;}
|
||||
void setOldFileName(std::string pFileName) {mOldFileName = pFileName;}
|
||||
|
||||
LLNotificationResponderInterface* createResponder(const std::string& pNotificationName, const LLSD& pParams) const;
|
||||
|
||||
private:
|
||||
std::string mFileName;
|
||||
std::string mOldFileName;
|
||||
};
|
||||
|
||||
#endif // LL_NOTIFICATIONSTORAGE_H
|
||||
|
|
|
|||
|
|
@ -142,6 +142,13 @@ void LLPanelContents::refresh()
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelContents::clearContents()
|
||||
{
|
||||
if (mPanelInventoryObject)
|
||||
{
|
||||
mPanelInventoryObject->clearInventoryTask();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public:
|
|||
virtual ~LLPanelContents();
|
||||
|
||||
void refresh();
|
||||
void clearContents();
|
||||
|
||||
|
||||
static void onClickNewScript(void*);
|
||||
|
|
|
|||
|
|
@ -860,10 +860,8 @@ void LLPanelEditWearable::draw()
|
|||
|
||||
void LLPanelEditWearable::onClose()
|
||||
{
|
||||
if ( isDirty() )
|
||||
{
|
||||
revertChanges();
|
||||
}
|
||||
// any unsaved changes should be reverted at this point
|
||||
revertChanges();
|
||||
}
|
||||
|
||||
void LLPanelEditWearable::setVisible(BOOL visible)
|
||||
|
|
@ -951,7 +949,7 @@ void LLPanelEditWearable::onCommitSexChange()
|
|||
gAgentAvatarp->updateSexDependentLayerSets();
|
||||
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
|
||||
showWearable(mWearablePtr, TRUE, TRUE);
|
||||
updateScrollingPanelUI();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1961,7 +1961,7 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
|
|||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if(!gdatap)
|
||||
{
|
||||
llwarns << "Unable to get group data for group " << mGroupID << llendl;
|
||||
LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2389,8 +2389,8 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
|
|||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unable to look up role information for role id: "
|
||||
<< role_id << llendl;
|
||||
LL_WARNS() << "Unable to look up role information for role id: "
|
||||
<< role_id << LL_ENDL;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -2835,7 +2835,7 @@ void LLPanelGroupActionsSubTab::setGroupID(const LLUUID& id)
|
|||
if(mActionMembers) mActionMembers->deleteAllItems();
|
||||
|
||||
if(mActionDescription) mActionDescription->clear();
|
||||
|
||||
|
||||
LLPanelGroupSubTab::setGroupID(id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,11 +225,16 @@ void LLPanelLogin::addUsersWithFavoritesToUsername()
|
|||
{
|
||||
LLComboBox* combo = getChild<LLComboBox>("username_combo");
|
||||
if (!combo) return;
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
|
||||
std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
LLSD fav_llsd;
|
||||
llifstream file;
|
||||
file.open(filename);
|
||||
if (!file.is_open()) return;
|
||||
if (!file.is_open())
|
||||
{
|
||||
file.open(old_filename);
|
||||
if (!file.is_open()) return;
|
||||
}
|
||||
LLSDSerialize::fromXML(fav_llsd, file);
|
||||
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
|
||||
iter != fav_llsd.endMap(); ++iter)
|
||||
|
|
@ -251,11 +256,17 @@ void LLPanelLogin::addFavoritesToStartLocation()
|
|||
|
||||
// Load favorites into the combo.
|
||||
std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' ');
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
|
||||
std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
|
||||
LLSD fav_llsd;
|
||||
llifstream file;
|
||||
file.open(filename);
|
||||
if (!file.is_open()) return;
|
||||
if (!file.is_open())
|
||||
{
|
||||
file.open(old_filename);
|
||||
if (!file.is_open()) return;
|
||||
}
|
||||
LLSDSerialize::fromXML(fav_llsd, file);
|
||||
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
|
||||
iter != fav_llsd.endMap(); ++iter)
|
||||
|
|
@ -954,11 +965,12 @@ void LLPanelLogin::onSelectServer()
|
|||
// The user twiddled with the grid choice ui.
|
||||
// apply the selection to the grid setting.
|
||||
LLPointer<LLCredential> credential;
|
||||
|
||||
|
||||
LLComboBox* server_combo = getChild<LLComboBox>("server_combo");
|
||||
LLSD server_combo_val = server_combo->getSelectedValue();
|
||||
LL_INFOS("AppInit") << "grid "<<server_combo_val.asString()<< LL_ENDL;
|
||||
LLGridManager::getInstance()->setGridChoice(server_combo_val.asString());
|
||||
addFavoritesToStartLocation();
|
||||
|
||||
/*
|
||||
* Determine whether or not the value in the start_location_combo makes sense
|
||||
|
|
|
|||
|
|
@ -384,9 +384,11 @@ BOOL LLPanelMainInventory::filtersVisible(void* user_data)
|
|||
|
||||
void LLPanelMainInventory::onClearSearch()
|
||||
{
|
||||
BOOL initially_active = FALSE;
|
||||
LLFloater *finder = getFinder();
|
||||
if (mActivePanel)
|
||||
{
|
||||
initially_active = mActivePanel->getFilter().isNotDefault();
|
||||
mActivePanel->setFilterSubString(LLStringUtil::null);
|
||||
mActivePanel->setFilterTypes(0xffffffffffffffffULL);
|
||||
mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS);
|
||||
|
|
@ -397,8 +399,8 @@ void LLPanelMainInventory::onClearSearch()
|
|||
LLFloaterInventoryFinder::selectAllTypes(finder);
|
||||
}
|
||||
|
||||
// re-open folders that were initially open
|
||||
if (mActivePanel)
|
||||
// re-open folders that were initially open in case filter was active
|
||||
if (mActivePanel && (mFilterSubString.size() || initially_active))
|
||||
{
|
||||
mSavedFolderState->setApply(TRUE);
|
||||
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||
|
|
|
|||
|
|
@ -1862,14 +1862,19 @@ void LLPanelObjectInventory::refresh()
|
|||
}
|
||||
if(!has_inventory)
|
||||
{
|
||||
mTaskUUID = LLUUID::null;
|
||||
removeVOInventoryListener();
|
||||
clearContents();
|
||||
clearInventoryTask();
|
||||
}
|
||||
mInventoryViewModel.setTaskID(mTaskUUID);
|
||||
//LL_INFOS() << "LLPanelObjectInventory::refresh() " << mTaskUUID << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLPanelObjectInventory::clearInventoryTask()
|
||||
{
|
||||
mTaskUUID = LLUUID::null;
|
||||
removeVOInventoryListener();
|
||||
clearContents();
|
||||
}
|
||||
|
||||
void LLPanelObjectInventory::removeSelectedItem()
|
||||
{
|
||||
if(mFolders)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public:
|
|||
|
||||
void refresh();
|
||||
const LLUUID& getTaskUUID() { return mTaskUUID;}
|
||||
void clearInventoryTask();
|
||||
void removeSelectedItem();
|
||||
void startRenamingSelectedItem();
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ LLContextMenu* PeopleContextMenu::createMenu()
|
|||
// Set up for multi-selected People
|
||||
|
||||
// registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
|
||||
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null));
|
||||
registrar.add("Avatar.IM", boost::bind(&PeopleContextMenu::startConference, this));
|
||||
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null));
|
||||
registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this));
|
||||
registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
|
||||
|
|
@ -272,6 +272,19 @@ void PeopleContextMenu::offerTeleport()
|
|||
LLAvatarActions::offerTeleport(mUUIDs);
|
||||
}
|
||||
|
||||
void PeopleContextMenu::startConference()
|
||||
{
|
||||
uuid_vec_t uuids;
|
||||
for (uuid_vec_t::const_iterator it = mUUIDs.begin(); it != mUUIDs.end(); ++it)
|
||||
{
|
||||
if(*it != gAgentID)
|
||||
{
|
||||
uuids.push_back(*it);
|
||||
}
|
||||
}
|
||||
LLAvatarActions::startConference(uuids);
|
||||
}
|
||||
|
||||
//== NearbyPeopleContextMenu ===============================================================
|
||||
|
||||
void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ private:
|
|||
bool enableContextMenuItem(const LLSD& userdata);
|
||||
bool checkContextMenuItem(const LLSD& userdata);
|
||||
void offerTeleport();
|
||||
void startConference();
|
||||
void requestTeleport();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "llscreenchannel.h"
|
||||
#include "llscriptfloater.h"
|
||||
#include "llviewermessage.h"
|
||||
|
||||
#include "llviewernetwork.h"
|
||||
LLPersistentNotificationStorage::LLPersistentNotificationStorage()
|
||||
: LLSingleton<LLPersistentNotificationStorage>()
|
||||
, LLNotificationStorage("")
|
||||
|
|
@ -158,7 +158,10 @@ void LLPersistentNotificationStorage::loadNotifications()
|
|||
|
||||
void LLPersistentNotificationStorage::initialize()
|
||||
{
|
||||
setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"));
|
||||
std::string file_name = "open_notifications_" + LLGridManager::getInstance()->getGrid() + ".xml";
|
||||
setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, file_name));
|
||||
setOldFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"));
|
||||
|
||||
LLNotifications::instance().getChannel("Persistent")->
|
||||
connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -474,12 +474,17 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
|
|||
&onSaveComplete,
|
||||
(void*)info,
|
||||
FALSE);
|
||||
return true;
|
||||
}
|
||||
else // !gAssetStorage
|
||||
{
|
||||
LL_WARNS() << "Not connected to an asset storage system." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
if(mCloseAfterSave)
|
||||
{
|
||||
closeFloater();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1166,7 +1166,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata )
|
|||
if( self->mSaveCallback )
|
||||
{
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) )
|
||||
if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT, self->mScriptName ) )
|
||||
{
|
||||
std::string filename = file_picker.getFirstFile();
|
||||
std::string scriptText=self->mEditor->getText();
|
||||
|
|
@ -1948,6 +1948,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
|
|||
|
||||
mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
|
||||
mScriptEd->mEditor->makePristine();
|
||||
mScriptEd->setScriptName(getItem()->getName());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@ public:
|
|||
|
||||
virtual bool hasAccelerators() const { return true; }
|
||||
|
||||
void setScriptName(const std::string& name){mScriptName = name;};
|
||||
|
||||
private:
|
||||
void onBtnHelp();
|
||||
void onBtnDynamicHelp();
|
||||
|
|
@ -138,6 +140,7 @@ protected:
|
|||
|
||||
private:
|
||||
std::string mSampleText;
|
||||
std::string mScriptName;
|
||||
LLScriptEditor* mEditor;
|
||||
void (*mLoadCallback)(void* userdata);
|
||||
void (*mSaveCallback)(void* userdata, BOOL close_after_save);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ void LLPreviewSound::auditionSound( void *userdata )
|
|||
|
||||
if(item && gAudiop)
|
||||
{
|
||||
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||
gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_SFX, lpos_global);
|
||||
gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_SFX);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -709,9 +709,20 @@ void LLSceneMonitorView::onClose(bool app_quitting)
|
|||
setVisible(false);
|
||||
}
|
||||
|
||||
void LLSceneMonitorView::onClickCloseBtn(bool app_quitting)
|
||||
{
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
void LLSceneMonitorView::onVisibilityChange(BOOL visible)
|
||||
{
|
||||
visible = visible && LLGLSLShader::sNoFixedFunction;
|
||||
if (!LLGLSLShader::sNoFixedFunction && visible)
|
||||
{
|
||||
visible = false;
|
||||
// keep Scene monitor and its view in sycn
|
||||
setVisible(false);
|
||||
LL_WARNS("SceneMonitor") << "Incompatible graphical settings, Scene Monitor can't be turned on" << LL_ENDL;
|
||||
}
|
||||
LLSceneMonitor::getInstance()->setDebugViewerVisible(visible);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void onClose(bool app_quitting=false);
|
||||
virtual void onClickCloseBtn(bool app_quitting=false);
|
||||
};
|
||||
|
||||
extern LLSceneMonitorView* gSceneMonitorView;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ void LLSceneView::onClose(bool)
|
|||
setVisible(false);
|
||||
}
|
||||
|
||||
void LLSceneView::onClickCloseBtn(bool)
|
||||
{
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
void LLSceneView::draw()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void onClose(bool app_qutting = false);
|
||||
virtual void onClickCloseBtn(bool app_qutting = false);
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2226,7 +2226,6 @@ bool idle_startup()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
LL_WARNS("AppInit") << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << LL_ENDL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ BOOL LLStatusBar::postBuild()
|
|||
sgp.stat.count_stat_float(&LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED);
|
||||
sgp.units("Kbps");
|
||||
sgp.precision(0);
|
||||
sgp.per_sec(true);
|
||||
mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp);
|
||||
addChild(mSGBandwidth);
|
||||
x -= SIM_STAT_WIDTH + 2;
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ private:
|
|||
void LLGLTexMemBar::draw()
|
||||
{
|
||||
S32Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory;
|
||||
S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem;
|
||||
S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMemory;
|
||||
S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory;
|
||||
S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem;
|
||||
F32 discard_bias = LLViewerTexture::sDesiredDiscardBias;
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ void LLToast::closeToast()
|
|||
{
|
||||
mOnDeleteToastSignal(this);
|
||||
|
||||
setSoundFlags(SILENT);
|
||||
|
||||
closeFloater();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,6 +266,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
|
|||
mLineEditor->setMaxTextChars(edit_text_max_chars);
|
||||
mLineEditor->setText(edit_text_contents);
|
||||
|
||||
if("SaveOutfitAs" == mNotification->getName())
|
||||
{
|
||||
mLineEditor->setPrevalidate(&LLTextValidate::validateASCII);
|
||||
}
|
||||
|
||||
// decrease limit of line editor of teleport offer dialog to avoid truncation of
|
||||
// location URL in invitation message, see EXT-6891
|
||||
if ("OfferTeleport" == mNotification->getName())
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#include "llworld.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llparcel.h"
|
||||
|
||||
#include "roles_constants.h"
|
||||
#include "llglheaders.h"
|
||||
|
||||
const std::string REGION_BLOCKS_TERRAFORM_MSG = "This region does not allow terraforming.\n"
|
||||
|
|
@ -239,9 +239,9 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
|
|||
iter != mLastAffectedRegions.end(); ++iter)
|
||||
{
|
||||
LLViewerRegion* regionp = *iter;
|
||||
if (!canTerraform(regionp))
|
||||
if (!canTerraformRegion(regionp))
|
||||
{
|
||||
alertNoTerraform(regionp);
|
||||
alertNoTerraformRegion(regionp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -376,12 +376,17 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
LLRegionPosition region_position( spot );
|
||||
LLViewerRegion* regionp = region_position.getRegion();
|
||||
|
||||
if (!canTerraform(regionp))
|
||||
if (!canTerraformRegion(regionp))
|
||||
{
|
||||
alertNoTerraform(regionp);
|
||||
alertNoTerraformRegion(regionp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!canTerraformParcel(regionp))
|
||||
{
|
||||
alertNoTerraformParcel();
|
||||
}
|
||||
|
||||
LLVector3 pos_region = region_position.getPositionRegion();
|
||||
U32 grids = regionp->getLand().mGridsPerEdge;
|
||||
S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids );
|
||||
|
|
@ -408,6 +413,16 @@ BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
|
|||
mMouseY = y;
|
||||
mGotHover = TRUE;
|
||||
gViewerWindow->setCursor(UI_CURSOR_TOOLLAND);
|
||||
|
||||
LLVector3d spot;
|
||||
if( gViewerWindow->mousePointOnLandGlobal( mMouseX, mMouseY, &spot ) )
|
||||
{
|
||||
|
||||
spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 );
|
||||
spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 );
|
||||
|
||||
LLViewerParcelMgr::getInstance()->setHoverParcel(spot);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -653,7 +668,7 @@ void LLToolBrushLand::redo()
|
|||
}*/
|
||||
|
||||
// static
|
||||
bool LLToolBrushLand::canTerraform(LLViewerRegion* regionp) const
|
||||
bool LLToolBrushLand::canTerraformRegion(LLViewerRegion* regionp) const
|
||||
{
|
||||
if (!regionp) return false;
|
||||
if (regionp->canManageEstate()) return true;
|
||||
|
|
@ -661,7 +676,22 @@ bool LLToolBrushLand::canTerraform(LLViewerRegion* regionp) const
|
|||
}
|
||||
|
||||
// static
|
||||
void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp)
|
||||
bool LLToolBrushLand::canTerraformParcel(LLViewerRegion* regionp) const
|
||||
{
|
||||
LLParcel* selected_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel();
|
||||
bool is_terraform_allowed = false;
|
||||
if (selected_parcel)
|
||||
{
|
||||
BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND);
|
||||
is_terraform_allowed = ( gAgent.canManageEstate() || (selected_parcel->getOwnerID() == regionp->getOwner()) || owner_release);
|
||||
}
|
||||
|
||||
return is_terraform_allowed;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBrushLand::alertNoTerraformRegion(LLViewerRegion* regionp)
|
||||
{
|
||||
if (!regionp) return;
|
||||
|
||||
|
|
@ -671,6 +701,19 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp)
|
|||
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBrushLand::alertNoTerraformParcel()
|
||||
{
|
||||
LLParcel* selected_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel();
|
||||
if (selected_parcel)
|
||||
{
|
||||
LLSD args;
|
||||
args["PARCEL"] = selected_parcel->getName();
|
||||
LLNotificationsUtil::add("ParcelNoTerraforming", args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///============================================================================
|
||||
/// Local function definitions
|
||||
///============================================================================
|
||||
|
|
|
|||
|
|
@ -81,10 +81,14 @@ protected:
|
|||
const LLVector3& pos_world);
|
||||
|
||||
// Does region allow terraform, or are we a god?
|
||||
bool canTerraform(LLViewerRegion* regionp) const;
|
||||
bool canTerraformRegion(LLViewerRegion* regionp) const;
|
||||
|
||||
bool canTerraformParcel(LLViewerRegion* regionp) const;
|
||||
|
||||
// Modal dialog that you can't terraform the region
|
||||
void alertNoTerraform(LLViewerRegion* regionp);
|
||||
void alertNoTerraformRegion(LLViewerRegion* regionp);
|
||||
|
||||
void alertNoTerraformParcel();
|
||||
|
||||
protected:
|
||||
F32 mStartingZ;
|
||||
|
|
|
|||
|
|
@ -126,12 +126,20 @@ void LLToolComposite::handleSelect()
|
|||
mSelected = TRUE;
|
||||
}
|
||||
|
||||
void LLToolComposite::handleDeselect()
|
||||
{
|
||||
mCur->handleDeselect();
|
||||
mCur = mDefault;
|
||||
mSelected = FALSE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// LLToolCompInspect
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LLToolCompInspect::LLToolCompInspect()
|
||||
: LLToolComposite(std::string("Inspect"))
|
||||
: LLToolComposite(std::string("Inspect")),
|
||||
mIsToolCameraActive(FALSE)
|
||||
{
|
||||
mSelectRect = new LLToolSelectRect(this);
|
||||
mDefault = mSelectRect;
|
||||
|
|
@ -146,37 +154,49 @@ LLToolCompInspect::~LLToolCompInspect()
|
|||
|
||||
BOOL LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mMouseDown = TRUE;
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback);
|
||||
return TRUE;
|
||||
BOOL handled = FALSE;
|
||||
|
||||
if (mCur == LLToolCamera::getInstance())
|
||||
{
|
||||
handled = mCur->handleMouseDown(x, y, mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
mMouseDown = TRUE;
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback);
|
||||
handled = TRUE;
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLToolCompInspect::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
BOOL handled = LLToolComposite::handleMouseUp(x, y, mask);
|
||||
mIsToolCameraActive = getCurrentTool() == LLToolCamera::getInstance();
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info)
|
||||
{
|
||||
LLViewerObject* hit_obj = pick_info.getObject();
|
||||
LLToolCompInspect * tool_inspectp = LLToolCompInspect::getInstance();
|
||||
|
||||
if (!LLToolCompInspect::getInstance()->mMouseDown)
|
||||
if (!tool_inspectp->mMouseDown)
|
||||
{
|
||||
// fast click on object, but mouse is already up...just do select
|
||||
LLToolCompInspect::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
|
||||
tool_inspectp->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
if( hit_obj )
|
||||
{
|
||||
if (LLSelectMgr::getInstance()->getSelection()->getObjectCount())
|
||||
{
|
||||
LLEditMenuHandler::gEditMenuHandler = LLSelectMgr::getInstance();
|
||||
}
|
||||
LLToolCompInspect::getInstance()->setCurrentTool( LLToolCompInspect::getInstance()->mSelectRect );
|
||||
LLToolCompInspect::getInstance()->mSelectRect->handlePick( pick_info );
|
||||
LLSelectMgr * mgr_selectp = LLSelectMgr::getInstance();
|
||||
if( hit_obj && mgr_selectp->getSelection()->getObjectCount()) {
|
||||
LLEditMenuHandler::gEditMenuHandler = mgr_selectp;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LLToolCompInspect::getInstance()->setCurrentTool( LLToolCompInspect::getInstance()->mSelectRect );
|
||||
LLToolCompInspect::getInstance()->mSelectRect->handlePick( pick_info );
|
||||
}
|
||||
tool_inspectp->setCurrentTool( tool_inspectp->mSelectRect );
|
||||
tool_inspectp->mIsToolCameraActive = FALSE;
|
||||
tool_inspectp->mSelectRect->handlePick( pick_info );
|
||||
}
|
||||
|
||||
BOOL LLToolCompInspect::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -184,6 +204,39 @@ BOOL LLToolCompInspect::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLToolCompInspect::handleKey(KEY key, MASK mask)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
|
||||
if(KEY_ALT == key)
|
||||
{
|
||||
setCurrentTool(LLToolCamera::getInstance());
|
||||
mIsToolCameraActive = TRUE;
|
||||
handled = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
handled = LLToolComposite::handleKey(key, mask);
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLToolCompInspect::onMouseCaptureLost()
|
||||
{
|
||||
LLToolComposite::onMouseCaptureLost();
|
||||
mIsToolCameraActive = FALSE;
|
||||
}
|
||||
|
||||
void LLToolCompInspect::keyUp(KEY key, MASK mask)
|
||||
{
|
||||
if (KEY_ALT == key && mCur == LLToolCamera::getInstance())
|
||||
{
|
||||
setCurrentTool(mDefault);
|
||||
mIsToolCameraActive = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// LLToolCompTranslate
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
virtual BOOL clipMouseWhenDown() { return mCur->clipMouseWhenDown(); }
|
||||
|
||||
virtual void handleSelect();
|
||||
virtual void handleDeselect() { mCur->handleDeselect(); mCur = mDefault; mSelected = FALSE; }
|
||||
virtual void handleDeselect();
|
||||
|
||||
virtual void render() { mCur->render(); }
|
||||
virtual void draw() { mCur->draw(); }
|
||||
|
|
@ -78,9 +78,10 @@ public:
|
|||
{ mCur->localPointToScreen(local_x, local_y, screen_x, screen_y); }
|
||||
|
||||
BOOL isSelecting();
|
||||
LLTool* getCurrentTool() { return mCur; }
|
||||
|
||||
protected:
|
||||
void setCurrentTool( LLTool* new_tool );
|
||||
LLTool* getCurrentTool() { return mCur; }
|
||||
// In hover handler, call this to auto-switch tools
|
||||
void setToolFromMask( MASK mask, LLTool *normal );
|
||||
|
||||
|
|
@ -108,9 +109,18 @@ public:
|
|||
|
||||
// Overridden from LLToolComposite
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleKey(KEY key, MASK mask);
|
||||
virtual void onMouseCaptureLost();
|
||||
void keyUp(KEY key, MASK mask);
|
||||
|
||||
static void pickCallback(const LLPickInfo& pick_info);
|
||||
|
||||
BOOL isToolCameraActive() const { return mIsToolCameraActive; }
|
||||
|
||||
private:
|
||||
BOOL mIsToolCameraActive;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -513,6 +513,7 @@ void LLToolDragAndDrop::onMouseCaptureLost()
|
|||
mSource = SOURCE_AGENT;
|
||||
mSourceID.setNull();
|
||||
mObjectID.setNull();
|
||||
mCustomMsg.clear();
|
||||
}
|
||||
|
||||
BOOL LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask )
|
||||
|
|
@ -556,6 +557,12 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance )
|
|||
mCursor = UI_CURSOR_NOLOCKED;
|
||||
break;
|
||||
|
||||
case ACCEPT_NO_CUSTOM:
|
||||
mToolTipMsg = mCustomMsg;
|
||||
mCursor = UI_CURSOR_NO;
|
||||
break;
|
||||
|
||||
|
||||
case ACCEPT_NO:
|
||||
mCursor = UI_CURSOR_NO;
|
||||
break;
|
||||
|
|
@ -630,6 +637,7 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
void LLToolDragAndDrop::handleDeselect()
|
||||
{
|
||||
mToolTipMsg.clear();
|
||||
mCustomMsg.clear();
|
||||
|
||||
LLToolTipMgr::instance().blockToolTips();
|
||||
}
|
||||
|
|
@ -2179,6 +2187,26 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
|
|||
// TODO: investigate wearables may not be loaded at this point EXT-8231
|
||||
}
|
||||
|
||||
U32 max_items = gSavedSettings.getU32("WearFolderLimit");
|
||||
if (category->getDescendentCount()>max_items)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
|
||||
gInventory.collectDescendentsIf(category->getUUID(),
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
not_worn);
|
||||
if (items.size() > max_items)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["AMOUNT"] = llformat("%d", max_items);
|
||||
mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args);
|
||||
return ACCEPT_NO_CUSTOM;
|
||||
}
|
||||
}
|
||||
|
||||
if(mSource == SOURCE_AGENT)
|
||||
{
|
||||
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ protected:
|
|||
BOOL mDrop;
|
||||
S32 mCurItemIndex;
|
||||
std::string mToolTipMsg;
|
||||
std::string mCustomMsg;
|
||||
|
||||
enddrag_signal_t mEndDragSignal;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
#include "llmorphview.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llmenugl.h"
|
||||
|
||||
// Globals
|
||||
BOOL gCameraBtnZoom = TRUE;
|
||||
|
|
@ -75,6 +76,7 @@ LLToolCamera::LLToolCamera()
|
|||
mOutsideSlopX(FALSE),
|
||||
mOutsideSlopY(FALSE),
|
||||
mValidClickPoint(FALSE),
|
||||
mValidSelection(FALSE),
|
||||
mMouseSteering(FALSE),
|
||||
mMouseUpX(0),
|
||||
mMouseUpY(0),
|
||||
|
|
@ -91,6 +93,8 @@ void LLToolCamera::handleSelect()
|
|||
if (gFloaterTools)
|
||||
{
|
||||
gFloaterTools->setStatusText("camera");
|
||||
// in case we start from tools floater, we count any selection as valid
|
||||
mValidSelection = gFloaterTools->getVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +102,14 @@ void LLToolCamera::handleSelect()
|
|||
void LLToolCamera::handleDeselect()
|
||||
{
|
||||
// gAgent.setLookingAtAvatar(FALSE);
|
||||
|
||||
// Make sure that temporary selection won't pass anywhere except pie tool.
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
|
||||
{
|
||||
LLMenuGL::sMenuContainer->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ protected:
|
|||
BOOL mOutsideSlopX;
|
||||
BOOL mOutsideSlopY;
|
||||
BOOL mValidClickPoint;
|
||||
BOOL mValidSelection;
|
||||
BOOL mMouseSteering;
|
||||
S32 mMouseUpX; // needed for releaseMouse()
|
||||
S32 mMouseUpY;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llworld.h"
|
||||
#include "llmenugl.h"
|
||||
|
||||
const S32 SLOP_DIST_SQ = 4;
|
||||
|
||||
|
|
@ -83,6 +84,7 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite )
|
|||
mLastFace(0),
|
||||
mSpinGrabbing( FALSE ),
|
||||
mSpinRotation(),
|
||||
mClickedInMouselook( FALSE ),
|
||||
mHideBuildHighlight(FALSE)
|
||||
{ }
|
||||
|
||||
|
|
@ -97,6 +99,8 @@ void LLToolGrab::handleSelect()
|
|||
{
|
||||
// viewer can crash during startup if we don't check.
|
||||
gFloaterTools->setStatusText("grab");
|
||||
// in case we start from tools floater, we count any selection as valid
|
||||
mValidSelection = gFloaterTools->getVisible();
|
||||
}
|
||||
gGrabBtnVertical = FALSE;
|
||||
gGrabBtnSpin = FALSE;
|
||||
|
|
@ -109,6 +113,14 @@ void LLToolGrab::handleDeselect()
|
|||
setMouseCapture( FALSE );
|
||||
}
|
||||
|
||||
// Make sure that temporary(invalid) selection won't pass anywhere except pie tool.
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible())))
|
||||
{
|
||||
LLMenuGL::sMenuContainer->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -136,6 +148,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
// can grab transparent objects (how touch event propagates, scripters rely on this)
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE);
|
||||
}
|
||||
mClickedInMouselook = gAgentCamera.cameraMouselook();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -926,13 +939,21 @@ BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
setMouseCapture( FALSE );
|
||||
}
|
||||
|
||||
mMode = GRAB_INACTIVE;
|
||||
|
||||
// HACK: Make some grabs temporary
|
||||
if (gGrabTransientTool)
|
||||
if(mClickedInMouselook && !gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gBasicToolset->selectTool( gGrabTransientTool );
|
||||
gGrabTransientTool = NULL;
|
||||
mClickedInMouselook = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// HACK: Make some grabs temporary
|
||||
if (gGrabTransientTool)
|
||||
{
|
||||
gBasicToolset->selectTool( gGrabTransientTool );
|
||||
gGrabTransientTool = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ private:
|
|||
BOOL mHasMoved; // has mouse moved off center at all?
|
||||
BOOL mOutsideSlop; // has mouse moved outside center 5 pixels?
|
||||
BOOL mDeselectedThisClick;
|
||||
BOOL mValidSelection;
|
||||
|
||||
S32 mLastFace;
|
||||
LLVector2 mLastUVCoords;
|
||||
|
|
@ -133,6 +134,8 @@ private:
|
|||
LLQuaternion mSpinRotation;
|
||||
|
||||
BOOL mHideBuildHighlight;
|
||||
|
||||
BOOL mClickedInMouselook;
|
||||
};
|
||||
|
||||
extern BOOL gGrabBtnVertical;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
//#include "llfirstuse.h"
|
||||
// tools and manipulators
|
||||
#include "llfloaterinspect.h"
|
||||
#include "lltool.h"
|
||||
#include "llmanipscale.h"
|
||||
#include "llselectmgr.h"
|
||||
|
|
@ -218,7 +219,20 @@ LLTool* LLToolMgr::getCurrentTool()
|
|||
}
|
||||
if (cur_tool)
|
||||
{
|
||||
cur_tool->handleSelect();
|
||||
if ( LLToolCompInspect::getInstance()->isToolCameraActive()
|
||||
&& prev_tool == LLToolCamera::getInstance()
|
||||
&& cur_tool == LLToolPie::getInstance() )
|
||||
{
|
||||
LLFloaterInspect * inspect_instance = LLFloaterReg::getTypedInstance<LLFloaterInspect>("inspect");
|
||||
if(inspect_instance && inspect_instance->getVisible())
|
||||
{
|
||||
setTransientTool(LLToolCompInspect::getInstance());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cur_tool->handleSelect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -439,8 +439,12 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object)
|
|||
break;
|
||||
case CLICK_ACTION_BUY:
|
||||
if ( mClickActionBuyEnabled )
|
||||
{
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
{
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getHoverNode();
|
||||
if (!node || node->mSaleInfo.isForSale())
|
||||
{
|
||||
cursor = UI_CURSOR_TOOLBUY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_OPEN:
|
||||
|
|
@ -544,6 +548,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
|
|||
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
|
||||
LLViewerObject *parent = NULL;
|
||||
LLViewerObject *object = mHoverPick.getObject();
|
||||
LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace);
|
||||
if (object)
|
||||
{
|
||||
parent = object->getRootEdit();
|
||||
|
|
@ -1306,7 +1311,16 @@ void LLToolPie::handleDeselect()
|
|||
}
|
||||
// remove temporary selection for pie menu
|
||||
LLSelectMgr::getInstance()->setHoverObject(NULL);
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
|
||||
// Menu may be still up during transfer to different tool.
|
||||
// toolfocus and toolgrab should retain menu, they will clear it if needed
|
||||
MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
|
||||
if (gMenuHolder && (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0))
|
||||
{
|
||||
// in most cases menu is useless without correct selection, so either keep both or discard both
|
||||
gMenuHolder->hideMenus();
|
||||
LLSelectMgr::getInstance()->validateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
LLTool* LLToolPie::getOverrideTool(MASK mask)
|
||||
|
|
@ -1686,6 +1700,12 @@ BOOL LLToolPie::handleRightClickPick()
|
|||
}
|
||||
}
|
||||
|
||||
// non UI object - put focus back "in world"
|
||||
if (gFocusMgr.getKeyboardFocus())
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
}
|
||||
|
||||
LLTool::handleRightMouseDown(x, y, mask);
|
||||
// We handled the event.
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llmanip.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llviewermediafocus.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
#include "llviewercamera.h"
|
||||
|
|
@ -110,6 +111,21 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
|
|||
{
|
||||
BOOL already_selected = object->isSelected();
|
||||
|
||||
if (already_selected &&
|
||||
object->getNumTEs() > 0 &&
|
||||
!LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES))
|
||||
{
|
||||
const LLTextureEntry* tep = object->getTE(pick.mObjectFace);
|
||||
if (tep && !tep->isSelected() && !LLViewerMediaFocus::getInstance()->getFocusedObjectID().isNull())
|
||||
{
|
||||
// we were interacting with media and clicked on non selected face, drop media focus
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
// selection was removed and zoom preserved by clearFocus(), continue with regular selection
|
||||
already_selected = false;
|
||||
extend_select = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( extend_select )
|
||||
{
|
||||
if ( already_selected )
|
||||
|
|
|
|||
|
|
@ -278,13 +278,13 @@ public:
|
|||
tokens[2].asReal(),
|
||||
tokens[3].asReal());
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["LOCATION"] = tokens[0];
|
||||
|
||||
// Region names may be %20 escaped.
|
||||
std::string region_name = LLURI::unescape(tokens[0]);
|
||||
|
||||
LLSD args;
|
||||
args["LOCATION"] = region_name;
|
||||
|
||||
LLSD payload;
|
||||
payload["region_name"] = region_name;
|
||||
payload["callback_url"] = LLSLURL(region_name, coords).getSLURLString();
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
#include "llfloaterinspect.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterjoystick.h"
|
||||
#include "llfloaterlagmeter.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterlandholdings.h"
|
||||
#include "llfloatermap.h"
|
||||
|
|
@ -240,6 +241,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLNotificationsUI::registerFloater();
|
||||
LLFloaterDisplayNameUtil::registerFloater();
|
||||
|
||||
LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
|
||||
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
|
||||
|
||||
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void agent_push_backward( EKeystate s )
|
|||
{
|
||||
camera_move_backward(s);
|
||||
}
|
||||
else if (!gAgent.backwardGrabbed() && gAgentAvatarp->isSitting())
|
||||
else if (!gAgent.backwardGrabbed() && gAgentAvatarp->isSitting() && gSavedSettings.getBOOL("LeaveMouselook"))
|
||||
{
|
||||
gAgentCamera.changeCameraToThirdPerson();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterimcontainer.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterimnearbychat.h"
|
||||
#include "llfloaterpathfindingcharacters.h"
|
||||
#include "llfloaterpathfindinglinksets.h"
|
||||
#include "llfloaterpay.h"
|
||||
|
|
@ -92,6 +93,7 @@
|
|||
#include "llparcel.h"
|
||||
#include "llrootview.h"
|
||||
#include "llsceneview.h"
|
||||
#include "llscenemonitor.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llspellcheckmenuhandler.h"
|
||||
#include "llstatusbar.h"
|
||||
|
|
@ -533,6 +535,10 @@ class LLAdvancedToggleConsole : public view_listener_t
|
|||
{
|
||||
toggle_visibility( (void*)gSceneView);
|
||||
}
|
||||
else if ("scene monitor" == console_type)
|
||||
{
|
||||
toggle_visibility( (void*)gSceneMonitorView);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -559,6 +565,10 @@ class LLAdvancedCheckConsole : public view_listener_t
|
|||
{
|
||||
new_value = get_visibility( (void*) gSceneView);
|
||||
}
|
||||
else if ("scene monitor" == console_type)
|
||||
{
|
||||
new_value = get_visibility( (void*) gSceneMonitorView);
|
||||
}
|
||||
|
||||
return new_value;
|
||||
}
|
||||
|
|
@ -5660,6 +5670,25 @@ void toggle_debug_menus(void*)
|
|||
// gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects...");
|
||||
// }
|
||||
//
|
||||
|
||||
class LLCommunicateNearbyChat : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance();
|
||||
bool nearby_visible = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->isInVisibleChain();
|
||||
if(nearby_visible && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1)
|
||||
{
|
||||
im_box->selectNextorPreviousConversation(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLWorldSetHomeLocation : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
|
|
@ -6176,7 +6205,7 @@ class LLPromptShowURL : public view_listener_t
|
|||
std::string alert = param.substr(0, offset);
|
||||
std::string url = param.substr(offset+1);
|
||||
|
||||
if(gSavedSettings.getBOOL("UseExternalBrowser"))
|
||||
if (LLWeb::useExternalBrowser(url))
|
||||
{
|
||||
LLSD payload;
|
||||
payload["url"] = url;
|
||||
|
|
@ -7796,7 +7825,7 @@ void handle_web_content_test(const LLSD& param)
|
|||
void handle_show_url(const LLSD& param)
|
||||
{
|
||||
std::string url = param.asString();
|
||||
if(gSavedSettings.getBOOL("UseExternalBrowser"))
|
||||
if (LLWeb::useExternalBrowser(url))
|
||||
{
|
||||
LLWeb::loadURLExternal(url);
|
||||
}
|
||||
|
|
@ -8233,9 +8262,9 @@ class LLWorldEnableEnvSettings : public view_listener_t
|
|||
bool result = false;
|
||||
std::string tod = userdata.asString();
|
||||
|
||||
if (tod == "region")
|
||||
if (LLEnvManagerNew::instance().getUseRegionSettings())
|
||||
{
|
||||
return LLEnvManagerNew::instance().getUseRegionSettings();
|
||||
return (tod == "region");
|
||||
}
|
||||
|
||||
if (LLEnvManagerNew::instance().getUseFixedSky())
|
||||
|
|
@ -8578,6 +8607,9 @@ void initialize_menus()
|
|||
// Me > Movement
|
||||
view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying");
|
||||
|
||||
//Communicate Nearby chat
|
||||
view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat");
|
||||
|
||||
// Communicate > Voice morphing > Subscribe...
|
||||
commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe));
|
||||
LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance();
|
||||
|
|
|
|||
|
|
@ -477,8 +477,10 @@ class LLFileEnableCloseWindow : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
bool new_value = NULL != gFloaterView->getFrontmostClosableFloater();
|
||||
return new_value;
|
||||
bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater());
|
||||
bool frontmost_snapshot_fl_exists = (NULL != gSnapshotFloaterView->getFrontmostClosableFloater());
|
||||
|
||||
return frontmost_fl_exists || frontmost_snapshot_fl_exists;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -486,7 +488,21 @@ class LLFileCloseWindow : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLFloater::closeFrontmostFloater();
|
||||
bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater());
|
||||
LLFloater* snapshot_floater = gSnapshotFloaterView->getFrontmostClosableFloater();
|
||||
|
||||
if(snapshot_floater && (!frontmost_fl_exists || snapshot_floater->hasFocus()))
|
||||
{
|
||||
snapshot_floater->closeFloater();
|
||||
if (gFocusMgr.getKeyboardFocus() == NULL)
|
||||
{
|
||||
gFloaterView->focusFrontFloater();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloater::closeFrontmostFloater();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3768,6 +3768,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||
LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args);
|
||||
}
|
||||
|
||||
// don't call notification for debug messages from not owned objects
|
||||
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
|
||||
{
|
||||
if (gAgentID != chat.mOwnerID)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LLSD msg_notify = LLSD(LLSD::emptyMap());
|
||||
msg_notify["session_id"] = LLUUID();
|
||||
msg_notify["from_id"] = chat.mFromID;
|
||||
|
|
@ -5823,7 +5832,7 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific
|
|||
tp_failure_notification = LLNotificationsUtil::add(notificationID+"_PreferencesOutOfSync", llsdBlock, llsdBlock, handle_prompt_for_maturity_level_change_callback);
|
||||
returnValue = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // End of special handling for "TeleportEntryAccessBlocked"
|
||||
else
|
||||
{ // Normal case, no message munging
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue