summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-01-01 15:27:16 -0500
committerMatthias Clasen <mclasen@redhat.com>2018-01-16 14:14:09 -0500
commit41e4c93443066b89770cbc7b4bf52e343cf55659 (patch)
treeb5fe10312898484800d194548f913f971d036d48
parenta739ee690517da1a53258a5d0ca58e22b47400f5 (diff)
downloadgtk+-41e4c93443066b89770cbc7b4bf52e343cf55659.tar.gz
Replace all remaining uses of delete-event
-rw-r--r--tests/testboxcss.c3
-rw-r--r--tests/testentrycompletion.c2
-rw-r--r--tests/testgrouping.c3
-rw-r--r--tests/testgtk.c5
-rw-r--r--tests/testheightforwidth.c3
-rw-r--r--tests/testkineticscrolling.c3
-rw-r--r--tests/testspinbutton.c6
-rw-r--r--tests/testtoolbar.c2
-rw-r--r--tests/testtooltips.c3
9 files changed, 12 insertions, 18 deletions
diff --git a/tests/testboxcss.c b/tests/testboxcss.c
index 3d7db8c700..fea3bbb903 100644
--- a/tests/testboxcss.c
+++ b/tests/testboxcss.c
@@ -162,8 +162,7 @@ main (gint argc, gchar **argv)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
- g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), main_box);
diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c
index ec1d2f6d68..8d30b70d09 100644
--- a/tests/testentrycompletion.c
+++ b/tests/testentrycompletion.c
@@ -299,7 +299,7 @@ main (int argc, char *argv[])
gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (window, "delete_event", gtk_main_quit, NULL);
+ g_signal_connect (window, "destroy", gtk_main_quit, NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_container_add (GTK_CONTAINER (window), vbox);
diff --git a/tests/testgrouping.c b/tests/testgrouping.c
index ff6b564e74..fbcb20f051 100644
--- a/tests/testgrouping.c
+++ b/tests/testgrouping.c
@@ -110,8 +110,7 @@ main (int argc, char **argv)
model = create_model ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (window, "delete_event",
- G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 320, 480);
sw = gtk_scrolled_window_new (NULL, NULL);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 5db8f1d34e..60cccb962b 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -2682,7 +2682,8 @@ static GtkWidget *sw_float_parent;
static gulong sw_destroyed_handler = 0;
static gboolean
-scrolled_windows_delete_cb (GtkWidget *widget, GdkEventAny *event, GtkWidget *scrollwin)
+scrolled_windows_delete_cb (GtkWidget *widget,
+ GtkWidget *scrollwin)
{
g_object_ref (scrollwin);
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (scrollwin)), scrollwin);
@@ -2751,7 +2752,7 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin)
sw_destroyed_handler =
g_signal_connect (sw_parent, "destroy",
G_CALLBACK (scrolled_windows_destroy_cb), scrollwin);
- g_signal_connect (sw_float_parent, "delete_event",
+ g_signal_connect (sw_float_parent, "close-request",
G_CALLBACK (scrolled_windows_delete_cb), scrollwin);
}
}
diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c
index 5755b92417..40937b6720 100644
--- a/tests/testheightforwidth.c
+++ b/tests/testheightforwidth.c
@@ -793,8 +793,7 @@ test_clicked (GtkWidget *button,
interface->window = (GtkWidget *)gtk_builder_get_object (builder, "window");
- g_signal_connect (interface->window, "delete_event",
- G_CALLBACK (gtk_widget_hide_on_delete), NULL);
+ gtk_window_set_hide_on_close (GTK_WINDOW (interface->window), TRUE);
g_object_unref (builder);
}
diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c
index d6e9ddecaa..cc866e5f51 100644
--- a/tests/testkineticscrolling.c
+++ b/tests/testkineticscrolling.c
@@ -26,8 +26,7 @@ kinetic_scrolling (void)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
- g_signal_connect (window, "delete_event",
- G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
grid = gtk_grid_new ();
diff --git a/tests/testspinbutton.c b/tests/testspinbutton.c
index 94e7fe08af..9c6aacc34a 100644
--- a/tests/testspinbutton.c
+++ b/tests/testspinbutton.c
@@ -21,9 +21,7 @@
static gint num_windows = 0;
static gboolean
-on_delete_event (GtkWidget *w,
- GdkEvent *event,
- gpointer user_data)
+on_delete (GtkWindow *w)
{
num_windows--;
if (num_windows == 0)
@@ -39,7 +37,7 @@ prepare_window_for_orientation (GtkOrientation orientation)
int max;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (window, "delete_event", G_CALLBACK (on_delete_event), NULL);
+ g_signal_connect (window, "close-request", G_CALLBACK (on_delete), NULL);
mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_container_add (GTK_CONTAINER (window), mainbox);
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index 9eb3b6193e..8fbad8e186 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -679,7 +679,7 @@ main (gint argc, gchar **argv)
gtk_widget_show (window);
- g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
g_signal_connect (toolbar, "popup_context_menu", G_CALLBACK (popup_context_menu), NULL);
diff --git a/tests/testtooltips.c b/tests/testtooltips.c
index 25485acfbb..6feda3f950 100644
--- a/tests/testtooltips.c
+++ b/tests/testtooltips.c
@@ -298,8 +298,7 @@ main (int argc, char *argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Tooltips test");
- g_signal_connect (window, "delete_event",
- G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_container_add (GTK_CONTAINER (window), box);