#include "controller_info.h" controller_info::controller_info(view_info *view, session_manager *sesion) { this->view=view; this->sesion=sesion; this->load_info(); } void controller_info::load_info(){ std::list list=this->sesion->get_packages_info(); for(std::string data:list){ Gtk::TreeModel::Row row = *(this->view->m_refTreeModel->append()); row[this->view->m_Columns.r_name]=get_first(data); row[this->view->m_Columns.r_date]=get_first(data); row[this->view->m_Columns.r_config]=(get_first(data)=="t"); row[this->view->m_Columns.r_user]=get_first(data); } } std::string controller_info::get_first(std::string &info){ int pos = info.find(":"); std::string ret = info.substr(0, pos); info=info.substr(pos+1, info.size()+1); return ret; }