Disabling tray icon plugin doesn't work
Describe the bug Disabling the tray icon plugin doesn't work.
To Reproduce
- Click on settings, select plugins, and disable the Tray Icon.
- The tray icon remains visible, and safeeyes becomes disabled.
Expected behavior The tray icon is removed.
Desktop (please complete the following information):
-
Ubuntu 24.04 -
GNOME -
Version 2.2.2
Debug Log
Run the Safe Eyes using safeeyes --debug command attach the ~/safeeyes.log` file.
Screenshots If applicable, add screenshots to help explain your problem.
I seem to be experiencing something related, when I launch a recently updated copy of safeeyes, I get this notice, and the disable button closes the dialog but leaves this traceback in console — safeeyes -t does not seem to work after this, but manually hitting the disable button in the configuration menu (calling safeeyes again) and relaunching the safeeyes server works
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/safeeyes/ui/required_plugin_dialog.py", line 82, in on_disable_plugin_clicked
self.on_disable_plugin()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/safeeyes/safeeyes.py", line 202, in <lambda>
lambda: self.disable_plugin(plugin_id)
^^^^^^^^^
NameError: name 'plugin_id' is not defined
Please check if the error is present in the latest development version https://launchpad.net/~safeeyes-team/+archive/ubuntu/safeeyes-daily/+files/safeeyes_2.2.3-2-dev~202503041634~ubuntu24.04.1_all.deb
Ah yes, the second error was in 2.2.3, unfortunately. It should be fixed in 3c3fe61fed3ea40cd171b538124b75ed504a281e. (Issues like these are precisely why I like tooling that catches them.)
The original bug is still present in the latest master.
Hmm, it seems to require restarting safeeyes. Then it works as expected.
Here is the current behavior (3.0.0b3)
Disable tray icon -- tray icon does not go away, but safeeyes is disabled. Restarting safe eyes truly disables the tray icon
However, after that, tray icon is immediately restored after enabling.
@deltragon Perhaps we can rename the tray icon plugin to "Tray icon (requires restart)" ?
That's an option, yeah, but long term I do think we should be able to fix that bug.