Changeset 2832

Show
Ignore:
Timestamp:
11/27/07 17:28:32 (1 year ago)
Author:
eblot
Message:

RevtreePlugin: fixes up #1694 and remove obsolete code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • revtreeplugin/0.11/revtree/svgview.py

    r2497 r2832  
    545545        return self._extent 
    546546 
    547     def render(self): 
    548         self._parent.svg().addElement(self._widget) 
    549  
    550  
    551 class SvgChangeLink(object): 
    552     """Deprecated. Set of associated changeset on the same branch""" 
    553      
    554     def __init__(self, parent, srcChg, dstChg, color='#000'): 
    555         self._parent = parent 
    556         self._source = srcChg 
    557         self._dest = dstChg 
    558         self._color = SvgColor(color) 
    559          
    560     def build(self): 
    561         (x0,y0) = self._source.position('se') 
    562         (x5,y5) = self._dest.position('ne') 
    563         pd = SVG.pathdata() 
    564         pd.move(x0,y0) 
    565         (x1,y1) = (x0+UNIT,y0+UNIT) 
    566         (x2,y2) = (x0+UNIT,y0+2*UNIT) 
    567         (x3,y3) = (x5+UNIT,y5-2*UNIT) 
    568         (x4,y4) = (x5+UNIT,y5-UNIT) 
    569         if x2 < x4: 
    570             pd.qbezier(x1,y1,x2,y2) 
    571             pd.line(x3,y3) 
    572             pd.qbezier(x4,y4,x5,y5) 
    573         else: 
    574             pd.qbezier(x0+UNIT,(y5+y0)/2,x5,y5) 
    575         self._extent = (abs(x5-x0),abs(y5-y0)) 
    576         self._widget = SVG.path(pd, 'none', self._color,  
    577                                 self._parent.strokewidth()) 
    578         self._widget.attributes['stroke-dasharray']='5, 5' 
    579          
    580     def extent(self): 
    581         return self._extent 
    582          
    583547    def render(self): 
    584548        self._parent.svg().addElement(self._widget) 
     
    968932        d.toXml(filename) 
    969933         
    970     def render(self, scale=1, width=None, height=None, linkparent=False): 
     934    def render(self, scale=1.0): 
    971935        """Render the revision tree""" 
    972         self._svg = SVG.svg((0,0,self._extent[0],self._extent[1]), 
     936        self._svg = SVG.svg((0, 0, self._extent[0], self._extent[1]), 
    973937                            scale*self._extent[0], scale*self._extent[1], 
    974938                            True) 
  • revtreeplugin/0.11/revtree/web_ui.py

    r2564 r2832  
    5050        self['revmin'] = str(self.revspan[0]) 
    5151        self['revmax'] = str(self.revspan[1]) 
    52         self['period'] = 31 
     52        self['period'] = '31' 
    5353        self['limits'] = 'limperiod' 
    5454        self['style'] = style 
     
    7777            key = 'revtree.%s' % field 
    7878            if self[field]: 
    79                 session[key] = self[field] 
     79                session[key] = str(self[field]) 
    8080            else: 
    8181                if session.has_key(key): 
     
    9393            self[name] = values.get(name, '') 
    9494        # checkboxes need to be postprocessed 
    95         if values.has_key('showdel') and values['showdel']: 
    96             self['showdel'] = True 
    97         else: 
    98             self['showdel'] = False 
     95        self['showdel'] = values.has_key('showdel') and values['showdel'] 
    9996 
    10097    def compute_range(self, timebase): 
     
    260257                sbranches = None 
    261258            sauthors = revstore['author'] and [revstore['author']] or None 
     259            if revstore['showdel']: 
     260                hidetermbranch = False 
     261            else: 
     262                hidetermbranch = True 
    262263            svgrevtree.create(req,  
    263264                              revisions=revstore.revrange,  
    264265                              branches=sbranches, authors=sauthors,  
    265                               hidetermbranch=not revstore['showdel'],  
     266                              hidetermbranch=hidetermbranch,  
    266267                              style=revstore['style']) 
    267268            svgrevtree.build() 
  • revtreeplugin/0.11/setup.py

    r2815 r2832  
    1616 
    1717PACKAGE = 'TracRevtreePlugin' 
    18 VERSION = '0.5.10
     18VERSION = '0.5.11
    1919 
    2020setup (