minor fixes
This commit is contained in:
		
							parent
							
								
									adf1bc70ce
								
							
						
					
					
						commit
						5e3c918245
					
				| @ -1,6 +1,6 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <!DOCTYPE QtCreatorProject> | <!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> | <qtcreator> | ||||||
|  <data> |  <data> | ||||||
|   <variable>EnvironmentId</variable> |   <variable>EnvironmentId</variable> | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ controller_info::controller_info(view_info *view, session_manager *sesion) | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void controller_info::load_info(){ | void controller_info::load_info(){ | ||||||
|  |   this->view->restart_table(); | ||||||
|   std::list<std::string> list=this->sesion->get_packages_info(); |   std::list<std::string> list=this->sesion->get_packages_info(); | ||||||
|   for(std::string data:list){ |   for(std::string data:list){ | ||||||
|       Gtk::TreeModel::Row row = *(this->view->m_refTreeModel->append()); |       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){ |   if(name.find("Gtk-CRITICAL **:")==std::string::npos){ | ||||||
|       this->sesion->remove_command(name); |       this->sesion->remove_command(name); | ||||||
|     } |     } | ||||||
|   this->view->restart_table(); |  | ||||||
|   this->load_info(); |   this->load_info(); | ||||||
| } | } | ||||||
|  | |||||||
| @ -25,6 +25,7 @@ void controller_install::on_button_clicked(){ | |||||||
|   if(result==-5){ |   if(result==-5){ | ||||||
|       int res=this->sesi->install_command(n_package); |       int res=this->sesi->install_command(n_package); | ||||||
|       mes.close(); |       mes.close(); | ||||||
|  |       con->load_info(); | ||||||
|       if(res>0){ |       if(res>0){ | ||||||
|           con->load_info(); |           con->load_info(); | ||||||
|           Gtk::MessageDialog mesf=Gtk::MessageDialog("Compile end satisfactorily",false,Gtk::MessageType::MESSAGE_INFO, Gtk::ButtonsType::BUTTONS_OK); |           Gtk::MessageDialog mesf=Gtk::MessageDialog("Compile end satisfactorily",false,Gtk::MessageType::MESSAGE_INFO, Gtk::ButtonsType::BUTTONS_OK); | ||||||
|  | |||||||
| @ -40,7 +40,7 @@ int session_manager::install_command(std::string package){ | |||||||
|     } |     } | ||||||
|   std::string buffer; |   std::string buffer; | ||||||
|   this->con->read_string(buffer,2); |   this->con->read_string(buffer,2); | ||||||
|   return atoi(buffer.data()); |   return (buffer=="ok")?1:-1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int session_manager::remove_command(std::string package){ | int session_manager::remove_command(std::string package){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user