diff --git a/source/main.cc b/source/main.cc index 8b88c69..c28e514 100644 --- a/source/main.cc +++ b/source/main.cc @@ -52,6 +52,9 @@ int main(int argc, char** argv) { pars_flag(1, argc, argv); MainWindow* wnd = nullptr; builder->get_widget_derived("window", wnd); + wnd->settings(); + wnd->event(); + wnd->set_menu_os_to_button(); auto r = app->run(*wnd); delete wnd; return r; diff --git a/source/menu_os.cc b/source/menu_os.cc index 71910dd..46378a9 100644 --- a/source/menu_os.cc +++ b/source/menu_os.cc @@ -16,16 +16,18 @@ void Menu_os::set_last_launched_os(string str_last_launched_os) { void Menu_os::set_builder(Glib::RefPtr& builder, string path_glade) { this->builder = builder; this->path_glade = path_glade; - builder->get_widget("popoverMenuOS", popoverMenuOS); builder->get_widget("revealerL1", revealerL1); builder->get_widget("revealerL2", revealerL2); builder->get_widget("boxALLL3", boxALLL3); builder->get_widget("boxLevel1", boxLevel1); builder->get_widget("btnToLev1", btnToLev1); - revealerL1->set_reveal_child(true); } +void Menu_os::set_btnOpenMenuOS(Gtk::Button *btnOpenMenuOS) { + this->btnOpenMenuOS = btnOpenMenuOS; +} + void Menu_os::set_map(vector>> &vec_list_os) { this->vec_list_os = vec_list_os; } @@ -96,11 +98,15 @@ void Menu_os::close_revealer() { } } +void Menu_os::set_main_revealer(Gtk::Revealer *revealer) { + this->main_revealer = revealer; +} + void Menu_os::show() { revealerL1->set_reveal_child(true); revealerL2->set_reveal_child(false); this->close_revealer(); - popoverMenuOS->show_all(); + main_revealer->set_reveal_child(true); } void Menu_os::event() { btnToLev1->signal_clicked().connect(sigc::mem_fun(*this, &Menu_os::to_l1)); @@ -127,10 +133,10 @@ void Menu_os::event_template(Gtk::Label* label, string& name_level, string& key) else if (map_menu_level_1[key]->vec_menu_level_3.size() == 0) { entry->set_text(name_level_1); name_level_3 = ""; - popoverMenuOS->hide(); + main_revealer->set_reveal_child(false); } else { - popoverMenuOS->hide(); + main_revealer->set_reveal_child(false); entry->set_text(name_level_1 + name_level_3); } } diff --git a/source/menu_os.h b/source/menu_os.h index 0768c7b..01e3051 100644 --- a/source/menu_os.h +++ b/source/menu_os.h @@ -13,10 +13,10 @@ private: Glib::RefPtr builder; vector>> vec_list_os; - Gtk::Popover *popoverMenuOS; Gtk::Revealer *revealerL1; Gtk::Revealer *revealerL2; Gtk::Button *btnToLev1; + Gtk::Revealer *main_revealer; string str_last_launched_os = ""; private: string name_level_1 = ""; @@ -26,6 +26,7 @@ private: string path_glade = ""; Gtk::Box *boxALLL3; Gtk::Box *boxLevel1; + Gtk::Button *btnOpenMenuOS; struct struct_menu_level_3 { Gtk::Button *btnToL3; Gtk::Label *lblToL3; @@ -60,6 +61,8 @@ public: void set_entry(Gtk::Entry *entry); void event_template(Gtk::Label* label, string& name_level, string& key); void event(); + void set_main_revealer(Gtk::Revealer *revealer); + void set_btnOpenMenuOS(Gtk::Button *btnOpenMenuOS); void to_l1(); ~Menu_os(); }; diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index e865002..331071d 100644 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -46,8 +46,12 @@ SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr build MainWindow* wnd = nullptr; builder->get_widget_derived("window", wnd); builder->get_widget("plugBox", plugBox); + wnd->settings(); + wnd->set_plug(plugBox); + wnd->event(); plugBox->get_parent()->remove(*plugBox); add(*plugBox); + wnd->set_menu_os_to_button(); show_all_children(); } @@ -58,17 +62,175 @@ int MainWindow::check_root() { return 0; } +// ================================================================= +View_edit_add_table::View_edit_add_table() { + builder = Gtk::Builder::create_from_file(path_glade); + this->settings(); +} + +void View_edit_add_table::settings() { + this->get_builder(); + this->localization(); + this->event(); + +} + +void View_edit_add_table::event() { + btnCancel->signal_clicked().connect([&]() {cancel();}); + btnSaveEditSave->signal_clicked().connect([&]() {save();}); + wndAddEditData->signal_hide().connect([&]() {this->get_data();}); + entryCol1->signal_changed().connect([&]() {this->check_space_entry();}); + entryCol2->signal_changed().connect([&]() {this->check_space_entry();}); +} + +void View_edit_add_table::check_space_entry() { + if (entryCol1->get_text().length() == 0 || entryCol2->get_text().length() == 0) { + btnSaveEditSave->set_sensitive(false); + } + else { + btnSaveEditSave->set_sensitive(true); + } +} + +void View_edit_add_table::localization() { + +} +void View_edit_add_table::get_builder() { + builder->get_widget("wndAddEditData", wndAddEditData); + builder->get_widget("btnCancel", btnCancel); + builder->get_widget("btnSaveEditSave", btnSaveEditSave); + builder->get_widget("chkAddEdit", chkAddEdit); + builder->get_widget("entryCol1", entryCol1); + builder->get_widget("entryCol2", entryCol2); + builder->get_widget("lblAddEditCheckBox", lblAddEditCheckBox); + builder->get_widget("lblAddEditCol1", lblAddEditCol1); + builder->get_widget("lblAddEditCol2", lblAddEditCol2); + builder->get_widget("lblEditAddHead", lblEditAddHead); + +} + + +void View_edit_add_table::cancel() { + wndAddEditData->hide(); + flag_save = false; +} + +void View_edit_add_table::save() { + flag_save = true; + new_data.check = chkAddEdit->get_active(); + new_data.column1 = entryCol1->get_text(); + new_data.column2 = entryCol2->get_text(); + wndAddEditData->hide(); +} +struct View_edit_add_table::struct_data View_edit_add_table::get_data() { + if (flag_save == true) { + if (mode_show == "ue" && new_data.column1.length() != 0 && new_data.column2.length() != 0) { + obj_main->wrapper_edit_user(new_data.check, new_data.column1, new_data.column2); + } + else if (mode_show == "me" && new_data.column1.length() != 0 && new_data.column2.length() != 0) { + obj_main->wrapper_edit_melody(new_data.check, new_data.column1, new_data.column2); + } + else if (mode_show == "ua" && new_data.column1.length() != 0 && new_data.column2.length() != 0) { + obj_main->wrapper_set_add_data_user(new_data.check, new_data.column1, new_data.column2); + } + else if (mode_show == "ma" && new_data.column1.length() != 0 && new_data.column2.length() != 0) { + obj_main->wrapper_set_add_data_melody(new_data.check, new_data.column1, new_data.column2); + } + return new_data; + } + if (mode_show == "ue" && old_data.column1.length() != 0 && old_data.column2.length() != 0) { + obj_main->wrapper_edit_user(old_data.check, old_data.column1, old_data.column2); + } + else if (mode_show == "me" && old_data.column1.length() != 0 && old_data.column2.length() != 0) { + obj_main->wrapper_edit_melody(old_data.check, old_data.column1, old_data.column2); + } + else if (mode_show == "ua" && old_data.column1.length() != 0 && old_data.column2.length() != 0){ + obj_main->wrapper_set_add_data_user(old_data.check, old_data.column1, old_data.column2); + } + else if (mode_show == "ma" && old_data.column1.length() != 0 && old_data.column2.length() != 0) { + obj_main->wrapper_set_add_data_melody(old_data.check, old_data.column1, old_data.column2); + } + return old_data; +} +void View_edit_add_table::show() { + flag_save = false; + wndAddEditData->show(); +} + +void View_edit_add_table::set_data(bool check, string column1, string column2) { + old_data.check = check; + old_data.column1 = column1; + old_data.column2 = column2; + chkAddEdit->set_active(check); + entryCol1->set_text(column1); + entryCol2->set_text(column2); +} + +void View_edit_add_table::show_melody_edit() { + gtk_entry_set_input_purpose(GTK_ENTRY(entryCol2->gobj()) ,GTK_INPUT_PURPOSE_FREE_FORM); + lblAddEditCheckBox->set_text(string(str_active) + ":"); + lblAddEditCol1->set_text(string(str_option) + ":"); + lblAddEditCol2->set_text(string(str_melody_code) + ":"); + string title = string(str_ringtone_at_startup) + " - " + string(str_edit); + lblEditAddHead->set_text(title); + mode_show = "me"; + this->show(); +} + +void View_edit_add_table::show_melody_add() { + gtk_entry_set_input_purpose(GTK_ENTRY(entryCol2->gobj()),GTK_INPUT_PURPOSE_FREE_FORM); + btnSaveEditSave->set_sensitive(false); + chkAddEdit->set_active(false); + entryCol1->set_text(""); + entryCol2->set_text(""); + lblAddEditCheckBox->set_text(string(str_active) + ":"); + lblAddEditCol1->set_text(string(str_option) + ":"); + lblAddEditCol2->set_text(string(str_melody_code) + ":"); + string title = string(str_ringtone_at_startup) + " - " + string(str_adding); + lblEditAddHead->set_text(title); + mode_show = "ma"; + btnSaveEditSave->set_sensitive(false); + this->show(); +} +void View_edit_add_table::show_user_edit() { + gtk_entry_set_input_purpose(GTK_ENTRY(entryCol2->gobj()),GTK_INPUT_PURPOSE_PASSWORD); + lblAddEditCheckBox->set_text(string(str_administrator) + ":"); + lblAddEditCol1->set_text(string(str_user) + ":"); + lblAddEditCol2->set_text(string(str_password) + ":"); + string title = string(str_title_Boot_Menu_Users) + " - " + string(str_edit); + lblEditAddHead->set_text(title); + mode_show = "ue"; + this->show(); +} + +void View_edit_add_table::show_user_add() { + gtk_entry_set_input_purpose(GTK_ENTRY(entryCol2->gobj()),GTK_INPUT_PURPOSE_PASSWORD); + btnSaveEditSave->set_sensitive(false); + chkAddEdit->set_active(false); + entryCol1->set_text(""); + entryCol2->set_text(""); + lblAddEditCheckBox->set_text(string(str_administrator) + ":"); + lblAddEditCol1->set_text(string(str_user) + ":"); + lblAddEditCol2->set_text(string(str_password) + ":"); + string title = string(str_title_Boot_Menu_Users) + " - " + string(str_adding); + lblEditAddHead->set_text(title); + btnSaveEditSave->set_sensitive(false); + this->show(); + mode_show = "ua"; +} +// ================================================================= + MainWindow::MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder) : Gtk::ApplicationWindow(obj), builder{builder} { - this->builder = builder; - this->settings(); + this->builder = builder; } MainWindow::MainWindow(Glib::RefPtr const& builder) { this->builder = builder; - this->settings(); } + + void MainWindow::settings() { obj_main = this; map_cmd_error[""] = ""; @@ -87,13 +249,9 @@ void MainWindow::settings() { Gtk::Widget *boxWidget; builder->get_widget("boxColor", boxWidget); overHead->add_overlay(*boxWidget); + overMenuOS->add_overlay(*revilerMenuOS); btnBoxAboutDialog->set_visible(false); ubl_make_plugs(boxSave,boxButton, socket_ext_id_I, socket_trd_id_I); - #ifdef WEBKIT_FOUND - one = WEBKIT_WEB_VIEW(webkit_web_view_new()); - three = Glib::wrap(GTK_WIDGET(one)); - wndWeb->add(*three); - #endif this->flag_block_gui(); if (this->check_root() == 0) { spbSecond->set_range(1, 60); @@ -107,6 +265,7 @@ void MainWindow::settings() { this->download_local_cfg(); this->download_globl_cfg(); vector>> vec_list_os = format_os_list(os_control_list); + obj_menu_os.set_main_revealer(revilerMenuOS); obj_menu_os.set_builder(builder, path_glade); obj_menu_os.set_map(vec_list_os); obj_menu_os.set_entry(entrListOS); @@ -125,7 +284,14 @@ void MainWindow::settings() { this->set_active_boot_second(); this->fill_in_view(); } - this->event(); +} + +void MainWindow::set_menu_os_to_button() { + obj_menu_os.set_btnOpenMenuOS(btnOpenMenuOS1); +} + +void MainWindow::set_plug(Gtk::Widget *plug) { + this->plug = plug; } vector>> MainWindow::format_os_list(vector &os_control_list) { @@ -215,14 +381,14 @@ void MainWindow::fill_in_view() { void MainWindow::view_add_colums_user(Gtk::TreeView &treeView) { treeView.append_column_editable(str_administrator, m_columns_user.check_button); - treeView.append_column_editable(str_user, m_columns_user.name); - treeView.append_column_editable(str_password, m_columns_user.password); + treeView.append_column(str_user, m_columns_user.name); + treeView.append_column(str_password, m_columns_user.password); } void MainWindow::view_add_colums_melody(Gtk::TreeView &treeView) { treeView.append_column_editable(str_active, m_columns_melody.check_button); - treeView.append_column_editable(str_option, m_columns_melody.title); - treeView.append_column_editable(str_melody_code, m_columns_melody.melody_code); + treeView.append_column(str_option, m_columns_melody.title); + treeView.append_column(str_melody_code, m_columns_melody.melody_code); } void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) { @@ -230,11 +396,13 @@ void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::Tr treeViewOTT->get_selection()->unselect_all(); treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); - if (flag_blocked_tree_view == false) { - string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX"); - map_cmd_selection["GRUB_CMDLINE_LINUX"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryKernel->set_text(str_flags); + if (flag_blocked_tree_view == false) { + if (this->intel_idle_cstate_check(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX") == false) { + string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX"); + map_cmd_selection["GRUB_CMDLINE_LINUX"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryKernel->set_text(str_flags); + } } } @@ -244,10 +412,12 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); if (flag_blocked_tree_view == false) { - string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT"); - map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryOTT->set_text(str_flags); + if (this->intel_idle_cstate_check(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT") == false) { + string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT"); + map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryOTT->set_text(str_flags); + } } } @@ -257,10 +427,12 @@ void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeM treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); if (flag_blocked_tree_view == false) { - string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT"); - map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryIPT->set_text(str_flags); + if (this->intel_idle_cstate_check(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT") == false) { + string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT"); + map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryIPT->set_text(str_flags); + } } } @@ -317,6 +489,44 @@ void MainWindow::set_download_mode() { map_cmd_selection["GRUB_BOOT_SILENT"] = key; } +bool MainWindow::intel_idle_cstate_check(int size, Glib::RefPtr &list_store, string key) { + string cmds_old = map_cmd_selection[key]; + string cmds = ""; + string param = ""; + int index_1 = -1; + int index_4 = -1; + bool active = false; + for (int index = 0; index < size; index++) { + Gtk::TreeModel::Row row = list_store->children()[index]; + if(row) { + param = row[m_columns.name] + ""; + active = row[m_columns.check_button]; + if (param == "intel_idle.max_cstate=1" && active == true) { + index_1 = index; + } + else if (param == "intel_idle.max_cstate=4" && active == true) { + index_4 = index; + } + } + } + if (index_1 != -1 && index_4 != -1) { + if (cmds_old.find("intel_idle.max_cstate=1") == string::npos) { + Gtk::TreeModel::Row row = list_store->children()[index_4]; + row[m_columns.check_button] = false; + return true; + } + else if (cmds_old.find("intel_idle.max_cstate=4") == string::npos) { + Gtk::TreeModel::Row row = list_store->children()[index_1]; + row[m_columns.check_button] = false; + return true; + } + else { + return false; + } + } + return false; +} + string MainWindow::template_item_selected(int size, Glib::RefPtr &list_store, string key) { string cmds_old = map_cmd_selection[key]; string cmds = ""; @@ -428,7 +638,7 @@ void MainWindow::get_builder() { builder->get_widget("btnReadHelp", btnReadHelp); builder->get_widget("btnCancelHelp", btnCancelHelp); builder->get_widget("wndShowWeb", wndShowWeb); - builder->get_widget("btnOpenMenuOS", btnOpenMenuOS); + builder->get_widget("btnOpenMenuOS1", btnOpenMenuOS1); builder->get_widget("entrListOS", entrListOS); builder->get_widget("treeViewUser", treeViewUser); builder->get_widget("treeViewMelody", treeViewMelody); @@ -438,6 +648,12 @@ void MainWindow::get_builder() { builder->get_widget("btnRemoveUser", btnRemoveUser); builder->get_widget("btnAddMusic", btnAddMusic); builder->get_widget("btnRemoveMusic", btnRemoveMusic); + builder->get_widget("btnEditMusic", btnEditMusic); + builder->get_widget("btnEditUser", btnEditUser); + builder->get_widget("revilerMenuOS", revilerMenuOS); + builder->get_widget("overMenuOS", overMenuOS); + + } void MainWindow::localization() { @@ -445,19 +661,17 @@ void MainWindow::localization() { tm *ltm = localtime(&now); unsigned int year = 1900+ ltm->tm_year; string str_authors = string(copyright) + to_string(year); - aboutWindows->set_program_name(name_app); + aboutWindows->set_program_name(app_name); aboutWindows->set_copyright(str_authors); aboutWindows->set_comments(name_app); aboutWindows->set_website(web_url); aboutWindows->set_version(_(version_application.c_str())); aboutWindows->set_website_label(project_Home_page); - lblInfoHead->set_text(configuring_system_boot); + lblInfoHead->set_text(name_app); lblHeaderName->set_text(name_app); - aboutWindows->set_comments(system_boot); lblHeaderAboutTopic->set_label(str_about); lblBootMenuUsers->set_text(str_title_Boot_Menu_Users); lblRingtoneStartup->set_text(str_title_Ringtone_Startup); - aboutWindows->set_website_label(project_Home_page); lblInfoCommand->set_text(command_line_parameters); lblInfoCommand1->set_text(command_line_parameters); lblInfoCommand2->set_text(command_line_parameters); @@ -478,19 +692,22 @@ void MainWindow::localization() { btnSave->set_label(str_save); btnLoad->set_label(str_load); this->set_title(name_app); - // Todo: check - lblDownloadMode->set_text(boot_screen_display_mode); cmbDownloadMode->append(loading_animation_with); cmbDownloadMode->append(loading_animation_without); cmbDownloadMode->append(no_loading_animation); cmbDownloadMode->append(lack_loading_animation); - + lblDownloadMode->set_text(boot_screen_display_mode); lblhelpHeader->set_text(read_documentation_web); lblhelpText->set_text(_(redirected_documentation)); btnReadHelp->set_label(read_online); - btnCancelHelp->set_label(cancel); + btnCancelHelp->set_label(str_cancel); chkAlwaysOpenHelp->set_label(always_redirect); lblwebHeaderName->set_label(name_app); + btnRemoveMusic->set_tooltip_text(str_tooltip_del_melody); + btnAddMusic->set_tooltip_text(str_tooltip_add_melody); + btnRemoveUser->set_tooltip_text(str_tooltip_del_user); + btnAddUser->set_tooltip_text(str_tooltip_add_user); + btnOpenMenuOS1->set_tooltip_text(str_tooltip_boot_menu); } vector MainWindow::get_setting_entry_all(string key, std::map * map_temp) { @@ -600,11 +817,11 @@ void MainWindow::event() { g_signal_connect(G_OBJECT(aboutWindows->gobj()), "activate-link", G_CALLBACK(wrapper_help_show), NULL); btnRemoveUser->signal_clicked().connect([&]() {remove_user();}); btnRemoveMusic->signal_clicked().connect([&]() {remove_melody();}); - btnAddUser->signal_clicked().connect([&]() {string name = "", passwd = ""; - set_add_data_user(row_user, false, name, passwd);}); - btnAddMusic->signal_clicked().connect([&]() {string code = "", name = ""; - set_add_data_melody(row_melody, false,name, code);}); - btnOpenMenuOS->signal_clicked().connect([&]() {obj_menu_os.show();}); + btnEditUser->signal_clicked().connect([&]() {wrapper_edit_show_user();}); + btnEditMusic->signal_clicked().connect([&]() {wrapper_edit_show_melody();}); + btnAddUser->signal_clicked().connect([&]() {wrapper_add_data_user();}); + btnAddMusic->signal_clicked().connect([&]() {wrapper_add_data_melody();}); + btnOpenMenuOS1->signal_clicked().connect([&]() {obj_menu_os.show();}); btnCancelHelp->signal_clicked().connect([&]() {wndShowWeb->hide();}); chkAlwaysOpenHelp->signal_toggled().connect([&]() {flag_open_browser = true;}); btnReadHelp->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::open_browser)); @@ -631,6 +848,93 @@ void MainWindow::event() { } this->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit)); chbLoadVariantSelectionTimer->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_active_boot_second)); + if (plug == NULL) { + this->signal_check_resize().connect(sigc::mem_fun(*this, &MainWindow::check_resize_window)); + } + else { + plug->get_parent()->signal_check_resize().connect(sigc::mem_fun(*this, &MainWindow::check_resize_window)); + } +} +void MainWindow::wrapper_edit_user(bool check, string column1, string column2) { + if (flag_validate_del_user && list_store_user->iter_is_valid(iter_user_del)) { + Gtk::TreeModel::Row row = *iter_user_del; + if(row) { + row[m_columns_user.check_button] = check; + row[m_columns_user.name] = column1; + row[m_columns_user.password] = column2; + } + } +} +void MainWindow::wrapper_edit_melody(bool check, string column1, string column2) { + if (flag_validate_del_melody && list_store_melody->iter_is_valid(iter_melody_del)) { + Gtk::TreeModel::Row row = *iter_melody_del; + if(row) { + row[m_columns_user.check_button] = check; + row[m_columns_user.name] = column1; + row[m_columns_user.password] = column2; + } + } +} + +void MainWindow::wrapper_edit_show_user() { + if (flag_validate_del_user && list_store_user->iter_is_valid(iter_user_del)) { + Gtk::TreeModel::Row row = *iter_user_del; + if(row) { + bool flag_activ = row[m_columns_user.check_button]; + string name = row[m_columns_user.name] + ""; + string password = row[m_columns_user.password] + ""; + obj_view_edit_add_table.set_data(flag_activ, name, password); + obj_view_edit_add_table.show_user_edit(); + + } + } + +} +void MainWindow::wrapper_edit_show_melody() { + if (flag_validate_del_melody && list_store_melody->iter_is_valid(iter_melody_del)) { + Gtk::TreeModel::Row row = *iter_melody_del; + if(row) { + bool flag_activ = row[m_columns_melody.check_button]; + string title = row[m_columns_melody.title] + ""; + string melody_code = row[m_columns_melody.melody_code] + ""; + obj_view_edit_add_table.set_data(flag_activ, title, melody_code); + obj_view_edit_add_table.show_melody_edit(); + + } + } +} + +void MainWindow::check_resize_window() { + int height = 0; + int width = 0; + if (plug == NULL) { + height = this->get_window()->get_height(); + width = this->get_window()->get_width(); + } + else { + height = plug->get_window()->get_height(); + width = plug->get_window()->get_width(); + // lblInfoHead->set_text(to_string(height)); + } + if (height != old_height) { + if (minimal_height >= height) { + cmbDownloadMode->remove_all(); + cmbDownloadMode->append(loading_animation_with); + cmbDownloadMode->append(loading_animation_without); + cmbDownloadMode->append(no_loading_animation_800_600); + cmbDownloadMode->append(lack_loading_animation_800_600); + } + else { + cmbDownloadMode->remove_all(); + cmbDownloadMode->append(loading_animation_with); + cmbDownloadMode->append(loading_animation_without); + cmbDownloadMode->append(no_loading_animation); + cmbDownloadMode->append(lack_loading_animation); + } + } + old_height = height; + old_width = width; + } void MainWindow::set_tree_view_user() { @@ -759,6 +1063,11 @@ void MainWindow::set_data_csv_melody() { } } +void MainWindow::wrapper_add_data_user() { + obj_view_edit_add_table.show_user_add(); + +} + void MainWindow::set_add_data_user(Gtk::TreeModel::Row &row, bool flag, string &name, string &password) { row = *(list_store_user->append()); row[m_columns_user.check_button] = flag; @@ -766,7 +1075,10 @@ void MainWindow::set_add_data_user(Gtk::TreeModel::Row &row, bool flag, string & row[m_columns_user.password] = password; len_old_user += 1; } - +void MainWindow::wrapper_set_add_data_user(bool flag, string &name, string &password) { + Gtk::TreeModel::Row row; + this->set_add_data_user(row, flag, name, password); +} void MainWindow::set_init_data_melody(std::map &map_temp) { treeViewMelody->remove_all_columns(); list_store_melody = Gtk::ListStore::create(m_columns_melody); @@ -794,6 +1106,14 @@ void MainWindow::set_add_data_melody(Gtk::TreeModel::Row &row, bool flag, string row[m_columns_melody.melody_code] = code; len_old_melody += 1; } +void MainWindow::wrapper_set_add_data_melody(bool flag, string &name, string &code) { + Gtk::TreeModel::Row row; + this->set_add_data_melody(row,flag, name, code); +} + +void MainWindow::wrapper_add_data_melody() { + obj_view_edit_add_table.show_melody_add(); +} void MainWindow::remove_user() { if (flag_validate_del_user && list_store_user->iter_is_valid(iter_user_del)) { @@ -829,34 +1149,12 @@ void MainWindow::select_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeMo treeViewIPT->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); iter_user_del = iter; - flag_validate_del_user = true; - bool flag_error = false; - string name = ""; - string password = ""; size_t len_new_user = 0; + flag_validate_del_user = true; Glib::RefPtr treeViewUser_model = treeViewUser->get_model(); Gtk::TreeModel::Children children = treeViewUser_model->children(); for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) { - Gtk::TreeModel::Row row = *iter; - name = row[m_columns_user.name] + ""; - password = row[m_columns_user.password] + ""; len_new_user += 1; - if (name.length() == 0 || password.length() == 0) { - flag_error = true; - - } - } - if (flag_error == true) { - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - info_status_app(info_box_error_css); - lblWarning->set_text(str_null_username); - } - else { - if ((len_old_user-1) != len_new_user) { - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(str_add_user); - } } len_old_user = len_new_user; } @@ -867,33 +1165,12 @@ void MainWindow::select_line_melody(const Gtk::TreeModel::Path&, const Gtk::Tree treeViewIPT->get_selection()->unselect_all(); treeViewUser->get_selection()->unselect_all(); iter_melody_del = iter; - flag_validate_del_melody = true; - string code_melodyes = ""; - string melody_title = ""; size_t len_new_melody = 0; - bool flag_error = false; + flag_validate_del_melody = true; Glib::RefPtr treeViewMelody_model = treeViewMelody->get_model(); Gtk::TreeModel::Children children = treeViewMelody_model->children(); for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) { - Gtk::TreeModel::Row row = *iter; - code_melodyes = row[m_columns_melody.melody_code] + ""; - melody_title = row[m_columns_melody.title] + ""; len_new_melody += 1; - if (code_melodyes.length() == 0 || melody_title.length() == 0) { - flag_error = true; - } - } - if (flag_error == true) { - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - info_status_app(info_box_error_css); - lblWarning->set_text(str_null_melody_name); - } - else { - if ((len_old_melody-1) != len_new_melody) { - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(str_add_melody); - } } this->validate_melody(); len_old_melody = len_new_melody; @@ -1161,7 +1438,6 @@ void MainWindow::temp_help_show() { else { wndShowWeb->show_all(); } - } void MainWindow::open_help() { @@ -1171,7 +1447,15 @@ void MainWindow::open_help() { void MainWindow::open_browser() { #ifdef WEBKIT_FOUND - webkit_web_view_load_uri(one, _(global_lick_doc.c_str())); + if (my_web_kit) { + gtk_widget_destroy(GTK_WIDGET(my_web_kit)); + } + my_web_kit = WEBKIT_WEB_VIEW(webkit_web_view_new()); + three = Glib::wrap(GTK_WIDGET(my_web_kit)); + wndWeb->add(*three); + webkit_web_view_load_uri(my_web_kit, _(global_lick_doc.c_str())); + wndWeb->show_all(); + webkit_web_view_load_uri(my_web_kit, _(global_lick_doc.c_str())); wndWeb->show_all(); #else this->template_open_browser(global_lick_doc); @@ -1251,9 +1535,6 @@ void MainWindow::info_warning_error(int mess) { } } MainWindow::~MainWindow() { - #ifdef WEBKIT_FOUND - free(one); - #endif } void MainWindow::add_CSS() { diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index effb636..399a601 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -36,6 +36,13 @@ extern bool flag_load_global; extern bool flag_lock_help; void me_thread(string cmd); +#define minimal_width 640 +#define minimal_height 500 +#define str_tooltip_add_user _("Add user") +#define str_tooltip_del_user _("Delete user") +#define str_tooltip_add_melody _("Add melody") +#define str_tooltip_del_melody _("Delete melody") +#define str_tooltip_boot_menu _("Selecting the loading mode option") #define copyright _("Copyright © UBSoft LLC, 2022 - ") #define name_app _("ubl-settings-bootloader") #define website _("https://wiki.ublinux.com") @@ -54,26 +61,29 @@ void me_thread(string cmd); #define str_about_1 _("About") #define str_save _("Save") #define str_load _("Load") +#define str_edit _("Edit") +#define str_adding _("Adding") #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") #define load_local _("Load local configuration") #define read_online _("Read online") -#define cancel _("Cancel") +#define str_cancel _("Cancel") #define always_redirect _("Always redirect") #define boot_screen_display_mode _("Boot screen display mode:") +#define no_loading_animation_800_600 _("No loading animation,\nfull log") #define no_loading_animation _("No loading animation, full log") #define boot_menu_user_name _("Boot menu user name:") #define boot_menu_user_password _("Boot menu user password:") #define last_successful_upload _("Last successful upload") #define read_documentation_web _("Would you like to read documentation in the Web?") -#define redirected_documentation _("You will be redirected to documentation site, where user help pages are " \ - "translated and supported by community.") +#define redirected_documentation _("You will be redirected to documentation website where documentation is\n""translated and supported by community.") #define user_name_configuration_editing_code _("User name to enter boot configuration editing mode") #define user_password_configuration_edit_mode _("User password to enter boot configuration edit mode") #define loading_animation_with _("Loading animation with the magazine") #define loading_animation_without _("Loading animation without a magazine") +#define lack_loading_animation_800_600 _("Lack of loading animation with the\noutput of the abbreviated log") #define lack_loading_animation _("Lack of loading animation with the output of the abbreviated log") #define web_url _("https://wiki.ublinux.com") #define enter_password _("Enter your password") @@ -150,6 +160,50 @@ void me_thread(string cmd); #define str_del_user _("User deleted") #define str_del_melody _("Melody deleted") +class View_edit_add_table { +private: + Glib::RefPtr builder; + Gtk::Window* wndAddEditData; + Gtk::Button* btnCancel; + Gtk::Button* btnSaveEditSave; + Gtk::CheckButton* chkAddEdit; + Gtk::Entry* entryCol1; + Gtk::Entry* entryCol2; + Gtk::Label* lblAddEditCheckBox; + Gtk::Label* lblAddEditCol1; + Gtk::Label* lblAddEditCol2; + Gtk::Label* lblEditAddHead; + bool flag_save = false; + string mode_show = ""; + +public: + struct struct_data { + bool check; + string column1; + string column2; + }; + struct struct_data old_data; + struct struct_data new_data; +public: + View_edit_add_table(); + //~View_edit_add_table(); + void settings(); + void event(); + void localization(); + void cancel(); + void save(); + void check_space_entry(); + void set_data(bool check, string column1, string column2); + struct struct_data get_data(); + void show(); + void show_melody_edit(); + void show_melody_add(); + void show_user_edit(); + void show_user_add(); + void get_builder(); +}; + + class CmdArgParser : public Glib::OptionGroup { public: @@ -207,6 +261,7 @@ public: ModelColumnsUser m_columns_user; ModelColumnsMelody m_columns_melody; Glib::RefPtr builder; + Gtk::Widget *plug = NULL; Gtk::SpinButton *spbSecond; Gtk::Label *lblBootMenuUsers; Gtk::Label *lblRingtoneStartup; @@ -225,6 +280,8 @@ public: Gtk::Button *btnRemoveUser; Gtk::Button *btnAddMusic; Gtk::Button *btnRemoveMusic; + Gtk::Button *btnEditUser; + Gtk::Button *btnEditMusic; Gtk::CheckButton *chbVgaText; Gtk::CheckButton *chbLoadVariantSelectionTimer; Gtk::Entry *entryKernel; @@ -267,8 +324,10 @@ public: Gtk::Button *btnReadHelp; Gtk::Button *btnCancelHelp; Gtk::Window *wndShowWeb; - Gtk::Button *btnOpenMenuOS; + Gtk::Button *btnOpenMenuOS1; Gtk::Entry *entrListOS; + Gtk::Overlay *overMenuOS; + Gtk::Revealer* revilerMenuOS; std::vector vec_Option_kernel; std::vector vec_Option_IPT; @@ -282,7 +341,7 @@ public: #ifdef WEBKIT_FOUND Gtk::Window *wndWeb; Gtk::Widget *three; - WebKitWebView *one; + WebKitWebView *my_web_kit = NULL; #endif Gtk::TreeModel::Row row_kernel; Gtk::TreeModel::Row row_IPT; @@ -304,6 +363,7 @@ public: vector vec_param_names; My_Process::My_Process_system obj_process_system = My_Process::My_Process_system(); My_Process::My_Process_call obj_process_call = My_Process::My_Process_call(); + View_edit_add_table obj_view_edit_add_table = View_edit_add_table(); bool flag_load = false; bool flag_save_all = false; bool flag_blocked_tree_view = false; @@ -317,7 +377,8 @@ public: size_t size_OTT = 0; size_t len_old_melody = 0; size_t len_old_user = 0; - + int old_height = 0; + int old_width = 0; Glib::RefPtr boxInfo; string str_cmd_error = ""; template @@ -404,6 +465,18 @@ public: void set_add_data_user(Gtk::TreeModel::Row &row, bool flag, string &name, string &password); void set_init_data_user(std::map &map_temp); void set_init_data_superuser(std::map &map_temp); + bool intel_idle_cstate_check(int size, Glib::RefPtr &list_store, string key); + void wrapper_add_data_user(); + void wrapper_add_data_melody(); + void check_resize_window(); + void set_plug(Gtk::Widget *plug); + void wrapper_edit_show_user(); + void wrapper_edit_show_melody(); + void wrapper_edit_melody(bool check, string column1, string column2); + void wrapper_edit_user(bool check, string column1, string column2); + void wrapper_set_add_data_melody(bool flag, string &name, string &code); + void wrapper_set_add_data_user(bool flag, string &name, string &password); + void set_menu_os_to_button(); }; class SettingsPlug : public Gtk::Plug diff --git a/ubl-settings-bootloader.css b/ubl-settings-bootloader.css index 34c1572..34e17f4 100644 --- a/ubl-settings-bootloader.css +++ b/ubl-settings-bootloader.css @@ -144,3 +144,13 @@ opacity:0.99; } +.thin{ + margin:0px; + padding: 0px; +} +.nobg{ + background: none; +} +.addbg * { + background-color: @theme_bg_color; +} \ No newline at end of file diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 8b01366..9ffb834 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -111,8 +111,7 @@ 5 5 5 - Running applications as a user with a -specified priority + ubl-settings-bootloader @@ -154,12 +153,19 @@ specified priority True True - + True - False - gtk-goto-last + True + False + True + right + + + @@ -283,8 +289,8 @@ specified priority - 760 - 560 + 650 + 500 False com.ublinux.ubl-settings-bootloader @@ -403,94 +409,73 @@ specified priority False 5 - + True False - vertical - - - True - False - - - Boot selection menu timer - True - True - False - 3 - 5 - 3 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Seconds - - - False - True - 2 - - - - - False - True - 0 - - True False + vertical - + True False - start - 5 - 5 - 5 - 5 - 5 - 5 - Default load - start - 0 + + + Boot selection menu timer + True + True + False + 3 + 5 + 3 + 5 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Seconds + + + False + True + 2 + + False @@ -499,81 +484,130 @@ specified priority - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - True - 2 - - - - + True - True - True - 5 - 10 - 5 - 10 - 5 - 5 + False - + True False - open-menu-symbolic + start + 5 + 5 + 5 + 5 + 5 + 5 + Default load + start + 0 + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + True + 2 + + + + + True + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + image-loading-symbolic + + + + False + True + 3 + False True - 3 + 1 - - - False - True - 1 - - - - - True - False - + True False - start - 5 - 5 - 5 - 5 - 5 - 5 - Load screen display mode: - start - 0 + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Load screen display mode: + start + 0 + + + False + True + 0 + + + + + True + False + 5 + 10 + 5 + 10 + 5 + 5 + + + True + True + 1 + + False True - 0 + 2 - + True False 5 @@ -582,58 +616,35 @@ specified priority 10 5 5 - - - True - True - 1 - - - - - False - True - 2 - - - - - True - False - 5 - 10 - 5 - 10 - 5 - 5 - 0.019999999552965164 - in - - - True - False + 0.019999999552965164 + in - + True False - 5 - + True False - vertical + 5 - - 65 + True - True - 3 - 5 - 3 - 5 - in + False + vertical - + + 100 + True + True + 5 + 3 + 5 + 3 + 5 + in + + True False @@ -645,71 +656,103 @@ specified priority + + + + False + True + 0 + - - False - True - 0 - + + True + True + 0 + - - - True - True - 0 - - - - - True - False - vertical - + True - True - True - 5 - 10 - 5 - 10 - 5 - 5 + False + vertical - + True - False - list-add + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + list-add + + + + False + True + 0 + - - - False - True - 0 - - - - - True - True - True - 5 - 10 - 5 - 10 - 3 - 10 - + True - False - gtk-remove + True + True + 5 + 10 + 5 + 10 + 3 + 5 + + + True + False + gtk-select-all + + + + + False + True + 1 + + + + + True + True + True + 5 + 10 + 5 + 10 + 3 + 10 + + + True + False + gtk-remove + + + + False + True + 2 + @@ -719,74 +762,68 @@ specified priority - - False - True - 1 - + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Boot Menu Users + start + + + False + True + 5 + - - + + True False - start 5 - 5 + 10 5 - 5 + 10 5 5 - Boot Menu Users - start - - - - - False - True - 5 - - - - - True - False - 5 - 10 - 5 - 10 - 5 - 5 - 0.019999999552965164 - in - - - True - False + 0.019999999552965164 + in - + True False - 5 - + True False - vertical + 5 - - 65 + True - True - 5 - 5 - 5 - 5 - in + False + vertical - + + 100 + True + True + 5 + 5 + 5 + 5 + 5 + in + + True False @@ -798,6 +835,45 @@ specified priority + + + + + False + True + 0 + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + list-add @@ -807,62 +883,55 @@ specified priority 0 - - - - - True - True - 0 - - - - - True - False - vertical - - - True - True - True - 5 - 10 - 5 - 10 - 5 - 5 - + True - False - list-add + True + True + 5 + 10 + 5 + 10 + 3 + 5 + + + True + False + gtk-select-all + + + + False + True + 1 + - - - False - True - 0 - - - - - True - True - True - 5 - 10 - 5 - 10 - 3 - 10 - + True - False - gtk-remove + True + True + 5 + 10 + 5 + 10 + 3 + 10 + + + True + False + gtk-remove + + + + False + True + 2 + @@ -872,34 +941,32 @@ specified priority - - False - True - 1 - + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Ringtone at startup + start + - - - - True - False - start - 5 - 5 - 5 - 5 - 5 - 5 - Ringtone at startup - start - + + False + True + 5 + - False - True - 5 + -1 @@ -1522,18 +1589,18 @@ specified priority both True - - - + + + both True - - - + + + @@ -1543,12 +1610,120 @@ specified priority - + False - btnOpenMenuOS - bottom + Внимание! + center + dialog + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 50 + gtk-dialog-warning + + + True + True + 0 + + + + + 160 + True + False + start + center + 5 + 5 + 5 + 5 + 5 + 5 + 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 + + + + + + + + True + False + end + start + 5 + 5 + 10 + 10 + slide-right + + True False @@ -1596,12 +1771,21 @@ specified priority True True - + True - False - start + True + False + True 0 - gtk-goto-first + left + + + + @@ -1637,12 +1821,15 @@ specified priority + - + False - Внимание! - center - dialog + True + True + com.ublinux.ubl-settings-datetime True @@ -1652,12 +1839,8 @@ specified priority True False - 5 - 5 - 5 - 5 - + True False 5 @@ -1666,32 +1849,33 @@ specified priority 5 5 5 - 50 - gtk-dialog-warning + label + 0 - True + False True 0 - - 160 + True - False - start - center + True + False 5 5 5 5 - 5 + 7 5 - Warning! + True + + + - True + False True 1 @@ -1700,46 +1884,213 @@ specified priority False True + 0 + + + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + label + 0 + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + label + 0 + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + True + 1 + + + + + False + True + 1 + + + + + True + True 1 - - OK + True - True - True - 5 - 5 - 5 - 5 - 3 - 3 + False + + + True + False + + + False + True + 0 + + + + + gtk-cancel + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + True + + + False + True + end + 1 + + + + + gtk-save + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + True + + + False + True + end + 1 + + False True - 1 + 3 - - - True - False - none - - + + True False - vertical + True + + + True + False + ubl-settings-bootloader + + - + + True + False + 32 + com.ublinux.ubl-settings-bootloader + 5 + + + + + + + + + False start diff --git a/ubl-settings-bootloader.pot b/ubl-settings-bootloader.pot index 51cc8f7..7b40070 100644 --- a/ubl-settings-bootloader.pot +++ b/ubl-settings-bootloader.pot @@ -17,6 +17,33 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Edit" +msgstr "" + +msgid "Adding" +msgstr "" + +msgid "Selecting the loading mode option" +msgstr "" + +msgid "Add user" +msgstr "" + +msgid "Delete user" +msgstr "" + +msgid "Add melody" +msgstr "" + +msgid "No loading animation, full log" +msgstr "" + +msgid "Lack of loading animation with the output of the abbreviated log" +msgstr "" + +msgid "Delete melody" +msgstr "Удалить мелодию" + msgid "Melody added" msgstr "" @@ -457,7 +484,7 @@ msgstr "" #: source/ubl-settings-bootloader.h:70 source/ubl-settings-bootloader.h:69 msgid "" -"You will be redirected to documentation site, where user help pages are " +"You will be redirected to documentation website where documentation is\n" "translated and supported by community." msgstr "" diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index ba664af..952e3ff 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -17,6 +17,27 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Edit" +msgstr "Редактирование" + +msgid "Adding" +msgstr "Добавление" + +msgid "Selecting the loading mode option" +msgstr "Выбор варианта режима загрузки" + +msgid "Add user" +msgstr "Добавить пользователя" + +msgid "Delete user" +msgstr "Удалить пользователя" + +msgid "Add melody" +msgstr "Добавить мелодию" + +msgid "Delete melody" +msgstr "Удалить мелодию" + #: source/ubl-settings-bootloader.h:53 source/ubl-settings-bootloader.h:52 #: source/ubl-settings-bootloader.cc:431 source/ubl-settings-bootloader.cc:301 msgid "About" @@ -24,7 +45,7 @@ msgstr "О программе" #: source/ubl-settings-bootloader.h:44 source/ubl-settings-bootloader.h:43 msgid "About ubl-settings-bootloader" -msgstr "О программе Настройка загрузки системы" +msgstr "О программе Загрузка системы" #: source/ubl-settings-bootloader.h:92 source/ubl-settings-bootloader.h:91 #: source/ubl-settings-bootloader.cc:337 source/ubl-settings-bootloader.cc:199 @@ -205,6 +226,9 @@ msgstr "Терминал для вывода" #: source/ubl-settings-bootloader.h:75 source/ubl-settings-bootloader.h:74 #: source/ubl-settings-bootloader.cc:451 +msgid "Lack of loading animation with the\noutput of the abbreviated log" +msgstr "Отсутствие анимации загрузки с\nвыводом сокращенного журнала" + msgid "Lack of loading animation with the output of the abbreviated log" msgstr "Отсутствие анимации загрузки с выводом сокращенного журнала" @@ -294,6 +318,9 @@ msgid "Maximum performance, power management" msgstr "Максимальная производительность, управление питанием" #: source/ubl-settings-bootloader.h:65 source/ubl-settings-bootloader.h:64 +msgid "No loading animation,\nfull log" +msgstr "Отсутствие анимации загрузки\nс выводом журнала" + msgid "No loading animation, full log" msgstr "Отсутствие анимации загрузки с выводом журнала" @@ -481,10 +508,10 @@ msgstr "Вы хотите прочитать справку в Сети?" #: source/ubl-settings-bootloader.h:70 source/ubl-settings-bootloader.h:69 msgid "" -"You will be redirected to documentation site, where user help pages are " +"You will be redirected to documentation website where documentation is\n" "translated and supported by community." msgstr "" -"Вы будете перенаправлены на сайт с документацией где страницы помощи " +"Вы будете перенаправлены на сайт с документацией где страницы помощи\n" "переводятся и поддерживаются сообществом." msgid "acpi=off (Disable ACPI)" @@ -579,7 +606,7 @@ msgstr "splash (Показать окно приветствия)" #: source/ubl-settings-bootloader.cc:439 source/ubl-settings-bootloader.cc:281 #: source/ubl-settings-bootloader.cc:286 source/ubl-settings-bootloader.cc:309 msgid "ubl-settings-bootloader" -msgstr "Настройка загрузки системы" +msgstr "Загрузка системы" #: source/ubl-settings-bootloader.h:79 source/ubl-settings-bootloader.h:78 #: source/ubl-settings-bootloader.cc:947 source/ubl-settings-bootloader.cc:547