|
|
|
@ -97,7 +97,6 @@ void MainWindow::settings() {
|
|
|
|
this->pars_os(os_control_list);
|
|
|
|
this->pars_os(os_control_list);
|
|
|
|
this->download_local_cfg();
|
|
|
|
this->download_local_cfg();
|
|
|
|
this->download_globl_cfg();
|
|
|
|
this->download_globl_cfg();
|
|
|
|
//this->view_add_colums_melody(*treeViewMelody);
|
|
|
|
|
|
|
|
vector<tuple<string, vector<string>>> vec_list_os = format_os_list(os_control_list);
|
|
|
|
vector<tuple<string, vector<string>>> vec_list_os = format_os_list(os_control_list);
|
|
|
|
obj_menu_os.set_builder(builder, path_glade);
|
|
|
|
obj_menu_os.set_builder(builder, path_glade);
|
|
|
|
obj_menu_os.set_map(vec_list_os);
|
|
|
|
obj_menu_os.set_map(vec_list_os);
|
|
|
|
@ -129,7 +128,6 @@ vector<tuple<string, vector<string>>> MainWindow::format_os_list(vector<string>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
vector<string> vec_os;
|
|
|
|
vector<string> vec_os;
|
|
|
|
//vec_os.push_back(" ");
|
|
|
|
|
|
|
|
tuple<string, vector<string>> t1(name_os, vec_os);
|
|
|
|
tuple<string, vector<string>> t1(name_os, vec_os);
|
|
|
|
vec_list_os.push_back(t1);
|
|
|
|
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&) {
|
|
|
|
void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
|
|
|
|
auto selection_kernel = treeViewKernel->get_selection();
|
|
|
|
|
|
|
|
treeViewKernel->get_selection()->unselect_all();
|
|
|
|
treeViewKernel->get_selection()->unselect_all();
|
|
|
|
treeViewOTT->get_selection()->unselect_all();
|
|
|
|
treeViewOTT->get_selection()->unselect_all();
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
@ -505,47 +502,30 @@ vector<string> MainWindow::get_setting_entry_all(string key, std::map <string, s
|
|
|
|
return vec_params;
|
|
|
|
return vec_params;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_out_txt_kernel(GdkEventFocus*) {
|
|
|
|
void MainWindow::focus_out_txt_kernel() {
|
|
|
|
treeViewKernel->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
this->set_entry_to_tree_view(list_store_kernel, *entryKernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX");
|
|
|
|
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");
|
|
|
|
this->set_row_all(map_cmd_selection, list_store_kernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX");
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_out_txt_IPT(GdkEventFocus*) {
|
|
|
|
void MainWindow::focus_out_txt_IPT() {
|
|
|
|
treeViewIPT->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
this->set_entry_to_tree_view(list_store_IPT, *entryIPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
|
|
|
|
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");
|
|
|
|
this->set_row_all(map_cmd_selection, list_store_IPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_out_txt_OTT(GdkEventFocus*) {
|
|
|
|
void MainWindow::focus_out_txt_OTT() {
|
|
|
|
treeViewIPT->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
this->set_entry_to_tree_view(list_store_OTT, *entryOTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
|
|
|
|
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");
|
|
|
|
this->set_row_all(map_cmd_selection, list_store_OTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
flag_blocked_tree_view = false;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_in_txt_kernel(GdkEventFocus*) {
|
|
|
|
bool MainWindow::focus_in_txt_entry(GdkEventFocus*) {
|
|
|
|
auto selection_kernel = treeViewKernel->get_selection();
|
|
|
|
treeViewKernel->get_selection()->unselect_all();
|
|
|
|
selection_kernel->unselect_all();
|
|
|
|
treeViewIPT->get_selection()->unselect_all();
|
|
|
|
return true;
|
|
|
|
treeViewOTT->get_selection()->unselect_all();
|
|
|
|
}
|
|
|
|
treeViewUser->get_selection()->unselect_all();
|
|
|
|
|
|
|
|
treeViewMelody->get_selection()->unselect_all();
|
|
|
|
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();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -629,9 +609,9 @@ void MainWindow::event() {
|
|
|
|
btnSaveLocalGlob->signal_activate().connect([&]() {wrapper_save_all_cfg();});
|
|
|
|
btnSaveLocalGlob->signal_activate().connect([&]() {wrapper_save_all_cfg();});
|
|
|
|
btnSaveLocal->signal_activate().connect([&]() {wrapper_save_local_cfg();});
|
|
|
|
btnSaveLocal->signal_activate().connect([&]() {wrapper_save_local_cfg();});
|
|
|
|
btnSaveGlob->signal_activate().connect([&]() {wrapper_save_global_cfg();});
|
|
|
|
btnSaveGlob->signal_activate().connect([&]() {wrapper_save_global_cfg();});
|
|
|
|
entryKernel->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_kernel));
|
|
|
|
entryKernel->signal_changed().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));
|
|
|
|
entryIPT->signal_changed().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));
|
|
|
|
entryOTT->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT));
|
|
|
|
if (this->check_root() == 0) {
|
|
|
|
if (this->check_root() == 0) {
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewKernelModel = treeViewKernel->get_model();
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewKernelModel = treeViewKernel->get_model();
|
|
|
|
treeViewKernelModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_kernel));
|
|
|
|
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));
|
|
|
|
treeViewIPTModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_IPT));
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewOTTModel = treeViewOTT->get_model();
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewOTTModel = treeViewOTT->get_model();
|
|
|
|
treeViewOTTModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_OTT));
|
|
|
|
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));
|
|
|
|
entryKernel->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry));
|
|
|
|
entryIPT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_IPT));
|
|
|
|
entryIPT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry));
|
|
|
|
entryOTT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT));
|
|
|
|
entryOTT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_entry));
|
|
|
|
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));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit));
|
|
|
|
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));
|
|
|
|
chbLoadVariantSelectionTimer->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_active_boot_second));
|
|
|
|
|