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

PreferencesWindow: Refactor #3320

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cyberphantom52
Copy link
Contributor

Description

Refactors the PreferencesWindow to use newer Adwaita widgets.

TODO:

  • Convert component lists into GtkListRow
  • Use property bindings and signals to simplify the code more.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

  • Test A
  • Test B

Copy link
Contributor

github-actions bot commented Mar 26, 2024

Pylint result on modfied files:
************* Module bottles.frontend.views.preferences
bottles/frontend/views/preferences.py:89:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:94:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:103:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:108:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:113:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:118:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:129:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:150:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/preferences.py:23:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/preferences.py:78:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:85:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:91:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:96:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:100:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:105:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:110:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:115:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:120:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:125:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:131:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/views/preferences.py:231:38: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:236:36: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:260:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/views/preferences.py:281:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:287:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
bottles/frontend/views/preferences.py:33:0: R0904: Too many public methods (23/20) (too-many-public-methods)

Copy link

fab-sonarqube bot commented Mar 26, 2024

@cyberphantom52
Copy link
Contributor Author

I'm thinking of converting all the component lists into GtkListBox then we can use gtk_list_box_bind_model to automatically populate them. But we will have to make changes in fetch_catalog method to return a GioListStore instead of a dict.

Thoughts? @mirkobrombin

@mirkobrombin
Copy link
Member

I think it's a good idea but I have no experience with GioListStore, how complex do you think it is?

@cyberphantom52
Copy link
Contributor Author

I think it's a good idea but I have no experience with GioListStore, how complex do you think it is?

not too much, will do that once i'm free

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.

None yet

2 participants