/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: Aaron Bentley
  • Date: 2007-01-17 06:42:55 UTC
  • mto: This revision was merged to the branch mainline in revision 129.
  • Revision ID: aaron.bentley@utoronto.ca-20070117064255-x4gznz5e0lyjq3gk
Remove usused span selector

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        """ Display the Remove file(s) dialog. """
55
55
        self.window.show_all()
56
56
        
57
 
    @show_bzr_error
58
57
    def remove(self, widget):
59
58
        radio_selected = self.glade.get_widget('radiobutton_remove_selected')
60
59
        radio_new = self.glade.get_widget('radiobutton_remove_new')
70
69
            
71
70
            fullpath = self.wt.abspath(os.path.join(self.wtpath, filename))
72
71
            
73
 
            self.wt.remove(fullpath)
 
72
            try:
 
73
                self.wt.remove(fullpath)
 
74
            except errors.NotBranchError:
 
75
                error_dialog(_('Directory is not a branch'),
 
76
                             _('You can perform this action only in a branch.'))
 
77
                return
 
78
            except errors.NotVersionedError:
 
79
                error_dialog(_('File not versioned'),
 
80
                             _('The selected file is not versioned.'))
 
81
                return
74
82
        elif radio_new.get_active():
75
83
            # Remove added files recursively
76
84
            added = self.wt.changes_from(self.wt.basis_tree()).added
118
126
        self.vbox.set_spacing(3)
119
127
        self.vbox.show_all()
120
128
        
121
 
    @show_bzr_error
122
129
    def _on_remove_clicked(self, button):
123
130
        """ Remove button clicked handler. """
124
131
        if self._radio_selected.get_active():
130
137
                             _('Please select a file from the list,\nor choose the other option.'))
131
138
                return
132
139
            
133
 
            self.wt.remove(os.path.join(self.wtpath, filename))
 
140
            try:
 
141
                self.wt.remove(os.path.join(self.wtpath, filename))
 
142
            except errors.NotBranchError:
 
143
                error_dialog(_('Directory is not a branch'),
 
144
                             _('You can perform this action only in a branch.'))
 
145
                return
 
146
            except errors.NotVersionedError:
 
147
                error_dialog(_('File not versioned'),
 
148
                             _('The selected file is not versioned.'))
 
149
                return
134
150
        elif self._radio_added.get_active():
135
151
            # Remove added files recursively
136
152
            added = self.wt.changes_from(self.wt.basis_tree()).added