From 33867c9ffe7ada781f82d662e187aa40772c2f3b Mon Sep 17 00:00:00 2001 From: "Rich O." Date: Tue, 3 Nov 2026 08:45:07 -0500 Subject: [PATCH] palm-client: menus split into Go / Channel / Options, per screen Channel menu only on Home (Add) and in a channel conversation (Add, Leave, Mute, Scope); DMs and the other screens get Go and Options. The Contacts list now has the menu too. --- palm-client/resources/visormesh.rcp | 58 +++++++++++++++++++++++++++-- palm-client/src/main.c | 6 ++- palm-client/src/resources.h | 2 + 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/palm-client/resources/visormesh.rcp b/palm-client/resources/visormesh.rcp index bfe2d36..655cd87 100644 --- a/palm-client/resources/visormesh.rcp +++ b/palm-client/resources/visormesh.rcp @@ -13,21 +13,72 @@ DATA "NFNT" ID SmallFontRes "resources/smallfont.nfnt" DATA "NFNT" ID LargeFontRes "resources/largefont.nfnt" DATA "EMJI" ID EmojiArtRes "resources/emoji.bin" +/* + * Menus: Go and Options on every screen; a Channel menu on Home and in a + * channel conversation (main.c picks ConvoChanMenuBar or MainMenuBar for ConvoForm). + */ MENU ID MainMenuBar BEGIN - PULLDOWN "Options" + PULLDOWN "Go" BEGIN MENUITEM "Conversations" ID MainMenuHome "H" MENUITEM "Contacts" ID MainMenuContacts "C" MENUITEM "Node" ID MainMenuNode "N" MENUITEM "Map" ID MainMenuMap "W" + END + PULLDOWN "Options" + BEGIN + MENUITEM "Flood Scopes..." ID MainMenuScopes "O" + MENUITEM "Preferences..." ID MainMenuSounds "R" MENUITEM "-" AUTOID + MENUITEM "Serial Ports..." ID MainMenuPorts "P" + MENUITEM "Font Preview" ID MainMenuFontPreview "F" + END +END + +MENU ID HomeMenuBar +BEGIN + PULLDOWN "Go" + BEGIN + MENUITEM "Conversations" ID MainMenuHome "H" + MENUITEM "Contacts" ID MainMenuContacts "C" + MENUITEM "Node" ID MainMenuNode "N" + MENUITEM "Map" ID MainMenuMap "W" + END + PULLDOWN "Channel" + BEGIN MENUITEM "Add Channel..." ID MainMenuAddChannel "A" + END + PULLDOWN "Options" + BEGIN + MENUITEM "Flood Scopes..." ID MainMenuScopes "O" + MENUITEM "Preferences..." ID MainMenuSounds "R" + MENUITEM "-" AUTOID + MENUITEM "Serial Ports..." ID MainMenuPorts "P" + MENUITEM "Font Preview" ID MainMenuFontPreview "F" + END +END + +MENU ID ConvoChanMenuBar +BEGIN + PULLDOWN "Go" + BEGIN + MENUITEM "Conversations" ID MainMenuHome "H" + MENUITEM "Contacts" ID MainMenuContacts "C" + MENUITEM "Node" ID MainMenuNode "N" + MENUITEM "Map" ID MainMenuMap "W" + END + PULLDOWN "Channel" + BEGIN + MENUITEM "Add Channel..." ID MainMenuAddChannel "A" + MENUITEM "-" AUTOID MENUITEM "Leave Channel" ID MainMenuLeaveChannel "L" MENUITEM "Mute Channel" ID MainMenuMuteChannel "M" MENUITEM "Channel Scope..." ID MainMenuChannelScope "E" + END + PULLDOWN "Options" + BEGIN MENUITEM "Flood Scopes..." ID MainMenuScopes "O" - MENUITEM "-" AUTOID MENUITEM "Preferences..." ID MainMenuSounds "R" MENUITEM "-" AUTOID MENUITEM "Serial Ports..." ID MainMenuPorts "P" @@ -39,7 +90,7 @@ END FORM ID HomeForm AT (0 0 160 160) NOFRAME USABLE -MENUID MainMenuBar +MENUID HomeMenuBar BEGIN TITLE "VisorMesh" GADGET ID HomeGadget AT (0 16 153 128) @@ -95,6 +146,7 @@ END FORM ID ContactsForm AT (0 0 160 160) NOFRAME USABLE +MENUID MainMenuBar BEGIN TITLE "Contacts " GADGET ID ContactsGadget AT (0 16 153 128) diff --git a/palm-client/src/main.c b/palm-client/src/main.c index 51a9c01..6c83119 100644 --- a/palm-client/src/main.c +++ b/palm-client/src/main.c @@ -75,7 +75,11 @@ static Boolean AppHandleEvent(EventType *event) FrmSetActiveForm(form); switch (formId) { case HomeForm: FrmSetEventHandler(form, HomeFormHandleEvent); break; - case ConvoForm: FrmSetEventHandler(form, ConvoFormHandleEvent); break; + case ConvoForm: + /* the Channel menu only for a channel; a DM gets the plain one */ + FrmSetMenu(form, gAppConv.type == VM_CONV_CHANNEL ? ConvoChanMenuBar : MainMenuBar); + FrmSetEventHandler(form, ConvoFormHandleEvent); + break; case ContactsForm: FrmSetEventHandler(form, ContactsFormHandleEvent); break; case MainForm: FrmSetEventHandler(form, NodeFormHandleEvent); break; case SettingsForm: FrmSetEventHandler(form, SettingsFormHandleEvent); break; diff --git a/palm-client/src/resources.h b/palm-client/src/resources.h index fc9acc4..9515a25 100644 --- a/palm-client/src/resources.h +++ b/palm-client/src/resources.h @@ -27,6 +27,8 @@ #define MainMenuChannelScope 1010 #define MainMenuScopes 1011 #define MainMenuMap 1012 +#define HomeMenuBar 1013 /* Go, Channel (Add), Options */ +#define ConvoChanMenuBar 1014 /* Go, Channel (Add, Leave, Mute, Scope), Options */ #define MainLinkGroup 1 #define SettingsForm 1200