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

Remove irrelevant menu options for unsaved files #12162

Closed
wants to merge 1 commit into from

Conversation

kjswaruph
Copy link

Issue
Whenever a new library is created which is not saved yet displays The "Reveal in file explorer" and "Open terminal here" options which are uneccesary.
Changes: Disabled the "Reveal in file explorer" and "Open terminal here" options by removing factory.createMenuItem() for respective options

jabref-png1

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Siedlerchr
Copy link
Member

But they need to be there for a saved library!

@HoussemNasri
Copy link
Member

This does not fix the issue. First, we want to disable the relevant menu items not remove them. Second, the menu items should be kept enabled for saved libraries.

To tackle this, we need to figure a way to distinguish saved from unsaved libraries (hint: a saved library has a path in the filesystem). Then we need to bind (please read about JavaFX binding if you haven't already) that property to the enabled/disabled status of the show in folder and open console menu items.

@HoussemNasri HoussemNasri marked this pull request as draft November 7, 2024 21:36
@kjswaruph
Copy link
Author

sorry for that i am now trying to only disable not remove the menu options.

@koppor
Copy link
Member

koppor commented Nov 8, 2024

Some code hints on disabling is available at #11941.

@koppor koppor added the status: changes required Pull requests that are not yet complete label Nov 8, 2024
@Siedlerchr
Copy link
Member

Superseded by #12199

@Siedlerchr Siedlerchr closed this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants