From: Vadim Zeitlin Date: Sun, 8 Oct 2006 15:15:32 +0000 (+0000) Subject: close the dialog when close button is pressed, this is apparently needed by older... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9948db2bf3b3d5f1515023b0dc0d05ced1e38eb3 close the dialog when close button is pressed, this is apparently needed by older GTK+ versions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/aboutdlg.cpp b/src/gtk/aboutdlg.cpp index 5f83dc37fd..c5c7355563 100644 --- a/src/gtk/aboutdlg.cpp +++ b/src/gtk/aboutdlg.cpp @@ -82,6 +82,12 @@ private: // implementation // ============================================================================ +extern "C" void +wxGtkAboutDialogOnClose(GtkAboutDialog *about) +{ + gtk_widget_destroy(GTK_WIDGET(about)); +} + extern "C" void wxGtkAboutDialogOnLink(GtkAboutDialog * WXUNUSED(about), const gchar *link, @@ -149,6 +155,9 @@ void wxAboutBox(const wxAboutDialogInfo& info) gtk_about_dialog_set_translator_credits(dlg, GtkStr(transCredits)); + g_signal_connect(dlg, "response", + G_CALLBACK(wxGtkAboutDialogOnClose), NULL); + gtk_widget_show(GTK_WIDGET(dlg)); return; }