From ec841973f35dd4f5ceb6be903bf64210668c1329 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 9 Feb 2024 09:28:05 +0600 Subject: [PATCH 1/6] Added new boot option --- source/ubl-settings-bootloader.cc | 5 ++++- source/ubl-settings-bootloader.h | 1 + ubl-settings-bootloader.pot | 4 ++++ ubl-settings-bootloader_ru.po | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index b18da4a..09ef392 100644 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -328,6 +328,7 @@ vector>> MainWindow::format_os_list(vector vector MainWindow::pars_os(vector &os_control_list) { string str_list_os = obj_process_call.call_all_sections(cmd_pars_list_os); os_control_list = Utils::split(str_list_os, '\n'); + os_control_list.insert(os_control_list.begin(),LAST_MODE_LABEL); return os_control_list; } string MainWindow::pars_last_launched_os() { @@ -1313,7 +1314,9 @@ void MainWindow::set_data_cfg() { map_cmd_selection["GRUB_TIMEOUT"] = ""; } string name_os = entrListOS->get_text(); - if (name_os.length() != 0) { + if (strstr(name_os.c_str(),LAST_MODE_LABEL)){ + map_cmd_selection["GRUB_DEFAULT"] = ""; + } else if (name_os.length() != 0) { map_cmd_selection["GRUB_DEFAULT"] = name_os; } else { diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index b13f27b..ef84741 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -159,6 +159,7 @@ void me_thread(string cmd); #define str_add_melody _("Melody added") #define str_del_user _("User deleted") #define str_del_melody _("Melody deleted") +#define LAST_MODE_LABEL _("Last succeeded load mode") class View_edit_add_table { private: diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index 820815c..8445b53 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -585,3 +585,7 @@ msgstr "" #: source/ubl-settings-bootloader.cc:450 msgid "Нет анимации загрузки, полный журнал" msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Last succeeded load mode" +msgstr "" \ No newline at end of file diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index 76d8cf1..0282871 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -628,3 +628,7 @@ msgstr "" #~ msgid "Disabled" #~ msgstr "Отключён" + +#: source/ubl-settings-bootloader.h:162 +msgid "Last succeeded load mode" +msgstr "Последний удачный вариант загрузки" \ No newline at end of file From ac64b1e0e97d9e9e6d76d6fb601379f360849681 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 12 Feb 2024 12:01:10 +0600 Subject: [PATCH 2/6] Frames around tree views --- .gitignore | 3 +- ubl-settings-bootloader.glade | 180 ++++++++++++---------------------- 2 files changed, 66 insertions(+), 117 deletions(-) diff --git a/.gitignore b/.gitignore index 2288297..e367c25 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ test.cpp .vscode ubl-settings-bootloader ubl-settings-bootloader_ru.po~ -terminal-commands/ \ No newline at end of file +terminal-commands/ +compile/ \ No newline at end of file diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 591a6d9..4ce5f58 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -435,18 +435,13 @@ True True - 5 - 5 - 5 never - in True False 5 5 - 5 5 @@ -458,6 +453,7 @@ True False vertical + 5 True @@ -468,7 +464,9 @@ True False + 5 5 + 5 True @@ -637,15 +635,13 @@ True False + 5 + 5 + 5 True False - 5 - 5 - 5 - 5 - 5 5 @@ -653,11 +649,19 @@ False vertical - + + True + False + 0 + in + + True True - - + + + + @@ -761,12 +765,6 @@ True False start - 5 - 5 - 5 - 5 - 5 - 5 Boot Menu Users start @@ -782,28 +780,34 @@ True False - 5 0.019999999552965164 in True False + 5 5 + 5 True False - 5 - 5 - 5 5 - + True - True - - + False + 0 + in + + + True + True + + + + @@ -900,12 +904,6 @@ True False start - 5 - 5 - 5 - 5 - 5 - 5 Ringtone at startup start @@ -930,12 +928,6 @@ True False - 5 - 5 - 5 - 5 - 5 - 5 Download menu @@ -975,9 +967,6 @@ True True - - - @@ -1034,12 +1023,6 @@ True False start - 5 - 5 - 5 - 5 - 5 - 5 Parameters passed to the kernel start @@ -1071,11 +1054,19 @@ vertical 5 - + True - True - - + False + 0 + in + + + True + True + + + + @@ -1132,12 +1123,6 @@ True False start - 5 - 5 - 5 - 5 - 5 - 5 Terminal for input start @@ -1169,11 +1154,19 @@ vertical 5 - + True - True - - + False + 0 + in + + + True + True + + + + @@ -1230,12 +1223,6 @@ True False start - 5 - 5 - 5 - 5 - 5 - 5 Terminal for output start @@ -1701,22 +1688,21 @@ True False + 5 + 5 5 + 5 vertical + 5 True False + 5 True False - 5 - 5 - 5 - 5 - 5 - 5 label 0 @@ -1731,12 +1717,6 @@ True True False - 5 - 5 - 5 - 5 - 7 - 5 True @@ -1760,20 +1740,16 @@ True False vertical + 5 True False + 5 True False - 5 - 5 - 5 - 5 - 5 - 5 label 0 @@ -1787,12 +1763,6 @@ True True - 5 - 5 - 5 - 5 - 5 - 5 True @@ -1811,16 +1781,11 @@ True False + 5 True False - 5 - 5 - 5 - 5 - 5 - 5 label 0 @@ -1834,12 +1799,6 @@ True True - 5 - 5 - 5 - 5 - 5 - 5 True @@ -1865,6 +1824,7 @@ True False + 5 True @@ -1882,12 +1842,6 @@ True True True - 5 - 5 - 5 - 5 - 5 - 5 True @@ -1903,12 +1857,6 @@ True True True - 5 - 5 - 5 - 5 - 5 - 5 True From 568c99f4a8492ebf0c38f6d333f8d25a65fabf41 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 12 Feb 2024 12:55:52 +0600 Subject: [PATCH 3/6] Localisation updates --- grub-cmdline-linux.csv | 70 ++++++++--------- grub-play.csv | 4 +- grub-terminal-input.csv | 12 +-- grub-terminal-output.csv | 12 +-- source/util.cc | 2 +- ubl-settings-bootloader.pot | 120 ++++++++++++++++++++++++++++ ubl-settings-bootloader_ru.po | 144 ++++++++++++++++++++++++++++------ 7 files changed, 292 insertions(+), 72 deletions(-) diff --git a/grub-cmdline-linux.csv b/grub-cmdline-linux.csv index e27bec1..db8a5d4 100644 --- a/grub-cmdline-linux.csv +++ b/grub-cmdline-linux.csv @@ -1,35 +1,35 @@ -Option;Description -noplymouth;Disable Plymouth -rd.plymouth=0;Disable Plymouth -plymouth.enable=0;Disable Plymouth -plymouth.debug;Write debug output into /var/log/plymouth-debug.log -acpi=off;Disable ACPI -noapic;Disable APIC -nolapic;Disable local APIC -single;Single User Mode -nomodeset;Disable kernel selection and loading of video drivers -nouveau.modeset=0; enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int) -nouveau.noaccel;disable kernel/abi16 acceleration (int) -i915.modeset=1;Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int) -i915.enable_fbc=0;Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int) -i915.enable_dc=0;Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int) -i915.enable_psr=0;Enable PSR (0=disabled, 1=enabled) (int) -i915.disable_power_well=1;Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int) -i915.enable_ips=N;Enable IPS (default: true) (int) -i915.fastboot=1;Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int) -i915.disable_display=Y;Disable display (default: false) (bool) -i915.enable_guc=0;Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int) -i915.enable_dp_mst=N;Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool) -i915.enable_gvt=Y;Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool) -ahci.marvell_enable=1;Marvell SATA via AHCI (1 = enabled) (int) -ahci.mobile_lpm_policy=1;Default LPM policy for mobile chipsets (default:-1) (int) -snd-intel-dspcfg.dsp_driver=1;Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int) -intel_idle.no_acpi=Y;Do not use ACPI _CST for building the idle states list (default:N) (bool) -intel_idle.use_acpi=Y;Use ACPI _CST for building the idle states list (default:N) (bool) -intel_idle.max_cstate=1;Prevents the processor from going into a deep sleep state (default:9) (int) -intel_idle.max_cstate=2;Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.max_cstate=3;Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.max_cstate=4;Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.states_off=1;Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint) -usbcore.autosuspend=-1;default autosuspend delay (-1=disabled) (int) -modprobe.blacklist=nouveau;Force dont`t load nouveau driver video for Nvidia \ No newline at end of file +Option|Description +noplymouth|Disable Plymouth +rd.plymouth=0|Disable Plymouth +plymouth.enable=0|Disable Plymouth +plymouth.debug|Write debug output into /var/log/plymouth-debug.log +acpi=off|Disable ACPI +noapic|Disable APIC +nolapic|Disable local APIC +single|Single User Mode +nomodeset|Disable kernel selection and loading of video drivers +nouveau.modeset=0|Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int) +nouveau.noaccel|Disable kernel/abi16 acceleration (int) +i915.modeset=1|Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int) +i915.enable_fbc=0|Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int) +i915.enable_dc=0|Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int) +i915.enable_psr=0|Enable PSR (0=disabled, 1=enabled) (int) +i915.disable_power_well=1|Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int) +i915.enable_ips=N|Enable IPS (default: true) (int) +i915.fastboot=1|Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int) +i915.disable_display=Y|Disable display (default: false) (bool) +i915.enable_guc=0|Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int) +i915.enable_dp_mst=N|Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool) +i915.enable_gvt=Y|Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool) +ahci.marvell_enable=1|Marvell SATA via AHCI (1 = enabled) (int) +ahci.mobile_lpm_policy=1|Default LPM policy for mobile chipsets (default:-1) (int) +snd-intel-dspcfg.dsp_driver=1|Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int) +intel_idle.no_acpi=Y|Do not use ACPI _CST for building the idle states list (default:N) (bool) +intel_idle.use_acpi=Y|Use ACPI _CST for building the idle states list (default:N) (bool) +intel_idle.max_cstate=1|Prevents the processor from going into a deep sleep state (default:9) (int) +intel_idle.max_cstate=2|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.max_cstate=3|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.max_cstate=4|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.states_off=1|Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint) +usbcore.autosuspend=-1|Default autosuspend delay (-1=disabled) (int) +modprobe.blacklist=nouveau|Force dont`t load nouveau driver video for Nvidia \ No newline at end of file diff --git a/grub-play.csv b/grub-play.csv index 63cb15d..070f201 100644 --- a/grub-play.csv +++ b/grub-play.csv @@ -1,2 +1,2 @@ -Option;Tone code -ubbeep;480 900 2 1000 2 800 2 400 2 600 3 \ No newline at end of file +Option|Tone code +ubbeep|480 900 2 1000 2 800 2 400 2 600 3 \ No newline at end of file diff --git a/grub-terminal-input.csv b/grub-terminal-input.csv index 98148e6..b2b265b 100644 --- a/grub-terminal-input.csv +++ b/grub-terminal-input.csv @@ -1,6 +1,6 @@ -Option;Description -console;PC BIOS & EFI console -serial;Serial terminal -ofconsole;Open Firmware Console -at_keyboard;PC AT Keyboard (Coreboot) -usb_keyboard;USB Keyboard (HID Boot protocol) +Option|Description +console|PC BIOS & EFI console +serial|Serial terminal +ofconsole|Open Firmware Console +at_keyboard|PC AT Keyboard (Coreboot) +usb_keyboard|USB Keyboard (HID Boot protocol) diff --git a/grub-terminal-output.csv b/grub-terminal-output.csv index e4a86fd..6ffc336 100644 --- a/grub-terminal-output.csv +++ b/grub-terminal-output.csv @@ -1,6 +1,6 @@ -Option;Description -console;PC BIOS & EFI console -serial;Serial terminal -ofconsole;Open Firmware Console -gfxterm;Output in graphical mode -vga_text;VGA text output (Coreboot) +Option|Description +console|PC BIOS & EFI console +serial|Serial terminal +ofconsole|Open Firmware Console +gfxterm|Output in graphical mode +vga_text|VGA text output (Coreboot) diff --git a/source/util.cc b/source/util.cc index 61c7688..86763c9 100644 --- a/source/util.cc +++ b/source/util.cc @@ -8,7 +8,7 @@ array, 5> read_csv(const string& filename) { vector vec_opcision; ifstream file(filename); string line; - char delimiter = ';'; + char delimiter = '|'; getline(file, line); while (getline(file, line)) { stringstream stream(line); diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index 8445b53..e46f96d 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -588,4 +588,124 @@ msgstr "" #: source/ubl-settings-bootloader.h:162 msgid "Last succeeded load mode" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable Plymouth" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Write debug output into /var/log/plymouth-debug.log" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable ACPI" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable APIC" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable local APIC" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Single User Mode" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable kernel selection and loading of video drivers" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "disable kernel/abi16 acceleration (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable PSR (0=disabled, 1=enabled) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable IPS (default: true) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable display (default: false) (bool)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Marvell SATA via AHCI (1 = enabled) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Default LPM policy for mobile chipsets (default:-1) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Do not use ACPI _CST for building the idle states list (default:N) (bool)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Use ACPI _CST for building the idle states list (default:N) (bool)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Prevents the processor from going into a deep sleep state (default:9) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Eliminates flickering laptop display on Ultra Voltage processors (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "default autosuspend delay (-1=disabled) (int)" +msgstr "" + +#: source/ubl-settings-bootloader.h:162 +msgid "Force dont`t load nouveau driver video for Nvidia" msgstr "" \ No newline at end of file diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index 0282871..d58a7f7 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -110,24 +110,6 @@ msgstr "По умолчанию" msgid "Description" msgstr "Описание" -msgid "Disable ACPI" -msgstr "Отключить ACPI" - -msgid "Disable APIC" -msgstr "Отключить APIC" - -msgid "Disable GPU power management" -msgstr "Отключить управление питанием графического процессора" - -msgid "Disable Plymouth" -msgstr "Отключить Plymouth" - -msgid "Disable kernel selection and loading of video drivers" -msgstr "Отключить выбор и загрузку ядром драйверов видео" - -msgid "Disable local APIC" -msgstr "Отключить локальный APIC" - #: source/ubl-settings-bootloader.h:48 source/ubl-settings-bootloader.h:47 #: source/ubl-settings-bootloader.cc:426 source/ubl-settings-bootloader.cc:294 msgid "Download menu" @@ -448,9 +430,6 @@ msgstr "Настройка загрузчика" msgid "Show welcome window" msgstr "Показывать окно приветствия" -msgid "Single User Mode" -msgstr "Режим одного пользователя" - #: source/ubl-settings-bootloader.h:89 source/ubl-settings-bootloader.h:88 #: source/ubl-settings-bootloader.cc:920 source/ubl-settings-bootloader.cc:464 msgid "Successfully saved local and global configuration" @@ -631,4 +610,125 @@ msgstr "" #: source/ubl-settings-bootloader.h:162 msgid "Last succeeded load mode" -msgstr "Последний удачный вариант загрузки" \ No newline at end of file +msgstr "Последний удачный вариант загрузки" + + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable Plymouth" +msgstr "Отключить Плимут" + +#: source/ubl-settings-bootloader.h:162 +msgid "Write debug output into /var/log/plymouth-debug.log" +msgstr "Записать выходные данные отладки в /var/log/plymouth-debug.log" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable ACPI" +msgstr "Отключить ACPI" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable APIC" +msgstr "Отключить APIC" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable local APIC" +msgstr "Отключить локальный APIC" + +#: source/ubl-settings-bootloader.h:162 +msgid "Single User Mode" +msgstr "Однопользовательский режим" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable kernel selection and loading of video drivers" +msgstr "Отключить выбор ядра и загрузку видеодрайверов" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)" +msgstr "Включить драйвер (по умолчанию: авто, 0 = отключено, 1 = включено, 2 = без головы) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable kernel/abi16 acceleration (int)" +msgstr "Отключить ускорение ядра/abi16 (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)" +msgstr "Использовать настройку режима ядра [KMS] (0=отключить, 1=включить, -1=принудительно настроить консоль vga [по умолчанию]) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)" +msgstr "Включить сжатие кадрового буфера для экономии энергии (по умолчанию: -1 (используйте значение по умолчанию для каждого чипа)) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)" +msgstr "Включить энергосберегающее отображение C-состояний. (-1=авто [по умолчанию]; 0=отключить; 1=до DC5; 2=до DC6; 3=до DC5 с DC3CO; 4=до DC6 с DC3CO) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable PSR (0=disabled, 1=enabled) (int)" +msgstr "Включить PSR (0=выключено, 1=включено) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)" +msgstr "Отключить отображение энергетических колодцев, когда это возможно (-1=авто [по умолчанию], 0=энергетические колодцы всегда включены, 1=энергетические колодцы отключены, когда это возможно) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable IPS (default: true) (int)" +msgstr "Включить IPS (по умолчанию: true) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)" +msgstr "Попробовать пропустить ненужные наборы режимов во время загрузки (0=отключено, 1=включено). По умолчанию: -1 (используйте настройки по умолчанию для каждого чипа) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Disable display (default: false) (bool)" +msgstr "Отключить отображение (по умолчанию: false) (bool)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)" +msgstr "Включить загрузку GuC для отправки GuC и/или загрузки HuC. Требуемую функциональность можно выбрать с помощью значений битовой маски. (-1=авто [по умолчанию], 0=отключить, 1=отправка GuC, 2=загрузка HuC) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)" +msgstr "Включить многопотоковую передачу (MST) для новых приемников DisplayPort. (по умолчанию: true) (bool)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool)" +msgstr "Включить поддержку хоста виртуализации графики Intel GVT-g (по умолчанию: false) (bool)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Marvell SATA via AHCI (1 = enabled) (int)" +msgstr "Marvell SATA через AHCI (1 = включено) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Default LPM policy for mobile chipsets (default:-1) (int)" +msgstr "Политика LPM по умолчанию для мобильных чипсетов (по умолчанию:-1) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int)" +msgstr "Принудительно установить драйвер DSP для Intel DSP (0=авто, 1=устаревший, 2=SST, 3=SOF) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Do not use ACPI _CST for building the idle states list (default:N) (bool)" +msgstr "Не использовать ACPI _CST для создания списка состояний простоя (по умолчанию: N) (bool)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Use ACPI _CST for building the idle states list (default:N) (bool)" +msgstr "Используйте ACPI _CST для создания списка состояний простоя (по умолчанию: N) (bool)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Prevents the processor from going into a deep sleep state (default:9) (int)" +msgstr "Предотвращает переход процессора в состояние глубокого сна (по умолчанию: 9) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Eliminates flickering laptop display on Ultra Voltage processors (int)" +msgstr "Устраняет мерцание дисплея ноутбука на процессорах сверхнапряжения (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint)" +msgstr "Маска отключенных состояний простоя (0=отключено, 1=включено) По умолчанию: 0 (uint)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Default autosuspend delay (-1=disabled) (int)" +msgstr "Задержка автоприостановки по умолчанию (-1=отключено) (int)" + +#: source/ubl-settings-bootloader.h:162 +msgid "Force dont`t load nouveau driver video for Nvidia" +msgstr "Принудительно не загружать видео драйвера nouveau для Nvidia" \ No newline at end of file From 21a09b6eeb0d6b4f30b9651964d063191ba848dc Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 12 Feb 2024 17:40:12 +0600 Subject: [PATCH 4/6] Removed types from csv file --- Makefile | 13 +++-- grub-cmdline-linux.csv | 48 +++++++++--------- ubl-settings-bootloader.pot | 44 ++++++++--------- ubl-settings-bootloader_ru.po | 91 +++++++++++++++++------------------ 4 files changed, 99 insertions(+), 97 deletions(-) diff --git a/Makefile b/Makefile index d5eb929..b9e5eb9 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,11 @@ uninstall: @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" + + @$(RM) "${DESTDIR}/usr/share/${PKGNAME}/grub-cmdline-linux.csv" + @$(RM) "${DESTDIR}/usr/share/${PKGNAME}/grub-terminal-input.csv" + @$(RM) "${DESTDIR}/usr/share/${PKGNAME}/grub-terminal-output.csv" + @$(RM) "${DESTDIR}/usr/share/${PKGNAME}/grub-play.csv" @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ @@ -124,10 +129,10 @@ install: check uninstall @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/" grub-cmdline-linux.csv - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/" grub-terminal-input.csv - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/" grub-terminal-output.csv - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/" grub-play.csv + @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/" grub-cmdline-linux.csv + @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/" grub-terminal-input.csv + @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/" grub-terminal-output.csv + @install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/" grub-play.csv @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" @sed -e '\|annotate key=|s|/usr/bin|${PREFIX}/bin|' -e '/action id=/s/\.run/${PKGIDENT}\.run/' -i ${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy @if [ -z ${DESTDIR} ]; then \ diff --git a/grub-cmdline-linux.csv b/grub-cmdline-linux.csv index db8a5d4..f38be53 100644 --- a/grub-cmdline-linux.csv +++ b/grub-cmdline-linux.csv @@ -8,28 +8,28 @@ noapic|Disable APIC nolapic|Disable local APIC single|Single User Mode nomodeset|Disable kernel selection and loading of video drivers -nouveau.modeset=0|Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int) -nouveau.noaccel|Disable kernel/abi16 acceleration (int) -i915.modeset=1|Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int) -i915.enable_fbc=0|Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int) -i915.enable_dc=0|Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int) -i915.enable_psr=0|Enable PSR (0=disabled, 1=enabled) (int) -i915.disable_power_well=1|Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int) -i915.enable_ips=N|Enable IPS (default: true) (int) -i915.fastboot=1|Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int) -i915.disable_display=Y|Disable display (default: false) (bool) -i915.enable_guc=0|Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int) -i915.enable_dp_mst=N|Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool) -i915.enable_gvt=Y|Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool) -ahci.marvell_enable=1|Marvell SATA via AHCI (1 = enabled) (int) -ahci.mobile_lpm_policy=1|Default LPM policy for mobile chipsets (default:-1) (int) -snd-intel-dspcfg.dsp_driver=1|Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int) -intel_idle.no_acpi=Y|Do not use ACPI _CST for building the idle states list (default:N) (bool) -intel_idle.use_acpi=Y|Use ACPI _CST for building the idle states list (default:N) (bool) -intel_idle.max_cstate=1|Prevents the processor from going into a deep sleep state (default:9) (int) -intel_idle.max_cstate=2|Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.max_cstate=3|Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.max_cstate=4|Eliminates flickering laptop display on Ultra Voltage processors (int) -intel_idle.states_off=1|Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint) -usbcore.autosuspend=-1|Default autosuspend delay (-1=disabled) (int) +nouveau.modeset=0|Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) +nouveau.noaccel|Disable kernel/abi16 acceleration +i915.modeset=1|Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) +i915.enable_fbc=0|Enable frame buffer compression for power savings (default: -1 (use per-chip default)) +i915.enable_dc=0|Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) +i915.enable_psr=0|Enable PSR (0=disabled, 1=enabled) +i915.disable_power_well=1|Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) +i915.enable_ips=N|Enable IPS (default: true) +i915.fastboot=1|Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) +i915.disable_display=Y|Disable display (default: false) +i915.enable_guc=0|Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) +i915.enable_dp_mst=N|Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) +i915.enable_gvt=Y|Enable support for Intel GVT-g graphics virtualization host support (default:false) +ahci.marvell_enable=1|Marvell SATA via AHCI (1 = enabled) +ahci.mobile_lpm_policy=1|Default LPM policy for mobile chipsets (default:-1) +snd-intel-dspcfg.dsp_driver=1|Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) +intel_idle.no_acpi=Y|Do not use ACPI _CST for building the idle states list (default:N) +intel_idle.use_acpi=Y|Use ACPI _CST for building the idle states list (default:N) +intel_idle.max_cstate=1|Prevents the processor from going into a deep sleep state (default:9) +intel_idle.max_cstate=2|Eliminates flickering laptop display on Ultra Voltage processors +intel_idle.max_cstate=3|Eliminates flickering laptop display on Ultra Voltage processors +intel_idle.max_cstate=4|Eliminates flickering laptop display on Ultra Voltage processors +intel_idle.states_off=1|Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 +usbcore.autosuspend=-1|Default autosuspend delay (-1=disabled) modprobe.blacklist=nouveau|Force dont`t load nouveau driver video for Nvidia \ No newline at end of file diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index e46f96d..9253897 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -619,91 +619,91 @@ msgid "Disable kernel selection and loading of video drivers" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)" +msgid "enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "disable kernel/abi16 acceleration (int)" +msgid "disable kernel/abi16 acceleration" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)" +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default])" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)" +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default))" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)" +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable PSR (0=disabled, 1=enabled) (int)" +msgid "Enable PSR (0=disabled, 1=enabled)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)" +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable IPS (default: true) (int)" +msgid "Enable IPS (default: true)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)" +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display (default: false) (bool)" +msgid "Disable display (default: false)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)" +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)" +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool)" +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Marvell SATA via AHCI (1 = enabled) (int)" +msgid "Marvell SATA via AHCI (1 = enabled)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Default LPM policy for mobile chipsets (default:-1) (int)" +msgid "Default LPM policy for mobile chipsets (default:-1)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int)" +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Do not use ACPI _CST for building the idle states list (default:N) (bool)" +msgid "Do not use ACPI _CST for building the idle states list (default:N)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Use ACPI _CST for building the idle states list (default:N) (bool)" +msgid "Use ACPI _CST for building the idle states list (default:N)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Prevents the processor from going into a deep sleep state (default:9) (int)" +msgid "Prevents the processor from going into a deep sleep state (default:9)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Eliminates flickering laptop display on Ultra Voltage processors (int)" +msgid "Eliminates flickering laptop display on Ultra Voltage processors" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint)" +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "default autosuspend delay (-1=disabled) (int)" +msgid "default autosuspend delay (-1=disabled)" msgstr "" #: source/ubl-settings-bootloader.h:162 diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index d58a7f7..f835017 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -118,9 +118,6 @@ msgstr "Меню загрузки" msgid "Downloading without text messages" msgstr "Загрузка без текстовых сообщений" -msgid "Eliminates flickering laptop display on Ultra Voltage processors" -msgstr "Устраняет мерцание дисплея ноутбука на процессорах Ultra Voltage" - #: source/ubl-settings-bootloader.h:78 source/ubl-settings-bootloader.h:77 #: source/ubl-settings-bootloader.cc:496 msgid "Enter login" @@ -642,92 +639,92 @@ msgid "Disable kernel selection and loading of video drivers" msgstr "Отключить выбор ядра и загрузку видеодрайверов" #: source/ubl-settings-bootloader.h:162 -msgid "Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)" -msgstr "Включить драйвер (по умолчанию: авто, 0 = отключено, 1 = включено, 2 = без головы) (int)" +msgid "Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless)" +msgstr "Включить драйвер (по умолчанию: авто, 0 = отключено, 1 = включено, 2 = без головы)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable kernel/abi16 acceleration (int)" -msgstr "Отключить ускорение ядра/abi16 (int)" +msgid "Disable kernel/abi16 acceleration" +msgstr "Отключить ускорение ядра/abi16" #: source/ubl-settings-bootloader.h:162 -msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)" -msgstr "Использовать настройку режима ядра [KMS] (0=отключить, 1=включить, -1=принудительно настроить консоль vga [по умолчанию]) (int)" +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default])" +msgstr "Использовать настройку режима ядра [KMS] (0=отключить, 1=включить, -1=принудительно настроить консоль vga [по умолчанию])" #: source/ubl-settings-bootloader.h:162 -msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)" -msgstr "Включить сжатие кадрового буфера для экономии энергии (по умолчанию: -1 (используйте значение по умолчанию для каждого чипа)) (int)" +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default))" +msgstr "Включить сжатие кадрового буфера для экономии энергии (по умолчанию: -1 (используйте значение по умолчанию для каждого чипа))" #: source/ubl-settings-bootloader.h:162 -msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)" -msgstr "Включить энергосберегающее отображение C-состояний. (-1=авто [по умолчанию]; 0=отключить; 1=до DC5; 2=до DC6; 3=до DC5 с DC3CO; 4=до DC6 с DC3CO) (int)" +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO)" +msgstr "Включить энергосберегающее отображение C-состояний. (-1=авто [по умолчанию]; 0=отключить; 1=до DC5; 2=до DC6; 3=до DC5 с DC3CO; 4=до DC6 с DC3CO)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable PSR (0=disabled, 1=enabled) (int)" -msgstr "Включить PSR (0=выключено, 1=включено) (int)" +msgid "Enable PSR (0=disabled, 1=enabled)" +msgstr "Включить PSR (0=выключено, 1=включено)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)" -msgstr "Отключить отображение энергетических колодцев, когда это возможно (-1=авто [по умолчанию], 0=энергетические колодцы всегда включены, 1=энергетические колодцы отключены, когда это возможно) (int)" +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)" +msgstr "Отключить отображение энергетических колодцев, когда это возможно (-1=авто [по умолчанию], 0=энергетические колодцы всегда включены, 1=энергетические колодцы отключены, когда это возможно)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable IPS (default: true) (int)" -msgstr "Включить IPS (по умолчанию: true) (int)" +msgid "Enable IPS (default: true)" +msgstr "Включить IPS (по умолчанию: true)" #: source/ubl-settings-bootloader.h:162 -msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)" -msgstr "Попробовать пропустить ненужные наборы режимов во время загрузки (0=отключено, 1=включено). По умолчанию: -1 (используйте настройки по умолчанию для каждого чипа) (int)" +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default)" +msgstr "Попробовать пропустить ненужные наборы режимов во время загрузки (0=отключено, 1=включено). По умолчанию: -1 (используйте настройки по умолчанию для каждого чипа)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display (default: false) (bool)" -msgstr "Отключить отображение (по умолчанию: false) (bool)" +msgid "Disable display (default: false)" +msgstr "Отключить отображение (по умолчанию: false)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)" -msgstr "Включить загрузку GuC для отправки GuC и/или загрузки HuC. Требуемую функциональность можно выбрать с помощью значений битовой маски. (-1=авто [по умолчанию], 0=отключить, 1=отправка GuC, 2=загрузка HuC) (int)" +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load)" +msgstr "Включить загрузку GuC для отправки GuC и/или загрузки HuC. Требуемую функциональность можно выбрать с помощью значений битовой маски. (-1=авто [по умолчанию], 0=отключить, 1=отправка GuC, 2=загрузка HuC)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)" -msgstr "Включить многопотоковую передачу (MST) для новых приемников DisplayPort. (по умолчанию: true) (bool)" +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" +msgstr "Включить многопотоковую передачу (MST) для новых приемников DisplayPort. (по умолчанию: true)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool)" -msgstr "Включить поддержку хоста виртуализации графики Intel GVT-g (по умолчанию: false) (bool)" +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false)" +msgstr "Включить поддержку хоста виртуализации графики Intel GVT-g (по умолчанию: false)" #: source/ubl-settings-bootloader.h:162 -msgid "Marvell SATA via AHCI (1 = enabled) (int)" -msgstr "Marvell SATA через AHCI (1 = включено) (int)" +msgid "Marvell SATA via AHCI (1 = enabled)" +msgstr "Marvell SATA через AHCI (1 = включено)" #: source/ubl-settings-bootloader.h:162 -msgid "Default LPM policy for mobile chipsets (default:-1) (int)" -msgstr "Политика LPM по умолчанию для мобильных чипсетов (по умолчанию:-1) (int)" +msgid "Default LPM policy for mobile chipsets (default:-1)" +msgstr "Политика LPM по умолчанию для мобильных чипсетов (по умолчанию:-1)" #: source/ubl-settings-bootloader.h:162 -msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int)" -msgstr "Принудительно установить драйвер DSP для Intel DSP (0=авто, 1=устаревший, 2=SST, 3=SOF) (int)" +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF)" +msgstr "Принудительно установить драйвер DSP для Intel DSP (0=авто, 1=устаревший, 2=SST, 3=SOF)" #: source/ubl-settings-bootloader.h:162 -msgid "Do not use ACPI _CST for building the idle states list (default:N) (bool)" -msgstr "Не использовать ACPI _CST для создания списка состояний простоя (по умолчанию: N) (bool)" +msgid "Do not use ACPI _CST for building the idle states list (default:N)" +msgstr "Не использовать ACPI _CST для создания списка состояний простоя (по умолчанию: N)" #: source/ubl-settings-bootloader.h:162 -msgid "Use ACPI _CST for building the idle states list (default:N) (bool)" -msgstr "Используйте ACPI _CST для создания списка состояний простоя (по умолчанию: N) (bool)" +msgid "Use ACPI _CST for building the idle states list (default:N)" +msgstr "Используйте ACPI _CST для создания списка состояний простоя (по умолчанию: N)" #: source/ubl-settings-bootloader.h:162 -msgid "Prevents the processor from going into a deep sleep state (default:9) (int)" -msgstr "Предотвращает переход процессора в состояние глубокого сна (по умолчанию: 9) (int)" +msgid "Prevents the processor from going into a deep sleep state (default:9)" +msgstr "Предотвращает переход процессора в состояние глубокого сна (по умолчанию: 9)" #: source/ubl-settings-bootloader.h:162 -msgid "Eliminates flickering laptop display on Ultra Voltage processors (int)" -msgstr "Устраняет мерцание дисплея ноутбука на процессорах сверхнапряжения (int)" +msgid "Eliminates flickering laptop display on Ultra Voltage processors" +msgstr "Устраняет мерцание дисплея ноутбука на процессорах сверхнапряжения" #: source/ubl-settings-bootloader.h:162 -msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint)" -msgstr "Маска отключенных состояний простоя (0=отключено, 1=включено) По умолчанию: 0 (uint)" +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0" +msgstr "Маска отключенных состояний простоя (0=отключено, 1=включено) По умолчанию: 0" #: source/ubl-settings-bootloader.h:162 -msgid "Default autosuspend delay (-1=disabled) (int)" -msgstr "Задержка автоприостановки по умолчанию (-1=отключено) (int)" +msgid "Default autosuspend delay (-1=disabled)" +msgstr "Задержка автоприостановки по умолчанию (-1=отключено)" #: source/ubl-settings-bootloader.h:162 msgid "Force dont`t load nouveau driver video for Nvidia" From a27ec72f5b81772699633ea70d93fabaf58d9adc Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 13 Feb 2024 12:45:08 +0600 Subject: [PATCH 5/6] Localisation revertion, fixes, window size and position saving --- grub-cmdline-linux.csv | 48 ++--- source/main.cc | 3 + source/ubl-settings-bootloader.cc | 3 + source/ubl-settings-bootloader.h | 2 + source/util.cc | 328 +++++++++++++++++++++++++++++- source/util.h | 89 +++++++- ubl-settings-bootloader.pot | 44 ++-- ubl-settings-bootloader_ru.po | 91 +++++---- 8 files changed, 516 insertions(+), 92 deletions(-) diff --git a/grub-cmdline-linux.csv b/grub-cmdline-linux.csv index f38be53..db8a5d4 100644 --- a/grub-cmdline-linux.csv +++ b/grub-cmdline-linux.csv @@ -8,28 +8,28 @@ noapic|Disable APIC nolapic|Disable local APIC single|Single User Mode nomodeset|Disable kernel selection and loading of video drivers -nouveau.modeset=0|Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) -nouveau.noaccel|Disable kernel/abi16 acceleration -i915.modeset=1|Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) -i915.enable_fbc=0|Enable frame buffer compression for power savings (default: -1 (use per-chip default)) -i915.enable_dc=0|Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) -i915.enable_psr=0|Enable PSR (0=disabled, 1=enabled) -i915.disable_power_well=1|Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) -i915.enable_ips=N|Enable IPS (default: true) -i915.fastboot=1|Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) -i915.disable_display=Y|Disable display (default: false) -i915.enable_guc=0|Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) -i915.enable_dp_mst=N|Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) -i915.enable_gvt=Y|Enable support for Intel GVT-g graphics virtualization host support (default:false) -ahci.marvell_enable=1|Marvell SATA via AHCI (1 = enabled) -ahci.mobile_lpm_policy=1|Default LPM policy for mobile chipsets (default:-1) -snd-intel-dspcfg.dsp_driver=1|Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) -intel_idle.no_acpi=Y|Do not use ACPI _CST for building the idle states list (default:N) -intel_idle.use_acpi=Y|Use ACPI _CST for building the idle states list (default:N) -intel_idle.max_cstate=1|Prevents the processor from going into a deep sleep state (default:9) -intel_idle.max_cstate=2|Eliminates flickering laptop display on Ultra Voltage processors -intel_idle.max_cstate=3|Eliminates flickering laptop display on Ultra Voltage processors -intel_idle.max_cstate=4|Eliminates flickering laptop display on Ultra Voltage processors -intel_idle.states_off=1|Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 -usbcore.autosuspend=-1|Default autosuspend delay (-1=disabled) +nouveau.modeset=0|Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int) +nouveau.noaccel|Disable kernel/abi16 acceleration (int) +i915.modeset=1|Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int) +i915.enable_fbc=0|Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int) +i915.enable_dc=0|Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int) +i915.enable_psr=0|Enable PSR (0=disabled, 1=enabled) (int) +i915.disable_power_well=1|Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int) +i915.enable_ips=N|Enable IPS (default: true) (int) +i915.fastboot=1|Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int) +i915.disable_display=Y|Disable display (default: false) (bool) +i915.enable_guc=0|Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int) +i915.enable_dp_mst=N|Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool) +i915.enable_gvt=Y|Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool) +ahci.marvell_enable=1|Marvell SATA via AHCI (1 = enabled) (int) +ahci.mobile_lpm_policy=1|Default LPM policy for mobile chipsets (default:-1) (int) +snd-intel-dspcfg.dsp_driver=1|Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int) +intel_idle.no_acpi=Y|Do not use ACPI _CST for building the idle states list (default:N) (bool) +intel_idle.use_acpi=Y|Use ACPI _CST for building the idle states list (default:N) (bool) +intel_idle.max_cstate=1|Prevents the processor from going into a deep sleep state (default:9) (int) +intel_idle.max_cstate=2|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.max_cstate=3|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.max_cstate=4|Eliminates flickering laptop display on Ultra Voltage processors (int) +intel_idle.states_off=1|Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint) +usbcore.autosuspend=-1|Default autosuspend delay (-1=disabled) (int) modprobe.blacklist=nouveau|Force dont`t load nouveau driver video for Nvidia \ No newline at end of file diff --git a/source/main.cc b/source/main.cc index 1c54a46..7ebc421 100644 --- a/source/main.cc +++ b/source/main.cc @@ -47,6 +47,9 @@ int main(int argc, char** argv) { pars_flag(1, argc, argv); MainWindow* wnd = nullptr; builder->get_widget_derived("window", wnd); + GObject *window_obj = G_OBJECT(wnd->gobj()); + Utils::yon_window_config_setup(GTK_WINDOW(window_obj)); + Utils::yon_window_config_load(ui_config_path); wnd->settings(); wnd->event(); wnd->set_menu_os_to_button(); diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 09ef392..5c73499 100644 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -45,6 +45,9 @@ SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr build : Gtk::Plug{p_socketID} { MainWindow* wnd = nullptr; builder->get_widget_derived("window", wnd); + GObject *window_obj = G_OBJECT(wnd->gobj()); + Utils::yon_window_config_setup(GTK_WINDOW(window_obj)); + Utils::yon_window_config_load(ui_config_path); builder->get_widget("plugBox", plugBox); wnd->settings(); wnd->set_plug(plugBox); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index ef84741..fdc91af 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -151,6 +151,8 @@ void me_thread(string cmd); #define app_name "ubl-settings-bootloader" #define path_resources "/usr/share/ubl-settings-bootloader" #define path_img_head_background "/com/ublinux/images/ubl-settings-bootloader-banner.png" +#define ui_config_path Utils::yon_char_unite(Utils::yon_ubl_user_get_home_directory(),"/.config/",app_name,"/",app_name,".conf",NULL) + #define cmd_pars_list_os "/usr/lib/ublinux/scripts/grub-functions exec_get_all_menuentry" #define cmd_last_launched_os "/usr/lib/ublinux/scripts/grub-functions exec_get_last_menuentry" #define info_box_ok_css "boxInfoMessOK" diff --git a/source/util.cc b/source/util.cc index 86763c9..9d06718 100644 --- a/source/util.cc +++ b/source/util.cc @@ -62,7 +62,7 @@ vector> read_csv_melody(const string& filename) { vector> vec_music; ifstream file(filename); string line; - char delimiter = ';'; + char delimiter = '|'; getline(file, line); while (getline(file, line)) { stringstream stream(line); @@ -131,4 +131,330 @@ std::vector split(std::string text, char delim) { return vec; } + +char *yon_char_new(char *chr) +{ + if (chr){ + char *newchar = (char*)malloc(strlen(chr) + 1); + memset(newchar, 0, strlen(chr) + 1); + memcpy(newchar, chr, strlen(chr)); + return newchar; + } else + return NULL; +} + +char *yon_char_append(char *source, char *append) +{ + if (source && append) + { + int size = strlen(source) + strlen(append) + 1; + char *final = (char*)malloc(size); + memset(final, 0, size); + // if (strstr(source, "%%")) + // sprintf(final, source, append); + // else + sprintf(final, "%s%s", source, append); + return final; + } + else + return NULL; +} + +char *yon_char_unite(char *source, ...){ + va_list arglist; + char *new_char=NULL; + char *unite_char=NULL; + new_char=yon_char_new(source); + va_start(arglist,source); + unite_char = va_arg(arglist,char*); + while(unite_char){ + new_char = yon_char_append(new_char,unite_char); + unite_char = va_arg(arglist,char*); + } + va_end(arglist); + return new_char; +} + +char *yon_char_divide(char *source, int dividepos) +{ + if (source&&(int)strlen(source)>=dividepos){ + char *cut = (char*)malloc(dividepos + 1); + memset(cut, 0, dividepos + 1); + memcpy(cut, source, dividepos); + char *left = (char*)malloc(strlen(source) - strlen(cut)); + memset(left, 0, strlen(source) - strlen(cut)); + memcpy(left, source + dividepos + 1, (strlen(source) - dividepos)); + memset(source, 0, strlen(source)); + memcpy(source, left, strlen(left)); + return cut; + } + return NULL; +} + +char *yon_char_divide_search(char *source, char *dividepos, int delete_divider) +{ + if (delete_divider){}; + if (source&÷pos){ + char *cut = strstr(source, dividepos); + if (cut) + { + int leng = strlen(source) - strlen(cut); + cut = yon_char_divide(source, leng); + return cut; + } + } + return source; +} + +char **yon_char_parse(char *parameters, int *size, char *divider){ + *size=0; + if (parameters){ + char **string=NULL; + char *paramline=yon_char_new(parameters); + char *param = strstr(paramline,divider); + for (;param;param=strstr(paramline,divider)){ + string = (!string) ? (char **)malloc(sizeof(char*)*((*size)+1)) : (char **)realloc(string, sizeof(char*)*((*size)+1)); + string[(*size)]=yon_char_divide(paramline,strlen(paramline)-strlen(param)); + *size=(*size)+1; + } + string = (!string) ? (char **)malloc(sizeof(char*)*((*size)+1)) : (char **)realloc(string, sizeof(char*)*((*size)+1)); + string[(*size)]=paramline; + (*size)+=1; + return string; + } + return NULL; +} + + #define check_window_config_setup if(__yon_window_config_target_window) + + typedef struct { + char *parameter_name; + enum YON_TYPE containing_type; + GtkWidget *track_widget; + char *property_name; + } __yon_listener_parameter; + + typedef struct { + char *parameter_name; + char *section; + enum YON_TYPE containing_type; + void *property; + } __yon_custom_parameter; + + struct { + int x; + int y; + int width; + int height; + int fullscreen; + dictionary *custom_listeners; + dictionary *custom_parameters; + dictionary *deleted_parameters; + } __yon_main_window_config; + + static GtkWindow *__yon_window_config_target_window = NULL; + static GKeyFile *__yon_window_config_file = NULL; + static char *__yon_window_config_path = NULL; + + void yon_window_config_save(); + void yon_window_config_save(){ + g_key_file_set_integer(__yon_window_config_file,"window","WindowPosX",__yon_main_window_config.x); + g_key_file_set_integer(__yon_window_config_file,"window","WindowPosY",__yon_main_window_config.y); + g_key_file_set_integer(__yon_window_config_file,"window","WindowWidth",__yon_main_window_config.width); + g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height); + g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen); + dictionary *dict=NULL; + if (__yon_main_window_config.deleted_parameters) + for_dictionaries(dict,__yon_main_window_config.deleted_parameters){ + __yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*); + g_key_file_remove_key(__yon_window_config_file,param->section,param->parameter_name,NULL); + } + if (__yon_main_window_config.custom_listeners) + for_dictionaries(dict,__yon_main_window_config.custom_listeners){ + __yon_listener_parameter *param = yon_dictionary_get_data(dict,__yon_listener_parameter*); + GValue *val = (GValue*)g_malloc0(sizeof(GValue)); + g_object_get_property(G_OBJECT(param->track_widget),param->property_name,val); + switch(param->containing_type){ + case YON_TYPE_STRING: + g_key_file_set_string(__yon_window_config_file,"window",param->parameter_name, g_value_get_string(val)); + break; + case YON_TYPE_INT: + g_key_file_set_integer(__yon_window_config_file,"window",param->parameter_name, g_value_get_int(val)); + break; + case YON_TYPE_BOOLEAN: + g_key_file_set_boolean(__yon_window_config_file,"window",param->parameter_name, g_value_get_boolean(val)); + break; + case YON_TYPE_STRING_LIST:break; + case YON_TYPE_OTHER:printf("\033[0;31mCannot save %s property with %s key\033[0m\n",param->property_name,param->parameter_name);break; + } + } + if (__yon_main_window_config.custom_parameters) + for_dictionaries(dict,__yon_main_window_config.custom_parameters){ + __yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*); + switch (param->containing_type){ + case YON_TYPE_STRING: + g_key_file_set_string(__yon_window_config_file,param->section,param->parameter_name, (char*)param->property); + break; + case YON_TYPE_INT: + g_key_file_set_integer(__yon_window_config_file,param->section,param->parameter_name, *(int*)param->property); + break; + case YON_TYPE_BOOLEAN: + g_key_file_set_boolean(__yon_window_config_file,param->section,param->parameter_name, *(gboolean*)param->property); + break; + case YON_TYPE_STRING_LIST:break; + default: + break; + } + } + + g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL); + } + + void yon_get_is_fullscreen(); + void yon_get_is_fullscreen(){ + gtk_window_is_maximized(__yon_window_config_target_window); + __yon_main_window_config.fullscreen = gtk_window_is_maximized(__yon_window_config_target_window); + if (!__yon_main_window_config.fullscreen) gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y); + } + + /**yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event) + * [EN] + * + * [RU] + * Сохраняет настройки основного окна. Вызывается когда основное окно уничтожается. + */ + void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event); + void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event){ + if (self&&event){}; + check_window_config_setup{ + yon_get_is_fullscreen(); + yon_window_config_save(); + } + gtk_main_quit(); + } + + void __yon_window_config_on_resize(); + void __yon_window_config_on_resize(){ + int max=0; + max=gtk_window_is_maximized(__yon_window_config_target_window); + if(max==0){ + gtk_window_get_size(__yon_window_config_target_window,&__yon_main_window_config.width,&__yon_main_window_config.height); + gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y); + } + } + + void yon_window_config_setup(GtkWindow *window){ + __yon_window_config_target_window = window; + g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL); + g_signal_connect(G_OBJECT(window),"check-resize"/*"configure-event"*/,G_CALLBACK(__yon_window_config_on_resize),NULL); + } + + void *_yon_maximize(void *data); + void *_yon_maximize(void *data){ + if (data){}; + g_usleep(G_USEC_PER_SEC/10); + if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window); + return NULL; + } + + int yon_window_config_load(char *path){ + __yon_window_config_file = g_key_file_new(); + __yon_window_config_path=yon_char_new(path); + if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){ + struct stat st; + int size; + config_str conf = yon_char_parse(yon_char_new(__yon_window_config_path),&size,(char*)"/"); + char *path = yon_char_unite(conf[0],(char*)"/",conf[1],(char*)"/",conf[2],(char*)"/",conf[3],(char*)"/",conf[4],(char*)"/",NULL); + if (stat(path, &st) == -1) { + mkdir(path, 0777); + } + FILE *fp; + fp=fopen(__yon_window_config_path,"w"); + chmod(__yon_window_config_path,0777); + fclose(fp); + g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL); + } + __yon_main_window_config.x = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosX",NULL); + __yon_main_window_config.y = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosY",NULL); + __yon_main_window_config.width = g_key_file_get_integer(__yon_window_config_file,"window","WindowWidth",NULL); + __yon_main_window_config.height = g_key_file_get_integer(__yon_window_config_file,"window","WindowHeight",NULL); + __yon_main_window_config.fullscreen = g_key_file_get_integer(__yon_window_config_file,"window","fullscreen",NULL); + dictionary *dict=NULL; + if (__yon_main_window_config.custom_listeners) + for_dictionaries(dict,__yon_main_window_config.custom_listeners){ + __yon_listener_parameter *param = yon_dictionary_get_data(dict,__yon_listener_parameter*); + GValue *val = (GValue*)g_malloc0(sizeof(GValue)); + g_object_get_property(G_OBJECT(param->track_widget),param->property_name,val); + gboolean res=0; + switch(param->containing_type){ + case YON_TYPE_STRING: + g_value_set_string(val,g_key_file_get_string(__yon_window_config_file,"window",param->parameter_name, NULL)); + break; + case YON_TYPE_INT: + g_value_set_int(val,g_key_file_get_integer(__yon_window_config_file,"window",param->parameter_name, NULL)); + break; + case YON_TYPE_BOOLEAN: + res = g_key_file_get_boolean(__yon_window_config_file,"window",param->parameter_name, NULL); + g_value_set_boolean(val,res); + break; + case YON_TYPE_STRING_LIST:break; + case YON_TYPE_OTHER:break; + } + g_object_set_property(G_OBJECT(param->track_widget),param->property_name,val); + } + if (__yon_main_window_config.width==0) __yon_main_window_config.width=800; + if (__yon_main_window_config.height==0) __yon_main_window_config.height=600; + gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); + gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y); + pthread_t tid; + pthread_create(&tid, NULL, (&_yon_maximize), NULL); + + return 1; + } + +void yon_window_config_apply(); + void yon_window_config_apply(){ + gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y); + gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); + } + + config_str yon_window_config_get_section(char *section, gsize *size){ + config_str key = g_key_file_get_keys(__yon_window_config_file,section,size,NULL); + return key; + } + +char *yon_ubl_user_get_home_directory(){ + FILE *path = popen(get_home_dir_command,"r"); + char *ret = (char*)malloc(4096); + memset(ret,0,4096); + if (fgets(ret,4096,path)){ + ret=yon_char_divide_search(ret,(char*)"\n",-1); + return ret; + } else return NULL; +} + + +char *yon_ubl_root_user_get(){ + char *user=NULL; + if (yon_ubl_check_root()){ + user=getenv("SUDO_USER"); + if (user&&strcmp(user,"")!=0){ + return user; + }else { + FILE *file = popen("getent passwd $PKEXEC_UID | cut -d: -f1","r"); + user=(char*)malloc(4096); + memset(user,0,4096); + if (fgets(user,4096,file)){ + user=yon_char_divide_search(user,(char*)"\n",-1); + if (user) return user; + } else return NULL; + } + } + return getlogin(); +} + +int yon_ubl_check_root(){ + if (getuid()==0) return 1; + else return 0; +} } \ No newline at end of file diff --git a/source/util.h b/source/util.h index 0267564..71e6b74 100644 --- a/source/util.h +++ b/source/util.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -24,10 +23,16 @@ #include #include #include +#include +#include using namespace std; namespace Utils { + + +#define get_home_dir_command yon_char_unite((char*)"getent passwd \"",yon_ubl_root_user_get(),(char*)"\" | cut -d: -f6",NULL) + template struct Result{ Type response; @@ -47,5 +52,87 @@ void str_replace_all(string &str_base, string str_find, string str_replace); std::vector split(std::string text, char delim); vector> read_csv_melody(const string& filename); void write_file(string path_name, string data); + +#define for_dictionaries(element, stack) for (element = stack->first; element != NULL; element = element->next) +#define yon_dictionary_get_data(dictionary, type) ((type)dictionary->data) + +typedef enum +{ + DICTIONARY_GTK_WIDGETS_TYPE, + DICTIONARY_OTHER_TYPE=0, + DICTIONARY_CHAR_TYPE, + DICTIONARY_INT_TYPE, + DICTIONARY_BOOL_TYPE, + +} DICT_TYPE; + +typedef struct dictionary +{ + char *key; + void *data; + struct dictionary *next; + struct dictionary *prev; + struct dictionary *first; + DICT_TYPE data_type; +} dictionary; + +typedef char** config_str; + +char *yon_char_divide(char *source, int dividepos); + +char *yon_char_divide_search(char *source, char *dividepos, int delete_divider); + +char *yon_char_new(char *chr); + +char *yon_char_append(char *source, char *append); + +char *yon_char_unite(char *source, ...); + +char **yon_char_parse(char *parameters, int *size, char *divider); + +/**YON_TYPE + * [EN] + * + * [RU] + * Типы, поддерживаемые функциями сохранения/загрузки конфигурации утилиты +*/ +enum YON_TYPE{ + YON_TYPE_STRING, + YON_TYPE_STRING_LIST, + YON_TYPE_INT, + YON_TYPE_BOOLEAN, + YON_TYPE_OTHER}; + +/**yon_window_config_setup(GtkWindow *window) + * [EN] + * + * [RU] + * Устанавливает указатель на окно для отслеживания его положения и размера +*/ +void yon_window_config_setup(GtkWindow *window); + +/**yon_window_config_load(char *path) + * [EN] + * + * [RU] + * Загружает конфиг окна и инициализирует отслеживание его параметров +*/ +int yon_window_config_load(char *path); + +/**yon_window_config_get_section(char *section, gsize *size) + * [EN] + * + * [RU] + * Возвращает все параметры раздела [section] конфига утилиты и записывает в [size] количество считанных параметров. +*/ +config_str yon_window_config_get_section(char *section, gsize *size); + + +char *yon_ubl_user_get_home_directory(); + +char *yon_ubl_root_user_get(); + + +int yon_ubl_check_root(); } #endif \ No newline at end of file diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index 9253897..e46f96d 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -619,91 +619,91 @@ msgid "Disable kernel selection and loading of video drivers" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless)" +msgid "enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "disable kernel/abi16 acceleration" +msgid "disable kernel/abi16 acceleration (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default])" +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default))" +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO)" +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable PSR (0=disabled, 1=enabled)" +msgid "Enable PSR (0=disabled, 1=enabled) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)" +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable IPS (default: true)" +msgid "Enable IPS (default: true) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default)" +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display (default: false)" +msgid "Disable display (default: false) (bool)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load)" +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false)" +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (bool)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Marvell SATA via AHCI (1 = enabled)" +msgid "Marvell SATA via AHCI (1 = enabled) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Default LPM policy for mobile chipsets (default:-1)" +msgid "Default LPM policy for mobile chipsets (default:-1) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF)" +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Do not use ACPI _CST for building the idle states list (default:N)" +msgid "Do not use ACPI _CST for building the idle states list (default:N) (bool)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Use ACPI _CST for building the idle states list (default:N)" +msgid "Use ACPI _CST for building the idle states list (default:N) (bool)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Prevents the processor from going into a deep sleep state (default:9)" +msgid "Prevents the processor from going into a deep sleep state (default:9) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Eliminates flickering laptop display on Ultra Voltage processors" +msgid "Eliminates flickering laptop display on Ultra Voltage processors (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0" +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (uint)" msgstr "" #: source/ubl-settings-bootloader.h:162 -msgid "default autosuspend delay (-1=disabled)" +msgid "default autosuspend delay (-1=disabled) (int)" msgstr "" #: source/ubl-settings-bootloader.h:162 diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index f835017..ea25bf0 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -118,6 +118,9 @@ msgstr "Меню загрузки" msgid "Downloading without text messages" msgstr "Загрузка без текстовых сообщений" +msgid "Eliminates flickering laptop display on Ultra Voltage processors" +msgstr "Устраняет мерцание дисплея ноутбука на процессорах Ultra Voltage" + #: source/ubl-settings-bootloader.h:78 source/ubl-settings-bootloader.h:77 #: source/ubl-settings-bootloader.cc:496 msgid "Enter login" @@ -639,92 +642,92 @@ msgid "Disable kernel selection and loading of video drivers" msgstr "Отключить выбор ядра и загрузку видеодрайверов" #: source/ubl-settings-bootloader.h:162 -msgid "Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless)" -msgstr "Включить драйвер (по умолчанию: авто, 0 = отключено, 1 = включено, 2 = без головы)" +msgid "Enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (целочисленное)" +msgstr "Включить драйвер (по умолчанию: авто, 0 = отключено, 1 = включено, 2 = без головы) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable kernel/abi16 acceleration" -msgstr "Отключить ускорение ядра/abi16" +msgid "Disable kernel/abi16 acceleration (целочисленное)" +msgstr "Отключить ускорение ядра/abi16 (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default])" -msgstr "Использовать настройку режима ядра [KMS] (0=отключить, 1=включить, -1=принудительно настроить консоль vga [по умолчанию])" +msgid "Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (целочисленное)" +msgstr "Использовать настройку режима ядра [KMS] (0=отключить, 1=включить, -1=принудительно настроить консоль vga [по умолчанию]) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default))" -msgstr "Включить сжатие кадрового буфера для экономии энергии (по умолчанию: -1 (используйте значение по умолчанию для каждого чипа))" +msgid "Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (целочисленное)" +msgstr "Включить сжатие кадрового буфера для экономии энергии (по умолчанию: -1 (используйте значение по умолчанию для каждого чипа)) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO)" -msgstr "Включить энергосберегающее отображение C-состояний. (-1=авто [по умолчанию]; 0=отключить; 1=до DC5; 2=до DC6; 3=до DC5 с DC3CO; 4=до DC6 с DC3CO)" +msgid "Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO) (целочисленное)" +msgstr "Включить энергосберегающее отображение C-состояний. (-1=авто [по умолчанию]; 0=отключить; 1=до DC5; 2=до DC6; 3=до DC5 с DC3CO; 4=до DC6 с DC3CO) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable PSR (0=disabled, 1=enabled)" -msgstr "Включить PSR (0=выключено, 1=включено)" +msgid "Enable PSR (0=disabled, 1=enabled) (целочисленное)" +msgstr "Включить PSR (0=выключено, 1=включено) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)" -msgstr "Отключить отображение энергетических колодцев, когда это возможно (-1=авто [по умолчанию], 0=энергетические колодцы всегда включены, 1=энергетические колодцы отключены, когда это возможно)" +msgid "Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (целочисленное)" +msgstr "Отключить отображение энергетических колодцев, когда это возможно (-1=авто [по умолчанию], 0=энергетические колодцы всегда включены, 1=энергетические колодцы отключены, когда это возможно) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable IPS (default: true)" -msgstr "Включить IPS (по умолчанию: true)" +msgid "Enable IPS (default: true) (целочисленное)" +msgstr "Включить IPS (по умолчанию: true) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default)" -msgstr "Попробовать пропустить ненужные наборы режимов во время загрузки (0=отключено, 1=включено). По умолчанию: -1 (используйте настройки по умолчанию для каждого чипа)" +msgid "Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (целочисленное)" +msgstr "Попробовать пропустить ненужные наборы режимов во время загрузки (0=отключено, 1=включено). По умолчанию: -1 (используйте настройки по умолчанию для каждого чипа) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Disable display (default: false)" -msgstr "Отключить отображение (по умолчанию: false)" +msgid "Disable display (default: false) (логическое значение)" +msgstr "Отключить отображение (по умолчанию: false) (логическое значение)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load)" -msgstr "Включить загрузку GuC для отправки GuC и/или загрузки HuC. Требуемую функциональность можно выбрать с помощью значений битовой маски. (-1=авто [по умолчанию], 0=отключить, 1=отправка GuC, 2=загрузка HuC)" +msgid "Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (целочисленное)" +msgstr "Включить загрузку GuC для отправки GuC и/или загрузки HuC. Требуемую функциональность можно выбрать с помощью значений битовой маски. (-1=авто [по умолчанию], 0=отключить, 1=отправка GuC, 2=загрузка HuC) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)" -msgstr "Включить многопотоковую передачу (MST) для новых приемников DisplayPort. (по умолчанию: true)" +msgid "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (логическое значение)" +msgstr "Включить многопотоковую передачу (MST) для новых приемников DisplayPort. (по умолчанию: true) (логическое значение)" #: source/ubl-settings-bootloader.h:162 -msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false)" -msgstr "Включить поддержку хоста виртуализации графики Intel GVT-g (по умолчанию: false)" +msgid "Enable support for Intel GVT-g graphics virtualization host support (default:false) (логическое значение)" +msgstr "Включить поддержку хоста виртуализации графики Intel GVT-g (по умолчанию: false) (логическое значение)" #: source/ubl-settings-bootloader.h:162 -msgid "Marvell SATA via AHCI (1 = enabled)" -msgstr "Marvell SATA через AHCI (1 = включено)" +msgid "Marvell SATA via AHCI (1 = enabled) (целочисленное)" +msgstr "Marvell SATA через AHCI (1 = включено) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Default LPM policy for mobile chipsets (default:-1)" -msgstr "Политика LPM по умолчанию для мобильных чипсетов (по умолчанию:-1)" +msgid "Default LPM policy for mobile chipsets (default:-1) (целочисленное)" +msgstr "Политика LPM по умолчанию для мобильных чипсетов (по умолчанию:-1) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF)" -msgstr "Принудительно установить драйвер DSP для Intel DSP (0=авто, 1=устаревший, 2=SST, 3=SOF)" +msgid "Force the DSP driver for Intel DSP (0=auto, 1=legacy, 2=SST, 3=SOF) (целочисленное)" +msgstr "Принудительно установить драйвер DSP для Intel DSP (0=авто, 1=устаревший, 2=SST, 3=SOF) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Do not use ACPI _CST for building the idle states list (default:N)" -msgstr "Не использовать ACPI _CST для создания списка состояний простоя (по умолчанию: N)" +msgid "Do not use ACPI _CST for building the idle states list (default:N) (логическое значение)" +msgstr "Не использовать ACPI _CST для создания списка состояний простоя (по умолчанию: N) (логическое значение)" #: source/ubl-settings-bootloader.h:162 -msgid "Use ACPI _CST for building the idle states list (default:N)" -msgstr "Используйте ACPI _CST для создания списка состояний простоя (по умолчанию: N)" +msgid "Use ACPI _CST for building the idle states list (default:N) (логическое значение)" +msgstr "Используйте ACPI _CST для создания списка состояний простоя (по умолчанию: N) (логическое значение)" #: source/ubl-settings-bootloader.h:162 -msgid "Prevents the processor from going into a deep sleep state (default:9)" -msgstr "Предотвращает переход процессора в состояние глубокого сна (по умолчанию: 9)" +msgid "Prevents the processor from going into a deep sleep state (default:9) (целочисленное)" +msgstr "Предотвращает переход процессора в состояние глубокого сна (по умолчанию: 9) (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Eliminates flickering laptop display on Ultra Voltage processors" -msgstr "Устраняет мерцание дисплея ноутбука на процессорах сверхнапряжения" +msgid "Eliminates flickering laptop display on Ultra Voltage processors (целочисленное)" +msgstr "Устраняет мерцание дисплея ноутбука на процессорах сверхнапряжения (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0" -msgstr "Маска отключенных состояний простоя (0=отключено, 1=включено) По умолчанию: 0" +msgid "Mask of disabled idle states (0=disabled, 1=enabled) Default: 0 (целочисленное)" +msgstr "Маска отключенных состояний простоя (0=отключено, 1=включено) По умолчанию: 0 (целочисленное)" #: source/ubl-settings-bootloader.h:162 -msgid "Default autosuspend delay (-1=disabled)" -msgstr "Задержка автоприостановки по умолчанию (-1=отключено)" +msgid "Default autosuspend delay (-1=disabled) (целочисленное)" +msgstr "Задержка автоприостановки по умолчанию (-1=отключено) (целочисленное)" #: source/ubl-settings-bootloader.h:162 msgid "Force dont`t load nouveau driver video for Nvidia" From 2b89281bb9219230a9b91af5a60ab8e384790120 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 13 Feb 2024 15:55:47 +0600 Subject: [PATCH 6/6] Crash after exiting fix --- source/util.cc | 2 +- source/util.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/util.cc b/source/util.cc index 9d06718..5b51b5c 100644 --- a/source/util.cc +++ b/source/util.cc @@ -330,7 +330,7 @@ char **yon_char_parse(char *parameters, int *size, char *divider){ yon_get_is_fullscreen(); yon_window_config_save(); } - gtk_main_quit(); + exit(0); } void __yon_window_config_on_resize(); diff --git a/source/util.h b/source/util.h index 71e6b74..8c614aa 100644 --- a/source/util.h +++ b/source/util.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include