From becde5183886b4399bf237bdb145e599a5498a73 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 09:30:38 +0600 Subject: [PATCH 01/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- cmdline-linux.csv => grub-cmdline-linux.csv | 0 grub-melodylist.csv => grub-play.csv | 0 source/ubl-settings-bootloader.cc | 4 ++-- source/ubl-settings-bootloader.h | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) rename cmdline-linux.csv => grub-cmdline-linux.csv (100%) rename grub-melodylist.csv => grub-play.csv (100%) diff --git a/Makefile b/Makefile index cf46ddb..eaaad3a 100644 --- a/Makefile +++ b/Makefile @@ -123,10 +123,10 @@ install: check uninstall @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "logo-background.png" @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 /usr/share/${PKGNAME}/ cmdline-linux.csv + @install -Dm644 -t /usr/share/${PKGNAME}/ grub-cmdline-linux.csv @install -Dm644 -t /usr/share/${PKGNAME}/ grub-terminal-input.csv @install -Dm644 -t /usr/share/${PKGNAME}/ grub-terminal-output.csv - @install -Dm644 -t /usr/share/${PKGNAME}/ grub-melodylist.csv + @install -Dm644 -t /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; \ diff --git a/cmdline-linux.csv b/grub-cmdline-linux.csv similarity index 100% rename from cmdline-linux.csv rename to grub-cmdline-linux.csv diff --git a/grub-melodylist.csv b/grub-play.csv similarity index 100% rename from grub-melodylist.csv rename to grub-play.csv diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 7ab2130..596b3af 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -717,7 +717,7 @@ void MainWindow::set_init_data_superuser(std::map &map_temp) { void MainWindow::set_data_csv_melody() { string path_name = ""; - path_name = path_name + path_resources + "/" + "grub-melodylist.csv"; + path_name = path_name + path_resources + "/" + path_melody; string line; string all_melody = ""; string all_melody_old = ""; @@ -769,7 +769,7 @@ void MainWindow::set_init_data_melody(std::map &map_temp) { list_store_melody = Gtk::ListStore::create(m_columns_melody); treeViewMelody->set_model(list_store_melody); string path_name = ""; - path_name = path_name + path_resources + "/" + "grub-melodylist.csv"; + path_name = path_name + path_resources + "/" + path_melody; vector> vec_melody = Utils::read_csv_melody(path_name); bool flag = false; string cgf_code_melody = map_temp["GRUB_PLAY"]; diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 21ec440..86092c9 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -129,7 +129,8 @@ void me_thread(string cmd); #define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" #define icon_checked "com.ublinux.ubl-settings-bootloader.checked" #define icon_warning "com.ublinux.ubl-settings-bootloader.warning" -#define kernel_csv "cmdline-linux.csv" +#define kernel_csv "grub-cmdline-linux.csv" +#define path_melody "grub-play.csv" #define IPT_csv "grub-terminal-input.csv" #define OTT_csv "grub-terminal-output.csv" #define path_app "/usr/bin/" -- 2.35.1 From 1e0028bd9ef730e28e2e499edac06e6fa2e7ac44 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 09:49:21 +0600 Subject: [PATCH 02/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D1=81=20csv=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grub-cmdline-linux.csv | 28 ++++++++++++++-------------- grub-play.csv | 2 +- grub-terminal-input.csv | 12 ++++++------ grub-terminal-output.csv | 12 ++++++------ source/ubl-settings-bootloader.cc | 8 ++------ source/util.cc | 12 ++++++++++-- source/util.h | 1 + 7 files changed, 40 insertions(+), 35 deletions(-) diff --git a/grub-cmdline-linux.csv b/grub-cmdline-linux.csv index 1aba2df..214b158 100644 --- a/grub-cmdline-linux.csv +++ b/grub-cmdline-linux.csv @@ -1,14 +1,14 @@ -Option,Description -quiet,Downloading without text messages -splash,Show welcome window -noplymouth,Disable Plymouth -acpi=off,Disable ACPI -noapic,Disable APIC -nolapic,Disable local APIC -single,Single User Mode -nomodeset,Disable kernel selection and loading of video drivers -915.enable_dc=0,Disable GPU power management -ahci.mobile_lpm_policy=1,"Maximum performance, power management" -snd-intel-dspcfg.dsp_driver=1,Forced selection of an Intel sound device driver -intel_idle.max_cstate=1,Prevents the processor from going into a deep sleep state -intel_idle.max_cstate=4,Eliminates flickering laptop display on Ultra Voltage processors +Option;Description +quiet;Downloading without text messages +splash;Show welcome window +noplymouth;Disable Plymouth +acpi=off;Disable ACPI +noapic;Disable APIC +nolapic;Disable local APIC +single;Single User Mode +nomodeset;Disable kernel selection and loading of video drivers +915.enable_dc=0;Disable GPU power management +ahci.mobile_lpm_policy=1;Maximum performance, power management +snd-intel-dspcfg.dsp_driver=1;Forced selection of an Intel sound device driver +intel_idle.max_cstate=1;Prevents the processor from going into a deep sleep state +intel_idle.max_cstate=4;Eliminates flickering laptop display on Ultra Voltage processors diff --git a/grub-play.csv b/grub-play.csv index 79edc2e..b4167ab 100644 --- a/grub-play.csv +++ b/grub-play.csv @@ -1 +1 @@ -ubbeep,1 22 333 4444 5555 \ No newline at end of file +ubbeep;1 22 333 4444 5555 \ No newline at end of file diff --git a/grub-terminal-input.csv b/grub-terminal-input.csv index 4bd7f47..98148e6 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 30453d6..e4a86fd 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/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 596b3af..4bd132f 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -734,7 +734,7 @@ void MainWindow::set_data_csv_melody() { Gtk::TreeModel::Row row = *iter; code_melodyes = row[m_columns_melody.melody_code] + ""; if (code_melodyes.length() != 0 && (row[m_columns_melody.title] + "").length() != 0) { - all_melody += row[m_columns_melody.title] + "," + code_melodyes + "\n"; + all_melody += row[m_columns_melody.title] + ";" + code_melodyes + "\n"; if (row[m_columns_melody.check_button]) { map_cmd_selection["GRUB_PLAY"] = code_melodyes + ""; } @@ -749,11 +749,7 @@ void MainWindow::set_data_csv_melody() { } } if (all_melody_old != all_melody) { - ofstream fout(path_name, ios_base::out | ios_base::trunc); - if (fout.is_open()) { - fout << all_melody; - fout.close(); - } + Utils::write_file(path_name, all_melody); } } diff --git a/source/util.cc b/source/util.cc index f2e47de..943146d 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); @@ -50,11 +50,19 @@ array, 5> read_csv(const string& filename) { return array_vectors; } +void write_file(string path_name, string data) { + ofstream fout(path_name, ios_base::out | ios_base::trunc); + if (fout.is_open()) { + fout << data; + fout.close(); + } +} + vector> read_csv_melody(const string& filename) { vector> vec_music; ifstream file(filename); string line; - char delimiter = ','; + char delimiter = ';'; while (getline(file, line)) { stringstream stream(line); string name; diff --git a/source/util.h b/source/util.h index 59909c2..0267564 100644 --- a/source/util.h +++ b/source/util.h @@ -46,5 +46,6 @@ void str_remove(std::string& source, std::string to_remove); 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); } #endif \ No newline at end of file -- 2.35.1 From a51dd7b9ded3f6aa37fa580d45a051f1568c326f Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 13:49:46 +0600 Subject: [PATCH 03/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 86092c9..ab0b0b1 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -122,8 +122,8 @@ void me_thread(string cmd); #define system_load "ubconfig --default --source system get boot" #define global_save "ubconfig --target global set boot " #define system_save "ubconfig --target system set boot " -#define global_remove "ubconfig --target global remove boot " -#define system_remove "ubconfig --target system remove boot " +#define global_remove "ubconfig --target global --noexecute set/remove boot " +#define system_remove "ubconfig --target system --noexecute set/remove boot " #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-bootloader" #define cmd_xdg "xdg-open " #define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" -- 2.35.1 From 0112ec6a1f671728e60d173536fd0e45478300ea Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 16:52:54 +0600 Subject: [PATCH 04/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/CMakeLists.txt | 2 +- source/save.cc | 18 ++++++++++++++++-- source/save.h | 2 +- source/ubl-settings-bootloader.cc | 12 ++++-------- source/ubl-settings-bootloader.h | 6 ++++-- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 670aa0b..725f694 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -28,7 +28,7 @@ configure_file(ubl-settings-bootloader.h.in ubl-settings-bootloader-cm.h) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ - -fstack-clash-protection -fcf-protection") + -fstack-clash-protection -fcf-protection -g") set(SOURCE_FILES menu_os.h diff --git a/source/save.cc b/source/save.cc index c824093..8fc3d11 100644 --- a/source/save.cc +++ b/source/save.cc @@ -57,6 +57,20 @@ bool Save::check_save(string flag_save, string key_name) { return true; } +bool Save::wrapper_check_save(string flag_save, string key_name) { + if (flag_save == "all") { + bool bool_flag_save = this->check_save("system", key_name); + if (bool_flag_save) { + return true; + } + return this->check_save("global", key_name); + } + else { + return this->check_save(flag_save, key_name); + } + +} + int Save::get_count_error() { return process.get_count_error(); } @@ -82,7 +96,7 @@ void Save::save(string sections, string str_flag_save) { for (const auto &key: *vec_param_names) { if (map_gui->find(key) != map_gui->end()) { value = (*map_gui)[key]; - if (this->check_save(str_flag_save, key)) { + if (this->wrapper_check_save(str_flag_save, key)) { if (value.length() != 0) { cmd = "ubconfig --target " + str_flag_save + " set " + sections + " " + key + "=\"" + value + "\""; @@ -117,7 +131,7 @@ void Save::save_one_cmd(string cmd1, string cmd_remove, string str_flag_save) { for (const auto &key: *vec_param_names) { if (map_gui->find(key) != map_gui->end()) { value = (*map_gui)[key]; - if (this->check_save(str_flag_save, key)) { + if (this->wrapper_check_save(str_flag_save, key)) { if (value.length() != 0) { cmd = cmd + key + "=\"" + value + "\" "; } diff --git a/source/save.h b/source/save.h index 40b13a1..b268b31 100644 --- a/source/save.h +++ b/source/save.h @@ -20,7 +20,7 @@ public: void set_data_gui(std::map &map_gui); bool check_save(string flag_save, string key_name); bool get_state_save(); - + bool wrapper_check_save(string flag_save, string key_name); void save_one_cmd(string cmd1, string cmd_remove, string str_flag_save); int get_count_error(); string get_cmd_error(); diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 4bd132f..a7cd686 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -951,15 +951,11 @@ void MainWindow::set_active_boot_second() { void MainWindow::wrapper_save_all_cfg() { this->set_data_cfg(); - bool _flag_save_global1 = true; - bool _flag_save_local1 = true; - if (flag_save_global == false) { - _flag_save_global1 = this->save_template(global_save, global_remove , "global"); + bool _flag_save_all = true; + if (flag_save_global == false || flag_save_local == false) { + _flag_save_all = this->save_template(all_save, all_remove, "all"); } - if (flag_save_local == false) { - _flag_save_local1 = this->save_template(system_save, system_remove , "system"); - } - if (_flag_save_global1 && _flag_save_local1) { + if (_flag_save_all) { this->info_warning_error(5); } else { diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index ab0b0b1..9c31ff6 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -120,8 +120,10 @@ void me_thread(string cmd); #define global_load "ubconfig --default --source global get boot" #define system_load "ubconfig --default --source system get boot" -#define global_save "ubconfig --target global set boot " -#define system_save "ubconfig --target system set boot " +#define all_save "ubconfig --noexecute set boot " +#define all_remove "ubconfig --noexecute set/remove boot " +#define global_save "ubconfig --target global --noexecute set boot " +#define system_save "ubconfig --target system --noexecute set boot " #define global_remove "ubconfig --target global --noexecute set/remove boot " #define system_remove "ubconfig --target system --noexecute set/remove boot " #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-bootloader" -- 2.35.1 From c783d31b1ba2e48bbd77b7bc80f742416d6b3f84 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 16:59:05 +0600 Subject: [PATCH 05/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=B2=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=83=D1=82=D0=B8=D0=BB=D0=B8=D1=82=D1=8B?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA?= =?UTF-8?q?=D0=B5=20=D0=B1=D0=B5=D0=B7=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/CMakeLists.txt | 2 +- source/main.cc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 725f694..670aa0b 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -28,7 +28,7 @@ configure_file(ubl-settings-bootloader.h.in ubl-settings-bootloader-cm.h) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ - -fstack-clash-protection -fcf-protection -g") + -fstack-clash-protection -fcf-protection") set(SOURCE_FILES menu_os.h diff --git a/source/main.cc b/source/main.cc index 4dd1d03..8b88c69 100644 --- a/source/main.cc +++ b/source/main.cc @@ -8,7 +8,12 @@ int main(int argc, char** argv) { string str_cmd_argv = ""; for (int i=1; i 1){ str_argv = argv[1]; } -- 2.35.1 From 1539e9ac2dbbccc6a2bcafa09b00889ed351329c Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 17:05:13 +0600 Subject: [PATCH 06/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.h | 2 +- ubl-settings-bootloader.pot | 2 +- ubl-settings-bootloader_ru.po | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 9c31ff6..2410362 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -54,7 +54,7 @@ void me_thread(string cmd); #define str_about_1 _("About") #define str_save _("Save") #define str_load _("Load") -#define save_all _("Save in global and local configuration") +#define save_all _("Save configuration") #define save_local _("Save in local configuration") #define save_global _("Save in global configuration") #define load_global _("Load global configuration") diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index 7dedcd7..72699a2 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -373,7 +373,7 @@ msgstr "" #: source/ubl-settings-bootloader.h:56 source/ubl-settings-bootloader.h:55 #: source/ubl-settings-bootloader.cc:432 source/ubl-settings-bootloader.cc:302 -msgid "Save in global and local configuration" +msgid "Save configuration" msgstr "" #: source/ubl-settings-bootloader.cc:293 diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index 46c2af2..5028f71 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -391,8 +391,8 @@ msgstr "Сохранить в локальную конфигурацию" #: source/ubl-settings-bootloader.h:56 source/ubl-settings-bootloader.h:55 #: source/ubl-settings-bootloader.cc:432 source/ubl-settings-bootloader.cc:302 -msgid "Save in global and local configuration" -msgstr "Сохранить в глобальную и локальную конфигурацию" +msgid "Save configuration" +msgstr "Сохранить конфигурацию" #: source/ubl-settings-bootloader.cc:293 #, fuzzy -- 2.35.1 From ea4de9cbbf514a3c24153f5fa124388b129a2808 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 17:36:41 +0600 Subject: [PATCH 07/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 2410362..db59476 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -124,8 +124,8 @@ void me_thread(string cmd); #define all_remove "ubconfig --noexecute set/remove boot " #define global_save "ubconfig --target global --noexecute set boot " #define system_save "ubconfig --target system --noexecute set boot " -#define global_remove "ubconfig --target global --noexecute set/remove boot " -#define system_remove "ubconfig --target system --noexecute set/remove boot " +#define global_remove "ubconfig --target global --noexecute remove boot " +#define system_remove "ubconfig --target system --noexecute remove boot " #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-bootloader" #define cmd_xdg "xdg-open " #define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" -- 2.35.1 From 453c49d71f63c2512f88321ca4be3ceb5bb9970a Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 10 May 2023 17:38:02 +0600 Subject: [PATCH 08/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index db59476..ee88204 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -121,7 +121,7 @@ void me_thread(string cmd); #define global_load "ubconfig --default --source global get boot" #define system_load "ubconfig --default --source system get boot" #define all_save "ubconfig --noexecute set boot " -#define all_remove "ubconfig --noexecute set/remove boot " +#define all_remove "ubconfig --noexecute remove boot " #define global_save "ubconfig --target global --noexecute set boot " #define system_save "ubconfig --target system --noexecute set boot " #define global_remove "ubconfig --target global --noexecute remove boot " -- 2.35.1 From dea014f3099433892596677401be62f79af59f48 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 11 May 2023 09:15:04 +0600 Subject: [PATCH 09/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index ee88204..f65e43b 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -120,12 +120,12 @@ void me_thread(string cmd); #define global_load "ubconfig --default --source global get boot" #define system_load "ubconfig --default --source system get boot" -#define all_save "ubconfig --noexecute set boot " -#define all_remove "ubconfig --noexecute remove boot " +#define all_save "ubconfig set boot " +#define all_remove "ubconfig remove boot " #define global_save "ubconfig --target global --noexecute set boot " -#define system_save "ubconfig --target system --noexecute set boot " +#define system_save "ubconfig --target system set boot " #define global_remove "ubconfig --target global --noexecute remove boot " -#define system_remove "ubconfig --target system --noexecute remove boot " +#define system_remove "ubconfig --target system remove boot " #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-bootloader" #define cmd_xdg "xdg-open " #define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" -- 2.35.1 From db94a299a58d67bb1a6eb718fe4ad9bdc1f8a65f Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 11 May 2023 09:35:17 +0600 Subject: [PATCH 10/11] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE=D0=BA?= =?UTF-8?q?=20=D0=B2=20csv=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grub-play.csv | 1 + source/ubl-settings-bootloader.cc | 4 ++-- source/ubl-settings-bootloader.h | 2 +- source/util.cc | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/grub-play.csv b/grub-play.csv index b4167ab..1c42eb8 100644 --- a/grub-play.csv +++ b/grub-play.csv @@ -1 +1,2 @@ +Option;Tone code ubbeep;1 22 333 4444 5555 \ No newline at end of file diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index a7cd686..b776f7b 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -717,7 +717,7 @@ void MainWindow::set_init_data_superuser(std::map &map_temp) { void MainWindow::set_data_csv_melody() { string path_name = ""; - path_name = path_name + path_resources + "/" + path_melody; + path_name = path_name + path_resources + "/" + melody_csv; string line; string all_melody = ""; string all_melody_old = ""; @@ -765,7 +765,7 @@ void MainWindow::set_init_data_melody(std::map &map_temp) { list_store_melody = Gtk::ListStore::create(m_columns_melody); treeViewMelody->set_model(list_store_melody); string path_name = ""; - path_name = path_name + path_resources + "/" + path_melody; + path_name = path_name + path_resources + "/" + melody_csv; vector> vec_melody = Utils::read_csv_melody(path_name); bool flag = false; string cgf_code_melody = map_temp["GRUB_PLAY"]; diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index f65e43b..36ece7a 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -132,7 +132,7 @@ void me_thread(string cmd); #define icon_checked "com.ublinux.ubl-settings-bootloader.checked" #define icon_warning "com.ublinux.ubl-settings-bootloader.warning" #define kernel_csv "grub-cmdline-linux.csv" -#define path_melody "grub-play.csv" +#define melody_csv "grub-play.csv" #define IPT_csv "grub-terminal-input.csv" #define OTT_csv "grub-terminal-output.csv" #define path_app "/usr/bin/" diff --git a/source/util.cc b/source/util.cc index 943146d..61c7688 100644 --- a/source/util.cc +++ b/source/util.cc @@ -63,6 +63,7 @@ vector> read_csv_melody(const string& filename) { ifstream file(filename); string line; char delimiter = ';'; + getline(file, line); while (getline(file, line)) { stringstream stream(line); string name; -- 2.35.1 From d89ac6e55db8287fab2e444de6ba1b5df1c09101 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 11 May 2023 09:45:05 +0600 Subject: [PATCH 11/11] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= =?UTF-8?q?=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20grub-melody.csv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index b776f7b..a486a47 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -719,8 +719,8 @@ void MainWindow::set_data_csv_melody() { string path_name = ""; path_name = path_name + path_resources + "/" + melody_csv; string line; - string all_melody = ""; - string all_melody_old = ""; + string all_melody = "Option;Tone code\n"; + string all_melody_old = "Option;Tone code\n"; string code_melodyes = ""; ifstream in(path_name); if (in.is_open()) { -- 2.35.1