work_place = 0;
lbl_cap_flujo = lbl_cap_extra = lbl_extra = lbl_nombre = lbl_color = lbl_flujo = 0;
+ rg->get_widget("btn_activar", btn_activar);
rg->get_widget("color_preview", color_preview);
rg->get_widget("lbl_nombre", lbl_nombre);
rg->get_widget("lbl_extra", lbl_extra);
exit->signal_activate().connect( SigC::slot(*this, &Principal::on_mnu_file_exit));
about->signal_activate().connect( SigC::slot(*this, &Principal::on_mnu_help_about));
btn_get->signal_clicked().connect( SigC::slot(*this, &Principal::on_get_clicked) );
+ btn_activar->signal_clicked().connect( SigC::slot(*this, &Principal::on_btn_activar_clicked) );
conexion = NULL;
is_xml_loaded = false;
Gtk::Main::quit();
}
+void Principal::on_btn_activar_clicked()
+{
+ if ((conexion == NULL) || (last_selected == NULL)) return;
+
+ PlaQui::Server::Command c("plant", "set");
+ c.add_arg("default");
+ c.add_arg(last_selected->get_name());
+ c.add_arg("open");
+
+ if (last_selected->get_open())
+ c.add_arg("false");
+ else
+ c.add_arg("true");
+
+ conexion->send(c);
+}
+
void Principal::on_mnu_file_disconnect()
{
if (conexion == NULL) return;
color_preview->modify_bg(Gtk::STATE_NORMAL, last_selected->get_color());
color_preview->queue_draw();
-
- std::cout << last_selected->get_name() << " " << last_selected->get_color().get_red() << std::endl;
}
void Principal::on_conexion_connected()