Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
M build.gradle
7171
7272
dependencies {
73
  def v_junit = '5.9.2'
73
  def v_junit = '5.9.1'
7474
  def v_flexmark = '0.64.0'
7575
  def v_jackson = '2.14.0'
M container/Containerfile
77
# ########################################################################
88
9
LABEL org.opencontainers.image.description Configures a typesetting system.
10
911
FROM alpine:latest
1012
ENV ENV="/etc/profile"
M src/main/java/com/keenwrite/ui/dialogs/ExportDialog.java
22
package com.keenwrite.ui.dialogs;
33
4
import com.keenwrite.events.ExportFailedEvent;
45
import com.keenwrite.util.FileWalker;
56
import com.keenwrite.util.RangeValidator;
...
5152
  private ComboBox<String> mComboBox;
5253
  private TextField mChapters;
54
  private final boolean mMissingThemes;
5355
5456
  /**
...
7476
    final var themes = readThemes( themesDir );
7577
76
    if( !themes.isEmpty() ) {
77
      initComboBox( mComboBox, mSettings, readThemes( themesDir ) );
78
    mMissingThemes = themes.isEmpty();
7879
79
      mPane.add( createLabel( "Dialog.typesetting.settings.theme" ), 0, 1 );
80
      mPane.add( mComboBox, 1, 1 );
81
    }
82
    else {
80
    // Typesetting installation has been corrupted. This is probably due
81
    // to the user's settings file gone missing. Rather than force users
82
    // to find the "themes" directory location, re-install the typesetter,
83
    if( mMissingThemes ) {
8384
      clue( "Dialog.typesetting.settings.themes.missing",
8485
            themesDir.getAbsolutePath() );
86
      ExportFailedEvent.fire();
87
      return;
8588
    }
89
90
    initComboBox( mComboBox, mSettings, readThemes( themesDir ) );
91
92
    mPane.add( createLabel( "Dialog.typesetting.settings.theme" ), 0, 1 );
93
    mPane.add( mComboBox, 1, 1 );
8694
8795
    var title = "Dialog.typesetting.settings.header.";
...
139147
  private boolean pick() {
140148
    try {
141
      final var result = showAndWait();
149
      if( !mMissingThemes ) {
150
        final var result = showAndWait();
142151
143
      // The result will only be set if the OK button is pressed.
144
      if( result.isPresent() ) {
145
        final var theme = mComboBox.getSelectionModel().getSelectedItem();
146
        mSettings.themeProperty().setValue( theme.toLowerCase() );
152
        // The result will only be set if the OK button is pressed.
153
        if( result.isPresent() ) {
154
          final var theme = mComboBox.getSelectionModel().getSelectedItem();
155
          mSettings.themeProperty().setValue( theme.toLowerCase() );
147156
148
        return true;
157
          return true;
158
        }
149159
      }
150160
    } catch( final Exception ex ) {
M src/test/java/com/keenwrite/io/FileObjectTest.java
2020
  /**
2121
   * Test that resources are not exhausted.
22
   *
22
   * <p>
2323
   * Disabled because no issue was found and this test thrashes the I/O.
24
   * </p>
2425
   */
2526
  @Disabled