Skip to content

Implement restoring last power state of bluetooth adapter(s)#3244

Open
infirit wants to merge 4 commits into
blueman-project:mainfrom
infirit:lastpowerstate
Open

Implement restoring last power state of bluetooth adapter(s)#3244
infirit wants to merge 4 commits into
blueman-project:mainfrom
infirit:lastpowerstate

Conversation

@infirit

@infirit infirit commented May 14, 2026

Copy link
Copy Markdown
Contributor

Off by default but I think this is reasonable. Bluedevil has a similar feature.

@infirit

infirit commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Sonar cloud was right to complain with the old error message but I disagree with it to use logging.exception here.

@infirit
infirit requested a review from cschramm May 31, 2026 18:21
@sonarqubecloud

Copy link
Copy Markdown

@cschramm cschramm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not really convinced if this should be blueman's business, but it's definitely a nice option.

<key type="mb" name="restore-power-state">
<default>nothing</default>
</key>
</schema>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
</schema>
</schema>

"default": False
},
"restore-power-state": {
"type": bool,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This does not match mb. I think get_option might actually return None and set_option will just never write None. It probably makes sense to just use b with a false default.

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.

2 participants