3131import org .openide .windows .WindowManager ;
3232import org .sleuthkit .autopsy .casemodule .StartupWindowProvider ;
3333import org .sleuthkit .autopsy .coreutils .Logger ;
34+ import org .sleuthkit .autopsy .coreutils .ModuleSettings ;
3435
3536/**
3637 * Manages this module's life cycle. Opens the startup dialog during startup.
@@ -40,7 +41,6 @@ public class Installer extends ModuleInstall {
4041 private static final long serialVersionUID = 1L ;
4142 private static final Logger logger = Logger .getLogger (Installer .class .getName ());
4243 private static Installer instance ;
43- public static boolean enableTimeline = true ;
4444
4545 public synchronized static Installer getDefault () {
4646 if (null == instance ) {
@@ -115,17 +115,23 @@ private void setOSXLookAndFeel() {
115115 });
116116 }
117117
118+ private void setModuleSettings (String value ) {
119+ if (ModuleSettings .configExists ("timeline" )) {
120+ ModuleSettings .setConfigSetting ("timeline" , "enable_timeline" , value );
121+ } else {
122+ ModuleSettings .makeConfigFile ("timeline" );
123+ ModuleSettings .setConfigSetting ("timeline" , "enable_timeline" , value );
124+ }
125+ }
126+
118127 private void setUnixLookAndFeel (){
119128 try {
120- UIManager .setLookAndFeel (UIManager .getCrossPlatformLookAndFeelClassName ());
129+ UIManager .put ("swing.boldMetal" , Boolean .FALSE );
130+ UIManager .setLookAndFeel ("com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
131+ setModuleSettings ("true" );
121132 } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex ) {
122133 logger .log (Level .WARNING , "Error setting crossplatform look-and-feel, setting default look-and-feel" ,ex );
123- try {
124- UIManager .setLookAndFeel (UIManager .getSystemLookAndFeelClassName ());
125- enableTimeline =false ;
126- } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex1 ) {
127- logger .log (Level .WARNING , "Error setting native look-and-feel" ,ex1 );
128- }
134+ setModuleSettings ("false" );
129135 }
130136 }
131137}
0 commit comments