/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-04-01 19:20:08 UTC
  • mto: (450.1.16 trunk)
  • mto: This revision was merged to the branch mainline in revision 458.
  • Revision ID: daniel.schierbeck@gmail.com-20080401192008-u85li5yg8bt1kb4f
Fixed error with unavailable keys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    def show_signature(self, crypttext):
134
134
        key = crypt.verify(crypttext)
135
135
 
 
136
        if not key.is_available():
 
137
            self.show_no_signature()
 
138
            self.signature_image.set_from_file(icon_path("sign-bad.png"))
 
139
            self.signature_label.set_markup("<b>Authentication error</b>\n" +
 
140
                                            "Signature key not available")
 
141
            return
 
142
 
 
143
        if key.is_trusted():
 
144
            self.signature_image.set_from_file(icon_path("sign-ok.png"))
 
145
            self.signature_label.set_markup("<b>Authenticity confirmed</b>\n" +
 
146
                                            "This revision has been signed by " +
 
147
                                            "a trusted party.")
 
148
        else:
 
149
            self.signature_image.set_from_file(icon_path("sign-bad.png"))
 
150
            self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
 
151
                                            "This revision has been signed by " +
 
152
                                            "an untrusted party.")
 
153
 
136
154
        trust = key.get_trust()
137
155
 
138
156
        if trust <= crypt.TRUST_NEVER:
154
172
 
155
173
        self.signature_trust_label.show()
156
174
        self.signature_trust.set_text('This key is ' + trust_text)
157
 
 
158
 
        if key.is_trusted():
159
 
            self.signature_image.set_from_file(icon_path("sign-ok.png"))
160
 
            self.signature_label.set_markup("<b>Authenticity confirmed</b>\n" +
161
 
                                            "This revision has been signed by " +
162
 
                                            "a trusted party.")
163
 
        else:
164
 
            self.signature_image.set_from_file(icon_path("sign-bad.png"))
165
 
            self.signature_label.set_markup("<b>Authenticity cannot be confirmed</b>\n" +
166
 
                                            "This revision has been signed by " +
167
 
                                            "an untrusted party.")
168
 
 
 
175
        
169
176
 
170
177
class RevisionView(gtk.Notebook):
171
178
    """ Custom widget for commit log details.