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

Consider removing almost-unused GUI2 widgets and windows #6540

Open
stevecotton opened this issue Feb 22, 2022 · 0 comments
Open

Consider removing almost-unused GUI2 widgets and windows #6540

stevecotton opened this issue Feb 22, 2022 · 0 comments
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Low Priority Issues that will cause no meaningful problems if left unaddressed. UI User interface issues, including both back-end and front-end issues. WML Issues involving the WML engine or WML APIs.

Comments

@stevecotton
Copy link
Contributor

An issue to put reminders of stuff spotted during other PRs, but too unrelated to the other PR to fix it there.

Some of the GUI2 code is either completely or almost unused. This is a low-priority issue to look at whether these classes could be useful, or whether they should be dropped.

[pane]

Implemented in src/gui/widgets/pane.cpp, this appears to only be used by the Debug Clock window. Start Wesnoth with the command line option --clock, and a new button appears on the title screen beneath "Quit" that shows the Debug Clock.

The grow_direction enum that's being changed in #6470 is a mandatory attribute of [pane], I suspect any C++ code that uses that enum could be removed. All changes to pane.cpp after 2012 seem to have been merely things that were applied to all the GUI code, rather than anything specific to that widget.

@stevecotton stevecotton added Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. WML Issues involving the WML engine or WML APIs. Low Priority Issues that will cause no meaningful problems if left unaddressed. labels Feb 22, 2022
@stevecotton stevecotton mentioned this issue Feb 27, 2022
43 tasks
stevecotton added a commit to stevecotton/wesnoth that referenced this issue Mar 9, 2022
Remove filter.hpp, which wasn't included by any file, and relied on
pane.hpp indirectly via one of the lines removed in this commit.
Note: there are two other unrelated `filter.hpp` files.

Header pane.hpp is only used by pane.cpp and window_builder.cpp.
The class is also used via a forward-declaration in window.hpp,
which friends it, allowing a call to window::layout_linked_widgets.
The class is also made accessible via REGISTER_WIDGET.

Part of wesnoth#6540.
stevecotton added a commit to stevecotton/wesnoth that referenced this issue Mar 9, 2022
Remove filter.hpp, which wasn't included by any file, and relied on
pane.hpp indirectly via one of the lines removed in this commit. The sorting
functionality seems to have moved into pane.cpp when matrix.hpp was added.
Note: there are two other unrelated `filter.hpp` files.

Header pane.hpp is only used by matrix.hpp, pane.cpp, and window_builder.cpp;
the class is also used via a forward-declaration in window.hpp, which friends
it, allowing a call to window::layout_linked_widgets. The class is also made
accessible via REGISTER_WIDGET.

Part of wesnoth#6540.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Low Priority Issues that will cause no meaningful problems if left unaddressed. UI User interface issues, including both back-end and front-end issues. WML Issues involving the WML engine or WML APIs.
Projects
None yet
Development

No branches or pull requests

1 participant