diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index bae86672c..fb9383ecb 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -57,6 +57,8 @@ static LLRegisterWidget r("scroll_list"); +LLMenuGL* sScrollListMenus[1] = {}; // List menus that recur, such as general avatars or groups menus + // local structures & classes. struct SortScrollListItem { @@ -2552,7 +2554,15 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node) node->getAttribute_bool("mouse_wheel_opaque", mMouseWheelOpaque); } - if (node->hasAttribute("menu_file")) + if (node->hasAttribute("menu_num")) + { + // Some scroll lists use common menus identified by number + // 0 is menu_avs_list.xml, 1 will be for groups, 2 could be for lists of objects + S32 menu_num; + node->getAttributeS32("menu_num", menu_num); + mPopupMenu = sScrollListMenus[menu_num]; + } + else if (node->hasAttribute("menu_file")) { std::string menu_file; node->getAttributeString("menu_file", menu_file); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ca85a2ac2..32e426544 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -239,6 +239,7 @@ extern BOOL gDebugTextEditorTips; extern BOOL gShowOverlayTitle; extern BOOL gOcclusionCull; extern AIHTTPView* gHttpView; +extern LLMenuGL* sScrollListMenus[1]; // // Globals // @@ -781,6 +782,10 @@ void init_menus() gMenuHolder->addChild(gLoginMenuBarView); + // Singu Note: Initialize common ScrollListMenus here + sScrollListMenus[0] = LLUICtrlFactory::getInstance()->buildMenu("menu_avs_list.xml", gMenuHolder); + //sScrollListMenus[1] = LLUICtrlFactory::getInstance()->buildMenu("menu_groups_list.xml"); // Singu TODO + LLView* ins = gMenuBarView->getChildView("insert_world", true, false); ins->setVisible(false); ins = gMenuBarView->getChildView("insert_agent", true, false); diff --git a/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/indra/newview/skins/default/xui/en-us/floater_about_land.xml index fec011a1a..eac223645 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -1383,7 +1383,7 @@ Select the thumbnail to choose a different texture. column_padding="0" draw_border="true" draw_heading="false" enabled="true" follows="top|bottom" heading_font="SansSerifSmall" heading_height="14" height="80" left="20" mouse_opaque="true" multi_select="true" - name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_file="menu_avs_list.xml"/> + name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0"/>