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

fix: remove add to library button if already in library #2561

Merged

Conversation

Kinsteen
Copy link
Contributor

Description

Title is quite explanatory

Fixes #2459

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.

  • locally

@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2023

Pylint result on modfied files:
------------- Module bottles.backend.managers.library
bottles/backend/managers/library.py:124:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/library.py:59:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/library.py:75:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/library.py:51:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/library.py:58:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/library.py:81:33: W0621: Redefining name 'uuid' from outer scope (line 19) (redefined-outer-name)
bottles/backend/managers/library.py:83:86: E0602: Undefined variable '_uuid' (undefined-variable)
bottles/backend/managers/library.py:101:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/library.py:101:12: W0612: Unused variable 'k' (unused-variable)
bottles/backend/managers/library.py:122:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/library.py:21:0: C0411: standard import "from pathlib import Path" should be placed before "from bottles.backend.utils import yaml" (wrong-import-order)
bottles/backend/managers/library.py:30:0: W0612: Unused variable 'LibraryManager' (unused-variable)
bottles/backend/managers/library.py:21:0: W0612: Unused variable 'Path' (unused-variable)
bottles/backend/managers/library.py:21:0: W0611: Unused Path imported from pathlib (unused-import)
------------- Module bottles.frontend.widgets.program
bottles/frontend/widgets/program.py:19:0: E0401: Unable to import 'gi.repository' (import-error)
bottles/frontend/widgets/program.py:60:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/frontend/widgets/program.py:74:16: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/widgets/program.py:105:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/widgets/program.py:109:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/widgets/program.py:176:31: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:182:31: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:186:31: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:205:14: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:207:18: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:233:31: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:258:16: W0212: Access to a protected member __library of a client class (protected-access)
bottles/frontend/widgets/program.py:263:39: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:285:35: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:301:35: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:319:39: E0602: Undefined variable '_' (undefined-variable)
bottles/frontend/widgets/program.py:258:16: W0238: Unused private member `ProgramEntry.__library` (unused-private-member)
bottles/frontend/widgets/program.py:37:0: W0612: Unused variable 'ProgramEntry' (unused-variable)

Your code has been rated at 6.93/10

Copy link
Contributor

@TheEvilSkeleton TheEvilSkeleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem I've encountered is that the "Add to Library" button is still present until you go back and reopen the bottle. It should be gone right after it is done adding to the library.

Marking as draft to make it clear that it's not ready to merge.

@TheEvilSkeleton TheEvilSkeleton marked this pull request as draft January 18, 2023 02:14
@Kinsteen Kinsteen marked this pull request as ready for review January 18, 2023 15:05
@TheEvilSkeleton TheEvilSkeleton merged commit c9e1513 into bottlesdevs:main Jan 18, 2023
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.

details: "Add to library" always available
2 participants