Skip to content

Commit 5c988a8

Browse files
committed
Change Startup and Shutdown functions
1 parent cbee4de commit 5c988a8

12 files changed

+13
-71
lines changed

Utilities/ProjectShutdown.m

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,2 @@
1-
function ProjectShutdown
2-
% Reset module to original state that is expected when loading in a new
3-
% MATLAB version.
4-
proj = currentProject;
5-
if isMATLABReleaseOlderThan("R2023b")
6-
cd(proj.RootFolder)
7-
try
8-
if exist(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),"file")
9-
movefile("MainMenu.mlx", fullfile("Utilities","OldVersions","MainMenuOld.mlx"))
10-
movefile(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),fullfile(proj.RootFolder,"MainMenu.mlx"))
11-
end
12-
catch
13-
disp("Failed to move MainMenu.mlx.")
14-
end
15-
try
16-
if exist(fullfile("Utilities","OldVersions","READMENew.mlx"),"file")
17-
movefile("README.mlx", fullfile("Utilities","OldVersions","READMEOld.mlx"))
18-
movefile(fullfile("Utilities","OldVersions","READMENew.mlx"),fullfile(proj.RootFolder,"README.mlx"))
19-
end
20-
catch
21-
disp("Failed to move README.mlx.")
22-
end
23-
end
24-
end
1+
% Close the StartUp app if still open:
2+
delete(findall(groot,'Name','StartUp App'))

Utilities/ProjectStartup.m

Lines changed: 0 additions & 24 deletions
This file was deleted.

Utilities/ProjectStartupApp.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function createComponents(app)
200200
app.UIFigure = uifigure('Visible', 'off');
201201
app.UIFigure.AutoResizeChildren = 'off';
202202
app.UIFigure.Position = [100 100 276 430];
203-
app.UIFigure.Name = 'Startup App';
203+
app.UIFigure.Name = 'StartUp App';
204204
app.UIFigure.Resize = 'off';
205205
app.UIFigure.CloseRequestFcn = createCallbackFcn(app, @UIFigureCloseRequest, true);
206206

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info File="Utilities/ProjectShutdown.m" GroupUUID="default" Icon="" Name="ProjectShutdown" Type="Shutdown" Visible="0">
3+
<Extension Name="ShutdownPrev" Value="HEAD"/>
4+
</Info>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="2d3e3ce8-b2a7-48df-84d3-7b72ad8bc869" type="EntryPoint"/>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<?xml version='1.0' encoding='UTF-8'?>
2-
<Info File="Utilities/ProjectStartupApp.m" GroupUUID="" Icon="" Name="ProjectStartupApp" Type="StartUp" Visible="0"/>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info File="Utilities/ProjectStartupApp.m" GroupUUID="default" Icon="" Name="ProjectStartupApp" Type="StartUp" Visible="0">
3+
<Extension Name="StartUpPrev" Value="HEAD"/>
4+
</Info>

resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/kwt4nrRX8PCsD_8oYGrAxtodymMd.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/KAXfQgCar2Yb8zOxgvf9hdmLP1E/kwt4nrRX8PCsD_8oYGrAxtodymMp.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/ZN2RlSIbyWXhOxbxxI4hOawbMD4/EyDhXb-HjEIhAYfuSMUxquCH4aYd.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

resources/project/ZN2RlSIbyWXhOxbxxI4hOawbMD4/EyDhXb-HjEIhAYfuSMUxquCH4aYp.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)