diff options
author | Christopher Davis <brainblasted@disroot.org> | 2020-11-17 13:43:01 -0800 |
---|---|---|
committer | Christopher Davis <brainblasted@disroot.org> | 2021-02-05 17:05:36 -0800 |
commit | a6593e57c3413d4ceb3dd04fb61dc74c81f309a8 (patch) | |
tree | bff0c850dd2047534f9955652f1a3f2521185d70 /src/nautilus-window.c | |
parent | d2e3decfa35a327a650630910617ad8442587ea7 (diff) | |
download | nautilus-a6593e57c3413d4ceb3dd04fb61dc74c81f309a8.tar.gz |
window: Init toolbar from template
This will allow us to easily set up HdyWindow,
as otherwise we'd need to use GtkContainer APIs
that will be removed in GTK4
Diffstat (limited to 'src/nautilus-window.c')
-rw-r--r-- | src/nautilus-window.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 0d8cd8414..4be36ebbf 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1975,8 +1975,6 @@ setup_toolbar (NautilusWindow *window) G_CALLBACK (location_entry_location_changed_callback), window, 0); g_signal_connect_object (location_entry, "cancel", G_CALLBACK (location_entry_cancel_callback), window, 0); - - gtk_window_set_titlebar (GTK_WINDOW (window), window->toolbar); } static void @@ -2776,8 +2774,6 @@ nautilus_window_init (NautilusWindow *window) gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (window)), "nautilus-window"); - window->toolbar = nautilus_toolbar_new (); - window_group = gtk_window_group_new (); gtk_window_group_add_window (window_group, GTK_WINDOW (window)); g_object_unref (window_group); @@ -2826,6 +2822,7 @@ nautilus_window_class_init (NautilusWindowClass *class) gtk_widget_class_set_template_from_resource (wclass, "/org/gnome/nautilus/ui/nautilus-window.ui"); + gtk_widget_class_bind_template_child (wclass, NautilusWindow, toolbar); gtk_widget_class_bind_template_child (wclass, NautilusWindow, content_paned); gtk_widget_class_bind_template_child (wclass, NautilusWindow, sidebar); gtk_widget_class_bind_template_child (wclass, NautilusWindow, places_sidebar); |