minor fixes

This commit is contained in:
Guillermo Roche 2020-06-03 22:39:48 +02:00
parent adf1bc70ce
commit 5e3c918245
4 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.8.2, 2020-06-03T15:11:45. -->
<!-- Written by QtCreator 4.8.2, 2020-06-03T22:37:50. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -10,6 +10,7 @@ controller_info::controller_info(view_info *view, session_manager *sesion)
}
void controller_info::load_info(){
this->view->restart_table();
std::list<std::string> list=this->sesion->get_packages_info();
for(std::string data:list){
Gtk::TreeModel::Row row = *(this->view->m_refTreeModel->append());
@ -38,6 +39,5 @@ void controller_info::on_button_clicked(){
if(name.find("Gtk-CRITICAL **:")==std::string::npos){
this->sesion->remove_command(name);
}
this->view->restart_table();
this->load_info();
}

View File

@ -25,6 +25,7 @@ void controller_install::on_button_clicked(){
if(result==-5){
int res=this->sesi->install_command(n_package);
mes.close();
con->load_info();
if(res>0){
con->load_info();
Gtk::MessageDialog mesf=Gtk::MessageDialog("Compile end satisfactorily",false,Gtk::MessageType::MESSAGE_INFO, Gtk::ButtonsType::BUTTONS_OK);

View File

@ -40,7 +40,7 @@ int session_manager::install_command(std::string package){
}
std::string buffer;
this->con->read_string(buffer,2);
return atoi(buffer.data());
return (buffer=="ok")?1:-1;
}
int session_manager::remove_command(std::string package){