Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support when specifying a pre-existing toolbar as the target of agw.aui Minimize #2495

Merged

Conversation

jmoraleda
Copy link
Contributor

agw.aui includes the option to specify a pre-existing toolbar as the location where the restore icon/tool should go when minimizing panes -- instead of the default behavior which is creating a new automatic toolbar.

But the option of specifying a pre-existing toolbar cannot handle loading new perspectives or closing or detaching minimized panes. The main issues when specifying a pre-existing toolbar are:

  • Using the tool id to find the tool does not work well because multiple tools with the "ID_RESTORE_FRAME" id could have been added to the same toolbar
  • Using the pane label/caption to find the tool does not work well when loading a perspective because the caption of the pane could be changed by the load operation
  • When loading a perspective, a pane that was minimized could become unminimized or vice versa, and when using a pre-existent toolbar, the toolbar would be preserved by the perspective change operation and the restore icon would need to be added or deleted from the toolbar as appropriate, but not added twice if it was already there.

This PR addresses these problems.

@jmoraleda jmoraleda force-pushed the agw-aui-improved-pane-minimize-support branch 2 times, most recently from b9fb1c6 to dcf76cb Compare December 8, 2023 17:35
@jmoraleda
Copy link
Contributor Author

Rebased to latest master, since it did not apply cleanly after merging #2494

@Metallicow
Copy link
Contributor

It is still a problem with agw.aui, but it seems you have collapsed two of the issues into a single subject.
These issues may be subject to review.
Look into the depth....

@jmoraleda
Copy link
Contributor Author

This is a new-feature PR as opposed to a bug-fix PR. It does not impact existing code in any way.

I and others have been testing it for several months as part of the wxPythonMeticy release and it appears to work well allowing the user to specify a pre-existing toolbar as the target to place the "restore" icon when minimizing an icon, so the end user has control or where the restore icons will appear.

This functionality in turn requires some additional data to be saved when saving a perspective so the perspective can be loaded preserving the target toolbar.

Is there anything I could I do to help review it and approve it?

…for the restore icon when minimizing a pane in agw.aui
@jmoraleda jmoraleda force-pushed the agw-aui-improved-pane-minimize-support branch from dcf76cb to 4115dd8 Compare September 23, 2024 16:30
@swt2c swt2c merged commit c21bb8d into wxWidgets:master Sep 23, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants