Commit 72ad5ba4 authored by Darin Adler's avatar Darin Adler

reviewed by: John Sullivan <sullivan@eazel.com>

                     Pavel Cisler <pavel@eazel.com>

	Fix bug 7609 (closing Show Properties window when new name
	conflicts leads to crash):

	* libnautilus-extensions/nautilus-stock-dialogs.c:
	(nautilus_run_simple_dialog), (create_message_box): Don't use
	an already-destroyed window as a parent.
parent bb5e1acb
2001-03-09 Darin Adler <darin@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
Pavel Cisler <pavel@eazel.com>
Fix bug 7609 (closing Show Properties window when new name
conflicts leads to crash):
* libnautilus-extensions/nautilus-stock-dialogs.c:
(nautilus_run_simple_dialog), (create_message_box): Don't use
an already-destroyed window as a parent.
2001-03-09 Darin Adler <darin@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
......
......@@ -384,7 +384,7 @@ nautilus_run_simple_dialog (GtkWidget *parent, gboolean ignore_close_box,
/* Parent it if asked to. */
if (parent != NULL) {
top_widget = gtk_widget_get_toplevel (parent);
if (GTK_IS_WINDOW (top_widget)) {
if (GTK_IS_WINDOW (top_widget) && !GTK_OBJECT_DESTROYED (top_widget)) {
gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (top_widget));
}
}
......@@ -458,7 +458,7 @@ create_message_box (const char *message,
message_label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (box), "message label"));
gtk_label_set_line_wrap (message_label, TRUE);
if (parent != NULL) {
if (parent != NULL && !GTK_OBJECT_DESTROYED (parent)) {
gnome_dialog_set_parent (GNOME_DIALOG (box), parent);
}
return GNOME_DIALOG (box);
......
......@@ -384,7 +384,7 @@ nautilus_run_simple_dialog (GtkWidget *parent, gboolean ignore_close_box,
/* Parent it if asked to. */
if (parent != NULL) {
top_widget = gtk_widget_get_toplevel (parent);
if (GTK_IS_WINDOW (top_widget)) {
if (GTK_IS_WINDOW (top_widget) && !GTK_OBJECT_DESTROYED (top_widget)) {
gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (top_widget));
}
}
......@@ -458,7 +458,7 @@ create_message_box (const char *message,
message_label = GTK_LABEL (gtk_object_get_data (GTK_OBJECT (box), "message label"));
gtk_label_set_line_wrap (message_label, TRUE);
if (parent != NULL) {
if (parent != NULL && !GTK_OBJECT_DESTROYED (parent)) {
gnome_dialog_set_parent (GNOME_DIALOG (box), parent);
}
return GNOME_DIALOG (box);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment