mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into 1916-L01Processor
This commit is contained in:
commit
e30a0902ff
@ -31,6 +31,7 @@ import org.openide.modules.ModuleInstall;
|
|||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages this module's life cycle. Opens the startup dialog during startup.
|
* Manages this module's life cycle. Opens the startup dialog during startup.
|
||||||
@ -72,6 +73,8 @@ public class Installer extends ModuleInstall {
|
|||||||
private void setLookAndFeel() {
|
private void setLookAndFeel() {
|
||||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||||
setOSXLookAndFeel();
|
setOSXLookAndFeel();
|
||||||
|
}else if (System.getProperty("os.name").toLowerCase().contains("nux")){
|
||||||
|
setUnixLookAndFeel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,4 +114,24 @@ public class Installer extends ModuleInstall {
|
|||||||
UIManager.put(entry.getKey(), entry.getValue());
|
UIManager.put(entry.getKey(), entry.getValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setModuleSettings(String value) {
|
||||||
|
if (ModuleSettings.configExists("timeline")) {
|
||||||
|
ModuleSettings.setConfigSetting("timeline", "enable_timeline", value);
|
||||||
|
} else {
|
||||||
|
ModuleSettings.makeConfigFile("timeline");
|
||||||
|
ModuleSettings.setConfigSetting("timeline", "enable_timeline", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setUnixLookAndFeel(){
|
||||||
|
try {
|
||||||
|
UIManager.put("swing.boldMetal", Boolean.FALSE);
|
||||||
|
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
|
||||||
|
setModuleSettings("true");
|
||||||
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||||
|
logger.log(Level.WARNING, "Error setting crossplatform look-and-feel, setting default look-and-feel",ex);
|
||||||
|
setModuleSettings("false");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
|||||||
import org.sleuthkit.autopsy.core.Installer;
|
import org.sleuthkit.autopsy.core.Installer;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
@ -97,6 +98,9 @@ public final class OpenTimelineAction extends CallableSystemAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
|
}else if("false".equals(ModuleSettings.getConfigSetting("timeline", "enable_timeline"))) {
|
||||||
|
Platform.runLater(PromptDialogManager::showTimeLineDisabledMessage);
|
||||||
|
setEnabled(false);
|
||||||
}else {
|
}else {
|
||||||
showTimeline();
|
showTimeline();
|
||||||
}
|
}
|
||||||
|
@ -223,4 +223,19 @@ public final class PromptDialogManager {
|
|||||||
dialog.showAndWait();
|
dialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NbBundle.Messages({
|
||||||
|
"PromptDialogManager.showTimeLineDisabledMessage.contentText="
|
||||||
|
+ "Timeline functionality is not available for Linux yet."
|
||||||
|
+ " Timeline will be disabled. ",
|
||||||
|
"PromptDialogManager.showTimeLineDisabledMessage.headerText="})
|
||||||
|
static void showTimeLineDisabledMessage() {
|
||||||
|
Alert dialog = new Alert(Alert.AlertType.INFORMATION,
|
||||||
|
Bundle.PromptDialogManager_showTimeLineDisabledMessage_contentText(), ButtonType.OK);
|
||||||
|
dialog.initModality(Modality.APPLICATION_MODAL);
|
||||||
|
dialog.setTitle(Bundle.Timeline_dialogs_title());
|
||||||
|
setDialogIcons(dialog);
|
||||||
|
dialog.setHeaderText(Bundle.PromptDialogManager_showTimeLineDisabledMessage_headerText());
|
||||||
|
dialog.showAndWait();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,8 @@
|
|||||||
<rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal"/>
|
<rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal"/>
|
||||||
<rule ref="rulesets/java/logging-java.xml/SystemPrintln"/>
|
<rule ref="rulesets/java/logging-java.xml/SystemPrintln"/>
|
||||||
<rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace"/>
|
<rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace"/>
|
||||||
<rule ref="rulesets/java/logging-java.xml/GuardLogStatementJavaUtil"/>
|
<!-- Disabled because we don't want If conditions around all Log statements
|
||||||
|
<rule ref="rulesets/java/logging-java.xml/GuardLogStatementJavaUtil"/> -->
|
||||||
<rule ref="rulesets/java/logging-java.xml/InvalidSlf4jMessageFormat"/>
|
<rule ref="rulesets/java/logging-java.xml/InvalidSlf4jMessageFormat"/>
|
||||||
<rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList"/>
|
<rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList"/>
|
||||||
<rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap"/>
|
<rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user