/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 branchview/treemodel.py

  • Committer: Curtis Hovey
  • Date: 2011-09-03 13:19:58 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110903131958-dvlxud881arul00m
Small performance improvement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    """A model of branch's merge history."""
40
40
 
41
41
    def __init__(self, branch, line_graph_data):
42
 
        super(BranchTreeModel, self).__init__()
 
42
        super(BranchTreeModel, self).__init__(
 
43
            GObject.TYPE_STRING,
 
44
            GObject.TYPE_PYOBJECT,
 
45
            GObject.TYPE_PYOBJECT,
 
46
            GObject.TYPE_PYOBJECT,
 
47
            GObject.TYPE_STRING,
 
48
            GObject.TYPE_STRING,
 
49
            GObject.TYPE_STRING,
 
50
            GObject.TYPE_STRING,
 
51
            GObject.TYPE_STRING,
 
52
            GObject.TYPE_PYOBJECT,
 
53
            GObject.TYPE_PYOBJECT,
 
54
            GObject.TYPE_PYOBJECT,
 
55
            GObject.TYPE_PYOBJECT,
 
56
            GObject.TYPE_STRING)
43
57
        self.revisions = {}
44
58
        self.branch = branch
45
59
        self.repository = branch.repository
46
 
        self.line_graph_data = line_graph_data
47
 
 
48
60
        if self.branch.supports_tags():
49
61
            self.tags = self.branch.tags.get_reverse_tag_dict()
50
62
        else:
51
63
            self.tags = {}
52
 
        self.set_column_types(
53
 
            (GObject.TYPE_STRING,
54
 
             GObject.TYPE_PYOBJECT,
55
 
             GObject.TYPE_PYOBJECT,
56
 
             GObject.TYPE_PYOBJECT,
57
 
             GObject.TYPE_STRING,
58
 
             GObject.TYPE_STRING,
59
 
             GObject.TYPE_STRING,
60
 
             GObject.TYPE_STRING,
61
 
             GObject.TYPE_STRING,
62
 
             GObject.TYPE_PYOBJECT,
63
 
             GObject.TYPE_PYOBJECT,
64
 
             GObject.TYPE_PYOBJECT,
65
 
             GObject.TYPE_PYOBJECT,
66
 
             GObject.TYPE_STRING))
 
64
        self.set_line_graph_data(line_graph_data)
67
65
 
68
66
    def add_tag(self, tag, revid):
69
67
        self.branch.tags.set_tag(tag, revid)