Commit Graph

18 Commits

Author SHA1 Message Date
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli cfd07af245 PopupMenuTable supports registration 2020-02-15 13:49:13 -05:00
Paul Licameli 46f958f376 Use computed registry items for conditionally shown popup menu items 2020-02-14 21:38:07 -05:00
Paul Licameli db3543500c Each popup menu item can carry a callback to check or disable it 2020-02-09 23:48:40 -05:00
Paul Licameli 00a419a280 Store a reference to a handler object in each PopupMenuItem 2020-02-09 23:48:40 -05:00
Paul Licameli e1e0869e26 Replace some macros for popup menus with function calls 2020-02-09 23:48:40 -05:00
Paul Licameli 8f88aa106e Bug2312: don't crash using Wave Color, Format, Rate sub-menus of TCP 2020-02-08 13:20:18 -05:00
Paul Licameli 540f2c5e67 Restore separators after "Move Track to Bottom" in TCP menus 2020-02-06 17:52:45 -05:00
Paul Licameli 23c7122985 Populate popup menus with a registry visitor 2020-02-06 00:52:54 -05:00
Paul Licameli 3517b900b1 PopupMenuTable need not publicize its wxMenu subclass 2020-02-06 00:52:54 -05:00
Paul Licameli 9435e97fb8 Store popup sub-menu caption with its item table 2020-02-06 00:52:53 -05:00
Paul Licameli 48b5988c7d Be sure PopupMenuTable::DestroyMenu() gets called...
... though it didn't matter yet for any of the overrides
2020-02-02 17:16:11 -05:00
Paul Licameli 12bbafe013 Separate storing of user data from initialization of popup items 2020-01-01 21:54:45 -05:00
Paul Licameli 6b812791a6 TranslatableString in popup menu tables 2019-12-16 15:10:35 -05:00
Paul Licameli 98a72acfb8 Remove unnecessary moves of return values 2018-07-24 21:25:22 -04:00
Paul Licameli 2f3604bdea Rewrite many calls to Connect() with Bind()...
... it's the more modern way, and does better type checking, without the
dubious casts of pointers-to-member-functions.
2018-02-21 19:28:11 -05:00
Paul Licameli bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli cba51e1bf8 Define class PopupMenuTable to make it easy to attach and detach handlers...
... to the parent TrackPanel window
2017-06-15 08:20:59 -04:00