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

Follow up for #1323 Batch Fulltext downloader #2344

Merged
merged 7 commits into from
Dec 8, 2016
Merged

Conversation

stefan-kolb
Copy link
Member

@stefan-kolb stefan-kolb commented Dec 7, 2016

  • Rename menu item to plural for finding full texts
  • Disable menu item when there are no documents selected for fulltext retrieval
  • Fix layout of file dialog and increase size of file path significantly
    old:
    image

new:
image

@stefan-kolb stefan-kolb added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Dec 7, 2016
@stefan-kolb stefan-kolb added this to the v3.8 milestone Dec 7, 2016
@@ -41,12 +41,26 @@ public FindFullTextAction(BasePanel basePanel) {

@Override
public void init() throws Exception {
if (basePanel.getSelectedEntries().size() == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't be a better approach to disable the menu item (as it is already done for various other actions)?

If selection size() is == 0 at this point you can just throw an exception.

Copy link
Member

Choose a reason for hiding this comment

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

Refs #2027

Copy link
Member Author

Choose a reason for hiding this comment

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

Not 100 % sure about this, but done.

@@ -1591,6 +1594,9 @@ public void updateEnabledState() {

boolean twoEntriesSelected = current.getSelectedEntries().size() == 2;
setEnabled(twoEntriesOnlyActions, twoEntriesSelected);

boolean oneOrMoreEntriesSelected = current.getSelectedEntries().size() >= 1;
Copy link
Member

Choose a reason for hiding this comment

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

Why not checking for !isEmpy()?

Localization.lang("No entry selected"),
JOptionPane.ERROR_MESSAGE);
return;
if (basePanel.getSelectedEntries().size() > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

!isEmpty(), maybe add a logger.DEBUG statement?

@koppor koppor merged commit 1371834 into master Dec 8, 2016
@koppor koppor deleted the fulltext-improvements branch December 8, 2016 10:50
tobiasdiez pushed a commit to tobiasdiez/jabref that referenced this pull request Dec 10, 2016
* Rename menu item to plural for finding full texts
* Fix layout of file dialog and increase size of file path significantly
* Reuse description as tooltip, old tooltip is not really accurate anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants