AmendHub

Download:

jcs

/

subtext

/

amendments

/

65

main: Add submenu for editing each view


jcs made amendment 65 over 2 years ago
--- main.c Thu Jan 20 14:23:01 2022 +++ main.c Sun Jan 23 13:45:16 2022 @@ -67,6 +67,7 @@ main(void) AddResMenu(apple_menu, 'DRVR'); if (!(file_menu = GetMHandle(FILE_MENU_ID))) panic("no file menu"); + InsertMenu(GetMenu(VIEWS_SUBMENU_ID), -1); update_menu(); DrawMenuBar(); @@ -234,14 +235,25 @@ handle_menu(long menu_id) break; case BBS_MENU_ID: switch (LoWord(menu_id)) { - case BBS_MENU_VIEWS_ID: - view_editor_show(DB_TEXT_MENU_ID, "Edit: Main menu"); - break; case BBS_MENU_SETTINGS_ID: settings_edit(); break; case BBS_MENU_OPEN_CONSOLE_ID: console_init(); + break; + } + ret = 1; + break; + case VIEWS_SUBMENU_ID: + switch (LoWord(menu_id)) { + case VIEWS_SUBMENU_MAIN_MENU_ID: + view_editor_show(DB_TEXT_MENU_ID, "Edit: Main menu"); + break; + case VIEWS_SUBMENU_SHORT_MENU_ID: + view_editor_show(DB_TEXT_SHORTMENU_ID, "Edit: Short menu"); + break; + case VIEWS_SUBMENU_ISSUE_ID: + view_editor_show(DB_TEXT_ISSUE_ID, "Edit: Pre-login view"); break; } ret = 1; --- subtext.h Fri Jan 21 14:53:33 2022 +++ subtext.h Sun Jan 23 13:43:00 2022 @@ -40,6 +40,11 @@ #define BBS_MENU_SETTINGS_ID 5 #define BBS_MENU_OPEN_CONSOLE_ID 7 +#define VIEWS_SUBMENU_ID 132 +#define VIEWS_SUBMENU_MAIN_MENU_ID 1 +#define VIEWS_SUBMENU_SHORT_MENU_ID 2 +#define VIEWS_SUBMENU_ISSUE_ID 3 + #define STR_LAST_DB 128 #define SETTINGS_DLOG_ID 130