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.
This commit is contained in:
1 parent
966b0bdc1b
commit
33867c9ffe
3 files changed
+62
-4
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user