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

SettingsPage: Subclass Gtk.Widget #283

Merged
merged 6 commits into from
Jan 27, 2024
Merged

Conversation

danirabbit
Copy link
Member

@danirabbit danirabbit commented Jan 24, 2024

Can test with elementary/switchboard-plug-bluetooth#216

Makes SettingsPage a Gtk.Widget instead of Gtk.Box so we're not exposing extra unwanted API and make it so settings a child sets the content area child not overwrites the whole page. Also get rid of the separate simple page and abstract page, everything is only using the simple page. While we're here, clamp things!

@danirabbit danirabbit changed the title AbstractSettingsPage: Subclass Gtk.Widget SettingsPage: Subclass Gtk.Widget Jan 25, 2024
@danirabbit danirabbit requested a review from a team January 25, 2024 01:13
@jeremypw
Copy link
Contributor

@danirabbit I cannot compile elementary/switchboard-plug-bluetooth#216 even with this branch installed - what else do I need to do? Error is:

../src/MainView.vala:22.35-22.64: error: The type name `Switchboard.SimpleSettingsPage' could not be found
   22 | public class Bluetooth.MainView : Switchboard.SimpleSettingsPage {

@leolost2605
Copy link
Member

I think it was renamed to SettingsPage instead of SimpleSettingsPage here

@danirabbit
Copy link
Member Author

Yup, just updated it! I ended up breaking API here a little harder than I though 😅

Copy link
Contributor

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every thing compiles and works, including unconverted plugs.

@jeremypw jeremypw merged commit 423f531 into main Jan 27, 2024
4 checks passed
@jeremypw jeremypw deleted the danirabbit/settingspage-gtkwidget branch January 27, 2024 12:22
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