summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-2-1011
-rw-r--r--README.in4
-rw-r--r--gtk/gtkaboutdialog.c48
4 files changed, 50 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 12edb1e75c..b4e3d60e54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
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
consistent (#163850)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 12edb1e75c..b4e3d60e54 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,16 @@
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
consistent (#163850)
diff --git a/README.in b/README.in
index ded0f90433..06318a0f85 100644
--- a/README.in
+++ b/README.in
@@ -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
=============
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 5ab9b77cad..7acd0da0b0 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -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);