Skip to content

Commit ae8dee9

Browse files
committed
REDUCEConfigDialog: Make the second column of the command grid pane wider (and fixed width) to accommodate the larger font used on Linux. Fix commandRootDirDCButtonAction to match fcButtonAction. REDUCEConfiguration: Change the default Linux configuration to use the search path and not check the command pathname, which makes it easier to transition from the previous defaults.
1 parent c58a31c commit ae8dee9

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/fjwright/runreduce/REDUCEConfigDialog.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
GridPane.columnIndex="1" GridPane.rowIndex="1">
130130
<columnConstraints>
131131
<ColumnConstraints/>
132-
<ColumnConstraints hgrow="SOMETIMES"/>
132+
<ColumnConstraints prefWidth="450.0"/>
133133
<ColumnConstraints maxWidth="-Infinity" prefWidth="24.0"/>
134134
</columnConstraints>
135135
<rowConstraints>

src/fjwright/runreduce/REDUCEConfigDialog.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,15 @@ private void workingDirDCButtonAction() {
481481

482482
@FXML
483483
private void commandRootDirDCButtonAction() {
484-
String defaultDir = commandRootDirTextField.getText().trim();
485-
if (defaultDir.isEmpty())
486-
defaultDir = reduceRootDirTextField.getText().trim();
487-
dcButtonAction("Command Root Directory",
488-
defaultDir.isEmpty() ? RunREDUCE.reduceConfigurationDefault.reduceRootDir : defaultDir,
489-
commandRootDirTextField);
484+
try {
485+
String defaultDir = directoryTextFieldReadableCheck(commandRootDirTextField);
486+
if (defaultDir.isEmpty())
487+
defaultDir = directoryTextFieldReadableCheck(reduceRootDirTextField);
488+
if (defaultDir.isEmpty())
489+
defaultDir = RunREDUCE.reduceConfigurationDefault.reduceRootDir;
490+
dcButtonAction("Command Root Directory", defaultDir, commandRootDirTextField);
491+
} catch (FileNotFoundException ignored) {
492+
}
490493
}
491494

492495
/**

src/fjwright/runreduce/REDUCEConfiguration.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,21 +251,21 @@ class REDUCEConfigurationDefault extends REDUCEConfigurationType {
251251
"$REDUCE\\bin\\redpsl.bat")); // "$REDUCE\\lib\\psl\\psl\\bpsl.exe",
252252
// "-td", "1000", "-f", "$REDUCE\\lib\\psl\\red\\reduce.img"));
253253
} else {
254-
// Linux, etc.
255-
reduceRootDir = "/usr/bin";
254+
// Linux, etc.: use shell and search path
255+
reduceRootDir = "/usr/bin"; // "/usr/lib/reduce";
256256
packagesDir = "/usr/share/reduce/packages";
257257
primersDir = manualDir = "/usr/share/doc/reduce";
258258
reduceCommandList.add(new REDUCECommand(CSL_REDUCE,
259259
true, // false,
260-
true,
260+
false,
261261
"",
262-
"$REDUCE/redcsl", // "$REDUCE/cslbuild/csl/reduce",
262+
"redcsl", // "$REDUCE/cslbuild/csl/reduce",
263263
"--nogui"));
264264
reduceCommandList.add(new REDUCECommand(PSL_REDUCE,
265265
true, // false,
266-
true,
266+
false,
267267
"",
268-
"$REDUCE/redpsl")); // "$REDUCE/pslbuild/psl/bpsl",
268+
"redpsl")); // "$REDUCE/pslbuild/psl/bpsl",
269269
// "-td", "1000", "-f", "$REDUCE/pslbuild/red/reduce.img"));
270270
}
271271
workingDir = getProperty("user.home");

0 commit comments

Comments
 (0)