mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
[bfu] enum menu_item_flags -> menu_item_flags_T
This commit is contained in:
parent
e57bae65d3
commit
3f29dada0a
@ -1376,7 +1376,7 @@ mainmenu_handler(struct window *win, struct term_event *ev)
|
|||||||
mem_align_alloc(mi_, size, (size) + 2, 0xF)
|
mem_align_alloc(mi_, size, (size) + 2, 0xF)
|
||||||
|
|
||||||
struct menu_item *
|
struct menu_item *
|
||||||
new_menu(enum menu_item_flags flags)
|
new_menu(menu_item_flags_T flags)
|
||||||
{
|
{
|
||||||
struct menu_item *mi = NULL;
|
struct menu_item *mi = NULL;
|
||||||
|
|
||||||
@ -1388,7 +1388,7 @@ new_menu(enum menu_item_flags flags)
|
|||||||
void
|
void
|
||||||
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
||||||
enum main_action action_id, menu_func_T func, void *data,
|
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);
|
int n = count_items(*mi);
|
||||||
/* XXX: Don't clear the last and special item. */
|
/* XXX: Don't clear the last and special item. */
|
||||||
|
@ -30,6 +30,8 @@ enum menu_item_flags {
|
|||||||
RIGHT_INTL = 256, /* Force translation of the right text */
|
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)
|
#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 */
|
menu_func_T func; /* Called when selecting the item */
|
||||||
|
|
||||||
void *data; /* Private data passed to handler */
|
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
|
/* If true, don't try to translate text/rtext inside of the menu
|
||||||
* routines. */
|
* 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
|
void
|
||||||
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
||||||
enum main_action action_id, menu_func_T func, void *data,
|
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) \
|
#define add_menu_separator(menu) \
|
||||||
add_to_menu(menu, "", NULL, ACT_MAIN_NONE, NULL, NULL, NO_SELECT)
|
add_to_menu(menu, "", NULL, ACT_MAIN_NONE, NULL, NULL, NO_SELECT)
|
||||||
|
@ -920,7 +920,7 @@ add_uri_command_to_menu(struct menu_item **mi, enum pass_uri_type type,
|
|||||||
NULL);
|
NULL);
|
||||||
struct option *option;
|
struct option *option;
|
||||||
int commands = 0;
|
int commands = 0;
|
||||||
enum menu_item_flags flags = NO_FLAG;
|
menu_item_flags_T flags = NO_FLAG;
|
||||||
action_id_T action_id;
|
action_id_T action_id;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user