Issue #13752 - Handle GTK_RESPONSE_HELP in about dialog
Previously, the Help button triggered the default dialog close behavior, without showing any help. This change ensures that pressing Help triggers the expected help function.
This commit is contained in:
parent
4e00c87ff5
commit
9989dfe933
1 changed files with 15 additions and 1 deletions
|
|
@ -76,6 +76,9 @@ typedef struct
|
|||
gboolean visible;
|
||||
} GimpAboutDialog;
|
||||
|
||||
static void about_dialog_response (GtkDialog *dialog,
|
||||
gint response_id,
|
||||
gpointer user_data);
|
||||
#ifdef G_OS_WIN32
|
||||
static void about_dialog_realize (GtkWidget *widget,
|
||||
GimpAboutDialog *dialog);
|
||||
|
|
@ -180,7 +183,7 @@ about_dialog_create (Gimp *gimp,
|
|||
g_set_weak_pointer (&dialog.dialog, widget);
|
||||
|
||||
g_signal_connect (widget, "response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
G_CALLBACK (about_dialog_response),
|
||||
NULL);
|
||||
#ifdef G_OS_WIN32
|
||||
g_signal_connect (widget, "realize",
|
||||
|
|
@ -232,6 +235,17 @@ about_dialog_create (Gimp *gimp,
|
|||
return dialog.dialog;
|
||||
}
|
||||
|
||||
static void
|
||||
about_dialog_response (GtkDialog *dialog,
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_HELP)
|
||||
gimp_standard_help_func (GIMP_HELP_ABOUT_DIALOG, NULL);
|
||||
else
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
static void
|
||||
about_dialog_realize (GtkWidget *widget,
|
||||
|
|
|
|||
Loading…
Reference in a new issue