Skip to content

Commit

Permalink
Expose number of backup files as a preferences option.
Browse files Browse the repository at this point in the history
  • Loading branch information
highperformancecoder committed Feb 26, 2024
1 parent 6efcc7d commit 796fbe8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Expand Up @@ -1121,10 +1121,12 @@ export class CommandsManager {
godleyTableShowValues,
godleyTableOutputStyle,
font,
numBackups,
} = StoreManager.store.get('preferences');
minsky.setGodleyDisplayValue(godleyTableShowValues,godleyTableOutputStyle);
minsky.multipleEquities(enableMultipleEquityColumns);
minsky.defaultFont(font);
minsky.numBackups(numBackups);
RecentFilesManager.updateNumberOfRecentFilesToDisplay();
}

Expand Down
2 changes: 2 additions & 0 deletions gui-js/apps/minsky-electron/src/app/managers/StoreManager.ts
Expand Up @@ -9,6 +9,7 @@ interface MinskyPreferences {
wrapLongEquationsInLatexExport: boolean;
font: string;
// focusFollowsMouse: boolean;
numBackups: number;
}

interface MinskyStore {
Expand All @@ -31,6 +32,7 @@ class StoreManager {
wrapLongEquationsInLatexExport: false,
font: "",
// focusFollowsMouse: false,
numBackups: 1,
},
},
});
Expand Down
Expand Up @@ -69,6 +69,19 @@
/>
</div>

<div class="form-control">
<label for="numBackups"
>Number of saved file backups</label
>
<input
formControlName="numBackups"
type="number"
class="numBackups"
id="numBackups"
value="1"
/>
</div>

<div class="form-control">
<label for="wrapLongEquationsInLatexExport"
>Wrap long equations in LaTeX export</label
Expand Down
Expand Up @@ -30,6 +30,7 @@ export class PreferencesComponent implements OnInit {
wrapLongEquationsInLatexExport: new FormControl(null),
// focusFollowsMouse: new FormControl(null),
font: new FormControl(null),
numBackups: new FormControl(null),
});
}
async ngOnInit() {
Expand Down

0 comments on commit 796fbe8

Please sign in to comment.