/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-22 00:00:19 UTC
  • mto: This revision was merged to the branch mainline in revision 402.
  • Revision ID: daniel.schierbeck@gmail.com-20071122000019-t5psmdwm3cb38xud
Added update() method to TreeView.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        self.iter   = None
92
92
        self.branch = branch
93
93
 
94
 
        gobject.idle_add(self.populate, start, maxnum, 
95
 
                         broken_line_length)
 
94
        self.start = start
 
95
        self.maxnum = maxnum
 
96
        self.broken_line_length = broken_line_length
 
97
 
 
98
        gobject.idle_add(self.populate)
96
99
 
97
100
        self.connect("destroy", lambda x: self.branch.unlock())
98
101
 
155
158
        """
156
159
        return self.get_property('parents')
157
160
        
 
161
    def update(self):
 
162
        self.iter = None
 
163
        gobject.idle_add(self.populate)
 
164
 
158
165
    def back(self):
159
166
        """Signal handler for the Back button."""
160
167
        parents = self.get_parents()
185
192
        else:
186
193
            self.set_revision_id(children[0])
187
194
 
188
 
    def populate(self, start, maxnum, broken_line_length=None):
 
195
    def populate(self):
189
196
        """Fill the treeview with contents.
190
197
 
191
198
        :param start: Revision id of revision to start with.
196
203
        """
197
204
        self.branch.lock_read()
198
205
        (linegraphdata, index, columns_len) = linegraph(self.branch.repository,
199
 
                                                        start,
200
 
                                                        maxnum, 
201
 
                                                        broken_line_length)
 
206
                                                        self.start,
 
207
                                                        self.maxnum, 
 
208
                                                        self.broken_line_length)
202
209
 
203
210
        self.model = TreeModel(self.branch.repository, linegraphdata)
204
211
        self.graph_cell.columns_len = columns_len