mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Sigh, revert the change.
2003-12-15 Federico Mena Quintero <federico@ximian.com> * gtk/gtkdialog.c: Sigh, revert the change.
This commit is contained in:
parent
7054ddccd8
commit
69c2585f0d
@ -1,3 +1,7 @@
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c: Sigh, revert the change.
|
||||
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c (dialog_has_cancel): Removed.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c: Sigh, revert the change.
|
||||
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c (dialog_has_cancel): Removed.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c: Sigh, revert the change.
|
||||
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c (dialog_has_cancel): Removed.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c: Sigh, revert the change.
|
||||
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c (dialog_has_cancel): Removed.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c: Sigh, revert the change.
|
||||
|
||||
2003-12-15 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkdialog.c (dialog_has_cancel): Removed.
|
||||
|
@ -354,6 +354,30 @@ gtk_dialog_style_set (GtkWidget *widget,
|
||||
update_spacings (GTK_DIALOG (widget));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dialog_has_cancel (GtkDialog *dialog)
|
||||
{
|
||||
GList *children, *tmp_list;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
|
||||
|
||||
for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
ResponseData *rd = get_response_data (tmp_list->data);
|
||||
|
||||
if (rd && rd->response_id == GTK_RESPONSE_CANCEL)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_dialog_close (GtkDialog *dialog)
|
||||
{
|
||||
@ -362,6 +386,9 @@ gtk_dialog_close (GtkDialog *dialog)
|
||||
GtkWidget *widget = GTK_WIDGET (dialog);
|
||||
GdkEvent *event;
|
||||
|
||||
if (!dialog_has_cancel (dialog))
|
||||
return;
|
||||
|
||||
event = gdk_event_new (GDK_DELETE);
|
||||
|
||||
event->any.window = g_object_ref (widget->window);
|
||||
|
Loading…
Reference in New Issue
Block a user