aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2014-11-16 10:27:10 -0800
committerDiva Canto2014-11-16 10:27:10 -0800
commit6a8353af36ed1a55a8da8e0645a1536b40f70caa (patch)
tree5f94b5202fd0f13b34dfc090b3d4632d0efb5f00
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-6a8353af36ed1a55a8da8e0645a1536b40f70caa.zip
opensim-SC_OLD-6a8353af36ed1a55a8da8e0645a1536b40f70caa.tar.gz
opensim-SC_OLD-6a8353af36ed1a55a8da8e0645a1536b40f70caa.tar.bz2
opensim-SC_OLD-6a8353af36ed1a55a8da8e0645a1536b40f70caa.tar.xz
Improved SpecialUIModule so that it sends the floater data properly.
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
index 0a8c83a..51f60bb 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
@@ -120,9 +120,10 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
120 m_log.DebugFormat("[SPECIAL UI]: OnSimulatorFeaturesRequest in {0}", m_scene.RegionInfo.RegionName); 120 m_log.DebugFormat("[SPECIAL UI]: OnSimulatorFeaturesRequest in {0}", m_scene.RegionInfo.RegionName);
121 if (m_Helper.ShouldSend(agentID) && m_Helper.UserLevel(agentID) <= m_UserLevel) 121 if (m_Helper.ShouldSend(agentID) && m_Helper.UserLevel(agentID) <= m_UserLevel)
122 { 122 {
123 OSDMap extrasMap;
124 OSDMap specialUI = new OSDMap();
123 using (StreamReader s = new StreamReader(Path.Combine(VIEWER_SUPPORT_DIR, "panel_toolbar.xml"))) 125 using (StreamReader s = new StreamReader(Path.Combine(VIEWER_SUPPORT_DIR, "panel_toolbar.xml")))
124 { 126 {
125 OSDMap extrasMap;
126 if (features.ContainsKey("OpenSimExtras")) 127 if (features.ContainsKey("OpenSimExtras"))
127 extrasMap = (OSDMap)features["OpenSimExtras"]; 128 extrasMap = (OSDMap)features["OpenSimExtras"];
128 else 129 else
@@ -131,11 +132,29 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
131 features["OpenSimExtras"] = extrasMap; 132 features["OpenSimExtras"] = extrasMap;
132 } 133 }
133 134
134 OSDMap specialUI = new OSDMap();
135 specialUI["toolbar"] = OSDMap.FromString(s.ReadToEnd()); 135 specialUI["toolbar"] = OSDMap.FromString(s.ReadToEnd());
136 extrasMap["special-ui"] = specialUI; 136 extrasMap["special-ui"] = specialUI;
137 } 137 }
138 m_log.DebugFormat("[SPECIAL UI]: Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName); 138 m_log.DebugFormat("[SPECIAL UI]: Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName);
139
140 if (Directory.Exists(Path.Combine(VIEWER_SUPPORT_DIR, "Floaters")))
141 {
142 OSDMap floaters = new OSDMap();
143 uint n = 0;
144 foreach (String name in Directory.GetFiles(Path.Combine(VIEWER_SUPPORT_DIR, "Floaters"), "*.xml"))
145 {
146 using (StreamReader s = new StreamReader(name))
147 {
148 string simple_name = Path.GetFileNameWithoutExtension(name);
149 m_log.DebugFormat("[XXX]: Reading {0} ({1})", name, simple_name);
150 OSDMap floater = new OSDMap();
151 floaters[simple_name] = OSDMap.FromString(s.ReadToEnd());
152 n++;
153 }
154 }
155 specialUI["floaters"] = floaters;
156 m_log.DebugFormat("[SPECIAL UI]: Sending {0} floaters", n);
157 }
139 } 158 }
140 else 159 else
141 m_log.DebugFormat("[SPECIAL UI]: NOT Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName); 160 m_log.DebugFormat("[SPECIAL UI]: NOT Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName);