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

[[email protected]] Add support for more battery device labels and icons #12262

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

garrettjstevens
Copy link

I have a device that shows up in UPower as a HEADSET, which wasn't one of the enumerated device types in the power applet so it showed up as "Unknown" with a generic battery icon. When I went to add support for the headset, I noticed this comment:

// TODO: why aren't we using introspection - upower-glib?

So instead of adding only the HEADSET device type, I've added UPowerGlib introspection and used UPDevice.kind_to_string(kind) so now any device type should get a reasonable label. I've also added icons for several more device types.

I've also renamed a few variables to be consistent with the DeviceKind terminology used by UPowerGlib (instead of DeviceType)

Get upower device type, state, and level enums from upower-glib instead
of defining them inline.
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.

1 participant