From dc4857ad422547e89d88715c4ca2730e3225a5d7 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 27 Oct 2021 13:31:32 +0200 Subject: Unnecessary G_OBJECT cast when calling signal connect function --- savers/floaters.c | 9 +++++---- savers/popsquares.c | 5 +++-- savers/slideshow.c | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'savers') diff --git a/savers/floaters.c b/savers/floaters.c index 009cc3f..3dae45c 100644 --- a/savers/floaters.c +++ b/savers/floaters.c @@ -807,11 +807,11 @@ screen_saver_new (GtkWidget *drawing_area, g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) cached_source_free); - g_signal_connect_swapped (G_OBJECT (drawing_area), "size-allocate", + g_signal_connect_swapped (drawing_area, "size-allocate", G_CALLBACK (screen_saver_on_size_allocate), screen_saver); - g_signal_connect_swapped (G_OBJECT (drawing_area), "draw", + g_signal_connect_swapped (drawing_area, "draw", G_CALLBACK (screen_saver_on_draw), screen_saver); @@ -1174,8 +1174,9 @@ main (int argc, window = gs_theme_window_new (); - g_signal_connect (G_OBJECT (window), "delete-event", - G_CALLBACK (gtk_main_quit), NULL); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), + NULL); drawing_area = GTK_WIDGET (gtk_drawing_area_new ()); diff --git a/savers/popsquares.c b/savers/popsquares.c index 254764e..8337b6d 100644 --- a/savers/popsquares.c +++ b/savers/popsquares.c @@ -54,8 +54,9 @@ main (int argc, char **argv) } window = gs_theme_window_new (); - g_signal_connect (G_OBJECT (window), "delete-event", - G_CALLBACK (gtk_main_quit), NULL); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), + NULL); g_set_prgname ("popsquares"); diff --git a/savers/slideshow.c b/savers/slideshow.c index 58cea19..c479bc7 100644 --- a/savers/slideshow.c +++ b/savers/slideshow.c @@ -93,8 +93,9 @@ main (int argc, char **argv) g_set_prgname ("slideshow"); window = gs_theme_window_new (); - g_signal_connect (G_OBJECT (window), "delete-event", - G_CALLBACK (gtk_main_quit), NULL); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), + NULL); engine = g_object_new (GSTE_TYPE_SLIDESHOW, NULL); -- cgit v1.2.1