refactor interface
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user