X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fcursesdisplay.c;fp=src%2Fcursesdisplay.c;h=beb7bdf7342173c3ecf4e639e2826566155f1881;hp=2d79d65f99cc0ae53838f0be551641de842a1b99;hb=bc958efad4530621ea32e98f265509140713384a;hpb=6faf61f4256ae548a91063a19fd14bf6dcb134da diff --git a/src/cursesdisplay.c b/src/cursesdisplay.c index 2d79d65..beb7bdf 100644 --- a/src/cursesdisplay.c +++ b/src/cursesdisplay.c @@ -779,8 +779,8 @@ void update_perf() while (g_hash_table_iter_next (&iter, &key, (gpointer) &perfn1)) { if (perfn1->visible) { if (perfn1->sort) { + /* pref_current_sort = i; */ wattron(center, A_UNDERLINE); - /* FIXME : sort in the opposite direction */ } /* + 5 to strip the "perf_" prefix */ mvwprintw(center, 1, perf_row, "%s", @@ -1443,19 +1443,24 @@ void *handle_keyboard(void *p) update_preference_panel(&pref_line_selected, 0, 1); break; case '>': - if (!pref_panel_visible) { + /* perf uses a hashtable, it is ordered backward */ + if (current_view == perf) { + pref_current_sort--; + } else if (!pref_panel_visible) { pref_current_sort++; - update_sort(&pref_current_sort); - update_current_view(); } + update_sort(&pref_current_sort); + update_current_view(); break; case '<': - if (!pref_panel_visible) { - if (pref_current_sort > 0) - pref_current_sort--; - update_sort(&pref_current_sort); - update_current_view(); + /* perf uses a hashtable, it is ordered backward */ + if (current_view == perf) { + pref_current_sort++; + } else if (!pref_panel_visible) { + pref_current_sort--; } + update_sort(&pref_current_sort); + update_current_view(); break; case 13: /* FIXME : KEY_ENTER ?? */