Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
e161b128
Commit
e161b128
authored
2 years ago
by
Maxim Nikolenko
Browse files
Options
Downloads
Patches
Plain Diff
SL-19379 WIP one more batch of context menu items
parent
0d068b0f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llinventorygallerymenu.cpp
+54
-0
54 additions, 0 deletions
indra/newview/llinventorygallerymenu.cpp
with
54 additions
and
0 deletions
indra/newview/llinventorygallerymenu.cpp
+
54
−
0
View file @
e161b128
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include
"llnotificationsutil.h"
#include
"llnotificationsutil.h"
#include
"llviewerfoldertype.h"
#include
"llviewerfoldertype.h"
#include
"llviewerwindow.h"
#include
"llviewerwindow.h"
#include
"llvoavatarself.h"
LLContextMenu
*
LLInventoryGalleryContextMenu
::
createMenu
()
LLContextMenu
*
LLInventoryGalleryContextMenu
::
createMenu
()
{
{
...
@@ -276,6 +277,18 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
...
@@ -276,6 +277,18 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
{
{
ungroup_folder_items
(
selected_id
);
ungroup_folder_items
(
selected_id
);
}
}
else
if
(
"take_off"
==
action
||
"detach"
==
action
)
{
LLAppearanceMgr
::
instance
().
removeItemFromAvatar
(
selected_id
);
}
else
if
(
"wear_add"
==
action
)
{
LLAppearanceMgr
::
instance
().
wearItemOnAvatar
(
selected_id
,
true
,
false
);
// Don't replace if adding.
}
else
if
(
"wear"
==
action
)
{
LLAppearanceMgr
::
instance
().
wearItemOnAvatar
(
selected_id
,
true
,
true
);
}
}
}
void
LLInventoryGalleryContextMenu
::
onRename
(
const
LLSD
&
notification
,
const
LLSD
&
response
)
void
LLInventoryGalleryContextMenu
::
onRename
(
const
LLSD
&
notification
,
const
LLSD
&
response
)
...
@@ -564,6 +577,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
...
@@ -564,6 +577,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
&&
obj
->
getType
()
!=
LLAssetType
::
AT_OBJECT
&&
obj
->
getType
()
!=
LLAssetType
::
AT_OBJECT
&&
obj
->
getType
()
!=
LLAssetType
::
AT_CLOTHING
&&
obj
->
getType
()
!=
LLAssetType
::
AT_CLOTHING
&&
obj
->
getType
()
!=
LLAssetType
::
AT_CATEGORY
&&
obj
->
getType
()
!=
LLAssetType
::
AT_CATEGORY
&&
obj
->
getType
()
!=
LLAssetType
::
AT_LANDMARK
&&
obj
->
getType
()
!=
LLAssetType
::
AT_BODYPART
))
&&
obj
->
getType
()
!=
LLAssetType
::
AT_BODYPART
))
{
{
bool
can_open
=
!
LLAssetType
::
lookupIsLinkType
(
obj
->
getType
());
bool
can_open
=
!
LLAssetType
::
lookupIsLinkType
(
obj
->
getType
());
...
@@ -585,6 +599,46 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
...
@@ -585,6 +599,46 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
{
{
items
.
push_back
(
std
::
string
(
"Landmark Open"
));
items
.
push_back
(
std
::
string
(
"Landmark Open"
));
}
}
else
if
(
obj
->
getType
()
==
LLAssetType
::
AT_OBJECT
||
obj
->
getType
()
==
LLAssetType
::
AT_CLOTHING
||
obj
->
getType
()
==
LLAssetType
::
AT_BODYPART
)
{
items
.
push_back
(
std
::
string
(
"Wearable And Object Separator"
));
if
(
obj
->
getType
()
==
LLAssetType
::
AT_CLOTHING
)
{
items
.
push_back
(
std
::
string
(
"Take Off"
));
}
if
(
get_is_item_worn
(
selected_id
))
{
if
(
obj
->
getType
()
==
LLAssetType
::
AT_OBJECT
)
{
items
.
push_back
(
std
::
string
(
"Detach From Yourself"
));
}
disabled_items
.
push_back
(
std
::
string
(
"Wearable And Object Wear"
));
disabled_items
.
push_back
(
std
::
string
(
"Wearable Add"
));
}
else
{
if
(
obj
->
getType
()
==
LLAssetType
::
AT_OBJECT
)
{
items
.
push_back
(
std
::
string
(
"Wearable Add"
));
}
items
.
push_back
(
std
::
string
(
"Wearable And Object Wear"
));
disabled_items
.
push_back
(
std
::
string
(
"Take Off"
));
}
if
(
!
gAgentAvatarp
->
canAttachMoreObjects
()
&&
(
obj
->
getType
()
==
LLAssetType
::
AT_OBJECT
))
{
disabled_items
.
push_back
(
std
::
string
(
"Wearable And Object Wear"
));
disabled_items
.
push_back
(
std
::
string
(
"Wearable Add"
));
}
if
(
selected_item
&&
(
obj
->
getType
()
!=
LLAssetType
::
AT_OBJECT
)
&&
LLWearableType
::
getInstance
()
->
getAllowMultiwear
(
selected_item
->
getWearableType
()))
{
items
.
push_back
(
std
::
string
(
"Wearable Add"
));
if
(
!
gAgentWearables
.
canAddWearable
(
selected_item
->
getWearableType
()))
{
disabled_items
.
push_back
(
std
::
string
(
"Wearable Add"
));
}
}
}
if
(
is_link
)
if
(
is_link
)
{
{
items
.
push_back
(
std
::
string
(
"Find Original"
));
items
.
push_back
(
std
::
string
(
"Find Original"
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment