~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Main/glue/constants-python.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#
49
49
</xsl:text>
50
50
class VirtualBoxReflectionInfo:
51
 
   def __init__(self):
52
 
      self.map = {}
53
 
 
 
51
   def __init__(self, isSym):
 
52
      self.isSym = isSym
 
53
 
54
54
   _Values = {<xsl:for-each select="//enum">
55
55
                '<xsl:value-of select="@name"/>':{
56
56
                  <xsl:for-each select="const">'<xsl:value-of select="@name"/>':<xsl:value-of select="@value"/><xsl:if test="not(position()=last())">,</xsl:if>
68
68
                   <xsl:if test="not(position()=last())">,</xsl:if>
69
69
                  </xsl:for-each>}
70
70
 
 
71
   _ValuesFlatSym = {<xsl:for-each select="//enum">
 
72
                   <xsl:variable name="ename">
 
73
                    <xsl:value-of select="@name"/>
 
74
                   </xsl:variable>
 
75
                   <xsl:for-each select="const">
 
76
                     <xsl:variable name="eval">
 
77
                       <xsl:value-of select="concat($ename, '_', @name)"/>
 
78
                   </xsl:variable>
 
79
                        '<xsl:value-of select="$eval"/>': '<xsl:value-of select="@name"/>'<xsl:if test="not(position()=last())">,</xsl:if>
 
80
                   </xsl:for-each>
 
81
                   <xsl:if test="not(position()=last())">,</xsl:if>
 
82
                  </xsl:for-each>}
 
83
 
71
84
   def __getattr__(self,attr):
72
 
      v = self._ValuesFlat.get(attr)
 
85
      if self.isSym:
 
86
        v = self._ValuesFlatSym.get(attr)
 
87
      else:
 
88
        v = self._ValuesFlat.get(attr)
73
89
      if v is not None:
74
90
         return v
75
91
      else:
76
92
         raise AttributeError
77
93
 
78
94
</xsl:template>
79
 
</xsl:stylesheet> 
 
95
</xsl:stylesheet>