Fixed Info dialogs
This commit is contained in:
parent
9844fb3438
commit
ea19a0e29c
2 changed files with 9 additions and 4 deletions
|
@ -36,7 +36,7 @@ namespace Ryujinx.Ui
|
||||||
return messageDialog;
|
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)
|
MessageDialog messageDialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, null)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,8 @@ namespace Ryujinx.Ui
|
||||||
WindowPosition = WindowPosition.Center
|
WindowPosition = WindowPosition.Center
|
||||||
};
|
};
|
||||||
messageDialog.SetSizeRequest(100, 20);
|
messageDialog.SetSizeRequest(100, 20);
|
||||||
return messageDialog;
|
messageDialog.Run();
|
||||||
|
messageDialog.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static MessageDialog CreateProgressDialog(string iconType, string titleMessage, string textMessage, string secText)
|
internal static MessageDialog CreateProgressDialog(string iconType, string titleMessage, string textMessage, string secText)
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace Ryujinx
|
||||||
Directory.CreateDirectory(localAppPath);
|
Directory.CreateDirectory(localAppPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get Version.json to compare versions
|
||||||
|
|
||||||
if (File.Exists(Path.Combine(localAppPath, "Version.json")))
|
if (File.Exists(Path.Combine(localAppPath, "Version.json")))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -84,7 +86,7 @@ namespace Ryujinx
|
||||||
|
|
||||||
if (newVersion.CompareTo(currentVersion) == 0)
|
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;
|
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."))
|
using (MessageDialog dialog = GtkDialog.CreateAcceptDialog("Update", "Ryujinx - Update", "Would you like to update?", "Version " + _buildVer + " is available."))
|
||||||
{
|
{
|
||||||
if (dialog.Run() == (int)ResponseType.Yes)
|
if (dialog.Run() == (int)ResponseType.Yes)
|
||||||
|
@ -122,7 +126,7 @@ namespace Ryujinx
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.PrintError(LogClass.Application, ex.Message);
|
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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue