Concept Listbox use for blueman device list(s) #2552
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rough, mostly working, proof of concept to replace the TreeView in blueman-sendto we currently have with a much simpler and flexible Gtk.ListBox. Before I go further I'd like some feedback on the overall design of it. I do want to move the bluez.Manager and bluez.AnyDevice signal handling further up into apps/blueman-sendto as we already have them there anyway.
I do want to make the Gtk.ListBox and Gtk.ListBoxRow only be responsible for presenting the data. Not have it handle state on adapters/devices internally, this will be done through methods. Using properties for the row in blueman-manager may not be ideal so maybe I should use some sort of properties_update method and pass in all the changes in one go.
I like to treat this as a blueprint for when I start working on the Gtk.ListBox for blueman-manager so we can finally implement some of the designs done by users some time ago.
ps: I'm sure mypy will be unhappy with me but it's just a proof of concept for now.