diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 6e1d0ef..569aa6c 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -97,7 +97,6 @@ void MainWindow::settings() { this->pars_os(os_control_list); this->download_local_cfg(); this->download_globl_cfg(); - //this->view_add_colums_melody(*treeViewMelody); vector>> vec_list_os = format_os_list(os_control_list); obj_menu_os.set_builder(builder, path_glade); obj_menu_os.set_map(vec_list_os); @@ -129,7 +128,6 @@ vector>> MainWindow::format_os_list(vector } else { vector vec_os; - //vec_os.push_back(" "); tuple> t1(name_os, vec_os); vec_list_os.push_back(t1); } @@ -249,7 +247,6 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM } void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) { - auto selection_kernel = treeViewKernel->get_selection(); treeViewKernel->get_selection()->unselect_all(); treeViewOTT->get_selection()->unselect_all(); treeViewUser->get_selection()->unselect_all(); @@ -505,47 +502,30 @@ vector MainWindow::get_setting_entry_all(string key, std::map get_selection()->unselect_all(); - treeViewUser->get_selection()->unselect_all(); +void MainWindow::focus_out_txt_kernel() { this->set_entry_to_tree_view(list_store_kernel, *entryKernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX"); this->set_row_all(map_cmd_selection, list_store_kernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX"); flag_blocked_tree_view = false; - return true; } -bool MainWindow::focus_out_txt_IPT(GdkEventFocus*) { - treeViewIPT->get_selection()->unselect_all(); - treeViewUser->get_selection()->unselect_all(); +void MainWindow::focus_out_txt_IPT() { this->set_entry_to_tree_view(list_store_IPT, *entryIPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT"); this->set_row_all(map_cmd_selection, list_store_IPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT"); flag_blocked_tree_view = false; - return true; } -bool MainWindow::focus_out_txt_OTT(GdkEventFocus*) { - treeViewIPT->get_selection()->unselect_all(); - treeViewUser->get_selection()->unselect_all(); +void MainWindow::focus_out_txt_OTT() { this->set_entry_to_tree_view(list_store_OTT, *entryOTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT"); this->set_row_all(map_cmd_selection, list_store_OTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT"); flag_blocked_tree_view = false; - return true; } -bool MainWindow::focus_in_txt_kernel(GdkEventFocus*) { - auto selection_kernel = treeViewKernel->get_selection(); - selection_kernel->unselect_all(); - return true; -} - -bool MainWindow::focus_in_txt_IPT(GdkEventFocus*) { - auto selection_IPT = treeViewIPT->get_selection(); - selection_IPT->unselect_all(); - return true; -} -bool MainWindow::focus_in_txt_OTT(GdkEventFocus*) { - auto selection_OTT = treeViewIPT->get_selection(); - selection_OTT->unselect_all(); +bool MainWindow::focus_in_txt_entry(GdkEventFocus*) { + treeViewKernel->get_selection()->unselect_all(); + treeViewIPT->get_selection()->unselect_all(); + treeViewOTT->get_selection()->unselect_all(); + treeViewUser->get_selection()->unselect_all(); + treeViewMelody->get_selection()->unselect_all(); return true; } @@ -629,9 +609,9 @@ void MainWindow::event() { btnSaveLocalGlob->signal_activate().connect([&]() {wrapper_save_all_cfg();}); btnSaveLocal->signal_activate().connect([&]() {wrapper_save_local_cfg();}); btnSaveGlob->signal_activate().connect([&]() {wrapper_save_global_cfg();}); - entryKernel->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_kernel)); - entryIPT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_IPT)); - entryOTT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT)); + entryKernel->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_kernel)); + entryIPT->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_IPT)); + entryOTT->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT)); if (this->check_root() == 0) { Glib::RefPtr treeViewKernelModel = treeViewKernel->get_model(); treeViewKernelModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_kernel)); @@ -639,12 +619,9 @@ void MainWindow::event() { treeViewIPTModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_IPT)); Glib::RefPtr treeViewOTTModel = treeViewOTT->get_model(); treeViewOTTModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_OTT)); - entryKernel->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_kernel)); - entryIPT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_IPT)); - entryOTT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT)); - entryKernel->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_kernel)); - entryIPT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_IPT)); - entryOTT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_OTT)); + entryKernel->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry)); + entryIPT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry)); + entryOTT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry)); } 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)); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 8f4e724..f379116 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -369,12 +369,10 @@ public: bool check_save(string flag_save, string key_name); void info_warning_error(int mess); int check_root(); - bool focus_out_txt_kernel(GdkEventFocus *); - bool focus_out_txt_IPT(GdkEventFocus *); - bool focus_out_txt_OTT(GdkEventFocus *); - bool focus_in_txt_kernel(GdkEventFocus *); - bool focus_in_txt_IPT(GdkEventFocus *); - bool focus_in_txt_OTT(GdkEventFocus *); + void focus_out_txt_kernel(); + void focus_out_txt_IPT(); + void focus_out_txt_OTT(); + bool focus_in_txt_entry(GdkEventFocus*); void fill_in_view(); bool focus_tree_view(GdkEventFocus *); bool check_flag_save(string flag_save); diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index af28065..50e5e9c 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -950,7 +950,7 @@ specified priority 5 5 5 - 6 + 1 6 Command line parameters: @@ -1031,8 +1031,12 @@ specified priority 140 True True + 5 5 + 5 5 + 6 + 6 in @@ -1068,7 +1072,7 @@ specified priority 5 5 5 - 6 + 1 6 Command line parameters: @@ -1149,8 +1153,12 @@ specified priority 140 True True + 5 5 + 5 5 + 6 + 6 in @@ -1186,7 +1194,7 @@ specified priority 5 5 5 - 6 + 1 6 Command line parameters: