From 99cc15128ee6d20812c83f3a5719cfc282804703 Mon Sep 17 00:00:00 2001 From: No0ne558 Date: Thu, 28 May 2026 11:46:15 -0700 Subject: [PATCH] dialog: remove redundant Menu Type field from Button Properties Dialog The 'Menu Type' selector was already covered by the specific zone types in 'Button's Type' (ZONE_ITEM_NORMAL, ZONE_ITEM_MODIFIER, etc.). itype is now derived solely from ztype; generic ZONE_ITEM defaults to ITEM_NORMAL. Network protocol byte is unchanged. --- docs/changelog.md | 5 +++++ term/term_dialog.cc | 10 +++------- term/term_dialog.hh | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 3c70f5e5..9f2dcb5f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +### Removed +- **Button Properties Dialog: Remove redundant "Menu Type" field** (2026-05-28) + - The "Menu Type" selector (`item_type` `DialogMenu` widget in `ZoneDialog`) was redundant with the more specific zone types already present in "Button's Type" (`ZONE_ITEM_NORMAL`, `ZONE_ITEM_MODIFIER`, `ZONE_ITEM_METHOD`, `ZONE_ITEM_SUBSTITUTE`, `ZONE_ITEM_POUND`, `ZONE_ITEM_ADMISSION`). The item classification (`itype`) is now derived entirely from the selected zone type; for the legacy generic `ZONE_ITEM` type the classification defaults to `ITEM_NORMAL`. The network protocol byte is preserved unchanged. + - Files modified: `term/term_dialog.hh`, `term/term_dialog.cc`. + ### Added - **Index Tab Buttons: Selected visual feedback, no-op guard, page-zero block, and auto-page creation** (2026-05-28) - `IndexTabZone::State()` now returns the selected state (1) whenever the terminal's current page matches the tab's `jump_id`. The tab for the active page is automatically rendered with its configured selected-state edge, texture, and font color (`frame[1]`, `texture[1]`, `color[1]`) — no new `Terminal` fields required. diff --git a/term/term_dialog.cc b/term/term_dialog.cc index 9a424c22..b0d952bb 100644 --- a/term/term_dialog.cc +++ b/term/term_dialog.cc @@ -1014,7 +1014,7 @@ void EZ_TypeCB(Widget widget, XtPointer client_data, XtPointer call_data) else if (ztype == ZONE_ITEM_SUBSTITUTE) itype = ITEM_SUBSTITUTE; else if (ztype == ZONE_ITEM_POUND) itype = ITEM_POUND; else if (ztype == ZONE_ITEM_ADMISSION) itype = ITEM_ADMISSION; - else itype = d->item_type.Value(); // For ZONE_ITEM, get from selector + else itype = ITEM_NORMAL; // For generic ZONE_ITEM, default to normal if (ztype == d->ztype && itype == d->itype) return; @@ -1115,8 +1115,6 @@ ZoneDialog::ZoneDialog(Widget parent) item_name.Init(container, "This Button's True Name"); item_zone_name.Init(container, "This Button's On-Screen Name, if Different than its True Name"); item_print_name.Init(container, "This Button's Abbreviation for Remote Printing if Different than its True Name"); - item_type.Init(container, "Menu Type", ItemTypeName, ItemTypeValue, - reinterpret_cast(EZ_TypeCB), this); item_location.Init(container,"Event Location"); item_event_time.Init(container, "Event Time"); item_total_tickets.Init(container,"Total Seats"); @@ -1244,7 +1242,6 @@ int ZoneDialog::Open() item_print_name.Set(RStr()); item_zone_name.Set(RStr()); itype = RInt8(); - item_type.Set(itype); item_location.Set(RStr()); item_event_time.Set(RStr()); item_total_tickets.Set(RStr()); @@ -1304,7 +1301,6 @@ int ZoneDialog::Correct() item_name.Show(IsItemZoneType(t)); item_zone_name.Show(IsItemZoneType(t)); item_print_name.Show(IsItemZoneType(t)); - item_type.Show(t == ZONE_ITEM); // Only show item type selector for generic ZONE_ITEM // For new specific item zone types, derive itype from zone type if (t == ZONE_ITEM_NORMAL) itype = ITEM_NORMAL; else if (t == ZONE_ITEM_MODIFIER) itype = ITEM_MODIFIER; @@ -1447,7 +1443,7 @@ int ZoneDialog::Send() WInt16(customer_type.Value()); WInt8(drawer_zone_type.Value()); - if(item_type.Value() == ITEM_ADMISSION) + if(itype == ITEM_ADMISSION) { Str h_itemname,h_time,h_location,h_priceclass,hout; h_itemname.Set(item_name.Value()); @@ -1464,7 +1460,7 @@ int ZoneDialog::Send() } WStr(item_print_name.Value()); WStr(item_zone_name.Value()); - WInt8(item_type.Value()); + WInt8(itype); WStr(item_location.Value()); WStr(item_event_time.Value()); WStr(item_total_tickets.Value()); diff --git a/term/term_dialog.hh b/term/term_dialog.hh index 6f33c7d1..0b60f758 100644 --- a/term/term_dialog.hh +++ b/term/term_dialog.hh @@ -166,7 +166,6 @@ public: DialogMenu color3; DialogMenu shape; DialogMenu shadow; - DialogMenu item_type; DialogMenu item_family; DialogMenu item_sales; DialogMenu item_printer;