/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:10:54 UTC
  • mto: This revision was merged to the branch mainline in revision 402.
  • Revision ID: daniel.schierbeck@gmail.com-20071122001054-m0kw5u85esadaood
Allowed the treeview to be refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        """
159
159
        return self.get_property('parents')
160
160
        
161
 
    def update(self):
162
 
        self.iter = None
163
 
        gobject.idle_add(self.populate)
 
161
    def refresh(self):
 
162
        gobject.idle_add(self.populate, self.get_revision())
164
163
 
165
164
    def back(self):
166
165
        """Signal handler for the Back button."""
192
191
        else:
193
192
            self.set_revision_id(children[0])
194
193
 
195
 
    def populate(self):
 
194
    def populate(self, revision=None):
196
195
        """Fill the treeview with contents.
197
196
 
198
197
        :param start: Revision id of revision to start with.
214
213
        self.graph_column.set_max_width(width)
215
214
        self.index = index
216
215
        self.treeview.set_model(self.model)
217
 
        self.treeview.set_cursor(0)
 
216
 
 
217
        if revision is None:
 
218
            self.treeview.set_cursor(0)
 
219
        else:
 
220
            self.set_revision(revision)
 
221
 
218
222
        self.emit('revisions-loaded')
219
223
 
220
224
        return False