mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 00:46:16 +00:00
Show dialog to user when attempting to search with no files indexed
This commit is contained in:
parent
542870ebde
commit
ad5afc03c7
@ -73,6 +73,10 @@ abstract class AbstractKeywordSearchPerformer extends javax.swing.JPanel impleme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void search() {
|
public void search() {
|
||||||
|
if (filesIndexed == 0) {
|
||||||
|
KeywordSearchUtil.displayDialog("Keyword Search Error", "No files are indexed, please index an image before searching", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
KeywordSearchQueryManager man = null;
|
KeywordSearchQueryManager man = null;
|
||||||
if (isMultiwordQuery()) {
|
if (isMultiwordQuery()) {
|
||||||
final List<Keyword> keywords = getQueryList();
|
final List<Keyword> keywords = getQueryList();
|
||||||
|
@ -307,10 +307,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
|
|
||||||
|
|
||||||
private void searchAction(ActionEvent e) {
|
private void searchAction(ActionEvent e) {
|
||||||
if (filesIndexed == 0)
|
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
return;
|
|
||||||
|
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
search();
|
search();
|
||||||
|
@ -216,8 +216,6 @@ public class KeywordSearchPanel extends AbstractKeywordSearchPerformer{
|
|||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void searchBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchBoxActionPerformed
|
private void searchBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchBoxActionPerformed
|
||||||
if (filesIndexed == 0)
|
|
||||||
return;
|
|
||||||
getRootPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
getRootPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
try {
|
try {
|
||||||
search();
|
search();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user