mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +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.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
|
||||
/**
|
||||
* Manages this module's life cycle. Opens the startup dialog during startup.
|
||||
@ -72,6 +73,8 @@ public class Installer extends ModuleInstall {
|
||||
private void setLookAndFeel() {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||
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());
|
||||
});
|
||||
}
|
||||
|
||||
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.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
@ -97,7 +98,10 @@ public final class OpenTimelineAction extends CallableSystemAction {
|
||||
}
|
||||
}
|
||||
setEnabled(false);
|
||||
} else {
|
||||
}else if("false".equals(ModuleSettings.getConfigSetting("timeline", "enable_timeline"))) {
|
||||
Platform.runLater(PromptDialogManager::showTimeLineDisabledMessage);
|
||||
setEnabled(false);
|
||||
}else {
|
||||
showTimeline();
|
||||
}
|
||||
}
|
||||
|
@ -222,5 +222,20 @@ public final class PromptDialogManager {
|
||||
dialog.setHeaderText(Bundle.PromptDialogManager_showTooManyFiles_headerText());
|
||||
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/SystemPrintln"/>
|
||||
<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/migrating.xml/ReplaceVectorWithList"/>
|
||||
<rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user