/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: Daniel Schierbeck
  • Date: 2008-04-03 20:30:15 UTC
  • mto: (450.1.18 trunk)
  • mto: This revision was merged to the branch mainline in revision 458.
  • Revision ID: daniel.schierbeck@gmail.com-20080403203015-ch8ck8gyjjhhiggf
Made the crypt code only use one DBus call to get key fields.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
import bzrlib.errors as errors
29
29
 
30
 
from bzrlib.plugins.gtk import _i18n
31
30
from bzrlib.plugins.gtk.dialog import error_dialog, warning_dialog
32
31
from guifiles import GLADEFILENAME
33
32
 
65
64
            filename = self.selected
66
65
            
67
66
            if filename is None:
68
 
                error_dialog(_i18n('No file was selected'),
69
 
                             _i18n('Please select a file from the list,\nor choose the other option.'))
 
67
                error_dialog(_('No file was selected'),
 
68
                             _('Please select a file from the list,\nor choose the other option.'))
70
69
                return
71
70
            
72
71
            fullpath = self.wt.abspath(os.path.join(self.wtpath, filename))
77
76
            added = self.wt.changes_from(self.wt.basis_tree()).added
78
77
            file_list = sorted([f[0] for f in added], reverse=True)
79
78
            if len(file_list) == 0:
80
 
                warning_dialog(_i18n('No matching files'),
81
 
                               _i18n('No added files were found in the working tree.'))
 
79
                warning_dialog(_('No matching files'),
 
80
                               _('No added files were found in the working tree.'))
82
81
                return
83
82
            self.wt.remove(file_list)
84
83
        
103
102
        self.selected = selected
104
103
        
105
104
        # Create widgets
106
 
        self._label = gtk.Label(_i18n("Which file(s) do you want to remove?"))
107
 
        self._radio_selected = gtk.RadioButton(None, _i18n("Selected only"), False)
108
 
        self._radio_added = gtk.RadioButton(self._radio_selected, _i18n("All files with status 'added'"), False)
109
 
        self._button_remove = gtk.Button(_i18n("_Remove"), use_underline=True)
 
105
        self._label = gtk.Label(_("Which file(s) do you want to remove?"))
 
106
        self._radio_selected = gtk.RadioButton(None, _("Selected only"), False)
 
107
        self._radio_added = gtk.RadioButton(self._radio_selected, _("All files with status 'added'"), False)
 
108
        self._button_remove = gtk.Button(_("_Remove"), use_underline=True)
110
109
        
111
110
        self._button_remove.connect('clicked', self._on_remove_clicked)
112
111
        
127
126
            filename = self.selected
128
127
            
129
128
            if filename is None:
130
 
                error_dialog(_i18n('No file was selected'),
131
 
                             _i18n('Please select a file from the list,\nor choose the other option.'))
 
129
                error_dialog(_('No file was selected'),
 
130
                             _('Please select a file from the list,\nor choose the other option.'))
132
131
                return
133
132
            
134
133
            self.wt.remove(os.path.join(self.wtpath, filename))
137
136
            added = self.wt.changes_from(self.wt.basis_tree()).added
138
137
            file_list = sorted([f[0] for f in added], reverse=True)
139
138
            if len(file_list) == 0:
140
 
                warning_dialog(_i18n('No matching files'),
141
 
                               _i18n('No added files were found in the working tree.'))
 
139
                warning_dialog(_('No matching files'),
 
140
                               _('No added files were found in the working tree.'))
142
141
                return
143
142
            self.wt.remove(file_list)
144
143