From 1869309c20c313b587e769878dce15ea831476d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 29 Apr 2021 21:53:19 +0200 Subject: Declare all GtkChild widgets as unowned See [1] for background. This was motivated by a warning from valac-0.50. [1] https://gitlab.gnome.org/GNOME/vala/-/issues/1121 --- terminal.vala | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/terminal.vala b/terminal.vala index aef68a5..a6c0a76 100644 --- a/terminal.vala +++ b/terminal.vala @@ -19,20 +19,20 @@ class Terminal : Gtk.Overlay { const double FONT_SCALE_FACTOR = 1.2; public Gtk.Window window { get; construct set; } - [GtkChild] Gtk.Button search_button_down; - [GtkChild] Gtk.Button search_button_up; - [GtkChild] Gtk.InfoBar infobar; - [GtkChild] Gtk.Label infobar_label; - [GtkChild] Gtk.Menu standard_context_menu; - [GtkChild] Gtk.Menu url_context_menu; - [GtkChild] Gtk.Menu hyperlink_context_menu; - [GtkChild] Gtk.MenuItem copy_item_text; - [GtkChild] Gtk.MenuItem copy_item_html; - [GtkChild] Gtk.MenuItem open_directory_item; - [GtkChild] Gtk.Revealer search_revealer; - [GtkChild] Gtk.ScrolledWindow scrolled_window; - [GtkChild] Gtk.SearchEntry search_entry; - [GtkChild] Vte.Terminal vte; + [GtkChild] unowned Gtk.Button search_button_down; + [GtkChild] unowned Gtk.Button search_button_up; + [GtkChild] unowned Gtk.InfoBar infobar; + [GtkChild] unowned Gtk.Label infobar_label; + [GtkChild] unowned Gtk.Menu standard_context_menu; + [GtkChild] unowned Gtk.Menu url_context_menu; + [GtkChild] unowned Gtk.Menu hyperlink_context_menu; + [GtkChild] unowned Gtk.MenuItem copy_item_text; + [GtkChild] unowned Gtk.MenuItem copy_item_html; + [GtkChild] unowned Gtk.MenuItem open_directory_item; + [GtkChild] unowned Gtk.Revealer search_revealer; + [GtkChild] unowned Gtk.ScrolledWindow scrolled_window; + [GtkChild] unowned Gtk.SearchEntry search_entry; + [GtkChild] unowned Vte.Terminal vte; Gtk.Clipboard clipboard; bool has_search; -- cgit v1.2.3-2-gb3c3