~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Ian Clatworthy
  • Date: 2010-03-30 20:13:52 UTC
  • mto: This revision was merged to the branch mainline in revision 5125.
  • Revision ID: ian.clatworthy@canonical.com-20100330201352-vw2gtujybyg3rvwc
whitespace fix in win32 installer

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
""")
39
39
 
 
40
from bzrlib.osutils import watch_sigwinch
 
41
 
40
42
from bzrlib.ui import (
41
43
    UIFactory,
42
44
    NullProgressView,
60
62
        self.stderr = stderr
61
63
        # paints progress, network activity, etc
62
64
        self._progress_view = self.make_progress_view()
63
 
        
 
65
        # hook up the signals to watch for terminal size changes
 
66
        watch_sigwinch()
 
67
 
64
68
    def be_quiet(self, state):
65
69
        if state and not self._quiet:
66
70
            self.clear_term()
249
253
    def _progress_all_finished(self):
250
254
        self._progress_view.clear()
251
255
 
 
256
    def show_user_warning(self, warning_id, **message_args):
 
257
        """Show a text message to the user.
 
258
 
 
259
        Explicitly not for warnings about bzr apis, deprecations or internals.
 
260
        """
 
261
        # eventually trace.warning should migrate here, to avoid logging and
 
262
        # be easier to test; that has a lot of test fallout so for now just
 
263
        # new code can call this
 
264
        if warning_id not in self.suppressed_warnings:
 
265
            self.stderr.write(self.format_user_warning(warning_id, message_args) +
 
266
                '\n')
 
267
 
252
268
 
253
269
class TextProgressView(object):
254
270
    """Display of progress bar and other information on a tty.