1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[bfu] enum menu_item_flags -> menu_item_flags_T

This commit is contained in:
Witold Filipczyk 2022-01-28 14:35:18 +01:00
parent e57bae65d3
commit 3f29dada0a
3 changed files with 8 additions and 6 deletions

View File

@ -1376,7 +1376,7 @@ mainmenu_handler(struct window *win, struct term_event *ev)
mem_align_alloc(mi_, size, (size) + 2, 0xF)
struct menu_item *
new_menu(enum menu_item_flags flags)
new_menu(menu_item_flags_T flags)
{
struct menu_item *mi = NULL;
@ -1388,7 +1388,7 @@ new_menu(enum menu_item_flags flags)
void
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
enum menu_item_flags flags)
menu_item_flags_T flags)
{
int n = count_items(*mi);
/* XXX: Don't clear the last and special item. */

View File

@ -30,6 +30,8 @@ enum menu_item_flags {
RIGHT_INTL = 256, /* Force translation of the right text */
};
typedef int menu_item_flags_T;
#define FREE_ANY (FREE_LIST|FREE_TEXT|FREE_RTEXT|FREE_DATA)
/*
@ -98,7 +100,7 @@ struct menu_item {
menu_func_T func; /* Called when selecting the item */
void *data; /* Private data passed to handler */
enum menu_item_flags flags; /* What to free() and display */
menu_item_flags_T flags; /* What to free() and display */
/* If true, don't try to translate text/rtext inside of the menu
* routines. */
@ -164,12 +166,12 @@ struct menu {
};
struct menu_item *new_menu(enum menu_item_flags);
struct menu_item *new_menu(menu_item_flags_T);
void
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
enum menu_item_flags flags);
menu_item_flags_T flags);
#define add_menu_separator(menu) \
add_to_menu(menu, "", NULL, ACT_MAIN_NONE, NULL, NULL, NO_SELECT)

View File

@ -920,7 +920,7 @@ add_uri_command_to_menu(struct menu_item **mi, enum pass_uri_type type,
NULL);
struct option *option;
int commands = 0;
enum menu_item_flags flags = NO_FLAG;
menu_item_flags_T flags = NO_FLAG;
action_id_T action_id;
switch (type) {