refactor interface

This commit is contained in:
2020-05-26 18:09:22 +02:00
parent c4e2ec96dd
commit 90a76301f2
14 changed files with 42 additions and 63 deletions

View File

@@ -6,6 +6,7 @@ controller_info::controller_info(view_info *view, session_manager *sesion)
this->view=view;
this->sesion=sesion;
this->load_info();
this->add_controlers();
}
void controller_info::load_info(){
@@ -25,3 +26,18 @@ std::string controller_info::get_first(std::string &info){
info=info.substr(pos+1, info.size()+1);
return ret;
}
void controller_info::add_controlers(){
this->view->b_remove.signal_clicked().connect(sigc::mem_fun(this,
&controller_info::on_button_clicked));
}
void controller_info::on_button_clicked(){
Gtk::TreeModel::Row row = *this->view->tree.get_selection()->get_selected();
std::string name=row.get_value(this->view->m_Columns.r_name);
if(name.find("Gtk-CRITICAL **:")==std::string::npos){
this->sesion->remove_command(name);
}
this->view->restart_table();
this->load_info();
}