void View::show_dialog(const char *name) { Gtk::Dialog *dialog; m_builder->get_widget (name, dialog); if (!dialog) { cerr << "no such dialog " << name << "\n"; return; } dialog->signal_response().connect (sigc::bind(sigc::mem_fun(*this, &View::hide_on_response), dialog)); dialog->show(); dialog->set_transient_for (*this); }
void VRConceptWidget::on_edit_prop_clicked() { if (!selected_property) return; Gtk::Dialog* dialog; VRGuiBuilder()->get_widget("PropertyEdit", dialog); setTextEntry("entry23", selected_property->getName()); setTextEntry("entry24", selected_property->type); dialog->show(); if (dialog->run() == Gtk::RESPONSE_OK) { selected_property->setName( getTextEntry("entry23") ); selected_property->type = getTextEntry("entry24"); saveScene(); } dialog->hide(); update(); }