/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 nautilus-bzr.py

  • Committer: Jelmer Vernooij
  • Date: 2006-10-08 20:51:52 UTC
  • Revision ID: jelmer@samba.org-20061008205152-1c5306ee8eb43b95
Use Olive's clone dialog in nautilus-bzr; remove the old Clone dialog 
from BzrGtk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        if vfs_file.get_uri_scheme() != 'file':
119
119
            return
120
120
 
121
 
        file = vfs_file.get_uri()
122
 
        try:
123
 
            tree, path = WorkingTree.open_containing(file)
124
 
        except NotBranchError:
125
 
            return
126
 
 
127
 
        from bzrlib.plugins.gtk.clone import CloneDialog
128
 
        dialog = CloneDialog(file)
129
 
        if dialog.run() != gtk.RESPONSE_CANCEL:
130
 
            bzrdir = BzrDir.open(dialog.url)
131
 
            bzrdir.sprout(dialog.dest_path)
 
121
        from bzrlib.plugins.gtk.olive.branch import BranchDialog
 
122
        
 
123
        dialog = BranchDialog(vfs_file.get_name())
 
124
        dialog.display()
132
125
 
133
126
    def commit_cb(self, menu, vfs_file=None):
134
127
        # We can only cope with local files
141
134
        except NotBranchError:
142
135
            return
143
136
 
144
 
        from bzrlib.plugins.gtk.commit import GCommitDialog
145
 
        dialog = GCommitDialog(tree)
146
 
        dialog.set_title(path + " - Commit")
147
 
        if dialog.run() != gtk.RESPONSE_CANCEL:
148
 
            Commit().commit(working_tree=wt,message=dialog.message,
149
 
                            specific_files=dialog.specific_files)
 
137
        from bzrlib.plugins.gtk.olive.commit import CommitDialog
 
138
        dialog = CommitDialog(tree, path)
 
139
        dialog.display()
 
140
        gtk.main()
150
141
 
151
142
    def log_cb(self, menu, vfs_file):
152
143
        # We can only cope with local files
167
158
        return
168
159
 
169
160
    def get_background_items(self, window, vfs_file):
 
161
        items = []
170
162
        file = vfs_file.get_uri()
171
163
        try:
172
164
            tree, path = WorkingTree.open_containing(file)
185
177
 
186
178
            return items
187
179
 
188
 
        items = []
189
180
        item = nautilus.MenuItem('BzrNautilus::log',
190
181
                             'Log',
191
182
                             'Show Bazaar history')