~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2010-01-15 03:15:27 UTC
  • mto: This revision was merged to the branch mainline in revision 4967.
  • Revision ID: mbp@sourcefrog.net-20100115031527-067m8b886zuuiax2
quietness-state is now tracked on UIFactory

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
 
110
110
    def __init__(self):
111
111
        self._task_stack = []
 
112
        self._quiet = False
 
113
 
 
114
    def be_quiet(self, state):
 
115
        """Tell the UI to be more quiet, or not.
 
116
 
 
117
        Typically this suppresses progress bars; the application may also look
 
118
        at ui_factory.is_quiet().
 
119
        """
 
120
        self._quiet = state
112
121
 
113
122
    def get_password(self, prompt='', **kwargs):
114
123
        """Prompt the user for a password.
125
134
        """
126
135
        raise NotImplementedError(self.get_password)
127
136
 
 
137
    def is_quiet(self):
 
138
        return self._quiet
 
139
 
128
140
    def make_output_stream(self, encoding=None, encoding_type=None):
129
141
        """Get a stream for sending out bulk text data.
130
142