From e8c6ec7f44e1c57c9d565da425eacbf384712e50 Mon Sep 17 00:00:00 2001 From: jmillman Date: Tue, 17 Feb 2015 17:09:54 -0500 Subject: [PATCH] don't call Case.hasData() in OpenTimelineAction so we don't block the edt. I also softened the mesage that pops up if the timeline is opened with no data sources added. --- Core/src/org/sleuthkit/autopsy/timeline/Bundle.properties | 2 +- .../sleuthkit/autopsy/timeline/OpenTimelineAction.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/Bundle.properties b/Core/src/org/sleuthkit/autopsy/timeline/Bundle.properties index fdb649329b..d6a79c8aaa 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/timeline/Bundle.properties @@ -41,5 +41,5 @@ Timeline.ProgressWindow.cancel.confdlg.msg=Do you want to cancel time line creat Timeline.ProgressWindow.cancel.confdlg.detail=Cancel timeline creation? Timeline.progressWindow.name=Timeline Timeline.progressWindow.title=Generating Timeline data -OpenTimeLineAction.msgdlg.text=Error creating timeline, there are no data sources. +OpenTimeLineAction.msgdlg.text=Could not create timeline, there are no data sources. TimeLineTopComponent.timeZonePanel.text=Display Times In\: diff --git a/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java b/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java index 295ae4b124..b9a5960150 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java @@ -54,7 +54,9 @@ public class OpenTimelineAction extends CallableSystemAction { @Override public boolean isEnabled() { - return Case.isCaseOpen() && fxInited && Case.getCurrentCase().hasData(); + /** we disabled the check to hasData() because if it is executed while a + * data source is being added, it blocks the edt */ + return Case.isCaseOpen() && fxInited;// && Case.getCurrentCase().hasData(); } @Override @@ -68,8 +70,8 @@ public class OpenTimelineAction extends CallableSystemAction { if (currentCase.hasData() == false) { JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), - NbBundle.getMessage(this.getClass(), "OpenTimeLineAction.msgdlg.text")); - LOGGER.log(Level.INFO, "Error creating timeline, there are no data sources.");// NON-NLS + NbBundle.getMessage(this.getClass(), "OpenTimeLineAction.msgdlg.text")); + LOGGER.log(Level.INFO, "Could not create timeline, there are no data sources.");// NON-NLS return; } synchronized (OpenTimelineAction.class) {