Add Group menus to group search, profiles, and groups floater

Also expand Group SLURL menu items for links in chat
Calculate ID Type from mPopupMenu's presence in sMenus, if possible.
This commit is contained in:
Liru Færs
2019-11-24 07:53:36 -05:00
parent 90677188ec
commit 841bd0e515
7 changed files with 35 additions and 5 deletions

View File

@@ -25,7 +25,7 @@
const std::array<const std::string, LFIDBearer::COUNT> LFIDBearer::sMenuStrings
{
"menu_avs_list.xml" // 0
, "menu_groups_list.xml" // 1 // Singu TODO
, "menu_groups_list.xml" // 1
, "menu_objects_list.xml" // 2 // Singu TODO
};
std::array<LLMenuGL*, LFIDBearer::COUNT> LFIDBearer::sMenus {};

View File

@@ -259,6 +259,14 @@ public:
void setContextMenu(U8 index) { mPopupMenu = sMenus[index]; }
void setContextMenu(const std::string& menu);
Type getSelectedType() const override
{
for (auto i = 0; mPopupMenu && i < COUNT; ++i)
if (sMenus[i] == mPopupMenu)
return (Type)i;
return LFIDBearer::getSelectedType();
}
// Overridden from LLView
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);

View File

@@ -743,7 +743,7 @@ To buy direct, visit the land and click on the place name in the title bar.
<scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true"
draw_heading="true"
follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true"
multi_select="false" name="results" search_column="2" width="339">
multi_select="false" name="results" search_column="2" width="339" menu_num="1">
<column label="" name="icon" sort="score" sort_ascending="false" width="24" />
<column label="" name="type" width="-1" />
<column dynamicwidth="true" label="Name" name="name" />

View File

@@ -10,6 +10,28 @@
<menu_item_call.on_click
function="List.ShowProfile" />
</menu_item_call>
<menu_item_call label="Open Group Chat" name="im_group">
<on_click function="List.StartIM"/>
<on_visible function="List.IsInGroup"/>
</menu_item_call>
<menu_item_call label="Call Group" name="call_group">
<on_click function="List.StartCall"/>
<on_enable function="List.EnableCall"/>
<on_visible function="List.IsInGroup"/>
</menu_item_call>
<menu_item_call label="Activate Group" name="activate_group">
<on_click function="List.Activate"/>
<on_visible function="List.IsInGroup"/>
</menu_item_call>
<menu_item_call label="Join Group" name="join_group">
<on_click function="List.Join"/>
<on_visible function="List.NotInGroup"/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Leave Group" name="leave_group">
<on_click function="List.Leave"/>
<on_visible function="List.IsInGroup"/>
</menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call

View File

@@ -102,7 +102,7 @@
</text>
<scroll_list background_visible="true" bottom_delta="-80" column_padding="5" draw_border="true"
follows="left|top" height="95" left="79" mouse_opaque="false"
multi_select="false" name="groups" width="321" />
multi_select="false" name="groups" width="321" menu_num="1"/>
<string name="None">None</string>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-18" drop_shadow_visible="true" follows="left|top"

View File

@@ -5,7 +5,7 @@
draw_heading="true" draw_stripes="true" enabled="true"
follows="left|top|right|bottom" left="10" mouse_opaque="true"
multi_select="true" name="group list" tab_stop="true" top="-10"
width="240">
width="240" menu_num="1">
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
<!--<column label="Active" name="is_active_group"
tool_tip="Group is set as active" width="40" />-->

View File

@@ -5,7 +5,7 @@
draw_heading="true" draw_stripes="true" enabled="true"
follows="left|top|right|bottom" left="5" mouse_opaque="true"
multi_select="true" name="group list" tab_stop="true" top="-10"
width="340">
width="340" menu_num="1">
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
<!--<column label="Active" name="is_active_group"
tool_tip="Group is set as active" width="40" />-->