mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
GUI: Centre on updates
This commit is contained in:
@@ -35,12 +35,12 @@ class UpdateFrame(wx.Frame):
|
|||||||
self.constants: constants.Constants = global_constants
|
self.constants: constants.Constants = global_constants
|
||||||
self.application_path = self.constants.payload_path / "OpenCore-Patcher.app"
|
self.application_path = self.constants.payload_path / "OpenCore-Patcher.app"
|
||||||
self.screen_location: wx.Point = screen_location
|
self.screen_location: wx.Point = screen_location
|
||||||
if self.screen_location is None:
|
if parent:
|
||||||
if parent:
|
self.parent.Centre()
|
||||||
self.screen_location = parent.GetScreenPosition()
|
self.screen_location = parent.GetScreenPosition()
|
||||||
else:
|
else:
|
||||||
self.Centre()
|
self.Centre()
|
||||||
self.screen_location = self.GetScreenPosition()
|
self.screen_location = self.GetScreenPosition()
|
||||||
|
|
||||||
|
|
||||||
if url == "" or version_label == "":
|
if url == "" or version_label == "":
|
||||||
@@ -143,7 +143,7 @@ class UpdateFrame(wx.Frame):
|
|||||||
while thread.is_alive():
|
while thread.is_alive():
|
||||||
wx.Yield()
|
wx.Yield()
|
||||||
|
|
||||||
timer = 8
|
timer = 5
|
||||||
while True:
|
while True:
|
||||||
launch_label.SetLabel(f"Closing old process in {timer} seconds")
|
launch_label.SetLabel(f"Closing old process in {timer} seconds")
|
||||||
launch_label.Center(wx.HORIZONTAL)
|
launch_label.Center(wx.HORIZONTAL)
|
||||||
@@ -249,4 +249,4 @@ EOF
|
|||||||
Launches newly installed update
|
Launches newly installed update
|
||||||
"""
|
"""
|
||||||
logging.info("Launching update: '/Library/Application Support/Dortania/OpenCore-Patcher.app'")
|
logging.info("Launching update: '/Library/Application Support/Dortania/OpenCore-Patcher.app'")
|
||||||
subprocess.Popen(["/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher"])
|
subprocess.Popen(["/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher", "--update_installed"])
|
||||||
|
|||||||
Reference in New Issue
Block a user