mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
GUI: Allow users to view repo on updates
This commit is contained in:
@@ -4,6 +4,7 @@ import wx
|
|||||||
import logging
|
import logging
|
||||||
import plistlib
|
import plistlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -58,10 +59,12 @@ class AutomaticSysPatch:
|
|||||||
caption="Update Available for OpenCore Legacy Patcher!",
|
caption="Update Available for OpenCore Legacy Patcher!",
|
||||||
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
|
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
|
||||||
)
|
)
|
||||||
dialog.SetYesNoCancelLabels("Download and install", "Always Ignore", "Ignore Once")
|
dialog.SetYesNoCancelLabels("Download and install", "View on Github", "Ignore")
|
||||||
response = dialog.ShowModal()
|
response = dialog.ShowModal()
|
||||||
if response == wx.ID_YES:
|
if response == wx.ID_YES:
|
||||||
gui_entry.EntryPoint(self.constants).start(entry=gui_entry.SupportedEntryPoints.UPDATE_APP)
|
gui_entry.EntryPoint(self.constants).start(entry=gui_entry.SupportedEntryPoints.UPDATE_APP)
|
||||||
|
elif response == wx.ID_NO:
|
||||||
|
webbrowser.open(dict[key]["Github Link"])
|
||||||
return
|
return
|
||||||
|
|
||||||
if utilities.check_seal() is True:
|
if utilities.check_seal() is True:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import wx
|
|||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
from resources.wx_gui import (
|
from resources.wx_gui import (
|
||||||
gui_build,
|
gui_build,
|
||||||
@@ -255,15 +256,13 @@ class MainFrame(wx.Frame):
|
|||||||
caption="Update Available for OpenCore Legacy Patcher!",
|
caption="Update Available for OpenCore Legacy Patcher!",
|
||||||
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
|
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
|
||||||
)
|
)
|
||||||
dialog.SetYesNoCancelLabels("Download and install", "Always Ignore", "Ignore Once")
|
dialog.SetYesNoCancelLabels("Download and install", "Ignore", "View on Github")
|
||||||
response = dialog.ShowModal()
|
response = dialog.ShowModal()
|
||||||
|
|
||||||
if response == wx.ID_YES:
|
if response == wx.ID_YES:
|
||||||
wx.CallAfter(self.on_update, dict[entry]["Link"], version)
|
wx.CallAfter(self.on_update, dict[entry]["Link"], version)
|
||||||
elif response == wx.ID_NO:
|
elif response == wx.ID_CANCEL:
|
||||||
logging.info("- Setting IgnoreAppUpdates to True")
|
webbrowser.open(dict[entry]["Github Link"])
|
||||||
self.constants.ignore_updates = True
|
|
||||||
global_settings.GlobalEnviromentSettings().write_property("IgnoreAppUpdates", True)
|
|
||||||
|
|
||||||
|
|
||||||
def on_build_and_install(self, event: wx.Event = None):
|
def on_build_and_install(self, event: wx.Event = None):
|
||||||
|
|||||||
Reference in New Issue
Block a user