Skip to content

fix: Implement destroy method for StatusIconDummy#110

Merged
C0rn3j merged 1 commit into
C0rn3j:mainfrom
City-busz:patch-2
Jul 19, 2026
Merged

fix: Implement destroy method for StatusIconDummy#110
C0rn3j merged 1 commit into
C0rn3j:mainfrom
City-busz:patch-2

Conversation

@City-busz

Copy link
Copy Markdown

This is needed to avoid error when the user disables the tray icon in the settings:

Traceback (most recent call last):
  File "/usr/lib/python3.14/site-packages/scc/gui/global_settings.py", line 387, in on_random_checkbox_toggled
    self.save_config()
    ~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/scc/gui/global_settings.py", line 309, in save_config
    self.app.destroy_statusicon()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/scc/gui/app.py", line 294, in destroy_statusicon
    self.statusicon.destroy()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/scc/gui/statusicon.py", line 380, in destroy
    self._status_fb.destroy()
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StatusIconDummy' object has no attribute 'destroy'

This is needed to avoid error when the user disables the tray icon in the settings.
@City-busz

Copy link
Copy Markdown
Author

It's not needed if #112 is implemented.

@City-busz City-busz closed this Jul 19, 2026
@C0rn3j C0rn3j reopened this Jul 19, 2026
@C0rn3j
C0rn3j merged commit 2922f63 into C0rn3j:main Jul 19, 2026
1 check passed
@C0rn3j

C0rn3j commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Not a bad idea to be a bit defensive either way, I pulled it, thanks.

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