refGlade->get_widget("btn_check",btn_check);
refGlade->get_widget("dlg_connect", dlg_connect);
refGlade->get_widget("btn_dlg_close", btn_dlg_close);
+ refGlade->get_widget("dlg_label", dlg_label);
refGlade->get_widget_derived("workplace", workplace); //fixed
void Constructor::on_btn_check_clicked()
{
std::list<CItem *>::iterator i = listaItems.begin();
- while ( i != listaItems.end() ) {
- CItem *temp = *i;
- if ( !temp->check_connection() ) {
- dlg_connect->show();
- break;
+ if ( !listaItems.empty() ) {
+ while ( i != listaItems.end() ) {
+ CItem *temp = *i;
+ if ( !temp->check_connection() ) {
+ dlg_connect->set_title("Error");
+ dlg_label->set_text("Los elementos no estan conectados\n\t\tcorrectamente");
+ dlg_connect->show();
+ return;
+ }
+ i++;
}
- i++;
+ dlg_connect->set_title("Conexion");
+ dlg_label->set_text("Los elementos estan conectados\n\t\tcorrectamente");
+ dlg_connect->show();
}
}