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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2007-05-17 13:30:19 UTC
  • mto: This revision was merged to the branch mainline in revision 201.
  • Revision ID: szilveszter.farkas@gmail.com-20070517133019-bn3j5rnrfasj0kbb
Make bzrk working with remote branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import gtk
26
26
 
27
 
from bzrlib.plugins.gtk import _i18n
28
27
from errors import show_bzr_error
29
28
 
30
29
from bzrlib.branch import Branch
37
36
 
38
37
class CheckoutDialog(gtk.Dialog):
39
38
    """ New implementation of the Checkout dialog. """
40
 
    def __init__(self, path=None, parent=None, remote_path=None):
 
39
    def __init__(self, path=None, parent=None):
41
40
        """ Initialize the Checkout dialog. """
42
41
        gtk.Dialog.__init__(self, title="Checkout - Olive",
43
42
                                  parent=parent,
48
47
        self.path = path
49
48
        
50
49
        # Create the widgets
51
 
        self._button_checkout = gtk.Button(_i18n("Check_out"), use_underline=True)
 
50
        self._button_checkout = gtk.Button(_("Check_out"), use_underline=True)
52
51
        self._button_revision = gtk.Button('')
53
52
        self._image_browse = gtk.Image()
54
 
        self._filechooser = gtk.FileChooserButton(_i18n("Please select a folder"))
 
53
        self._filechooser = gtk.FileChooserButton(_("Please select a folder"))
55
54
        self._combo = gtk.ComboBoxEntry()
56
 
        self._label_location = gtk.Label(_i18n("Branch location:"))
57
 
        self._label_destination = gtk.Label(_i18n("Destination:"))
58
 
        self._label_nick = gtk.Label(_i18n("Branck nick:"))
59
 
        self._label_revision = gtk.Label(_i18n("Revision:"))
 
55
        self._label_location = gtk.Label(_("Branch location:"))
 
56
        self._label_destination = gtk.Label(_("Destination:"))
 
57
        self._label_nick = gtk.Label(_("Branck nick:"))
 
58
        self._label_revision = gtk.Label(_("Revision:"))
60
59
        self._hbox_revision = gtk.HBox()
61
60
        self._entry_revision = gtk.Entry()
62
61
        self._entry_nick = gtk.Entry()
63
 
        self._check_lightweight = gtk.CheckButton(_i18n("_Lightweight checkout"),
 
62
        self._check_lightweight = gtk.CheckButton(_("_Lightweight checkout"),
64
63
                                                  use_underline=True)
65
64
        
66
65
        # Set callbacks
94
93
        self.vbox.set_spacing(3)
95
94
        if self.path is not None:
96
95
            self._filechooser.set_filename(self.path)
97
 
        if remote_path is not None:
98
 
            self._combo.child.set_text(remote_path)
99
96
        
100
97
        # Pack some widgets
101
98
        self._hbox_revision.pack_start(self._entry_revision, True, True)
161
158
        """ Checkout button clicked handler. """
162
159
        location = self._combo.get_child().get_text()
163
160
        if location is '':
164
 
            error_dialog(_i18n('Missing branch location'),
165
 
                         _i18n('You must specify a branch location.'))
 
161
            error_dialog(_('Missing branch location'),
 
162
                         _('You must specify a branch location.'))
166
163
            return
167
164
        
168
165
        destination = self._filechooser.get_filename()
193
190
        """ We try to get the last revision if focus lost. """
194
191
        rev = self._get_last_revno()
195
192
        if rev is None:
196
 
            self._entry_revision.set_text(_i18n('N/A'))
 
193
            self._entry_revision.set_text(_('N/A'))
197
194
            self._button_revision.set_sensitive(False)
198
195
        else:
199
196
            self._entry_revision.set_text(str(rev))