]> granicus.if.org Git - procps-ng/commitdiff
top: with new bar graphs, make 'b' toggle unrestricted
authorJim Warner <james.warner@comcast.net>
Mon, 23 Jun 2014 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Tue, 24 Jun 2014 10:38:30 +0000 (20:38 +1000)
While the 'b' toggle remains window based (vs. global)
it should no longer require that the window be visible
and either the 'x' or 'y' toggles to be on. Previously
those requirements were intended to remind a user that
there must be something for this command to highlight.

With the introduction of graph modes (specifically the
the bar graph) the 'bold/reverse' toggle has important
implications beyond highlighting some columns or rows.

The %Cpu(s) graph and Mem portion of the memory graphs
are designed to offer a visual clue as to the separate
elements comprising them. But that separation could be
lost under some X color schemes or when top is running
without color (in monochrome mode) and the block graph
is selected. But, if the graph is then changed to bars
any separation always becomes visible whenever the 'b'
toggle is turned off. Portions then show in 'reverse'.

So from now on we'll check nothing, we'll just toggle.

[ Besides, with all the code thrown at restricting a ]
[ 'b' toggle use, it might have all been for naught. ]
[ That toggle could still be set/unset using the 'Z' ]
[ command and the color mapping screen. Geez Louise! ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.1
top/top.c
top/top_nls.c
top/top_nls.h

index 5d71f619bc3c142354b20deb878132028d5554f9..d92e437a40cff3b2851ae4c213ae3d1827007804 100644 (file)
--- a/top/top.1
+++ b/top/top.1
@@ -1342,7 +1342,8 @@ global `B' (bold enable) toggle.
 .TP 7
 \ \ \ \fBb\fR\ \ :\fIBold/Reverse\fR toggle \fR
 This command will impact how the `x' and `y' toggles are displayed.
-Further, it will only be available when at least one of those toggles is \*O.
+It may also impact the \*(SA when a bar graph has been selected for \*(Pu
+states or memory usage via the 't' or 'm' toggles.
 
 .TP 7
 \ \ \ \fBx\fR\ \ :\fIColumn-Highlight\fR toggle \fR
index 8fb05d90e58774db547c030bb5e71f2f5666f7be..e8bbe6cbb6a7fb43d839304a5aa8cccafd323ac5 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -4586,18 +4586,8 @@ static void keys_task (int ch) {
          }
          break;
       case 'b':
-         if (VIZCHKw(w)) {
-#ifdef USE_X_COLHDR
-            if (!CHKw(w, Show_HIROWS))
-#else
-            if (!CHKw(w, Show_HICOLS | Show_HIROWS))
-#endif
-               show_msg(N_txt(HILIGHT_cant_txt));
-            else {
-               TOGw(w, Show_HIBOLD);
-               capsmk(w);
-            }
-         }
+         TOGw(w, Show_HIBOLD);
+         capsmk(w);
          break;
       case 'c':
          VIZTOGw(w, Show_CMDLIN);
index 5ffe72e6978d6135b58457f95cdda33995cce1ac..01dd968ea803f946ef25a860729858a3f9299b53 100644 (file)
@@ -347,7 +347,6 @@ static void build_norm_nlstab (void) {
    Norm_nlstab[TIME_accumed_fmt] = _("Cumulative time %s");
    Norm_nlstab[GET_max_task_fmt] = _("Maximum tasks = %d, change to (0 is unlimited)");
    Norm_nlstab[BAD_max_task_txt] = _("Invalid maximum");
-   Norm_nlstab[HILIGHT_cant_txt] = _("Nothing to highlight!");
    Norm_nlstab[GET_user_ids_txt] = _("Which user (blank for all)");
    Norm_nlstab[UNKNOWN_cmds_txt] = _("Unknown command - try 'h' for help");
    Norm_nlstab[SCROLL_coord_fmt] = _("scroll coordinates: y = %d/%%d (tasks), x = %d/%d (fields)");
index 9d880d178ca3e36ae64f71220972574fe2f4c227..27d857aac890eb8bef4c29ab233739129b211a49 100644 (file)
@@ -73,18 +73,18 @@ enum norm_nls {
    FAIL_tty_set_fmt, FAIL_widecpu_txt, FAIL_widepid_txt, FIND_no_find_fmt,
    FIND_no_next_txt, FOREST_modes_fmt, FOREST_views_txt, GET_find_str_txt,
    GET_max_task_fmt, GET_nice_num_fmt, GET_pid2kill_fmt, GET_pid2nice_fmt,
-   GET_sigs_num_fmt, GET_user_ids_txt, HELP_cmdline_fmt, HILIGHT_cant_txt,
-   IRIX_curmode_fmt, LIMIT_exceed_fmt, MISSING_args_fmt, NAME_windows_fmt,
-   NOT_onsecure_txt, NOT_smp_cpus_txt, NUMA_nodebad_txt, NUMA_nodeget_fmt,
-   NUMA_nodenam_fmt, NUMA_nodenot_txt, OFF_one_word_txt, ON_word_only_txt,
-   OSEL_casenot_txt, OSEL_caseyes_txt, OSEL_errdelm_fmt, OSEL_errdups_txt,
-   OSEL_errvalu_fmt, OSEL_prompts_fmt, OSEL_statlin_fmt, RC_bad_entry_fmt,
-   RC_bad_files_fmt, SCROLL_coord_fmt, SELECT_clash_txt, THREADS_show_fmt,
-   TIME_accumed_fmt, UNKNOWN_cmds_txt, UNKNOWN_opts_fmt, USAGE_abbrev_txt,
-   WORD_abv_mem_txt, WORD_abv_swp_txt, WORD_allcpus_txt, WORD_another_txt,
-   WORD_eachcpu_fmt, WORD_exclude_txt, WORD_include_txt, WORD_noneone_txt,
-   WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt,
-   XTRA_badflds_fmt, XTRA_fixwide_fmt, XTRA_warncfg_txt, XTRA_winsize_txt,
+   GET_sigs_num_fmt, GET_user_ids_txt, HELP_cmdline_fmt, IRIX_curmode_fmt,
+   LIMIT_exceed_fmt, MISSING_args_fmt, NAME_windows_fmt, NOT_onsecure_txt,
+   NOT_smp_cpus_txt, NUMA_nodebad_txt, NUMA_nodeget_fmt, NUMA_nodenam_fmt,
+   NUMA_nodenot_txt, OFF_one_word_txt, ON_word_only_txt, OSEL_casenot_txt,
+   OSEL_caseyes_txt, OSEL_errdelm_fmt, OSEL_errdups_txt, OSEL_errvalu_fmt,
+   OSEL_prompts_fmt, OSEL_statlin_fmt, RC_bad_entry_fmt, RC_bad_files_fmt,
+   SCROLL_coord_fmt, SELECT_clash_txt, THREADS_show_fmt, TIME_accumed_fmt,
+   UNKNOWN_cmds_txt, UNKNOWN_opts_fmt, USAGE_abbrev_txt, WORD_abv_mem_txt,
+   WORD_abv_swp_txt, WORD_allcpus_txt, WORD_another_txt, WORD_eachcpu_fmt,
+   WORD_exclude_txt, WORD_include_txt, WORD_noneone_txt, WORD_process_txt,
+   WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt, XTRA_badflds_fmt,
+   XTRA_fixwide_fmt, XTRA_warncfg_txt, XTRA_winsize_txt,
 #ifndef INSP_OFFDEMO
    YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt,
    YINSP_deqtyp_txt, YINSP_dstory_txt,