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

Add options to viz treeview to not show the line graph, and to only show the main line.
Set the revision browser to use these options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.branch import Branch
30
30
import bzrlib.errors as errors
31
31
 
32
 
from bzrlib.plugins.gtk import _i18n
33
 
 
34
32
from dialog import error_dialog, info_dialog
35
33
 
36
34
from branchbox import BranchSelectionBox
49
47
        self.path = path
50
48
        
51
49
        # Create the widgets
52
 
        self._button_branch = gtk.Button(_i18n("_Branch"), use_underline=True)
 
50
        self._button_branch = gtk.Button(_("_Branch"), use_underline=True)
53
51
        self._remote_branch = BranchSelectionBox()
54
52
        self._button_revision = gtk.Button('')
55
 
        self._label_location = gtk.Label(_i18n("Branch location:"))
 
53
        self._label_location = gtk.Label(_("Branch location:"))
56
54
        self._label_location.set_alignment(0, 0.5)
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:"))
60
 
        self._filechooser = gtk.FileChooserButton(_i18n("Please select a folder"))
 
55
        self._label_destination = gtk.Label(_("Destination:"))
 
56
        self._label_nick = gtk.Label(_("Branck nick:"))
 
57
        self._label_revision = gtk.Label(_("Revision:"))
 
58
        self._filechooser = gtk.FileChooserButton(_("Please select a folder"))
61
59
        self._filechooser.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
62
60
        self._hbox_revision = gtk.HBox()
63
61
        self._entry_revision = gtk.Entry()
137
135
        """ Branch button clicked handler. """
138
136
        location = self._remote_branch.get_url()
139
137
        if location is '':
140
 
            error_dialog(_i18n('Missing branch location'),
141
 
                         _i18n('You must specify a branch location.'))
 
138
            error_dialog(_('Missing branch location'),
 
139
                         _('You must specify a branch location.'))
142
140
            return
143
141
        
144
142
        destination = self._filechooser.get_filename()
179
177
        finally:
180
178
            br_from.unlock()
181
179
                
182
 
        info_dialog(_i18n('Branching successful'),
183
 
                    _i18n('%d revision(s) branched.') % revs)
 
180
        self._history.add_entry(location)
 
181
        info_dialog(_('Branching successful'),
 
182
                    _('%d revision(s) branched.') % revs)
184
183
        
185
184
        self.response(gtk.RESPONSE_OK)
186
185
    
188
187
        """ We try to get the last revision if focus lost. """
189
188
        rev = self._get_last_revno()
190
189
        if rev is None:
191
 
            self._entry_revision.set_text(_i18n('N/A'))
 
190
            self._entry_revision.set_text(_('N/A'))
192
191
            self._button_revision.set_sensitive(False)
193
192
        else:
194
193
            self._entry_revision.set_text(str(rev))