/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 push.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-05 14:01:51 UTC
  • Revision ID: jelmer@samba.org-20120305140151-zythye0ljphkruax
Support opening push dialog from nautilus.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
class PushDialog(Gtk.Dialog):
39
39
    """New implementation of the Push dialog."""
40
40
 
41
 
    def __init__(self, repository, revid, branch=None, parent=None):
 
41
    def __init__(self, repository=None, revid=None, branch=None, parent=None):
42
42
        """Initialize the Push dialog. """
43
43
        super(PushDialog, self).__init__(
44
44
            title="Push", parent=parent, flags=0, border_width=6,
45
45
            buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE))
 
46
        if repository is None:
 
47
            repository = branch.repository
46
48
        self.branch = branch
47
49
 
48
50
        # Unused arguments
49
51
        self.repository = repository
 
52
        if revid is None:
 
53
            revid = branch.last_revision()
50
54
        self.revid = revid
51
55
 
52
56
        # Create the widgets