From 48c6283efab211fc8598fdb65d82632b99830b10 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 4 May 2023 12:24:22 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B5=20=D0=BE=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #ubl-settings-bootloader.glade# | 1944 ----------------------------- source/menu_os.cc | 12 +- source/menu_os.h | 4 +- source/ubl-settings-bootloader.cc | 16 +- source/ubl-settings-bootloader.h | 2 +- 5 files changed, 20 insertions(+), 1958 deletions(-) delete mode 100644 #ubl-settings-bootloader.glade# diff --git a/#ubl-settings-bootloader.glade# b/#ubl-settings-bootloader.glade# deleted file mode 100644 index 72d0071..0000000 --- a/#ubl-settings-bootloader.glade# +++ /dev/null @@ -1,1944 +0,0 @@ - - - - - - both - True - - - - - True - False - vertical - 5 - - - True - True - - - False - True - end - 0 - - - - - button - True - True - True - - - False - True - end - 1 - - - - - True - True - - - False - True - end - 2 - - - - - False - False - True - center - com.ublinux.ubl-settings-diskquota - dialog - True - True - ubl-settings-bootloader - 1.0 - Copyright © 2022 - 2023, UBSoft LLC - ubl-settings-bootloader - https://ublinux.ru/ - Project Home Page - Это приложение распространяется без каких-либо гарантий. -Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. - UBGroup - UBGroup - UBGroup - UBGroup - com.ublinux.ubl-settings-bootloader - True - gpl-2-0 - - - True - False - vertical - 2 - - - False - end - - - False - False - 1 - - - - - - - - - - True - False - True - - - True - False - 5 - 5 - 5 - 5 - 2 - ubl-settings-bootloader - - - - - - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 69 - com.ublinux.ubl-settings-bootloader - - - False - True - 0 - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Running applications as a user with a -specified priority - - - - - - - - True - True - 1 - - - - - True - False - - - True - False - **** - 0.009999999776482582 - - - True - True - 0 - - - - - True - True - True - - - True - False - gtk-goto-last - - - - - - False - True - 1 - - - - - True - True - True - - - True - False - 0 - - - - - True - False - - - True - False - False - False - 4 - - - True - False - Load global configuration - - - - - - True - False - Load local configuration - - - - - - True - False - False - False - 4 - - - True - False - Help - - - - - - True - False - About - - - - - - True - False - False - False - 4 - - - True - False - Save to global and local configuration - - - - - - True - False - Save global configuration - - - - - - True - False - Save local configuration - - - - - - 750 - 550 - False - com.ublinux.ubl-settings-bootloader - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 25 - 1 - - - False - True - 0 - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - - - 81 - True - False - start - - - -1 - - - - - False - True - 1 - - - - - True - True - in - - - True - False - - - True - False - vertical - - - True - False - vertical - - - True - False - 0.019999999552965164 - in - - - True - False - 12 - - - True - False - vertical - - - True - False - - - Boot selection menu timer - True - True - False - 3 - 5 - 3 - 5 - 6 - 6 - True - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Seconds - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Default load - start - 0 - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 2 - - - - - True - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - False - open-menu-symbolic - - - - - False - True - 3 - - - - - False - True - 1 - - - - - True - False - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Load screen display mode: - start - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 1 - - - - - False - True - 2 - - - - - True - False - 0.019999999552965164 - in - - - True - False - - - True - False - 12 - - - True - False - vertical - - - 65 - True - True - 6 - in - - - True - False - - - True - True - - - - - - - - - - False - True - 0 - - - - - - - True - True - 0 - - - - - True - False - vertical - - - True - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - False - list-add - - - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 5 - 5 - 3 - 6 - - - True - False - gtk-remove - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Boot Menu Users - start - - - - - False - True - 5 - - - - - True - False - 0.019999999552965164 - in - - - True - False - - - True - False - 12 - - - True - False - vertical - - - 65 - True - True - 6 - in - - - True - False - - - True - True - - - - - - - - - - False - True - 0 - - - - - - - True - True - 0 - - - - - True - False - vertical - - - True - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - False - list-add - - - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 5 - 5 - 3 - 6 - - - True - False - gtk-remove - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Ringtone at startup - start - - - - - False - True - 6 - - - - - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Download menu - - - - - False - True - 0 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 12 - - - True - False - vertical - - - 140 - True - True - 5 - 5 - in - - - True - False - - - -1 - True - True - - - - - - - - - - False - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Command line parameters: - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 1 - - - - - False - True - 10 - - - - - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Parameters passed to the kernel - start - - - - - False - True - 1 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 12 - - - True - False - vertical - - - 140 - True - True - 5 - 5 - in - - - True - False - - - True - True - - - - - - - - - - False - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Command line parameters: - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 1 - - - - - False - True - 7 - - - - - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Terminal for input - start - - - - - False - True - 2 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 12 - - - True - False - vertical - - - 140 - True - True - 5 - 5 - in - - - True - False - - - True - True - - - - - - - - - - False - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Command line parameters: - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 1 - - - - - False - True - 7 - - - - - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Terminal for output - start - - - - - False - True - 3 - - - - - False - True - 5 - - - - - - - - - True - True - 2 - - - - - - - True - False - True - - - True - False - ubl-settings-bootloader - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-bootloader - - - - - True - False - - - True - False - - - True - True - False - True - True - menu2 - none - - - True - False - - - True - False - 5 - 5 - 5 - 5 - Save - - - - False - True - 0 - - - - - True - False - pan-down-symbolic - - - False - True - 1 - - - - - - - False - True - 0 - - - - - True - True - False - True - True - menu1 - none - - - True - False - open-menu-symbolic - - - - - False - True - 1 - - - - - - False - True - 0 - - - - - end - 1 - - - - - True - False - - - True - True - False - True - True - menu - none - - - True - False - - - True - False - 5 - 5 - 5 - 5 - Load - - - False - True - 0 - - - - - True - False - pan-down-symbolic - - - False - True - 1 - - - - - - - False - True - 0 - - - - - - 2 - - - - - - - both - True - - - - - - - - both - True - - - - - - - - False - btnOpenMenuOS - bottom - - - True - False - - - True - False - none - - - True - False - vertical - - - - - - - - True - True - 0 - - - - - True - False - none - True - - - True - False - vertical - - - True - True - True - - - True - False - start - 0 - gtk-goto-first - - - - - False - True - 0 - - - - - True - False - vertical - - - - - - False - True - 1 - - - - - - - False - True - 1 - - - - - - - False - Внимание! - center - dialog - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 50 - gtk-dialog-warning - - - True - True - 0 - - - - - 160 - True - False - start - center - 5 - 5 - 5 - 5 - 6 - 6 - Warning! - - - True - True - 1 - - - - - False - True - 1 - - - - - OK - True - True - True - 5 - 5 - 5 - 5 - 3 - 3 - - - False - True - 1 - - - - - - - True - False - none - - - True - False - vertical - - - - - - - - False - start - start - False - 450 - 250 - dialog-question-symbolic - - - True - False - vertical - - - True - False - - - True - False - start - 20 - 20 - dialog-question-symbolic - 6 - - - False - True - 0 - - - - - True - False - vertical - - - True - False - start - 10 - 5 - Would you like to read documentation in the Web? - True - 0 - - - - - - - False - True - 0 - - - - - True - False - start - start - 10 - 10 - You will be redirected to documentation website where documentation is translated and supported by community. - True - 0 - - - - True - True - 1 - - - - - Always redirect to online documentation - True - True - False - end - 10 - True - - - - False - True - 2 - - - - - - True - True - 1 - - - - - - True - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - 30 - True - - - Cancel - True - True - True - - - - True - True - 0 - - - - - Read Online - True - True - True - - - - True - True - 1 - - - - - False - True - 1 - - - - - - - True - False - True - - - True - False - ubl-settings-bootloader - - - - - - - - True - False - 32 - dialog-question-symbolic - - - - - - - 800 - 600 - False - True - True - com.ublinux.ubl-settings-datetime - - - - - - True - False - True - - - True - False - ubl-settings-bootloader - - - - - True - False - 32 - com.ublinux.ubl-settings-bootloader - 5 - - - - - - diff --git a/source/menu_os.cc b/source/menu_os.cc index 6fa884f..74f3603 100644 --- a/source/menu_os.cc +++ b/source/menu_os.cc @@ -26,15 +26,19 @@ void Menu_os::set_builder(Glib::RefPtr& builder, string path_glade revealerL1->set_reveal_child(true); } -void Menu_os::set_map(std::map > &map_list_os) { - this->map_list_os = map_list_os; +void Menu_os::set_map(vector>> &vec_list_os) { + this->vec_list_os = vec_list_os; } void Menu_os::init() { revealerL1->set_reveal_child(true); revealerL2->set_reveal_child(true); size_t index_l1 = 0; - for (auto& [key, vec_value]: map_list_os) { + string key = ""; + + for (tuple> tuple_os: vec_list_os) { + key = get<0>(tuple_os); + vector vec_value = get<1>(tuple_os); map_menu_level_1[key] = new struct_menu_level1; Glib::RefPtr builder_level_1 = Gtk::Builder::create_from_file(path_glade); builder_level_1->get_widget("lblRevL1", map_menu_level_1[key]->lblRevL1); @@ -43,7 +47,7 @@ void Menu_os::init() { map_menu_level_1[key]->btnToL2AndLv3_css = map_menu_level_1[key]->btnToL2AndLv3->get_style_context(); map_menu_level_1[key]->btnToL2AndLv3_css->add_class("noborder"); map_menu_level_1[key]->builder = builder_level_1; - boxLevel1->pack_end(*(map_menu_level_1[key]->boxMenuLevel1)); + boxLevel1->pack_start(*(map_menu_level_1[key]->boxMenuLevel1)); map_menu_level_1[key]->name = key; this->html_last_launched_os(key, map_menu_level_1[key]->lblRevL1); map_menu_level_1[key]->btnToL2AndLv3->signal_clicked().connect( diff --git a/source/menu_os.h b/source/menu_os.h index c289d24..0768c7b 100644 --- a/source/menu_os.h +++ b/source/menu_os.h @@ -11,7 +11,7 @@ class Menu_os { private: Glib::RefPtr builder; - std::map > map_list_os; + vector>> vec_list_os; Gtk::Popover *popoverMenuOS; Gtk::Revealer *revealerL1; @@ -50,7 +50,7 @@ private: public: Menu_os(/* args */); void set_builder(Glib::RefPtr& builder, string path_glade); - void set_map(std::map > &map_list_os); + void set_map(vector>> &vec_list_os); void init(); void show(); void close_revealer(); diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index c50e581..6e1d0ef 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -98,9 +98,9 @@ void MainWindow::settings() { this->download_local_cfg(); this->download_globl_cfg(); //this->view_add_colums_melody(*treeViewMelody); - std::map> map_list_os = format_os_list(os_control_list); + vector>> vec_list_os = format_os_list(os_control_list); obj_menu_os.set_builder(builder, path_glade); - obj_menu_os.set_map(map_list_os); + obj_menu_os.set_map(vec_list_os); obj_menu_os.set_entry(entrListOS); // obj_menu_os.set_last_launched_os(map_global_cmd_selection["GRUB_DEFAULT"]); obj_menu_os.set_last_launched_os(this->str_last_launched_os); @@ -120,8 +120,8 @@ void MainWindow::settings() { this->event(); } -map> MainWindow::format_os_list(vector &os_control_list) { - std::map> map_list_os; +vector>> MainWindow::format_os_list(vector &os_control_list) { + vector>> vec_list_os; set set_key; for (string& name_os : os_control_list) { if (name_os.find(">") != string::npos) { @@ -130,7 +130,8 @@ map> MainWindow::format_os_list(vector &os_contro else { vector vec_os; //vec_os.push_back(" "); - map_list_os[name_os] = vec_os; + tuple> t1(name_os, vec_os); + vec_list_os.push_back(t1); } } set::iterator it = set_key.begin(); @@ -146,10 +147,11 @@ map> MainWindow::format_os_list(vector &os_contro } } if (flag) { - map_list_os[name_os_buff] = vec_os_values; + tuple> t1(name_os_buff, vec_os_values); + vec_list_os.push_back(t1); } } - return map_list_os; + return vec_list_os; } vector MainWindow::pars_os(vector &os_control_list) { diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 5dc5086..8f4e724 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -347,7 +347,7 @@ public: void synopsis_show(); void set_data_cfg(); void set_data_csv_melody(); - std::map> format_os_list(vector &os_control_list); + vector>> format_os_list(vector &os_control_list); void set_active_boot_second(); void get_download_mode(std::map &map_temp); void view_add_cell(Gtk::TreeModel::Row &row, Glib::RefPtr list_store_m, std::array, 5> &arr_view, size_t index);