/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/treeview.py

  • Committer: Daniel Schierbeck
  • Date: 2007-11-06 18:02:09 UTC
  • Revision ID: daniel.schierbeck@gmail.com-20071106180209-mrlhg28ma5a6jebf
Fixed locks and made tagging work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        self.construct_treeview()
74
74
 
75
75
        self.branch = branch
76
 
        self.branch.lock_read()
77
76
 
78
77
        gobject.idle_add(self.populate, start, maxnum, 
79
78
                         broken_line_length)
82
81
        self.children = None
83
82
        self.parents  = None
84
83
 
85
 
        self.connect('destroy', lambda w: self.branch.unlock())
86
 
 
87
84
    def do_get_property(self, property):
88
85
        if property.name == 'revno-column-visible':
89
86
            return self.revno_column.get_visible()
179
176
        :param broken_line_length: After how much lines branches \
180
177
                       should be broken.
181
178
        """
182
 
        (linegraphdata, index, columns_len) = linegraph(self.branch.repository,
183
 
                                                        start,
184
 
                                                        maxnum, 
185
 
                                                        broken_line_length)
186
 
 
187
 
        self.model = TreeModel(self.branch.repository, linegraphdata)
188
 
        self.graph_cell.columns_len = columns_len
189
 
        width = self.graph_cell.get_size(self.treeview)[2]
190
 
        self.graph_column.set_fixed_width(width)
191
 
        self.graph_column.set_max_width(width)
192
 
        self.index = index
193
 
        self.treeview.set_model(self.model)
194
 
        self.treeview.set_cursor(0)
195
 
        self.emit('revisions-loaded')
 
179
        try:
 
180
            self.branch.lock_read()
 
181
            (linegraphdata, index, columns_len) = linegraph(self.branch.repository,
 
182
                                                            start,
 
183
                                                            maxnum, 
 
184
                                                            broken_line_length)
 
185
 
 
186
            self.model = TreeModel(self.branch.repository, linegraphdata)
 
187
            self.graph_cell.columns_len = columns_len
 
188
            width = self.graph_cell.get_size(self.treeview)[2]
 
189
            self.graph_column.set_fixed_width(width)
 
190
            self.graph_column.set_max_width(width)
 
191
            self.index = index
 
192
            self.treeview.set_model(self.model)
 
193
            self.treeview.set_cursor(0)
 
194
            self.emit('revisions-loaded')
 
195
 
 
196
        finally:
 
197
            self.branch.unlock()
196
198
 
197
199
        return False
198
200