Commits

Anonymous committed 3918ac0

implemented major task EXT-2153 make changes to Communicate menu

Comments (0)

Files changed (3)

indra/newview/llviewermenu.cpp

 	root->addChild(side_tray);
 }
 
-class LLSelfFriends : public view_listener_t
-{
-	bool handleEvent(const LLSD& userdata)
-	{
-		// Open "Friends" tab of the "People" panel in side tray.
+class LLShowPanelPeopleTab : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		// Open tab of the "People" panel in side tray.
 		LLSD param;
-		param["people_panel_tab_name"] = "friends_panel";
-
-		LLSideTray::getInstance()->showPanel("panel_people", param);
-		return true;
-	}
-};
-
-class LLSelfGroups : public view_listener_t
-{
-	bool handleEvent(const LLSD& userdata)
-	{
-		// Open "Groups" tab of the "People" panel in side tray.
-		LLSD param;
-		param["people_panel_tab_name"] = "groups_panel";
+		param["people_panel_tab_name"] = userdata.asString();
 		LLSideTray::getInstance()->showPanel("panel_people", param);
 		return true;
 	}
 	view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
 
 	// we don't use boost::bind directly to delay side tray construction
-	view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends");
-	view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups");
+	view_listener_t::addMenu( new LLShowPanelPeopleTab(), "SideTray.PanelPeopleTab");
 
 	 // Avatar pie menu
 	view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");

indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml

    label="My Friends"
    name="my_friends">
     <menu_item_call.on_click
-     function="Self.Friends"
-     parameter="" />
+    function="SideTray.PanelPeopleTab"
+    parameter="friends_panel" />
   </menu_item_call>
   <menu_item_call
    label="My Groups"
    name="my_groups">
     <menu_item_call.on_click
-     function="Self.Groups" />
+     function="SideTray.PanelPeopleTab"
+     parameter="groups_panel" />
   </menu_item_call>
 </menu>

indra/newview/skins/default/xui/en/menu_viewer.xml

      layout="topleft"
      name="Communicate"
      tear_off="true">
-        <menu_item_check
+        <menu_item_call
          label="My Friends"
          layout="topleft"
          name="My Friends"
          shortcut="control|shift|F">
-            <menu_item_check.on_check
-             function="Floater.Visible"
-             parameter="contacts.friends" />
-            <menu_item_check.on_click
-             function="Floater.Toggle"
-             parameter="contacts.friends" />
-        </menu_item_check>
+            <menu_item_call.on_click
+             function="SideTray.PanelPeopleTab"
+             parameter="friends_panel" />
+            </menu_item_call>
         <menu_item_call
          label="My Groups"
          layout="topleft"
          name="My Groups">
             <menu_item_call.on_click
-             function="Floater.Show"
-             parameter="contacts.groups" />
+             function="SideTray.PanelPeopleTab"
+             parameter="groups_panel" />
         </menu_item_call>
         <menu_item_separator
          layout="topleft" />
              function="Floater.Toggle"
              parameter="nearby_chat" />
         </menu_item_check>
-        <menu_item_check
-         label="Nearby Speakers"
+        <menu_item_call
+         label="Nearby People"
          layout="topleft"
          name="Active Speakers"
          shortcut="control|shift|A">
-            <menu_item_check.on_check
-             function="Floater.Visible"
-             parameter="active_speakers" />
-            <menu_item_check.on_click
-             function="Floater.Toggle"
-             parameter="active_speakers" />
-        </menu_item_check>
+            <menu_item_call.on_click
+             function="SideTray.PanelPeopleTab"
+             parameter="nearby_panel" />
+            </menu_item_call>
         <menu_item_check
          label="Nearby Media"
          layout="topleft"