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

  • Committer: Jelmer Vernooij
  • Date: 2011-04-10 18:44:39 UTC
  • mto: This revision was merged to the branch mainline in revision 730.
  • Revision ID: jelmer@samba.org-20110410184439-g7hqaacexqtviq13
Move i18n support to a separate file, so gettext files aren't loaded unless bzr-gtk is used.

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 (
32
31
    info_dialog,
33
32
    question_dialog,
34
33
    )
35
34
 
36
35
from bzrlib.plugins.gtk.history import UrlHistory
 
36
from bzrlib.plugins.gtk.i18n import _i18n
 
37
 
37
38
 
38
39
class PushDialog(gtk.Dialog):
39
 
    """ New implementation of the Push dialog. """
 
40
    """New implementation of the Push dialog."""
40
41
 
41
42
    def __init__(self, repository, revid, branch=None, parent=None):
42
 
        """ Initialize the Push dialog. """
43
 
        gtk.Dialog.__init__(self, title="Push - Olive",
 
43
        """Initialize the Push dialog. """
 
44
        gtk.Dialog.__init__(self, title="Push",
44
45
                                  parent=parent,
45
46
                                  flags=0,
46
47
                                  buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
78
79
        self._build_history()
79
80
 
80
81
    def _build_history(self):
81
 
        """ Build up the location history. """
 
82
        """Build up the location history. """
82
83
        self._combo_model = gtk.ListStore(str)
83
84
        for item in self._history.get_entries():
84
85
            self._combo_model.append([ item ])
92
93
 
93
94
    @show_bzr_error
94
95
    def _on_push_clicked(self, widget):
95
 
        """ Push button clicked handler. """
 
96
        """Push button clicked handler. """
96
97
        location = self._combo.get_child().get_text()
97
98
        revs = 0
98
99
 
115
116
 
116
117
 
117
118
def do_push(br_from, location, overwrite):
118
 
    """ Update a mirror of a branch.
 
119
    """Update a mirror of a branch.
119
120
 
120
121
    :param br_from: the source branch
121
122
    :param location: the location of the branch that you'd like to update