added ICONS_BUTTON_GUI variable for GUI

This commit is contained in:
Sergey Palcheh
2025-12-04 13:59:54 +06:00
parent eca1905c62
commit dc7a996060

View File

@@ -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()