[gtk+/wip/matthiasc/kill-event-signals: 70/126] Replace all remaining uses of delete-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/kill-event-signals: 70/126] Replace all remaining uses of delete-event
- Date: Mon, 15 Jan 2018 13:05:42 +0000 (UTC)
commit b8565dfc9fef84c4281556b8a268c2d53caeec6e
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 1 15:27:16 2018 -0500
Replace all remaining uses of delete-event
tests/testboxcss.c | 3 +--
tests/testentrycompletion.c | 2 +-
tests/testgrouping.c | 3 +--
tests/testgtk.c | 5 +++--
tests/testheightforwidth.c | 3 +--
tests/testkineticscrolling.c | 3 +--
tests/testspinbutton.c | 6 ++----
tests/testtoolbar.c | 2 +-
tests/testtooltips.c | 3 +--
9 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/tests/testboxcss.c b/tests/testboxcss.c
index 3d7db8c..fea3bbb 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 ec1d2f6..8d30b70 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 ff6b564..fbcb20f 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 5db8f1d..60cccb9 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 5755b92..40937b6 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 d6e9dde..cc866e5 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 94e7fe0..9c6aacc 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 9eb3b61..8fbad8e 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 25485ac..6feda3f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]