From b56ec7c67903d1ce38f0a8665af64f1d5e8758c3 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 20 May 2023 13:50:37 -0600 Subject: [PATCH] GUI: Allow users to view repo on updates --- resources/sys_patch/sys_patch_auto.py | 5 ++++- resources/wx_gui/gui_main_menu.py | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/sys_patch/sys_patch_auto.py b/resources/sys_patch/sys_patch_auto.py index 7bea39299..255fb0018 100644 --- a/resources/sys_patch/sys_patch_auto.py +++ b/resources/sys_patch/sys_patch_auto.py @@ -4,6 +4,7 @@ import wx import logging import plistlib import subprocess +import webbrowser from pathlib import Path @@ -58,10 +59,12 @@ class AutomaticSysPatch: caption="Update Available for OpenCore Legacy Patcher!", 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() if response == wx.ID_YES: gui_entry.EntryPoint(self.constants).start(entry=gui_entry.SupportedEntryPoints.UPDATE_APP) + elif response == wx.ID_NO: + webbrowser.open(dict[key]["Github Link"]) return if utilities.check_seal() is True: diff --git a/resources/wx_gui/gui_main_menu.py b/resources/wx_gui/gui_main_menu.py index 9d5833460..5bd63500d 100644 --- a/resources/wx_gui/gui_main_menu.py +++ b/resources/wx_gui/gui_main_menu.py @@ -3,6 +3,7 @@ import wx import sys import logging import threading +import webbrowser from resources.wx_gui import ( gui_build, @@ -255,15 +256,13 @@ class MainFrame(wx.Frame): caption="Update Available for OpenCore Legacy Patcher!", 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() if response == wx.ID_YES: wx.CallAfter(self.on_update, dict[entry]["Link"], version) - elif response == wx.ID_NO: - logging.info("- Setting IgnoreAppUpdates to True") - self.constants.ignore_updates = True - global_settings.GlobalEnviromentSettings().write_property("IgnoreAppUpdates", True) + elif response == wx.ID_CANCEL: + webbrowser.open(dict[entry]["Github Link"]) def on_build_and_install(self, event: wx.Event = None):