diff --git a/ClienteTFG.pro.user b/ClienteTFG.pro.user index 10c2889..e6c828e 100644 --- a/ClienteTFG.pro.user +++ b/ClienteTFG.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/controller_info.cpp b/controller_info.cpp index e9cde45..1ca5a06 100644 --- a/controller_info.cpp +++ b/controller_info.cpp @@ -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 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(); } diff --git a/controller_install.cpp b/controller_install.cpp index 51d8480..0b6f738 100644 --- a/controller_install.cpp +++ b/controller_install.cpp @@ -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); diff --git a/session_manager.cpp b/session_manager.cpp index 5802dc7..68c7dfb 100644 --- a/session_manager.cpp +++ b/session_manager.cpp @@ -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){