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

  • Committer: Curtis Hovey
  • Date: 2012-02-27 04:36:33 UTC
  • mto: (776.2.1 ui-factory)
  • mto: This revision was merged to the branch mainline in revision 779.
  • Revision ID: sinzui.is@verizon.net-20120227043633-r1h8ts3vhl4kat1p
Added tests for report_transport_activity().

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
        if pbw:
215
215
            pbw.finished()
216
216
 
217
 
    def _progress_updated(self, task):
218
 
        """See UIFactory._progress_updated"""
 
217
    def _ensure_progress_widget(self):
219
218
        if self._progress_bar_widget is None:
220
 
            # Default to a window since nobody gave us a better mean to report
 
219
            # Default to a window since nobody gave us a better means to report
221
220
            # progress.
222
221
            self.set_progress_bar_widget(ProgressBarWindow())
 
222
 
 
223
    def _progress_updated(self, task):
 
224
        """See UIFactory._progress_updated"""
 
225
        self._ensure_progress_widget()
223
226
        self._progress_bar_widget.update(task.msg,
224
227
                                         task.current_cnt, task.total_cnt)
225
228
 
226
229
    def report_transport_activity(self, transport, byte_count, direction):
227
230
        """See UIFactory.report_transport_activity"""
 
231
        self._ensure_progress_widget()
228
232
        self._progress_bar_widget.tick()