void-packages/srcpkgs/playonlinux/patches/python-3.12.patch

43 lines
2.0 KiB
Diff

--- a/python/configurewindow/ConfigureWindowNotebook.py
+++ b/python/configurewindow/ConfigureWindowNotebook.py
@@ -460,9 +460,11 @@ class ConfigureWindowNotebook(wx.Noteboo
if (param == 405):
self.FileDialog = wx.FileDialog(self)
self.FileDialog.SetDirectory("~")
- self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
- \|Windows executable (*.exe)|*.exe;*.EXE\
- \|Windows install file (*.msi)|*.msi;*MSI"
+ self.supported_files = "|".join([
+ "All|*.exe;*.EXE;*.msi;*.MSI",
+ "Windows executable (*.exe)|*.exe;*.EXE",
+ "Windows install file (*.msi)|*.msi;*MSI",
+ ]);
self.FileDialog.SetWildcard(self.supported_files)
self.FileDialog.ShowModal()
if (self.FileDialog.GetPath() != ""):
--- a/python/mainwindow.py
+++ b/python/mainwindow.py
@@ -705,13 +705,15 @@ class MainWindow(wx.Frame):
def ChangeIcon(self, event):
self.IconDir = Variables.homedir + "/.local/share/icons/"
- self.SupprotedIconExt = "All|*.xpm;*.XPM;*.png;*.PNG;*.ico;*.ICO;*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP\
- \|XPM (*.xpm)|*.xpm;*.XPM\
- \|PNG (*.png)|*.png;*.PNG\
- \|ICO (*.ico)|*.ico;*.ICO\
- \|JPG (*.jpg)|*.jpg;*.JPG\
- \|BMP (*.bmp)|*.bmp;*.BMP\
- \|JPEG (*.jpeg)|*.jpeg;*JPEG"
+ self.SupprotedIconExt = "|".join([
+ "All|*.xpm;*.XPM;*.png;*.PNG;*.ico;*.ICO;*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP",
+ "XPM (*.xpm)|*.xpm;*.XPM",
+ "PNG (*.png)|*.png;*.PNG",
+ "ICO (*.ico)|*.ico;*.ICO",
+ "JPG (*.jpg)|*.jpg;*.JPG",
+ "BMP (*.bmp)|*.bmp;*.BMP",
+ "JPEG (*.jpeg)|*.jpeg;*.JPEG",
+ ])
self.IconDialog = wx.FileDialog(self, "Choose a icon file", self.IconDir, "", self.SupprotedIconExt,
wx.OPEN | wx.FD_PREVIEW)
if self.IconDialog.ShowModal() == wx.ID_OK: