mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
61f56f2741
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Frame;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
@ -1077,7 +1078,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
}
|
||||
|
||||
//case change helper
|
||||
private static void doCaseChange(Case toChangeTo) {
|
||||
private static void doCaseChange(final Case toChangeTo) {
|
||||
logger.log(Level.INFO, "Changing Case to: " + toChangeTo); //NON-NLS
|
||||
if (toChangeTo != null) { // new case is open
|
||||
|
||||
@ -1085,39 +1086,49 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
Case.clearTempFolder();
|
||||
checkSubFolders(toChangeTo);
|
||||
|
||||
// enable these menus
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// enable these menus
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu
|
||||
|
||||
if (toChangeTo.hasData()) {
|
||||
// open all top components
|
||||
CoreComponentControl.openCoreWindows();
|
||||
} else {
|
||||
// close all top components
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (toChangeTo.hasData()) {
|
||||
// open all top components
|
||||
CoreComponentControl.openCoreWindows();
|
||||
} else {
|
||||
// close all top components
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
}
|
||||
} else { // case is closed
|
||||
// close all top components first
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// close all top components first
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
|
||||
// disable these menus
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu
|
||||
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); // Case Properties menu
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu
|
||||
// disable these menus
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu
|
||||
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); // Case Properties menu
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu
|
||||
|
||||
//clear pending notifications
|
||||
MessageNotifyUtil.Notify.clear();
|
||||
//clear pending notifications
|
||||
MessageNotifyUtil.Notify.clear();
|
||||
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(Case.getAppName()); // set the window name to just application name
|
||||
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(Case.getAppName()); // set the window name to just application name
|
||||
|
||||
//try to force gc to happen
|
||||
System.gc();
|
||||
System.gc();
|
||||
//try to force gc to happen
|
||||
System.gc();
|
||||
System.gc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//log memory usage after case changed
|
||||
@ -1130,8 +1141,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
private static void doCaseNameChange(String newCaseName) {
|
||||
// update case name
|
||||
if (!newCaseName.equals("")) {
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(newCaseName + " - " + Case.getAppName()); // set the window name to the new value
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(newCaseName + " - " + Case.getAppName()); // set the window name to the new value
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
||||
final BlackboardAttribute longEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END);
|
||||
return String.format("from %1$g %2$g to %3$g %4$g", latStart.getValueDouble(), longStart.getValueDouble(), latEnd.getValueDouble(), longEnd.getValueDouble());
|
||||
}),
|
||||
GPS_TRACKPOINT("Location History", "gps_trackpoint.png",
|
||||
GPS_TRACKPOINT("Location History", "gps-trackpoint.png",
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||
|
Loading…
x
Reference in New Issue
Block a user