/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 olive/remove.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-24 18:10:41 UTC
  • mfrom: (0.11.13 olive)
  • mto: (0.14.1 main)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060924181041-5b1d24ce8ce9080d
Merge Jelmer Vernooij's integration branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
except:
28
28
    sys.exit(1)
29
29
 
30
 
import olive.backend.errors as errors
31
 
import olive.backend.fileops as fileops
 
30
import bzrlib.errors as errors
32
31
 
33
32
class OliveRemove:
34
33
    """ Display the Remove file(s) dialog and perform the needed actions. """
73
72
                return
74
73
            
75
74
            try:
76
 
                fileops.remove([directory + '/' + filename])
 
75
                wt, path = WorkingTree.open_containing(directory + '/' + filename)
 
76
                wt.remove(path)
77
77
            except errors.NotBranchError:
78
78
                self.dialog.error_dialog(_('Directory is not a branch'),
79
79
                                         _('You can perform this action only in a branch.'))
89
89
        elif radio_new.get_active():
90
90
            # Remove added files recursively
91
91
            try:
92
 
                fileops.remove([directory], True)
 
92
                wt, path = WorkingTree.open_containing(directory)
 
93
                wt.remove(path)
93
94
            except errors.NotBranchError:
94
95
                self.dialog.error_dialog(_('Directory is not a branch'),
95
96
                                         _('You can perform this action only in a branch.'))