diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-12 19:37:51 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-20 02:44:18 +0400 |
commit | 4c1c952e37c7511a52f617ceddbc10c855d45d7b (patch) | |
tree | 8f2ffa7d5b787b23cf88ea84309d7961e79d9c01 /tools/perf/util/ui/browsers/map.c | |
parent | b50e003db13848dd74572ffd221047683313981d (diff) | |
download | linux-4c1c952e37c7511a52f617ceddbc10c855d45d7b.tar.xz |
perf ui browser: Add routines to compactly specify exit keys
This makes the usual idiom for specifying a series of key codes to exit
ui_browser__run() for specialized processing (search, annotate, etc) or
plain exiting the browser more compact.
It also abstracts away some more libnewt operations. At some point we'll
also replace NEWT_KEY_foo with something that can be mapped to NEWT or,
say, gtk.
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/map.c')
-rw-r--r-- | tools/perf/util/ui/browsers/map.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/perf/util/ui/browsers/map.c b/tools/perf/util/ui/browsers/map.c index 16b7d70f2c58..1bf09796cb31 100644 --- a/tools/perf/util/ui/browsers/map.c +++ b/tools/perf/util/ui/browsers/map.c @@ -1,6 +1,5 @@ #include "../libslang.h" #include <elf.h> -#include <newt.h> #include <sys/ttydefaults.h> #include <ctype.h> #include <string.h> @@ -106,13 +105,8 @@ static int map_browser__run(struct map_browser *self) verbose ? "" : "restart with -v to use") < 0) return -1; - newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT); - newtFormAddHotKey(self->b.form, NEWT_KEY_ESCAPE); - newtFormAddHotKey(self->b.form, 'Q'); - newtFormAddHotKey(self->b.form, 'q'); - newtFormAddHotKey(self->b.form, CTRL('c')); if (verbose) - newtFormAddHotKey(self->b.form, '/'); + ui_browser__add_exit_key(&self->b, '/'); while (1) { key = ui_browser__run(&self->b); |