diff options
author | António Fernandes <antoniof@gnome.org> | 2021-12-31 17:54:32 +0000 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-01-05 12:56:32 +0000 |
commit | e199c473f1d254ef5ff717afd28826bd8fdae6ac (patch) | |
tree | c96bb469df73bff492db33bf40965ec6a368279e | |
parent | 533fa4ce65fab62e694a135c52f59ce115a51297 (diff) | |
download | nautilus-e199c473f1d254ef5ff717afd28826bd8fdae6ac.tar.gz |
window: GtkWidget.delete_event() -> GtkWindow.close_request()
-rw-r--r-- | src/nautilus-window.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 0ed906572..a2230f736 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -2498,10 +2498,9 @@ on_is_maximized_changed (GObject *object, } static gboolean -nautilus_window_delete_event (GtkWidget *widget, - GdkEventAny *event) +nautilus_window_close_request (GtkWindow *window) { - nautilus_window_close (NAUTILUS_WINDOW (widget)); + nautilus_window_close (NAUTILUS_WINDOW (window)); return FALSE; } @@ -2669,6 +2668,7 @@ nautilus_window_class_init (NautilusWindowClass *class) { GObjectClass *oclass = G_OBJECT_CLASS (class); GtkWidgetClass *wclass = GTK_WIDGET_CLASS (class); + GtkWindowClass *winclass = GTK_WINDOW_CLASS (class); oclass->dispose = nautilus_window_dispose; oclass->finalize = nautilus_window_finalize; @@ -2676,9 +2676,10 @@ nautilus_window_class_init (NautilusWindowClass *class) wclass->show = nautilus_window_show; wclass->realize = nautilus_window_realize; - wclass->delete_event = nautilus_window_delete_event; wclass->grab_focus = nautilus_window_grab_focus; + winclass->close_request = nautilus_window_close_request; + gtk_widget_class_set_template_from_resource (wclass, "/org/gnome/nautilus/ui/nautilus-window.ui"); gtk_widget_class_bind_template_child (wclass, NautilusWindow, toolbar); |