[GRASS-SVN] r67595 - grass-addons/grass7/gui/wxpython/wx.metadata/mdlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 18 01:57:10 PST 2016


Author: krejcmat
Date: 2016-01-18 01:57:10 -0800 (Mon, 18 Jan 2016)
New Revision: 67595

Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
Log:
addons g.gui.cswbrowser: allows to open pure xml instead of CSS html formatting

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py	2016-01-18 08:18:17 UTC (rev 67594)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py	2016-01-18 09:57:10 UTC (rev 67595)
@@ -263,20 +263,22 @@
         self.Fit()
 
     def OnShowReguest(self, evt):
-        request_html = encodeString(highlight_xml(self.context, self.catalog.request))
-        path = os.path.join(tempfile.gettempdir(),'htmlRequest.html')
+        #request_html = encodeString(highlight_xml(self.context, self.catalog.request,False))
+        path = os.path.join(tempfile.gettempdir(),'htmlRequest.xml')
+        if os.path.exists(path): os.remove(path)
         f = open(path, 'w')
-        f.write(request_html)
+        f.writelines(self.catalog.request)
         f.close()
         if yesNo(self, 'Do you want to open <request> in default browser', 'Open file'):
             open_url(path)
         self.htmlView.SetPage((renderXML(self.context, self.catalog.request)))
 
     def OnShowResponse(self, evt):
-        response_html = encodeString(highlight_xml(self.context, self.catalog.response))
-        path = os.path.join(tempfile.gettempdir(),'htmlResponse.html')
+        #response_html = encodeString(highlight_xml(self.context, self.catalog.response,False))
+        path = os.path.join(tempfile.gettempdir(),'htmlResponse.xml')
+        if os.path.exists(path): os.remove(path)
         f = open(path, 'w')
-        f.write(response_html)
+        f.write(self.catalog.response)
         f.close()
         if yesNo(self, 'Do you want to open <response> in default browser', 'Open file'):
             open_url(path)



More information about the grass-commit mailing list