Skip to content

Commit

Permalink
Fix double opening of the browser after a self-update
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Jan 18, 2025
1 parent ab08dc0 commit b5ad2e3
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ post-load
postLoad
GSSelfUpdater postInstallVersion: self installedVersion.
GSBaseWorkingCopy doPostUpdateMigrations.
GSBrowser allInstances do: #reopen.
GSBrowser rebuildAll.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"installedVersionFromDirectoryRepository:" : "mad 10/24/2024 14:59",
"installedVersionFromGitHubRepository:" : "mad 10/24/2024 14:27",
"installedVersionFromRepository:" : "mad 10/24/2024 14:26",
"postLoad" : "mad 12/21/2024 18:27",
"postLoad" : "mad 1/18/2025 16:22",
"projectClass" : "jr 5/4/2017 17:25" } }
1 change: 1 addition & 0 deletions src/GitS-Core.package/GSBrowser.class/class/open.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
instance creation
open
GSSelfUpdater checkForNewVersion.
^ self new open
5 changes: 5 additions & 0 deletions src/GitS-Core.package/GSBrowser.class/class/rebuildAll.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
self-update
rebuildAll
self allInstances do: #rebuild.
"collect old morphs to prevent double updates, like commitList"
Smalltalk garbageCollect.
4 changes: 0 additions & 4 deletions src/GitS-Core.package/GSBrowser.class/instance/basicOpen.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ buildWindow: builder
^ builder pluggableWindowSpec new
model: self;
label: #windowTitle;
children: {GSGUIUtilities windowChild: (self buildLayout: builder)};
children: #windowChildren;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
toolbuilder
buildWindowChild: builder
^ GSGUIUtilities windowChild: (self buildLayout: builder)
4 changes: 2 additions & 2 deletions src/GitS-Core.package/GSBrowser.class/instance/open.st
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
toolbuilder
open
GSSelfUpdater checkForNewVersion.
self basicOpen.
ToolBuilder open: self.
self postOpen.
5 changes: 5 additions & 0 deletions src/GitS-Core.package/GSBrowser.class/instance/postOpen.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
toolbuilder
postOpen
self
revealActiveTreeMember;
changed: #activeCommit.
5 changes: 5 additions & 0 deletions src/GitS-Core.package/GSBrowser.class/instance/rebuild.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
toolbuilder
rebuild
self
changed: #windowChildren;
postOpen.
6 changes: 0 additions & 6 deletions src/GitS-Core.package/GSBrowser.class/instance/reopen.st

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
toolbuilder
windowChildren
| builder |
builder := ToolBuilder default.
^ {builder build: (self buildWindowChild: builder)}
13 changes: 8 additions & 5 deletions src/GitS-Core.package/GSBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"class" : {
"errorOutdated" : "mad 10/9/2024 17:56",
"initialize" : "mad 9/21/2023 18:47",
"open" : "mad 9/19/2023 12:44",
"open" : "mad 1/17/2025 11:37",
"rebuildAll" : "mad 1/18/2025 16:22",
"registerInWorldMenu" : "mad 10/18/2023 15:14",
"unload" : "mad 9/26/2023 15:50",
"unregisterFromWorldMenu" : "mad 9/19/2023 13:45" },
Expand Down Expand Up @@ -33,7 +34,6 @@
"activeWorkingCopyAction:" : "mad 10/8/2024 22:04",
"addMappersProjectListMenu:" : "mad 10/9/2024 16:01",
"basicActiveCommit:" : "mad 5/15/2024 21:42",
"basicOpen" : "mad 12/22/2024 01:29",
"buildBranchButton:" : "mad 12/21/2024 22:10",
"buildButtons:" : "mad 11/16/2024 16:23",
"buildCommitButton:" : "mad 12/21/2024 22:10",
Expand All @@ -53,7 +53,8 @@
"buildRefsButtons:" : "mad 12/23/2024 20:02",
"buildRefsPanel:" : "mad 12/16/2024 20:36",
"buildUpperLayout:" : "mad 10/9/2024 16:01",
"buildWindow:" : "mad 1/18/2025 16:25",
"buildWindow:" : "mad 1/18/2025 16:10",
"buildWindowChild:" : "mad 1/18/2025 16:13",
"buildWith:" : "mad 9/1/2023 14:44",
"close" : "mad 12/21/2024 18:25",
"commitList" : "mad 12/22/2024 00:12",
Expand All @@ -66,20 +67,22 @@
"ifRepositoryDoesNotExist:" : "mad 11/30/2023 17:08",
"initializeRefTree" : "mad 1/15/2025 18:59",
"newProject:" : "mad 12/22/2024 00:36",
"open" : "mad 10/25/2024 11:37",
"open" : "mad 1/17/2025 11:57",
"operationLifecycle" : "mad 12/21/2024 22:26",
"otherMenu:" : "mad 12/22/2024 01:50",
"postOpen" : "mad 1/17/2025 11:58",
"projectListMenu:" : "mad 12/21/2024 22:09",
"rebuild" : "mad 1/18/2025 16:17",
"refChanged:" : "mad 12/17/2024 19:08",
"refListMenu:" : "mad 12/23/2024 19:54",
"refTree" : "mad 12/16/2024 22:03",
"refTree:" : "mad 12/16/2024 22:03",
"refTreeRoots" : "mad 12/16/2024 21:55",
"refsChanged" : "mad 12/16/2024 20:45",
"reopen" : "mad 1/15/2025 18:56",
"revealActiveTreeMember" : "mad 1/18/2025 15:49",
"unitOfWork" : "mad 9/19/2023 12:37",
"update:" : "mad 12/21/2024 20:47",
"updateRefTree" : "mad 12/16/2024 22:13",
"windowChildren" : "mad 1/18/2025 16:15",
"windowTitle" : "mad 10/18/2023 15:14",
"withUnitOfWork:" : "mad 9/19/2023 12:37" } }

0 comments on commit b5ad2e3

Please sign in to comment.