aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llgroupmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llgroupmgr.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/linden/indra/newview/llgroupmgr.cpp b/linden/indra/newview/llgroupmgr.cpp
index fbdcf81..8e49749 100644
--- a/linden/indra/newview/llgroupmgr.cpp
+++ b/linden/indra/newview/llgroupmgr.cpp
@@ -49,6 +49,7 @@
49#include "llviewerwindow.h" 49#include "llviewerwindow.h"
50#include "llfloaterdirectory.h" 50#include "llfloaterdirectory.h"
51#include "llfloatergroupinfo.h" 51#include "llfloatergroupinfo.h"
52#include "lluictrlfactory.h"
52 53
53LLGroupMgr sGroupMgr; // use local instance so that it gets cleaned up on application exit 54LLGroupMgr sGroupMgr; // use local instance so that it gets cleaned up on application exit
54LLGroupMgr* gGroupMgr = &sGroupMgr; 55LLGroupMgr* gGroupMgr = &sGroupMgr;
@@ -1729,21 +1730,28 @@ void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
1729//static 1730//static
1730bool LLGroupMgr::parseRoleActions(const LLString& xml_filename) 1731bool LLGroupMgr::parseRoleActions(const LLString& xml_filename)
1731{ 1732{
1732 LLXmlTree xml_tree; 1733 LLXMLNodePtr root;
1733 LLString xml_file = LLUI::locateSkin(xml_filename); 1734
1734 BOOL success = xml_tree.parseFile(xml_file, TRUE ); 1735 BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
1735 LLXmlTreeNode* root = xml_tree.getRoot(); 1736
1736 if (!success || !root || !root->hasName( "role_actions" )) 1737 if (!success || !root || !root->hasName( "role_actions" ))
1737 { 1738 {
1738 llerrs << "Problem reading UI role_actions file: " << xml_filename << llendl; 1739 llerrs << "Problem reading UI role_actions file: " << xml_filename << llendl;
1739 return false; 1740 return false;
1740 } 1741 }
1741 1742
1742 for (LLXmlTreeNode* action_set = root->getChildByName("action_set"); 1743 LLXMLNodeList role_list;
1743 action_set != NULL; action_set = root->getNextNamedChild()) 1744 LLXMLNodeList::iterator role_iter;
1745
1746 root->getChildren("action_set", role_list, false);
1747
1748 for (role_iter = role_list.begin(); role_iter != role_list.end(); ++role_iter)
1744 { 1749 {
1750 LLXMLNodePtr action_set = role_iter->second;
1751
1745 LLRoleActionSet* role_action_set = new LLRoleActionSet(); 1752 LLRoleActionSet* role_action_set = new LLRoleActionSet();
1746 LLRoleAction* role_action_data = new LLRoleAction(); 1753 LLRoleAction* role_action_data = new LLRoleAction();
1754
1747 // name= 1755 // name=
1748 LLString action_set_name; 1756 LLString action_set_name;
1749 if (action_set->getAttributeString("name", action_set_name)) 1757 if (action_set->getAttributeString("name", action_set_name))
@@ -1774,9 +1782,15 @@ bool LLGroupMgr::parseRoleActions(const LLString& xml_filename)
1774 // power mask= 1782 // power mask=
1775 U64 set_power_mask = 0; 1783 U64 set_power_mask = 0;
1776 1784
1777 for (LLXmlTreeNode* action = action_set->getChildByName("action"); 1785 LLXMLNodeList action_list;
1778 action != NULL; action = action_set->getNextNamedChild()) 1786 LLXMLNodeList::iterator action_iter;
1787
1788 action_set->getChildren("action", action_list, false);
1789
1790 for (action_iter = action_list.begin(); action_iter != action_list.end(); ++action_iter)
1779 { 1791 {
1792 LLXMLNodePtr action = action_iter->second;
1793
1780 LLRoleAction* role_action = new LLRoleAction(); 1794 LLRoleAction* role_action = new LLRoleAction();
1781 1795
1782 // name= 1796 // name=