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

  • Committer: zedtux
  • Date: 2011-03-11 14:59:04 UTC
  • mto: This revision was merged to the branch mainline in revision 723.
  • Revision ID: zedtux@zedroot.org-20110311145904-g0cq6drvweriy9hz
Added committers and authors avatars from Gravatar (urllib2 version)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
from bzrlib.plugins.gtk import icon_path
34
34
 
 
35
from bzrlib.plugins.gtk.avatarsbox import AvatarsBox
 
36
from bzrlib.plugins.gtk.avatar import Avatar
 
37
 
35
38
try:
36
39
    from bzrlib.plugins.gtk import seahorse
37
40
except ImportError:
402
405
 
403
406
    def _set_revision(self, revision):
404
407
        if revision is None: return
405
 
 
 
408
        
 
409
        self.avatarsbox.reset()
 
410
        
406
411
        self._revision = revision
407
412
        if revision.committer is not None:
408
413
            self.committer.set_text(revision.committer)
 
414
            self.avatarsbox.add(revision.committer, "committer")
409
415
        else:
410
416
            self.committer.set_text("")
 
417
            self.avatarsbox.hide()
411
418
        author = revision.properties.get('author', '')
 
419
        self.avatarsbox.merge(revision.get_apparent_authors(), "author")
412
420
        if author != '':
413
421
            self.author.set_text(author)
414
422
            self.author.show()
579
587
        self.connect_after('notify::revision', self._update_signature)
580
588
 
581
589
    def _create_headers(self):
 
590
        self.avatarsbox = AvatarsBox()
 
591
        
582
592
        self.table = gtk.Table(rows=5, columns=2)
583
593
        self.table.set_row_spacings(6)
584
594
        self.table.set_col_spacings(6)
585
595
        self.table.show()
 
596
        
 
597
        self.avatarsbox.pack_start(self.table)
 
598
        self.avatarsbox.show()
586
599
 
587
600
        row = 0
588
601
 
673
686
 
674
687
        self.connect('notify::revision', self._add_tags)
675
688
 
676
 
        return self.table
 
689
        self.avatarsbox.show()
 
690
        return self.avatarsbox
677
691
    
678
692
    def _create_parents(self):
679
693
        hbox = gtk.HBox(True, 3)