forked from CastroFidel/winehelper
Merge branch 'minergenon-devel'
This commit is contained in:
@@ -1034,14 +1034,21 @@ class ScriptParser:
|
||||
with open(script_path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# 1. Приоритет у PROG_ICON
|
||||
# 1. Приоритет у переменной ICONS_BUTTON_GUI для GUI
|
||||
for line in lines:
|
||||
if line.strip().startswith('export ICONS_BUTTON_GUI='):
|
||||
icon_names_str = line.split('=', 1)[1].strip().strip('"\'')
|
||||
if icon_names_str:
|
||||
return icon_names_str.split()
|
||||
|
||||
# 2. Если ICONS_BUTTON_GUI не найдена, ищем PROG_ICON (для обратной совместимости)
|
||||
for line in lines:
|
||||
if line.strip().startswith('export PROG_ICON='):
|
||||
icon_name = line.split('=', 1)[1].strip().strip('"\'')
|
||||
if icon_name:
|
||||
return [icon_name]
|
||||
icon_names_str = line.split('=', 1)[1].strip().strip('"\'')
|
||||
if icon_names_str:
|
||||
return icon_names_str.split()
|
||||
|
||||
# 2. Если PROG_ICON не найден, ищем все вызовы create_desktop
|
||||
# 3. Если ничего не найдено, ищем все вызовы create_desktop
|
||||
icon_names = []
|
||||
for line in lines:
|
||||
line = line.strip()
|
||||
@@ -5117,6 +5124,7 @@ class WineHelperGUI(QMainWindow):
|
||||
if exit_code == 0:
|
||||
self.command_log_output.append(f"\n=== Восстановление успешно завершено ===")
|
||||
self.update_installed_apps()
|
||||
self._load_created_prefixes()
|
||||
self.filter_installed_buttons()
|
||||
else:
|
||||
self.command_log_output.append(f"\n=== Ошибка выполнения (код: {exit_code}) ===")
|
||||
|
||||
Reference in New Issue
Block a user