diff --git a/inc/plugins/plugin.h b/inc/plugins/plugin.h index b1e1baeda..46be92e0c 100644 --- a/inc/plugins/plugin.h +++ b/inc/plugins/plugin.h @@ -253,10 +253,10 @@ typedef struct Plugin * deactivate before freeing the plugin. */ gulong destroy_window_id; - /** ID of the delete-event signal for \ref + /** ID of the close-request signal for \ref * Plugin.window so that we can * deactivate before freeing the plugin. */ - gulong delete_event_id; + gulong close_request_id; int magic; diff --git a/meson.build b/meson.build index be3634c10..ffedbaf2e 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2021 Alexandros Theodotou +# Copyright (C) 2019-2022 Alexandros Theodotou # # This file is part of Zrythm # diff --git a/src/gui/widgets/port_connections_popover.c b/src/gui/widgets/port_connections_popover.c index 8fe6c546e..727a14b00 100644 --- a/src/gui/widgets/port_connections_popover.c +++ b/src/gui/widgets/port_connections_popover.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Alexandros Theodotou + * Copyright (C) 2019-2022 Alexandros Theodotou * * This file is part of Zrythm * diff --git a/src/gui/widgets/scale_selector_window.c b/src/gui/widgets/scale_selector_window.c index bfaca83d0..2ad460c6b 100644 --- a/src/gui/widgets/scale_selector_window.c +++ b/src/gui/widgets/scale_selector_window.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Alexandros Theodotou + * Copyright (C) 2019-2022 Alexandros Theodotou * * This file is part of Zrythm * @@ -38,9 +38,8 @@ G_DEFINE_TYPE ( GTK_TYPE_WINDOW) static gboolean -on_delete_event ( - GtkWidget *widget, - GdkEvent *event, +on_close_request ( + GtkWindow * window, ScaleSelectorWindowWidget * self) { arranger_selections_clear ( @@ -77,7 +76,7 @@ on_delete_event ( arranger_selections_free_full (before); arranger_selections_free_full (after); - return FALSE; + return false; } static void @@ -303,7 +302,7 @@ scale_selector_window_widget_init ( /* set signals */ g_signal_connect ( - G_OBJECT (self), "delete-event", - G_CALLBACK (on_delete_event), self); + G_OBJECT (self), "close-request", + G_CALLBACK (on_close_request), self); } diff --git a/src/plugins/plugin_gtk.c b/src/plugins/plugin_gtk.c index bd1a72475..badb77290 100644 --- a/src/plugins/plugin_gtk.c +++ b/src/plugins/plugin_gtk.c @@ -671,10 +671,9 @@ on_window_destroy ( } static gboolean -on_delete_event ( - GtkWidget *widget, - GdkEvent *event, - Plugin * plugin) +on_close_request ( + GtkWindow * window, + Plugin * plugin) { plugin->visible = 0; plugin->window = NULL; @@ -687,7 +686,7 @@ on_delete_event ( "%s: deleted plugin [%s] window", __func__, pl_str); - return FALSE; + return false; } /** @@ -758,10 +757,10 @@ plugin_gtk_create_window ( g_signal_connect ( plugin->window, "destroy", G_CALLBACK (on_window_destroy), plugin); - plugin->delete_event_id = + plugin->close_request_id = g_signal_connect ( - G_OBJECT (plugin->window), "delete-event", - G_CALLBACK (on_delete_event), plugin); + G_OBJECT (plugin->window), "close-request", + G_CALLBACK (on_close_request), plugin); } /** @@ -1882,11 +1881,11 @@ plugin_gtk_close_ui ( pl->window, pl->destroy_window_id); pl->destroy_window_id = 0; } - if (pl->delete_event_id) + if (pl->close_request_id) { g_signal_handler_disconnect ( - pl->window, pl->delete_event_id); - pl->delete_event_id = 0; + pl->window, pl->close_request_id); + pl->close_request_id = 0; } gtk_widget_set_sensitive ( GTK_WIDGET (pl->window), 0);