Skip to content

Commit 796fbe8

Browse files
Expose number of backup files as a preferences option.
1 parent 6efcc7d commit 796fbe8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

gui-js/apps/minsky-electron/src/app/managers/CommandsManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,12 @@ export class CommandsManager {
11211121
godleyTableShowValues,
11221122
godleyTableOutputStyle,
11231123
font,
1124+
numBackups,
11241125
} = StoreManager.store.get('preferences');
11251126
minsky.setGodleyDisplayValue(godleyTableShowValues,godleyTableOutputStyle);
11261127
minsky.multipleEquities(enableMultipleEquityColumns);
11271128
minsky.defaultFont(font);
1129+
minsky.numBackups(numBackups);
11281130
RecentFilesManager.updateNumberOfRecentFilesToDisplay();
11291131
}
11301132

gui-js/apps/minsky-electron/src/app/managers/StoreManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface MinskyPreferences {
99
wrapLongEquationsInLatexExport: boolean;
1010
font: string;
1111
// focusFollowsMouse: boolean;
12+
numBackups: number;
1213
}
1314

1415
interface MinskyStore {
@@ -31,6 +32,7 @@ class StoreManager {
3132
wrapLongEquationsInLatexExport: false,
3233
font: "",
3334
// focusFollowsMouse: false,
35+
numBackups: 1,
3436
},
3537
},
3638
});

gui-js/libs/menu/src/lib/options/preferences/preferences.component.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@
6969
/>
7070
</div>
7171

72+
<div class="form-control">
73+
<label for="numBackups"
74+
>Number of saved file backups</label
75+
>
76+
<input
77+
formControlName="numBackups"
78+
type="number"
79+
class="numBackups"
80+
id="numBackups"
81+
value="1"
82+
/>
83+
</div>
84+
7285
<div class="form-control">
7386
<label for="wrapLongEquationsInLatexExport"
7487
>Wrap long equations in LaTeX export</label

gui-js/libs/menu/src/lib/options/preferences/preferences.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class PreferencesComponent implements OnInit {
3030
wrapLongEquationsInLatexExport: new FormControl(null),
3131
// focusFollowsMouse: new FormControl(null),
3232
font: new FormControl(null),
33+
numBackups: new FormControl(null),
3334
});
3435
}
3536
async ngOnInit() {

0 commit comments

Comments
 (0)