tweaks: rename a function, to be a bit more fitting
parent
b14ad451a9
commit
43235c2f16
|
@ -428,8 +428,8 @@ int the_code_for(void (*func)(void), int defaultval)
|
|||
return s->keycode;
|
||||
}
|
||||
|
||||
/* Return the number of entries in the shortcut list for a given menu. */
|
||||
size_t length_of_list(int menu)
|
||||
/* Return the number of entries that can be shown in the given menu. */
|
||||
size_t shown_entries_for(int menu)
|
||||
{
|
||||
funcstruct *item;
|
||||
size_t count = 0;
|
||||
|
|
|
@ -319,7 +319,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
|
|||
/* Some functions in global.c. */
|
||||
const keystruct *first_sc_for(int menu, void (*func)(void));
|
||||
int the_code_for(void (*func)(void), int defaultval);
|
||||
size_t length_of_list(int menu);
|
||||
size_t shown_entries_for(int menu);
|
||||
const keystruct *get_shortcut(int *kbinput);
|
||||
functionptrtype func_from_key(int *kbinput);
|
||||
int keycode_from_string(const char *keystring);
|
||||
|
|
|
@ -1696,7 +1696,7 @@ int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts)
|
|||
}
|
||||
|
||||
/* Determine how many shortcuts are being shown. */
|
||||
number = length_of_list(currmenu);
|
||||
number = shown_entries_for(currmenu);
|
||||
|
||||
/* Calculate the width of each non-rightmost shortcut item;
|
||||
* the rightmost ones will "absorb" any remaining slack. */
|
||||
|
@ -2293,7 +2293,7 @@ void bottombars(int menu)
|
|||
return;
|
||||
|
||||
/* Determine how many shortcuts must be shown. */
|
||||
number = length_of_list(menu);
|
||||
number = shown_entries_for(menu);
|
||||
|
||||
/* Compute the width of each keyname-plus-explanation pair. */
|
||||
itemwidth = COLS / ((number / 2) + (number % 2));
|
||||
|
|
Loading…
Reference in New Issue