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

  • Committer: Daniel Schierbeck
  • Date: 2007-12-11 23:20:49 UTC
  • mfrom: (412.1.15 refactor)
  • Revision ID: daniel.schierbeck@gmail.com-20071211232049-3uj3jncnbeea1qqc
Merged refactoring of the revisionview.

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
    def construct_bottom(self):
292
292
        """Construct the bottom half of the window."""
293
293
        from bzrlib.plugins.gtk.revisionview import RevisionView
294
 
        self.revisionview = RevisionView(None, tags=[], show_children=True, branch=self.branch)
 
294
        self.revisionview = RevisionView(branch=self.branch)
295
295
        (width, height) = self.get_size()
296
296
        self.revisionview.set_size_request(width, int(height / 2.5))
297
297
        self.revisionview.show()
298
298
        self.revisionview.set_show_callback(self._show_clicked_cb)
299
 
        self.revisionview.set_go_callback(self._go_clicked_cb)
 
299
        self.revisionview.connect('notify::revision', self._go_clicked_cb)
300
300
        return self.revisionview
301
301
 
302
302
    def _tag_selected_cb(self, menuitem, revid):
349
349
 
350
350
            self.next_button.set_menu(next_menu)
351
351
 
352
 
            tags = []
353
 
            if self.branch.supports_tags():
354
 
                tagdict = self.branch.tags.get_reverse_tag_dict()
355
 
                if tagdict.has_key(revision.revision_id):
356
 
                    tags = tagdict[revision.revision_id]
357
 
            self.revisionview.set_revision(revision, tags, children)
 
352
            self.revisionview.set_revision(revision)
 
353
            self.revisionview.set_children(children)
358
354
 
359
355
    def _back_clicked_cb(self, *args):
360
356
        """Callback for when the back button is clicked."""
364
360
        """Callback for when the forward button is clicked."""
365
361
        self.treeview.forward()
366
362
 
367
 
    def _go_clicked_cb(self, revid):
 
363
    def _go_clicked_cb(self, w, p):
368
364
        """Callback for when the go button for a parent is clicked."""
369
 
        self.treeview.set_revision_id(revid)
 
365
        if self.revisionview.get_revision() is not None:
 
366
            self.treeview.set_revision(self.revisionview.get_revision())
370
367
 
371
368
    def _show_clicked_cb(self, revid, parentid):
372
369
        """Callback for when the show button for a parent is clicked."""