1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-29 22:58:39 +02:00

9 Commits

Author SHA1 Message Date
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