Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200607
b: refs/heads/master
c: 1d90f2e
h: refs/heads/master
i:
  200605: 9e90bc7
  200603: 40f9639
  200599: f2184c4
  200591: fcd9636
  200575: 3144212
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jun 10, 2010
1 parent 978661c commit fef3d55
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d11007703c31db534674ebeeb9eb047bbbe758bd
refs/heads/master: 1d90f2e707e75afdb6b644f774cf5e54dc9c33fc
15 changes: 13 additions & 2 deletions trunk/tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)

if (self != NULL) {
int cols;

if (use_browser <= 0)
return self;
newtGetScreenSize(&cols, NULL);
cols -= 4;
newtCenteredWindow(cols, 1, title);
Expand All @@ -67,14 +70,22 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)

void ui_progress__update(struct ui_progress *self, u64 curr)
{
/*
* FIXME: We should have a per UI backend way of showing progress,
* stdio will just show a percentage as NN%, etc.
*/
if (use_browser <= 0)
return;
newtScaleSet(self->scale, curr);
newtRefresh();
}

void ui_progress__delete(struct ui_progress *self)
{
newtFormDestroy(self->form);
newtPopWindow();
if (use_browser > 0) {
newtFormDestroy(self->form);
newtPopWindow();
}
free(self);
}

Expand Down

0 comments on commit fef3d55

Please sign in to comment.