add_menu(windid window, int glyph, const anything identifier, char accelerator, char groupacc, int attr, char *str, unsigned int itemflags) -- Add a text line str to the given menu window. If identifier is 0, then the line cannot be selected (e.g. a title). Otherwise, identifier i
| 706 | menu is displayed, set bit MENU_ITEMFLAGS_SELECTED. |
| 707 | */ |
| 708 | void |
| 709 | gnome_add_menu(winid wid, int glyph, const ANY_P *identifier, |
| 710 | CHAR_P accelerator, CHAR_P group_accel, int attr, |
| 711 | const char *str, unsigned int itemflags) |
| 712 | { |
| 713 | boolean presel = ((itemflags & MENU_ITEMFLAGS_SELECTED) != 0); |
| 714 | GHackMenuItem item; |
| 715 | item.glyph = glyph; |
| 716 | item.identifier = identifier; |
| 717 | item.accelerator = accelerator; |
| 718 | item.group_accel = group_accel; |
| 719 | item.attr = attr; |
| 720 | item.str = str; |
| 721 | item.presel = presel; |
| 722 | item.itemflags = itemflags; |
| 723 | |
| 724 | if (wid != -1 && gnome_windowlist[wid].win != NULL) { |
| 725 | gtk_signal_emit(GTK_OBJECT(gnome_windowlist[wid].win), |
| 726 | ghack_signals[GHSIG_ADD_MENU], &item); |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | /* |
| 731 | end_menu(window, prompt) |
nothing calls this directly
no outgoing calls
no test coverage detected