forked from Boria138/PortProtonQt
fix: fix dist sorting on Wine Settings tab
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -2035,8 +2035,8 @@ class MainWindow(QMainWindow):
|
|||||||
if not os.path.exists(dist_path):
|
if not os.path.exists(dist_path):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Update the wine versions list
|
# Update the wine versions list with sorting
|
||||||
self.wine_versions = [d for d in os.listdir(dist_path) if os.path.isdir(os.path.join(dist_path, d))]
|
self.wine_versions = sorted([d for d in os.listdir(dist_path) if os.path.isdir(os.path.join(dist_path, d))], key=version_sort_key)
|
||||||
self.wineCombo.clear()
|
self.wineCombo.clear()
|
||||||
self.wineCombo.addItems(self.wine_versions)
|
self.wineCombo.addItems(self.wine_versions)
|
||||||
|
|
||||||
@@ -2049,8 +2049,8 @@ class MainWindow(QMainWindow):
|
|||||||
if not os.path.exists(prefixes_path):
|
if not os.path.exists(prefixes_path):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Update the prefixes list
|
# Update the prefixes list with sorting
|
||||||
self.prefixes = [d for d in os.listdir(prefixes_path) if os.path.isdir(os.path.join(prefixes_path, d))]
|
self.prefixes = sorted([d for d in os.listdir(prefixes_path) if os.path.isdir(os.path.join(prefixes_path, d))], key=version_sort_key)
|
||||||
self.prefixCombo.clear()
|
self.prefixCombo.clear()
|
||||||
self.prefixCombo.addItems(self.prefixes)
|
self.prefixCombo.addItems(self.prefixes)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user