Gradience
Gradience copied to clipboard
bug: `FlatpakGSettings` does not contain the function `set_string`
Is there an existing issue for this?
- [X] I have searched the existing issues
What happened?
While trying to apply gtk-3 themes via adw-gtk3 I get the error:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/gradience/frontend/main.py", line 605, in apply_color_scheme
PresetUtils().apply_preset("gtk3", self.preset)
File "/app/lib/python3.11/site-packages/gradience/backend/theming/preset.py", line 120, in apply_preset
self.set_gtk3_theme()
File "/app/lib/python3.11/site-packages/gradience/backend/theming/preset.py", line 46, in set_gtk3_theme
self.settings.set_string("gtk-theme", "adw-gtk3")
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FlatpakGSettings' object has no attribute 'set_string'
The FlatpakGSettings
definition doesn't actually contain this function but does contain set
:
https://github.com/GradienceTeam/Gradience/blob/29fa687f2c8ffd68c61629716a42e7623f53683f/gradience/backend/utils/gsettings.py#L247
To Reproduce
- Open the flatpak devel version of Gradience
- Apply a theme and check the box for gtk-3
Expected behavior
No response
Screenshots
No response
OS
EndeavourOs
DE/WM version
GNOME 45
Version
0.8.0-beta2-cdc6692
Installation method
Flatpak from Github Actions
Enabled system extensions (GNOME specific)
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ
I'm also getting yapsy errors:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/yapsy/PluginManager.py", line 535, in loadPlugins
is_correct_subclass = issubclass(element, self.categories_interfaces[category_name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class
which is probably causing the firefox theming to not work. This is what I get when I press the firefox toggle:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/gradience/frontend/widgets/plugin_row.py", line 95, in on_switch_toggled
if self.switch.get_active():
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_active'
I am seeing the same error. (lots of them actually)
Platform:
Arch Linux, Gnome 45.3, Wayland, Gradience 0.8.0-beta2-8b5c6f5 (Flatpak)
Likewise. I have the same error on arch using gradience-git. It would be nice to have firefox matching. It's the most commonly used app on my desktop.
You just need to remove the _string from set_string in preset.py
Yeah, given what I've reported, I also thing the same. But, I'm not familiar with the project, so, I don't know if its 100% correct. Also, I can't get the project to build in the Gnome Builder flatpak, so, can't really experiment with it.
You can modify the existing file at /var/lib/flatpak/app/com.github.GradienceTeam.Gradience.Devel/current/active/files/lib/python3.11/site-packages/gradience/backend/theming/
You can modify the existing file at /var/lib/flatpak/app/com.github.GradienceTeam.Gradience.Devel/current/active/files/lib/python3.11/site-packages/gradience/backend/theming/
But this file doesn't have any lines matching "_string", I'll say more, no other file in this directory has anything like it
https://github.com/lavafroth/Gradience/blob/fix-set-gtk3-theme/gradience/backend/theming/preset.py download this version of the file