/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/graphcell.py

  • Committer: Gary van der Merwe
  • Date: 2007-09-22 15:01:53 UTC
  • mfrom: (256.4.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070922150153-zkqtq9gfj9d3pwrk
Merge viz changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
      in_lines          (start, end, colour) tuple list to draw inward lines,
31
31
      out_lines         (start, end, colour) tuple list to draw outward lines.
32
32
    """
 
33
    
 
34
    columns_len = 0
33
35
 
34
36
    __gproperties__ = {
35
37
        "node":         ( gobject.TYPE_PYOBJECT, "node",
45
47
                          gobject.PARAM_WRITABLE
46
48
                        ),
47
49
        }
48
 
 
 
50
    
49
51
    def do_set_property(self, property, value):
50
52
        """Set properties from GObject properties."""
51
53
        if property.name == "node":
114
116
        """
115
117
        box_size = self.box_size(widget) + 1
116
118
 
117
 
        cols = self.node[0]
118
 
        for start, end, colour in self.in_lines + self.out_lines:
119
 
            cols = max(cols, start, end)
120
 
 
121
 
        width = box_size * (cols + 1)
 
119
        width = box_size * (self.columns_len + 1)
122
120
        height = box_size
123
121
 
124
122
        # FIXME I have no idea how to use cell_area properly