PR htop-dev/htop#70 got rid of the infrastructure for generating header
files, but it left behind some code duplication.
Some of cases are things that belong in the header file and don't need
to be repeated in the C file. Other cases are things that belong in the
C file and don't need to be in the header file.
In this commit I tried to fix all of these that I could find. When given
a choice I preferred keeping things out of the header file, unless they
were being used by someone else.
Reasoning:
- implementation was unsound -- broke down when I added a fairly
basic macro definition expanding to a struct initializer in a *.c
file.
- made it way too easy (e.g. via otherwise totally innocuous git
commands) to end up with timestamps such that it always ran
MakeHeader.py but never used its output, leading to overbuild noise
when running what should be a null 'make'.
- but mostly: it's just an awkward way of dealing with C code.
Before:
SpaceStyle EnterMove DelDeleteEscDone |
~~~~~ ~~~~~ ~~~ ~~~ |
UpUp DnDown LtLeft RtRight EnterConfirmDelDeleteEscDone |
~~ ~~ ~~ ~~ ~~~~~ ~~~ ~~~ |
After:
SpaceStyle EnterMove DelDeleteF10Done
~~~~~ ~~~~~ ~~ ~~~ ~~~
SpaceStyle EnterLock UpUp DnDown <-Left ->Right DelDeleteF10Done
~~~~~ ~~~~~ ~~ ~~ ~~ ~~ ~~ ~~~ ~~~
* Align 'Delete' and 'Done' to the right to match functions on other
screens. (Accidental clicking is avoided as a side benefit.)
* You could change meter type while in moving mode. New bar now hints
this.
* Two Enter key functions are put in the same place and so mouse clicks
there act like functions toggle. (The wording change to 'Lock' is
also to reflect this.)
* '<-' and '->' instead of 'Lt' and 'Rt' abbreviation as the latter is
not widely seen and arrows shapes are obvious. :)
* 'Esc' key for 'Done' in this context may not be intuitive, comparing
to 'F10'. While I wish there be a Cancel/Undo function for 'Esc', it
wouldn't hurt if we write 'F10' for 'Done' on functions bar for now.