diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index eec5978..02e32ea 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -636,6 +636,30 @@ bool MainWindow::focus_out_txt_OTT(GdkEventFocus*) { 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(); + return true; +} + + + + void MainWindow::set_entry_to_tree_view(Glib::RefPtr &list_store, Gtk::Entry &entry, std::vector &vec_Option, int size, string key) { flag_blocked_tree_view = true; vector vec_params; @@ -727,12 +751,12 @@ 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_tree_view)); - // entryIPT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_tree_view)); - // entryOTT->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_tree_view)); + 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)); } this->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit)); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 0856c2a..c4c5abb 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -313,6 +313,9 @@ public: 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 fill_in_view(); bool focus_tree_view(GdkEventFocus *); void set_security_login();