-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
…x some related UI issues
@@ -41,12 +41,26 @@ public FindFullTextAction(BasePanel basePanel) { | |||
|
|||
@Override | |||
public void init() throws Exception { | |||
if (basePanel.getSelectedEntries().size() == 0) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refs #2027
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
* 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
old:
new: