/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-03 22:32:54 UTC
  • mto: (461.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 462.
  • Revision ID: daniel.schierbeck@gmail.com-20080403223254-ftzsn62d9051wezm
Made sure the Signature page only gets updated when it is selected.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
else:
34
34
    has_seahorse = True
35
35
 
 
36
PAGE_GENERAL = 0
 
37
PAGE_RELATIONS = 1
 
38
PAGE_SIGNATURE = 2
 
39
PAGE_BUGS = 3
 
40
 
36
41
def _open_link(widget, uri):
37
42
    subprocess.Popen(['sensible-browser', uri], close_fds=True)
38
43
 
238
243
        )
239
244
    }
240
245
 
241
 
 
242
246
    def __init__(self, branch=None):
243
247
        gtk.Notebook.__init__(self)
244
248
 
252
256
        self._create_file_info_view()
253
257
        self._create_bugs()
254
258
 
255
 
        self.set_current_page(0)
 
259
        self.set_current_page(PAGE_GENERAL)
 
260
        self.connect_after('switch-page', lambda *a: self._update_signature())
256
261
        
257
262
        self._show_callback = None
258
263
        self._clicked_callback = None
374
379
 
375
380
        self._add_tags()
376
381
 
377
 
    def _update_signature(self, widget, param):
378
 
        self.signature_table.set_revision(self._revision)
 
382
    def _update_signature(self):
 
383
        if self.get_current_page() == PAGE_SIGNATURE:
 
384
            self.signature_table.set_revision(self._revision)
379
385
 
380
386
    def set_children(self, children):
381
387
        self._add_parents_or_children(children,
465
471
    def _create_signature(self):
466
472
        self.signature_table = SignatureTab(self._branch.repository)
467
473
        self.append_page(self.signature_table, tab_label=gtk.Label('Signature'))
468
 
        self.connect_after('notify::revision', self._update_signature)
 
474
        self.connect_after('notify::revision', lambda *a: self._update_signature())
469
475
 
470
476
    def _create_headers(self):
471
477
        self.table = gtk.Table(rows=5, columns=2)