Skip to content

don't crash when moving a button that doesn't have functionality (e.g. image only) - #226

Closed
violet4 wants to merge 4 commits into
StreamController:mainfrom
violet4:main
Closed

don't crash when moving a button that doesn't have functionality (e.g. image only)#226
violet4 wants to merge 4 commits into
StreamController:mainfrom
violet4:main

Conversation

@violet4

@violet4 violet4 commented Sep 9, 2024

Copy link
Copy Markdown

i just found StreamController a few minutes ago! awesome!

one of the first things i did was add an image to a button and then, without adding any functionality to the button, drag the "button" to another physical button. an exception is raised and the button fails to move as expected.

this is a naïve fix without really trying to understand the code, but it certainly prevented an error for me and enabled the functionless image button to be moved freely.

feel free to tell me it's awful and ideally give some pointers on the preferred way of handling this error and i'd be happy to put work in to make it better.

violet4 and others added 4 commits September 8, 2024 18:18
…cks. achieved by adding `--list` and `--paths` command line arguments.

`--list` lists all the attached	Stream Deck devices with some basic information, including their "paths", and exits
`--paths` takes	1 or more paths	(found via `--list`) and filters out paths not specified before	initializing the devices
ability	to only	run specified Stream Decks instead of all attached de…
@Core447

Core447 commented Sep 9, 2024

Copy link
Copy Markdown
Member

i just found StreamController a few minutes ago! awesome!

Thank you!

Is it ok if I just apply this directly?:
image
The problem with one try is that in case the first line raises an exception the second one isn't event attempted. This isn't a problem on the buttons but on the SD+ when dragging between dials, buttons and the screen.

You can also create a new pr for it if you want to. And please use a separate branch in your fork for every PR to avoid duplicated commits (like in this case where the "ability to run specified..." is in this PR as well)

@Core447

Core447 commented Sep 14, 2024

Copy link
Copy Markdown
Member

@violet4 What do you think?

@violet4

violet4 commented Sep 14, 2024

Copy link
Copy Markdown
Author

@Core447 yeah, go ahead and apply it directly! thank you for looking into it! 😊

ahh, thanks for the note about the separate branches. tl;dr that wasn't supposed to happen but now i understand PR/branch relationship better and won't do it again 😂️

@Core447

Core447 commented Sep 14, 2024

Copy link
Copy Markdown
Member

ahh, thanks for the note about the separate branches. tl;dr that wasn't supposed to happen but now i understand PR/branch relationship better and won't do it again 😂️

No problem, it happened to me as well.

The changes are now available with 6f1694d.

@Core447 Core447 closed this Sep 14, 2024
nazbert added a commit to nazbert/Deckard that referenced this pull request Aug 9, 2026
nazbert pushed a commit to nazbert/Deckard that referenced this pull request Aug 9, 2026
types(6/8): Store/PageManagement/WindowGrabber + backend rest to zero mypy errors

Closes StreamController#226

See merge request naz/Deckard!115
nazbert added a commit to nazbert/Deckard that referenced this pull request Aug 9, 2026
…roller#227)

Rebased onto gitlab/main (86db4f9, MRs StreamController#222/StreamController#223/StreamController#225/StreamController#226 landed). Eleven
in-scope errors appeared, all from StreamController#225's honest widening; re-zeroed.

Absorbed (11):
- LabelEditor.py (10) -- KeyLabel.text/color/outline_width/outline_color/
  alignment/font_name/font_size/style/font_weight are all `| None` now.
  _update_values_locked treats an unset text as "", and the four LabelRow
  setters take `| None` and no-op rather than being handed a None (which
  color_values_to_gdk / set_value would have raised on). The font
  description needs all four properties, so an incompletely composed label
  leaves the chooser alone instead of calling Pango with None.
- ImageEditor.py (1) -- ImageLayout.size is `| None`; the spinner keeps its
  value when unset instead of evaluating None*100.

Stale ignores removed (4): StreamController#225 fixed both root causes this branch forwarded,
so the two color_values_to_gdk arg-type ignores in LabelEditor and the two
InputIdentifier.Events attr-defined ignores in ActionConfigurator are gone.
Verified with a --warn-unused-ignores diagnostic run: no stale ignores remain
in src/windows (config untouched).

Ignores: 24 -> 20 (12 gi stub, 6 late-init, 2 cross-MR).

Both surviving cross-MR forwards outlived StreamController#226, which zeroed those files
without widening the two signatures (their only offending callers live in
src/windows, so StreamController#226 never saw the errors) -- for the residual sweep:
- PageManagerBackend.set_default_page:309 `path: str`, but None is the
  documented "clear the default" value.
- AssetManagerBackend.add_custom_media_set_by_ui:333 `path: str`, whose first
  branch is `if path is None and url is not None`.

Gates on the rebased tree: src/windows/** 0 errors, total 228 (all in
DeckController.py 227 + ActionCore.py 1, i.e. StreamController#224's scope), ruff clean,
harness 175/175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants