ref->get_widget("color_select_dlg",color_select_dlg);
ref->get_widget("dlg_select_color_cancel",dlg_select_color_cancel);
ref->get_widget("dlg_select_color_ok",dlg_select_color_ok);
+
+ Glib::RefPtr<Gnome::Glade::Xml> ref2 = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "dlg_flot");
+ ref2->get_widget("dlg_flot",dlg_flot);
+ ref2->get_widget("btn_dlg_flot_ok",btn_dlg_flot_ok);
+
+ btn_dlg_flot_ok->signal_clicked().connect(SigC::slot(*this,&CisternPtyWnd::on_btn_dlg_flot_ok_clicked));
btn_select_color->signal_clicked().connect(SigC::slot(*this,&CisternPtyWnd::on_btn_select_color_clicked));
dlg_select_color_cancel->signal_clicked().connect(SigC::slot(*this,&CisternPtyWnd::on_dlg_select_color_cancel_clicked));
void CisternPtyWnd::on_btn_accept_clicked()
{
CisternPtyWnd::on_btn_apply_clicked();
- if ( !cistern->workplace->chek_name(txt_cistern_name->get_text(), cistern->get_id()) )
+ if ( !cistern->workplace->chek_name(txt_cistern_name->get_text(), cistern->get_id()) && ( spin_flot_inf->get_value() < spin_flot_sup->get_value() ) )
hide();
}
cistern->set_capacidad( spin_capacidad->get_value() );
cistern->set_contenido_inicial( spin_inicial->get_value() );
cistern->set_name( txt_cistern_name->get_text() );
- cistern->set_flotante_inf(spin_flot_inf->get_value() );
- cistern->set_flotante_sup(spin_flot_sup->get_value() );
color_select_dlg->get_colorsel()->set_current_color(cistern->get_liquid_color());
if ( cistern->workplace->chek_name(txt_cistern_name->get_text(), cistern->get_id()) )
dlg_name->show();
else
cistern->set_name( txt_cistern_name->get_text() );
+ if ( spin_flot_inf->get_value() >= spin_flot_sup->get_value() )
+ dlg_flot->show();
+ else {
+ cistern->set_flotante_inf(spin_flot_inf->get_value() );
+ cistern->set_flotante_sup(spin_flot_sup->get_value() );
+ }
}
void CisternPtyWnd::on_btn_select_color_clicked()
color_preview->modify_bg( Gtk::STATE_NORMAL , cistern->get_liquid_color() );
color_select_dlg->hide();
}
+
+void CisternPtyWnd::on_btn_dlg_flot_ok_clicked()
+{
+ dlg_flot->hide();
+}