diff --git a/Ryujinx/Ui/GtkDialog.cs b/Ryujinx/Ui/GtkDialog.cs index f833174250..0218f3b994 100644 --- a/Ryujinx/Ui/GtkDialog.cs +++ b/Ryujinx/Ui/GtkDialog.cs @@ -36,7 +36,7 @@ namespace Ryujinx.Ui return messageDialog; } - internal static MessageDialog CreateInfoDialog(string iconType, string titleMessage, string textMessage, string secText) + internal static void CreateInfoDialog(string iconType, string titleMessage, string textMessage, string secText) { MessageDialog messageDialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, null) { @@ -47,7 +47,8 @@ namespace Ryujinx.Ui WindowPosition = WindowPosition.Center }; messageDialog.SetSizeRequest(100, 20); - return messageDialog; + messageDialog.Run(); + messageDialog.Dispose(); } internal static MessageDialog CreateProgressDialog(string iconType, string titleMessage, string textMessage, string secText) diff --git a/Ryujinx/Updater/UpdateParser.cs b/Ryujinx/Updater/UpdateParser.cs index de529fd0fa..9d8dda3d5b 100644 --- a/Ryujinx/Updater/UpdateParser.cs +++ b/Ryujinx/Updater/UpdateParser.cs @@ -73,6 +73,8 @@ namespace Ryujinx Directory.CreateDirectory(localAppPath); } + // Get Version.json to compare versions + if (File.Exists(Path.Combine(localAppPath, "Version.json"))) { try @@ -84,7 +86,7 @@ namespace Ryujinx if (newVersion.CompareTo(currentVersion) == 0) { - GtkDialog.CreateErrorDialog("You are already using the most updated version!"); + GtkDialog.CreateInfoDialog("Update", "Ryujinx - Updater", "You are already using the most updated version of Ryujinx!", ""); return; } @@ -95,6 +97,8 @@ namespace Ryujinx } } + // Show a message asking the user if they want to update + using (MessageDialog dialog = GtkDialog.CreateAcceptDialog("Update", "Ryujinx - Update", "Would you like to update?", "Version " + _buildVer + " is available.")) { if (dialog.Run() == (int)ResponseType.Yes) @@ -122,7 +126,7 @@ namespace Ryujinx catch (Exception ex) { Logger.PrintError(LogClass.Application, ex.Message); - GtkDialog.CreateErrorDialog("Update canceled by user or failed to grab or parse the information.\nPlease try at a later time, or report the error to our GitHub."); + GtkDialog.CreateErrorDialog("Update failed to grab or parse the information.\nPlease try at a later time, or report the error to our GitHub."); } }