Allow importing official Windows configurations in Linux for #148
This commit is contained in:
Generated
+17
@@ -97,6 +97,8 @@ Partial Class frmGameManager
|
||||
Me.btnExport = New System.Windows.Forms.Button()
|
||||
Me.cmsImport = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.cmsOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsOfficialWindows = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsOfficialLinux = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.txtQuickFilter = New System.Windows.Forms.TextBox()
|
||||
Me.lblQuickFilter = New System.Windows.Forms.Label()
|
||||
@@ -850,10 +852,23 @@ Partial Class frmGameManager
|
||||
'
|
||||
'cmsOfficial
|
||||
'
|
||||
Me.cmsOfficial.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsOfficialWindows, Me.cmsOfficialLinux})
|
||||
Me.cmsOfficial.Name = "cmsOfficial"
|
||||
Me.cmsOfficial.Size = New System.Drawing.Size(117, 22)
|
||||
Me.cmsOfficial.Text = "&Official List..."
|
||||
'
|
||||
'cmsOfficialWindows
|
||||
'
|
||||
Me.cmsOfficialWindows.Name = "cmsOfficialWindows"
|
||||
Me.cmsOfficialWindows.Size = New System.Drawing.Size(180, 22)
|
||||
Me.cmsOfficialWindows.Text = "&Windows..."
|
||||
'
|
||||
'cmsOfficialLinux
|
||||
'
|
||||
Me.cmsOfficialLinux.Name = "cmsOfficialLinux"
|
||||
Me.cmsOfficialLinux.Size = New System.Drawing.Size(180, 22)
|
||||
Me.cmsOfficialLinux.Text = "&Linux..."
|
||||
'
|
||||
'cmsFile
|
||||
'
|
||||
Me.cmsFile.Name = "cmsFile"
|
||||
@@ -1042,4 +1057,6 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnProcesses As Button
|
||||
Friend WithEvents ttFullPath As ToolTip
|
||||
Friend WithEvents btnImportBackup As Button
|
||||
Friend WithEvents cmsOfficialWindows As ToolStripMenuItem
|
||||
Friend WithEvents cmsOfficialLinux As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
+28
-12
@@ -1704,17 +1704,9 @@ Public Class frmGameManager
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImportOfficialGameList()
|
||||
Dim sImportURL As String
|
||||
|
||||
If mgrCommon.IsUnix Then
|
||||
sImportURL = App_URLImportLinux
|
||||
Else
|
||||
sImportURL = App_URLImport
|
||||
End If
|
||||
|
||||
Private Sub ImportOfficialGameList(ByVal sImportUrl As String)
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(sImportURL, True, Settings) Then
|
||||
If mgrMonitorList.DoImport(sImportUrl, True, Settings) Then
|
||||
mgrMonitorList.SyncMonitorLists(Settings)
|
||||
LoadData()
|
||||
LoadBackupData()
|
||||
@@ -1774,6 +1766,8 @@ Public Class frmGameManager
|
||||
btnDelete.Text = frmGameManager_btnDelete
|
||||
btnAdd.Text = frmGameManager_btnAdd
|
||||
cmsOfficial.Text = frmGameManager_cmsOfficial
|
||||
cmsOfficialLinux.Text = frmGameManager_cmsOfficialLinux
|
||||
cmsOfficialWindows.Text = frmGameManager_cmsOfficialWindows
|
||||
cmsFile.Text = frmGameManager_cmsFile
|
||||
lblQuickFilter.Text = frmGameManager_lblQuickFilter
|
||||
lblLimit.Text = frmGameManager_lblLimit
|
||||
@@ -1785,6 +1779,15 @@ Public Class frmGameManager
|
||||
btnImportBackup.Text = frmGameManager_btnImportBackup
|
||||
btnProcesses.Text = frmGameManager_btnProcesses
|
||||
|
||||
'Init Official Import Menu
|
||||
If mgrCommon.IsUnix Then
|
||||
cmsOfficial.Text = cmsOfficial.Text.TrimEnd(".")
|
||||
RemoveHandler cmsOfficial.Click, AddressOf cmsOfficialWindows_Click
|
||||
Else
|
||||
cmsOfficialLinux.Visible = False
|
||||
cmsOfficialWindows.Visible = False
|
||||
End If
|
||||
|
||||
'Init Filter Timer
|
||||
tmFilterTimer = New Timer()
|
||||
tmFilterTimer.Interval = 1000
|
||||
@@ -1967,8 +1970,21 @@ Public Class frmGameManager
|
||||
cmsImport.Show(btnImport, New Drawing.Point(btnImport.Size.Width - Math.Floor(btnImport.Size.Width * 0.1), btnImport.Size.Height - Math.Floor(btnImport.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
||||
End Sub
|
||||
|
||||
Private Sub cmsOfficial_Click(sender As Object, e As EventArgs) Handles cmsOfficial.Click
|
||||
ImportOfficialGameList()
|
||||
Private Sub cmsOfficialWindows_Click(sender As Object, e As EventArgs) Handles cmsOfficialWindows.Click, cmsOfficial.Click
|
||||
'Show one time warning about Windows configs in Linux
|
||||
If mgrCommon.IsUnix Then
|
||||
If Not (oSettings.SuppressMessages And mgrSettings.eSuppressMessages.WinConfigsInLinux) = mgrSettings.eSuppressMessages.WinConfigsInLinux Then
|
||||
mgrCommon.ShowMessage(frmGameManager_WarningWinConfigsInLinux, MsgBoxStyle.Information)
|
||||
oSettings.SuppressMessages = oSettings.SetMessageField(oSettings.SuppressMessages, mgrSettings.eSuppressMessages.WinConfigsInLinux)
|
||||
oSettings.SaveSettings()
|
||||
End If
|
||||
End If
|
||||
|
||||
ImportOfficialGameList(App_URLImport)
|
||||
End Sub
|
||||
|
||||
Private Sub cmsOfficialLinux_Click(sender As Object, e As EventArgs) Handles cmsOfficialLinux.Click
|
||||
ImportOfficialGameList(App_URLImportLinux)
|
||||
End Sub
|
||||
|
||||
Private Sub cmsFile_Click(sender As Object, e As EventArgs) Handles cmsFile.Click
|
||||
|
||||
@@ -31,6 +31,7 @@ Public Class mgrSettings
|
||||
None = 0
|
||||
GameIDSync = 1
|
||||
BackupImport = 2
|
||||
WinConfigsInLinux = 4
|
||||
End Enum
|
||||
|
||||
Property StartWithWindows As Boolean
|
||||
|
||||
Generated
+27
@@ -1815,6 +1815,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Linux....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsOfficialLinux() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsOfficialLinux", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Windows....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsOfficialWindows() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsOfficialWindows", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Are you sure you want to run a backup for [PARAM]? This will close the form..
|
||||
'''</summary>
|
||||
@@ -2463,6 +2481,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Official Windows configurations can be used in Linux for games running in Wine or Proton.[BR][BR]You do not need to modify these configurations, GBM will automatically do any required path conversions the first time the game is detected.[BR][BR]This message will only be shown once..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_WarningWinConfigsInLinux() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_WarningWinConfigsInLinux", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to XML.
|
||||
'''</summary>
|
||||
|
||||
@@ -2257,4 +2257,13 @@
|
||||
<data name="frmGameManager_WarningImportBackupSaveMulti" xml:space="preserve">
|
||||
<value>The "Save multiple backups" option must be enabled on this configuration to import backup files.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsOfficialLinux" xml:space="preserve">
|
||||
<value>&Linux...</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsOfficialWindows" xml:space="preserve">
|
||||
<value>&Windows...</value>
|
||||
</data>
|
||||
<data name="frmGameManager_WarningWinConfigsInLinux" xml:space="preserve">
|
||||
<value>Official Windows configurations can be used in Linux for games running in Wine or Proton.[BR][BR]You do not need to modify these configurations, GBM will automatically do any required path conversions the first time the game is detected.[BR][BR]This message will only be shown once.</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user