aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ui/browsers/hists.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-08-10 14:44:20 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-10 14:44:20 -0400
commit59e8fe32fc0cc9dff6b0c269d099a49e004dc45e (patch)
tree55133961ebcbf9ea5b5ab674360207876c189349 /tools/perf/util/ui/browsers/hists.c
parentf1e9214cc99644101d957c5c660946c6f2f86d7c (diff)
perf ui browser: Add ui_browser__show counterpart: __hide
So that the common tasks of providing a helpline at __run entry and destroying the window and releasing resourses at exit can be abstracted away, reducing a bit more the coupling with libnewt. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/browsers/hists.c')
-rw-r--r--tools/perf/util/ui/browsers/hists.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index cee7998f1c33..dd512b73b015 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -211,7 +211,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
211 nr_events, unit); 211 nr_events, unit);
212 newtDrawRootText(0, 0, str); 212 newtDrawRootText(0, 0, str);
213 213
214 if (ui_browser__show(&self->b, title) < 0) 214 if (ui_browser__show(&self->b, title,
215 "Press '?' for help on key bindings") < 0)
215 return -1; 216 return -1;
216 217
217 newtFormAddHotKey(self->b.form, 'A'); 218 newtFormAddHotKey(self->b.form, 'A');
@@ -253,6 +254,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title,
253 return 0; 254 return 0;
254 } 255 }
255 } 256 }
257
258 ui_browser__hide(&self->b);
256 return 0; 259 return 0;
257} 260}
258 261