/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: Curtis Hovey
  • Date: 2011-08-13 03:06:56 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110813030656-10hwf8adkrg0mbbp
Updated gmissing to gtk3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        self.revision = None
149
149
        self.repository = repository
150
150
 
151
 
        super(SignatureTab, self).__init__(False, 6)
 
151
        super(SignatureTab, self).__init__(homogeneous=False, spacing=6)
152
152
        signature_box = Gtk.Table(rows=3, columns=3)
153
153
        signature_box.set_col_spacing(0, 16)
154
154
        signature_box.set_col_spacing(1, 12)
157
157
        self.signature_image = Gtk.Image()
158
158
        signature_box.attach(self.signature_image, 0, 1, 0, 1, Gtk.AttachOptions.FILL)
159
159
 
160
 
        align = Gtk.Alignment.new(0.0, 0.1)
 
160
        align = Gtk.Alignment.new(0.0, 0.1, 0.0, 0.0)
161
161
        self.signature_label = Gtk.Label()
162
162
        align.add(self.signature_label)
163
163
        signature_box.attach(align, 1, 3, 0, 1, Gtk.AttachOptions.FILL)
164
164
 
165
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
165
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
166
166
        self.signature_key_id_label = Gtk.Label()
167
167
        self.signature_key_id_label.set_markup("<b>Key Id:</b>")
168
168
        align.add(self.signature_key_id_label)
169
169
        signature_box.attach(align, 1, 2, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
170
170
 
171
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
171
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
172
172
        self.signature_key_id = Gtk.Label()
173
173
        self.signature_key_id.set_selectable(True)
174
174
        align.add(self.signature_key_id)
175
175
        signature_box.attach(align, 2, 3, 1, 2, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
176
176
 
177
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
177
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
178
178
        self.signature_fingerprint_label = Gtk.Label()
179
179
        self.signature_fingerprint_label.set_markup("<b>Fingerprint:</b>")
180
180
        align.add(self.signature_fingerprint_label)
181
181
        signature_box.attach(align, 1, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
182
182
 
183
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
183
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
184
184
        self.signature_fingerprint = Gtk.Label()
185
185
        self.signature_fingerprint.set_selectable(True)
186
186
        align.add(self.signature_fingerprint)
187
187
        signature_box.attach(align, 2, 3, 2, 3, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
188
188
 
189
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
189
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
190
190
        self.signature_trust_label = Gtk.Label()
191
191
        self.signature_trust_label.set_markup("<b>Trust:</b>")
192
192
        align.add(self.signature_trust_label)
193
193
        signature_box.attach(align, 1, 2, 3, 4, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
194
194
 
195
 
        align = Gtk.Alignment.new(0.0, 0.5)
 
195
        align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
196
196
        self.signature_trust = Gtk.Label()
197
197
        self.signature_trust.set_selectable(True)
198
198
        align.add(self.signature_trust)
327
327
    }
328
328
 
329
329
    def __init__(self, branch=None, repository=None):
330
 
        GObject.GObject.__init__(self)
 
330
        Gtk.Notebook.__init__(self)
331
331
 
332
332
        self._revision = None
333
333
        self._branch = branch
335
335
            self._repository = branch.repository
336
336
        else:
337
337
            self._repository = repository
 
338
        self.signature_table = None
338
339
 
339
340
        self._create_general()
340
341
        self._create_relations()
474
475
        self._add_tags()
475
476
 
476
477
    def _update_signature(self, widget, param):
 
478
        if not has_seahorse:
 
479
            return
477
480
        if self.get_current_page() == PAGE_SIGNATURE:
478
481
            self.signature_table.set_revision(self._revision)
479
482
 
488
491
                                      self.children_table)
489
492
 
490
493
    def _switch_page_cb(self, notebook, page, page_num):
 
494
        if not has_seahorse:
 
495
            return
491
496
        if page_num == PAGE_SIGNATURE:
492
497
            self.signature_table.set_revision(self._revision)
493
498
 
581
586
    def _create_signature(self):
582
587
        self.signature_table = SignatureTab(self._repository)
583
588
        self.append_page(
584
 
            self.signature_table, tab_label=Gtk.Label(label='Signature'))
 
589
            self.signature_table, Gtk.Label(label='Signature'))
585
590
        self.connect_after('notify::revision', self._update_signature)
586
591
 
587
592
    def _create_headers(self):