File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ public boolean isElevationNeeded(String path) {
7676 if (path != null ) {
7777 result = ! canWrite(path);
7878 } else {
79+ if (isMac()) {
80+ // Mac user name is never simply "root"
81+ return false ;
82+ }
7983 result = ! System . getProperty(" user.name" ). equals(" root" );
8084 }
8185 }
@@ -87,6 +91,9 @@ public boolean isElevationNeeded(String path) {
8791* @return
8892*/
8993public boolean isAdminUser () {
94+ if (isMac()) {
95+ return true ;
96+ }
9097 if (isWindows()) {
9198 try {
9299 String NTAuthority = " HKU\\ S-1-5-19" ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public enum BFFilter implements FilterSettingsEnum
2727public enum FilterChannelSelect implements FilterSettingsEnum
2828{
2929 ALL_CHANNELS (0 , " All Channels" ),
30- CUSTOM_CHANNELS (1 , " Custom " );
30+ CUSTOM_CHANNELS (1 , " Per Channel " );
3131
3232 private int index;
3333 private String name;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ class FilterSettings {
9696 channelCount = board. getNumEXGChannels();
9797
9898 values = new FilterSettingsValues (channelCount);
99- defaultValues = values ;
99+ defaultValues = new FilterSettingsValues (channelCount) ;
100100 }
101101
102102 public boolean loadSettingsValues (String filename ) {
@@ -143,9 +143,7 @@ class FilterSettings {
143143 }
144144
145145 public void revertAllChannelsToDefaultValues () {
146- Gson gson = new GsonBuilder (). setPrettyPrinting(). create();
147- String defaultValsAsString = gson. toJson(defaultValues);
148- values = gson. fromJson(defaultValsAsString, FilterSettingsValues . class);
146+ values = new FilterSettingsValues (channelCount);
149147 }
150148
151149 // Called in UI to control number of channels. This is set from the board when this class is instantiated.
@@ -202,4 +200,4 @@ public void storeFilterSettings(File selection) {
202200 outputError(" Failed to save Filter Settings." );
203201 }
204202 }
205- }
203+ }
You can’t perform that action at this time.
0 commit comments