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

  • Committer: Adeodato Simó
  • Date: 2007-07-05 19:50:44 UTC
  • mto: This revision was merged to the branch mainline in revision 234.
  • Revision ID: dato@net.com.org.es-20070705195044-rcrj8f27i386cvrv
Support setting diff colors from gedit's syntax highlighting config too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import bzrlib.errors as errors
29
29
from bzrlib.workingtree import WorkingTree
30
30
 
31
 
from errors import show_bzr_error
32
31
from bzrlib.plugins.gtk.dialog import error_dialog
33
32
from guifiles import GLADEFILENAME
34
 
from bzrlib.plugins.gtk import _i18n
35
33
 
36
34
 
37
35
class OliveRename:
68
66
        new_filename = self.entry.get_text()
69
67
            
70
68
        if old_filename is None:
71
 
            error_dialog(_i18n('No file was selected'),
72
 
                         _i18n('Please select a file from the list to proceed.'))
 
69
            error_dialog(_('No file was selected'),
 
70
                         _('Please select a file from the list to proceed.'))
73
71
            return
74
72
        
75
73
        if new_filename == "":
76
 
            error_dialog(_i18n('Filename not given'),
77
 
                         _i18n('Please specify a new name for the file.'))
 
74
            error_dialog(_('Filename not given'),
 
75
                         _('Please specify a new name for the file.'))
78
76
            return
79
77
        
80
78
        source = os.path.join(self.wtpath, old_filename)
85
83
        wt2, path2 = WorkingTree.open_containing(self.wt.abspath(source))
86
84
 
87
85
        if wt1.basedir != wt2.basedir:
88
 
            error_dialog(_i18n('Not the same branch'),
89
 
                         _i18n('The destination is not in the same branch.'))
 
86
            error_dialog(_('Not the same branch'),
 
87
                         _('The destination is not in the same branch.'))
90
88
            return
91
89
        wt1.rename_one(source, destination)
92
90
        self.close()