/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: Daniel Schierbeck
  • Date: 2008-03-30 16:47:06 UTC
  • mto: (450.1.16 trunk)
  • mto: This revision was merged to the branch mainline in revision 458.
  • Revision ID: daniel.schierbeck@gmail.com-20080330164706-14ce03ggfrv5q6xf
Made the key id label disappear when the revision is not signed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
gtk.link_button_set_uri_hook(_open_link)
33
33
 
34
34
class BugsTab(gtk.Table):
 
35
 
35
36
    def __init__(self):
36
37
        super(BugsTab, self).__init__(rows=5, columns=2)
37
38
        self.set_row_spacings(6)
56
57
 
57
58
 
58
59
class SignatureTab(gtk.VBox):
 
60
 
59
61
    def __init__(self):
60
62
        from gpg import GPGSubprocess
61
63
        self.gpg = GPGSubprocess()
74
76
        signature_info.set_col_spacings(6)
75
77
 
76
78
        align = gtk.Alignment(1.0, 0.5)
77
 
        label = gtk.Label()
78
 
        label.set_markup("<b>Key Id:</b>")
79
 
        align.add(label)
 
79
        self.signature_key_id_label = gtk.Label()
 
80
        self.signature_key_id_label.set_markup("<b>Key Id:</b>")
 
81
        align.add(self.signature_key_id_label)
80
82
        signature_info.attach(align, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
81
83
 
82
84
        align = gtk.Alignment(0.0, 0.5)
91
93
        self.show_all()
92
94
 
93
95
    def show_no_signature(self):
 
96
        self.signature_key_id_label.hide()
94
97
        self.signature_key_id.set_text("")
95
98
        self.signature_image.set_from_file(icon_path("sign-unknown.png"))
96
99
        self.signature_label.set_text("This revision has not been signed.")
97
100
 
98
101
    def show_signature(self, text):
 
102
        self.signature_key_id_label.show()
99
103
        signature = self.gpg.verify(text)
100
104
 
101
105
        if signature.key_id is not None: