int wxColourDialog::ShowModal() { ColourDataToDialog(); gulong id = g_signal_connect(m_widget, "response", G_CALLBACK(response), this); int rc = wxDialog::ShowModal(); g_signal_handler_disconnect(m_widget, id); if (rc == wxID_OK) DialogToColourData(); return rc; }
int wxColourDialog::ShowModal() { ColourDataToDialog(); gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); gtk_widget_hide(m_widget); switch (result) { default: wxFAIL_MSG(wxT("unexpected GtkColorSelectionDialog return code")); // fall through case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: return wxID_CANCEL; case GTK_RESPONSE_OK: DialogToColourData(); return wxID_OK; } }