Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
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.
Expand Down Expand Up @@ -72,6 +73,8 @@ public void uninstalled() {
private void setLookAndFeel() {
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
setOSXLookAndFeel();
}else if (System.getProperty("os.name").toLowerCase().contains("nux")){
setUnixLookAndFeel();
}
}

Expand Down Expand Up @@ -111,4 +114,24 @@ private void setOSXLookAndFeel() {
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");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
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;
Expand Down Expand Up @@ -97,7 +98,10 @@ public void performAction() {
}
}
setEnabled(false);
} else {
}else if("false".equals(ModuleSettings.getConfigSetting("timeline", "enable_timeline"))) {
Platform.runLater(PromptDialogManager::showTimeLineDisabledMessage);
setEnabled(false);
}else {
showTimeline();
}
}
Expand Down
15 changes: 15 additions & 0 deletions Core/src/org/sleuthkit/autopsy/timeline/PromptDialogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,20 @@ static void showTooManyFiles() {
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();
}

}