Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gracefully handle hamster DBUS disappearing
Previously, if this happened the extension would be disabled using the `disable()` method. However, this caused an error (because disable was called twice, once for each DBUS service) and gnome-shell would not be told that the extension was disabled, so the user could not re-enable it. With this commit, when the apiProxy disappears, the panel widget is hidden. When it reappears, the panel widget is shown again. Note that there are still some rough edges, but this change is mostly intended to simplify hamster development - you can now restart hamster after making changes (or to switch between installed and source versions) and still have the extension work without needing to restart gnome-shell (which means logging out with wayland). This commit does not attempt to handle windowsProxy disappearing, since keeping track of the status of both services can get messy quickly. Also, now you can restart just the api service, and leave the windows service to be autostarted when needed if you want (and if autostart fails, the user will be shown a proper error message). Also, this does not disable the keybindings, so pressing that while the DBUS proxy is down will probably still allow opening up the menu (but that's ok - making any changes will just autostart hamster again, or show an error message otherwise).
- Loading branch information