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();
}
}
</child>
<child>
- <widget class="GtkLabel" id="label21">
+ <widget class="GtkLabel" id="dlg_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Los elementos no estan conectados
- correctamente</property>
+ correctamente</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_FILL</property>
Gtk::FileSelection *file_selection;
Gtk::Entry *combo_entry;
Gtk::Dialog *dlg_connect;
+ Gtk::Label *dlg_label;
Glib::RefPtr<Gdk::Pixbuf> ico_canio, ico_y, ico_codo, ico_tanque;
Glib::RefPtr<Gdk::Pixbuf> ico_last;
std::list<Gtk::TargetEntry> listTargets;