Merge pull request #2783 from millmanorama/2625-disable-IG-button-during-AutoIngest

2625 disable the IG button if we are running without GUI
This commit is contained in:
Richard Cordovano
2017-05-05 09:25:44 -04:00
committed by GitHub
@@ -35,6 +35,7 @@ import org.openide.util.actions.Presenter;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.core.Installer;
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
import org.sleuthkit.autopsy.imagegallery.ImageGalleryModule;
@@ -64,7 +65,7 @@ public final class OpenAction extends CallableSystemAction implements Presenter.
toolbarButton.addActionListener(actionEvent -> performAction());
pcl = (PropertyChangeEvent evt) -> {
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
setEnabled(evt.getNewValue() != null);
setEnabled(RuntimeProperties.runningWithGUI() && evt.getNewValue() != null);
}
};
Case.addPropertyChangeListener(pcl);