YBoxPanel northPanel = new YBoxPanel();
northPanel.add(startupFolderPanel);
northPanel.addSpace(5);
showHiddenFilesCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.show_hidden_files")){
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_HIDDEN_FILES, MuPreferences.DEFAULT_SHOW_HIDDEN_FILES);
}
};
showHiddenFilesCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_HIDDEN_FILES, MuPreferences.DEFAULT_SHOW_HIDDEN_FILES));
northPanel.add(showHiddenFilesCheckBox);
// Mac OS X-only options
if(OsFamily.MAC_OS_X.isCurrent()) {
// Monitor showHiddenFilesCheckBox state to disable 'show .DS_Store files' option
// when 'Show hidden files' is disabled, as .DS_Store files are hidden files
showHiddenFilesCheckBox.addItemListener(this);
showDSStoreFilesCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.show_ds_store_files")){
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_DS_STORE_FILES, MuPreferences.DEFAULT_SHOW_DS_STORE_FILES);
}
};
showDSStoreFilesCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_DS_STORE_FILES,
MuPreferences.DEFAULT_SHOW_DS_STORE_FILES));
showDSStoreFilesCheckBox.setEnabled(showHiddenFilesCheckBox.isSelected());
// Shift the check box to the right to indicate that it is a sub-option
northPanel.add(showDSStoreFilesCheckBox, 20);
}
if (OsFamily.MAC_OS_X.isCurrent() || OsFamily.WINDOWS.isCurrent()) {
showSystemFoldersCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.show_system_folders")) {
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_SYSTEM_FOLDERS, MuPreferences.DEFAULT_SHOW_SYSTEM_FOLDERS);
}
};
showSystemFoldersCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_SYSTEM_FOLDERS,
MuPreferences.DEFAULT_SHOW_SYSTEM_FOLDERS));
northPanel.add(showSystemFoldersCheckBox);
}
compactSizeCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.compact_file_size")) {
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.DISPLAY_COMPACT_FILE_SIZE, MuPreferences.DEFAULT_DISPLAY_COMPACT_FILE_SIZE);
}
};
compactSizeCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.DISPLAY_COMPACT_FILE_SIZE,
MuPreferences.DEFAULT_DISPLAY_COMPACT_FILE_SIZE));
northPanel.add(compactSizeCheckBox);
followSymlinksCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.follow_symlinks_when_cd")) {
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.CD_FOLLOWS_SYMLINKS, MuPreferences.DEFAULT_CD_FOLLOWS_SYMLINKS);
}
};
followSymlinksCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.CD_FOLLOWS_SYMLINKS,
MuPreferences.DEFAULT_CD_FOLLOWS_SYMLINKS));
northPanel.add(followSymlinksCheckBox);
showTabHeaderCheckBox = new PrefCheckBox(Translator.get("prefs_dialog.show_tab_header")) {
public boolean hasChanged() {
return isSelected() != MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_TAB_HEADER, MuPreferences.DEFAULT_SHOW_TAB_HEADER);
}
};
showTabHeaderCheckBox.setSelected(MuConfigurations.getPreferences().getVariable(MuPreference.SHOW_TAB_HEADER,