From: Arnaldo Carvalho de Melo Date: Sat, 15 May 2010 23:40:34 +0000 (-0300) Subject: perf newt: Make <- exit the ui_browser X-Git-Tag: v3.0~4461^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=605539034f208d365f76af8e2152cb25f702367d;p=platform%2Fkernel%2Flinux-amlogic.git perf newt: Make <- exit the ui_browser Right now that means that pressing the left arrow willl make the symbol annotation window to exit back to the main symbol histogram browser. This is another improvement on the UI fastpath, i.e. just the arrows and enter are enough for most browsing. Suggested-by: Ingo Molnar Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index e74df12..5ded2f0 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -323,6 +323,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title, newtFormAddHotKey(self->form, NEWT_KEY_PGDN); newtFormAddHotKey(self->form, NEWT_KEY_HOME); newtFormAddHotKey(self->form, NEWT_KEY_END); + newtFormAddHotKey(self->form, NEWT_KEY_LEFT); if (ui_browser__refresh_entries(self) < 0) return -1; @@ -408,6 +409,7 @@ static int ui_browser__run(struct ui_browser *self, const char *title, } break; case NEWT_KEY_ESCAPE: + case NEWT_KEY_LEFT: case CTRL('c'): case 'Q': case 'q': @@ -616,7 +618,7 @@ static void hist_entry__annotate_browser(struct hist_entry *self) if (hist_entry__annotate(self, &head) < 0) return; - ui_helpline__push("Press ESC to exit"); + ui_helpline__push("Press <- or ESC to exit"); memset(&browser, 0, sizeof(browser)); browser.entries = &head;