Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: FlatpakGSettings does not contain the function set_string #858

Open
2 tasks done
manan-gup opened this issue Feb 3, 2024 · 9 comments
Open
2 tasks done

bug: FlatpakGSettings does not contain the function set_string #858

manan-gup opened this issue Feb 3, 2024 · 9 comments
Labels
type/bug Something isn't working

Comments

@manan-gup
Copy link

Is there an existing issue for this?

  • 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:

def set(self, key:str, value:str) -> None:

To Reproduce

  1. Open the flatpak devel version of Gradience
  2. 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

  • I agree to follow this project's Code of Conduct
@manan-gup manan-gup added the type/bug Something isn't working label Feb 3, 2024
Copy link
Contributor

github-actions bot commented Feb 3, 2024

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

@manan-gup
Copy link
Author

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'

@peterbone-bo
Copy link

I am seeing the same error. (lots of them actually)

Platform:

Arch Linux,
Gnome 45.3,
Wayland,
Gradience 0.8.0-beta2-8b5c6f5 (Flatpak)

@keilmillerjr
Copy link

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.

@KennyDevT
Copy link

KennyDevT commented Feb 14, 2024

You just need to remove the _string from set_string in preset.py

@manan-gup
Copy link
Author

manan-gup commented Feb 14, 2024

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.

@KennyDevT
Copy link

KennyDevT commented Feb 14, 2024

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/

@donorsemen
Copy link

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
Снимок экрана от 2024-02-29 20-26-40

@KennyDevT
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

5 participants