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

get/set_active instead of get/set_state for switch #2882

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

kryotek777
Copy link
Contributor

Description

Somehow using get_state and set_state on switches will sometimes make them render incorrectly.
Switching to get_active and set_active seems to fix this issue.

Fixes #2877

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?

Toggled the switches and saved and reloaded the settings multiple times

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2023

Pylint result on modfied files:
************* Module bottles.frontend.windows.display
bottles/frontend/windows/display.py:33:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/display.py:35:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/display.py:20:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/display.py:49:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/frontend/windows/display.py:49:46: W0613: Unused argument 'details' (unused-argument)
bottles/frontend/windows/display.py:76:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:82:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:95:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:118:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:121:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:121:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:131:12: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/display.py:139:11: C0121: Comparison 'self.expander_virtual_desktop.get_enable_expansion() == True' should be 'self.expander_virtual_desktop.get_enable_expansion() is True' if checking for the singleton value True, or 'bool(self.expander_virtual_desktop.get_enable_expansion())' if testing for truthiness (singleton-comparison)
bottles/frontend/windows/display.py:140:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:143:12: E0102: function already defined line 121 (function-redefined)
bottles/frontend/windows/display.py:143:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:143:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:153:12: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/display.py:163:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:166:12: E0102: function already defined line 121 (function-redefined)
bottles/frontend/windows/display.py:166:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:166:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:176:12: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/display.py:185:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:188:12: E0102: function already defined line 121 (function-redefined)
bottles/frontend/windows/display.py:188:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:188:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:198:12: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/display.py:208:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:211:12: E0102: function already defined line 121 (function-redefined)
bottles/frontend/windows/display.py:211:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:211:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:221:12: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/display.py:234:23: W0613: Unused argument 'result' (unused-argument)
bottles/frontend/windows/display.py:234:31: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/display.py:262:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/display.py:89:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/display.py:266:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/display.py:96:8: W0201: Attribute 'started' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/display.py:104:16: W0201: Attribute 'started' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/display.py:97:8: W0201: Attribute 'queued' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/display.py:98:8: W0201: Attribute 'completed' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/display.py:34:0: R0903: Too few public methods (0/2) (too-few-public-methods)

@TheEvilSkeleton TheEvilSkeleton added this to the 52.0 milestone Jun 8, 2023
@TheEvilSkeleton
Copy link
Contributor

Thank you!

@TheEvilSkeleton TheEvilSkeleton merged commit ded4fda into bottlesdevs:main Jun 8, 2023
5 checks passed
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.

[Bug]: Schrödinger's switch
2 participants