25
from bzrlib import trace
25
26
from bzrlib.osutils import format_date
26
from bzrlib.util.bencode import bdecode
28
from bzrlib.bencode import bdecode
30
from bzrlib.util.bencode import bdecode
27
31
from bzrlib.testament import Testament
29
33
from bzrlib.plugins.gtk import icon_path
47
51
webbrowser._tryorder.insert(0, '%s "%%s"' % cmd)
48
52
webbrowser.open(uri)
50
gtk.link_button_set_uri_hook(_open_link)
54
if getattr(gtk, 'link_button_set_uri_hook', None) is not None:
55
# Not available before PyGtk-2.10
56
gtk.link_button_set_uri_hook(_open_link)
52
58
class BugsTab(gtk.VBox):
54
60
def __init__(self):
55
61
super(BugsTab, self).__init__(False, 6)
57
63
table = gtk.Table(rows=2, columns=2)
59
65
table.set_row_spacings(6)
415
421
self.timestamp.set_text(format_date(revision.timestamp,
416
422
revision.timezone))
418
self.branchnick_label.set_text(revision.properties['branch-nick'])
424
self.branchnick.show()
425
self.branchnick_label.show()
426
self.branchnick.set_text(revision.properties['branch-nick'])
420
self.branchnick_label.set_text("")
428
self.branchnick.hide()
429
self.branchnick_label.hide()
422
431
self._add_parents_or_children(revision.parent_ids,
423
432
self.parents_widgets,
424
433
self.parents_table)
426
435
file_info = revision.properties.get('file-info', None)
427
436
if file_info is not None:
428
file_info = bdecode(file_info.encode('UTF-8'))
438
file_info = bdecode(file_info.encode('UTF-8'))
440
trace.note('Invalid per-file info for revision:%s, value: %r',
441
revision.revision_id, file_info)
431
445
if self._file_id is None:
617
631
self.committer.show()
621
label.set_alignment(1.0, 0.5)
622
label.set_markup("<b>Branch nick:</b>")
623
self.table.attach(label, 0, 1, row, row+1, gtk.FILL, gtk.FILL)
626
634
self.branchnick_label = gtk.Label()
627
self.branchnick_label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
628
self.branchnick_label.set_alignment(0.0, 0.5)
629
self.branchnick_label.set_selectable(True)
630
self.table.attach(self.branchnick_label, 1, 2, row, row+1, gtk.EXPAND | gtk.FILL, gtk.FILL)
635
self.branchnick_label.set_alignment(1.0, 0.5)
636
self.branchnick_label.set_markup("<b>Branch nick:</b>")
637
self.table.attach(self.branchnick_label, 0, 1, row, row+1, gtk.FILL, gtk.FILL)
631
638
self.branchnick_label.show()
640
self.branchnick = gtk.Label()
641
self.branchnick.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
642
self.branchnick.set_alignment(0.0, 0.5)
643
self.branchnick.set_selectable(True)
644
self.table.attach(self.branchnick, 1, 2, row, row+1, gtk.EXPAND | gtk.FILL, gtk.FILL)
645
self.branchnick.show()
634
648
label = gtk.Label()
635
649
label.set_alignment(1.0, 0.5)