/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 branchview/treeview.py

  • Committer: Jelmer Vernooij
  • Date: 2008-06-29 18:12:29 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629181229-1l2m4cf7vvbyh8qg
Simplify progress bar code, use embedded progress bar inside viz window.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
        if set_tooltip is not None:
326
326
            set_tooltip(treemodel.MESSAGE)
327
327
 
328
 
        self._prev_cursor_path = None
329
328
        self.treeview.connect("cursor-changed",
330
329
                self._on_selection_changed)
331
330
 
401
400
    def _on_selection_changed(self, treeview):
402
401
        """callback for when the treeview changes."""
403
402
        (path, focus) = treeview.get_cursor()
404
 
        if (path is not None) and (path != self._prev_cursor_path):
405
 
            self._prev_cursor_path = path # avoid emitting twice per click
 
403
        if path is not None:
406
404
            self.iter = self.model.get_iter(path)
407
405
            self.emit('revision-selected')
408
406
 
409
407
    def _on_revision_selected(self, widget, event):
410
 
        from bzrlib.plugins.gtk.revisionmenu import RevisionMenu
 
408
        from bzrlib.plugins.gtk.revisionmenu import RevisionPopupMenu
411
409
        if event.button == 3:
412
 
            menu = RevisionMenu(self.branch.repository, 
 
410
            menu = RevisionPopupMenu(self.branch.repository, 
413
411
                [self.get_revision().revision_id],
414
412
                self.branch)
415
413
            menu.connect('tag-added', lambda w, t, r: self.add_tag(t, r))