forked from AuroraMiddleware/gtk
Make the behaviour of the about dialog consistent with other dialogs in
2006-03-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaboutdialog.c (gtk_show_about_dialog): Make the behaviour of the about dialog consistent with other dialogs in gtk. If the dialog is constructed with gtk_about_dialog_new(), the creator is reponsible for handling the response by hiding or closing the dialog. gtk_show_about_dialog() handles it by hiding the dialog. (#333360, Daniel Drake) * README.in: Mention this change.
This commit is contained in:
parent
03dcf45d90
commit
80ee413123
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2006-03-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Make the behaviour
|
||||
of the about dialog consistent with other dialogs in gtk. If the
|
||||
dialog is constructed with gtk_about_dialog_new(), the creator
|
||||
is reponsible for handling the response by hiding or closing the
|
||||
dialog. gtk_show_about_dialog() handles it by hiding the dialog.
|
||||
(#333360, Daniel Drake)
|
||||
|
||||
* README.in: Mention this change.
|
||||
|
||||
2006-03-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Apply a patch from Dennis Cranston to make dialogs more
|
||||
|
@ -1,3 +1,14 @@
|
||||
2006-03-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaboutdialog.c (gtk_show_about_dialog): Make the behaviour
|
||||
of the about dialog consistent with other dialogs in gtk. If the
|
||||
dialog is constructed with gtk_about_dialog_new(), the creator
|
||||
is reponsible for handling the response by hiding or closing the
|
||||
dialog. gtk_show_about_dialog() handles it by hiding the dialog.
|
||||
(#333360, Daniel Drake)
|
||||
|
||||
* README.in: Mention this change.
|
||||
|
||||
2006-03-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Apply a patch from Dennis Cranston to make dialogs more
|
||||
|
@ -56,6 +56,10 @@ Release notes for 2.10
|
||||
and GtkExpander) and resize grips, using the new EXPANDER and
|
||||
RESIZE_GRIP function values.
|
||||
|
||||
* Dialogs created by gtk_about_dialog_new no longer hide automatically
|
||||
when the user clicks close. It is the applications responsibility to
|
||||
hide or destroy the dialog.
|
||||
|
||||
Release notes
|
||||
=============
|
||||
|
||||
|
@ -529,9 +529,6 @@ gtk_about_dialog_init (GtkAboutDialog *about)
|
||||
/* force defaults */
|
||||
gtk_about_dialog_set_name (about, NULL);
|
||||
gtk_about_dialog_set_logo (about, NULL);
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (about, "response", G_CALLBACK (close_cb), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2122,27 +2119,6 @@ display_license_dialog (GtkWidget *button,
|
||||
gtk_widget_show_all (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
close_cb (GtkAboutDialog *about)
|
||||
{
|
||||
GtkAboutDialogPrivate *priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
if (priv->license_dialog != NULL)
|
||||
{
|
||||
gtk_widget_destroy (priv->license_dialog);
|
||||
priv->license_dialog = NULL;
|
||||
}
|
||||
|
||||
if (priv->credits_dialog != NULL)
|
||||
{
|
||||
gtk_widget_destroy (priv->credits_dialog);
|
||||
priv->credits_dialog = NULL;
|
||||
}
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (about));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_about_dialog_new:
|
||||
*
|
||||
@ -2224,6 +2200,27 @@ gtk_about_dialog_set_url_hook (GtkAboutDialogActivateLinkFunc func,
|
||||
return old;
|
||||
}
|
||||
|
||||
static void
|
||||
close_cb (GtkAboutDialog *about)
|
||||
{
|
||||
GtkAboutDialogPrivate *priv = (GtkAboutDialogPrivate *)about->private_data;
|
||||
|
||||
if (priv->license_dialog != NULL)
|
||||
{
|
||||
gtk_widget_destroy (priv->license_dialog);
|
||||
priv->license_dialog = NULL;
|
||||
}
|
||||
|
||||
if (priv->credits_dialog != NULL)
|
||||
{
|
||||
gtk_widget_destroy (priv->credits_dialog);
|
||||
priv->credits_dialog = NULL;
|
||||
}
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (about));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_show_about_dialog:
|
||||
* @parent: transient parent, or %NULL for none
|
||||
@ -2258,6 +2255,9 @@ gtk_show_about_dialog (GtkWindow *parent,
|
||||
|
||||
g_signal_connect (dialog, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL);
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (close_cb), NULL);
|
||||
|
||||
va_start (var_args, first_property_name);
|
||||
g_object_set_valist (G_OBJECT (dialog), first_property_name, var_args);
|
||||
va_end (var_args);
|
||||
|
Loading…
Reference in New Issue
Block a user