[gnome-boxes/ricotz/vala] Reference of [GtkChild] field is handled by GtkBuilder, type must be unowned




commit dc07f3c1f1d5359f5154430fe600abf9e261883b
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Feb 22 13:54:33 2021 +0100

    Reference of [GtkChild] field is handled by GtkBuilder, type must be unowned

 src/app-window.vala                     | 20 ++++++++++----------
 src/assistant/downloads-page.vala       |  4 ++--
 src/assistant/identify-os-page.vala     |  4 ++--
 src/assistant/identify-os-popover.vala  |  4 ++--
 src/assistant/index-page.vala           | 26 +++++++++++++-------------
 src/assistant/preparation-page.vala     | 12 ++++++------
 src/assistant/review-page.vala          | 10 +++++-----
 src/assistant/rhel-download-dialog.vala |  4 ++--
 src/assistant/setup-page.vala           |  2 +-
 src/assistant/vm-assistant.vala         | 14 +++++++-------
 src/auth-notification.vala              | 10 +++++-----
 src/collection-toolbar.vala             | 16 ++++++++--------
 src/config-editor.vala                  |  2 +-
 src/display-page.vala                   | 12 ++++++------
 src/display-toolbar.vala                | 15 +++++++--------
 src/downloads-hub.vala                  | 12 ++++++------
 src/editable-entry.vala                 |  6 +++---
 src/empty-boxes.vala                    |  2 +-
 src/icon-view-child.vala                | 14 +++++++-------
 src/icon-view.vala                      |  2 +-
 src/list-view-row.vala                  | 18 +++++++++---------
 src/list-view.vala                      |  2 +-
 src/notification.vala                   |  8 ++++----
 src/properties-page-widget.vala         |  2 +-
 src/properties-toolbar.vala             | 10 +++++-----
 src/properties-window.vala              | 12 ++++++------
 src/searchbar.vala                      |  2 +-
 src/selection-toolbar.vala              |  6 +++---
 src/selectionbar.vala                   |  8 ++++----
 src/shared-folders.vala                 | 10 +++++-----
 src/snapshot-list-row.vala              | 10 +++++-----
 src/topbar.vala                         |  6 +++---
 src/transfer-info-row.vala              | 10 +++++-----
 src/transfer-popover.vala               |  2 +-
 src/troubleshoot-log.vala               |  2 +-
 src/unattended-setup-box.vala           | 22 +++++++++++-----------
 src/welcome-tutorial-page.vala          |  4 ++--
 src/welcome-tutorial.vala               |  6 +++---
 38 files changed, 165 insertions(+), 166 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 348ce22c..7ee13cbc 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -80,23 +80,23 @@
     public PropertiesWindow  props_window;
 
     [GtkChild]
-    public Searchbar searchbar;
+    public unowned Searchbar searchbar;
     [GtkChild]
-    public Topbar topbar;
+    public unowned Topbar topbar;
     [GtkChild]
-    public Selectionbar selectionbar;
+    public unowned Selectionbar selectionbar;
     [GtkChild]
-    public DisplayPage display_page;
+    public unowned DisplayPage display_page;
     [GtkChild]
-    public EmptyBoxes empty_boxes;
+    public unowned EmptyBoxes empty_boxes;
     [GtkChild]
-    public TroubleshootView troubleshoot_view;
+    public unowned TroubleshootView troubleshoot_view;
     [GtkChild]
-    public Gtk.Stack below_bin;
+    public unowned Gtk.Stack below_bin;
     [GtkChild]
-    private IconView icon_view;
+    private unowned IconView icon_view;
     [GtkChild]
-    private ListView list_view;
+    private unowned ListView list_view;
 
     public ViewType view_type { get; set; default = ViewType.ICON; }
 
@@ -122,7 +122,7 @@
     }
 
     [GtkChild]
-    private Notificationbar _notificationbar;
+    private unowned Notificationbar _notificationbar;
 
     private uint configure_id;
     public const uint configure_id_timeout = 100;  // 100ms
diff --git a/src/assistant/downloads-page.vala b/src/assistant/downloads-page.vala
index 41b93581..0d4fe1c5 100644
--- a/src/assistant/downloads-page.vala
+++ b/src/assistant/downloads-page.vala
@@ -12,9 +12,9 @@
     public DownloadsSearch search { private set; get; }
 
     [GtkChild]
-    private Gtk.ListBox listbox;
+    private unowned Gtk.ListBox listbox;
     [GtkChild]
-    private Gtk.ListBox recommended_listbox;
+    private unowned Gtk.ListBox recommended_listbox;
 
     public Gtk.SearchEntry search_entry = new Gtk.SearchEntry ();
     private GLib.ListStore recommended_model;
diff --git a/src/assistant/identify-os-page.vala b/src/assistant/identify-os-page.vala
index 6063f974..256b861d 100644
--- a/src/assistant/identify-os-page.vala
+++ b/src/assistant/identify-os-page.vala
@@ -5,9 +5,9 @@
     private Boxes.IdentifyOsPopover os_popover;
 
     [GtkChild]
-    private Gtk.MenuButton menu_button;
+    private unowned Gtk.MenuButton menu_button;
     [GtkChild]
-    private Gtk.Label menu_button_label;
+    private unowned Gtk.Label menu_button_label;
 
     private Osinfo.Os? selected_os = null;
 
diff --git a/src/assistant/identify-os-popover.vala b/src/assistant/identify-os-popover.vala
index 4a1b751d..61abd4bc 100644
--- a/src/assistant/identify-os-popover.vala
+++ b/src/assistant/identify-os-popover.vala
@@ -3,9 +3,9 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/pages/identify-os-popover.ui")]
 public class Boxes.IdentifyOsPopover : Gtk.Popover {
     [GtkChild]
-    private Gtk.SearchEntry search_entry;
+    private unowned Gtk.SearchEntry search_entry;
     [GtkChild]
-    private Gtk.ListBox listbox;
+    private unowned Gtk.ListBox listbox;
     private GLib.ListStore model;
 
     private GLib.List<weak Osinfo.Entity> os_list;
diff --git a/src/assistant/index-page.vala b/src/assistant/index-page.vala
index cf7c858e..14109f3c 100644
--- a/src/assistant/index-page.vala
+++ b/src/assistant/index-page.vala
@@ -12,20 +12,20 @@
     private const int MAX_MEDIA_ENTRIES = 3;
 
     [GtkChild]
-    private Stack stack;
+    private unowned Stack stack;
     [GtkChild]
-    private AssistantDownloadsPage recommended_downloads_page;
+    private unowned AssistantDownloadsPage recommended_downloads_page;
     [GtkChild]
-    private ScrolledWindow home_page;
+    private unowned ScrolledWindow home_page;
 
     [GtkChild]
-    private Box detected_sources_section;
+    private unowned Box detected_sources_section;
     [GtkChild]
-    private ListBox source_medias;
+    private unowned ListBox source_medias;
     [GtkChild]
-    private ListBox featured_medias;
+    private unowned ListBox featured_medias;
     [GtkChild]
-    private Button expand_detected_sources_list_button;
+    private unowned Button expand_detected_sources_list_button;
 
     private GLib.Cancellable cancellable = new GLib.Cancellable ();
 
@@ -171,11 +171,11 @@ private void on_download_an_os_button_clicked () {
     public Osinfo.Os? os;
 
     [GtkChild]
-    private Gtk.Image media_image;
+    private unowned Gtk.Image media_image;
     [GtkChild]
-    private Gtk.Label title_label;
+    private unowned Gtk.Label title_label;
     [GtkChild]
-    private Gtk.Label details_label;
+    private unowned Gtk.Label details_label;
 
     public string title {
         get { return title_label.get_text (); }
@@ -212,11 +212,11 @@ public WizardDownloadableEntry (Osinfo.Media media) {
     public InstallerMedia media;
 
     [GtkChild]
-    private Gtk.Image media_image;
+    private unowned Gtk.Image media_image;
     [GtkChild]
-    private Gtk.Label title_label;
+    private unowned Gtk.Label title_label;
     [GtkChild]
-    private Gtk.Label details_label;
+    private unowned Gtk.Label details_label;
 
     public WizardMediaEntry (InstallerMedia media) {
         this.media = media;
diff --git a/src/assistant/preparation-page.vala b/src/assistant/preparation-page.vala
index aba91071..c62dda5c 100644
--- a/src/assistant/preparation-page.vala
+++ b/src/assistant/preparation-page.vala
@@ -3,18 +3,18 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/pages/preparation-page.ui")]
 private class Boxes.AssistantPreparationPage : AssistantPage {
     [GtkChild]
-    private Gtk.Stack stack;
+    private unowned Gtk.Stack stack;
     [GtkChild]
-    private Boxes.IdentifyOsPage identify_os_page;
+    private unowned Boxes.IdentifyOsPage identify_os_page;
 
     [GtkChild]
-    private Gtk.Label media_label;
+    private unowned Gtk.Label media_label;
     [GtkChild]
-    private Gtk.Label status_label;
+    private unowned Gtk.Label status_label;
     [GtkChild]
-    private Gtk.Image installer_image;
+    private unowned Gtk.Image installer_image;
     [GtkChild]
-    private Gtk.ProgressBar progress_bar;
+    private unowned Gtk.ProgressBar progress_bar;
 
     private Cancellable cancellable = new GLib.Cancellable ();
 
diff --git a/src/assistant/review-page.vala b/src/assistant/review-page.vala
index 16326340..5dd5a116 100644
--- a/src/assistant/review-page.vala
+++ b/src/assistant/review-page.vala
@@ -3,15 +3,15 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/pages/review-page.ui")]
 private class Boxes.AssistantReviewPage : AssistantPage {
     [GtkChild]
-    private WizardSummary summary;
+    private unowned WizardSummary summary;
     [GtkChild]
-    private InfoBar nokvm_infobar;
+    private unowned InfoBar nokvm_infobar;
     [GtkChild]
-    private Grid customization_grid;
+    private unowned Grid customization_grid;
     [GtkChild]
-    private ToggleButton customize_button;
+    private unowned ToggleButton customize_button;
     [GtkChild]
-    private Stack customization_stack;
+    private unowned Stack customization_stack;
     private GLib.List<Boxes.Property> resource_properties;
 
     private Cancellable? cancellable;
diff --git a/src/assistant/rhel-download-dialog.vala b/src/assistant/rhel-download-dialog.vala
index 5bba05b0..f4aab073 100644
--- a/src/assistant/rhel-download-dialog.vala
+++ b/src/assistant/rhel-download-dialog.vala
@@ -4,9 +4,9 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/rhel-download-dialog.ui")]
 private class Boxes.RHELDownloadDialog : Gtk.Dialog {
     [GtkChild]
-    private Gtk.ProgressBar progress_bar;
+    private unowned Gtk.ProgressBar progress_bar;
     [GtkChild]
-    private WebKit.WebView web_view;
+    private unowned WebKit.WebView web_view;
 
     private uint hide_progress_bar_id;
     private const uint progress_bar_id_timeout = 500;  // 500ms
diff --git a/src/assistant/setup-page.vala b/src/assistant/setup-page.vala
index 64279ebd..d4bb22ad 100644
--- a/src/assistant/setup-page.vala
+++ b/src/assistant/setup-page.vala
@@ -3,7 +3,7 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/pages/setup-page.ui")]
 private class Boxes.AssistantSetupPage : AssistantPage {
     [GtkChild]
-    private Box setup_box;
+    private unowned Box setup_box;
 
     public async void setup (VMCreator vm_creator) {
         this.artifact = vm_creator;
diff --git a/src/assistant/vm-assistant.vala b/src/assistant/vm-assistant.vala
index 901c7cba..184f854e 100644
--- a/src/assistant/vm-assistant.vala
+++ b/src/assistant/vm-assistant.vala
@@ -4,20 +4,20 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/assistant/vm-assistant.ui")]
 private class Boxes.VMAssistant : Gtk.Dialog {
     [GtkChild]
-    private Stack pages;
+    private unowned Stack pages;
     [GtkChild]
-    private AssistantIndexPage index_page;
+    private unowned AssistantIndexPage index_page;
     [GtkChild]
-    private AssistantPreparationPage preparation_page;
+    private unowned AssistantPreparationPage preparation_page;
     [GtkChild]
-    private AssistantSetupPage setup_page;
+    private unowned AssistantSetupPage setup_page;
     [GtkChild]
-    private AssistantReviewPage review_page;
+    private unowned AssistantReviewPage review_page;
 
     [GtkChild]
-    public Button previous_button;
+    public unowned Button previous_button;
     [GtkChild]
-    private Button next_button;
+    private unowned Button next_button;
 
     private AssistantPage visible_page {
         get {
diff --git a/src/auth-notification.vala b/src/auth-notification.vala
index df0762fd..a49fb9c6 100644
--- a/src/auth-notification.vala
+++ b/src/auth-notification.vala
@@ -8,15 +8,15 @@
     public delegate void AuthFunc (string username, string password);
 
     [GtkChild]
-    private Gtk.Label title_label;
+    private unowned Gtk.Label title_label;
     [GtkChild]
-    private Gtk.Label username_label;
+    private unowned Gtk.Label username_label;
     [GtkChild]
-    private Gtk.Entry username_entry;
+    private unowned Gtk.Entry username_entry;
     [GtkChild]
-    private Gtk.Entry password_entry;
+    private unowned Gtk.Entry password_entry;
     [GtkChild]
-    private Gtk.Button auth_button;
+    private unowned Gtk.Button auth_button;
 
     private AuthFunc? auth_func;
     private bool auth_pressed;
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 54f86e3a..09b3bd20 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -4,21 +4,21 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/collection-toolbar.ui")]
 private class Boxes.CollectionToolbar: Hdy.HeaderBar {
     [GtkChild]
-    private Button search_btn;
+    private unowned Button search_btn;
     [GtkChild]
-    private Button select_btn;
+    private unowned Button select_btn;
     [GtkChild]
-    private Button list_btn;
+    private unowned Button list_btn;
     [GtkChild]
-    private Button grid_btn;
+    private unowned Button grid_btn;
     [GtkChild]
-    private Button back_btn;
+    private unowned Button back_btn;
     [GtkChild]
-    private Button new_btn;
+    private unowned Button new_btn;
     [GtkChild]
-    private MenuButton downloads_hub_btn;
+    private unowned MenuButton downloads_hub_btn;
     [GtkChild]
-    public MenuButton hamburger_btn;
+    public unowned MenuButton hamburger_btn;
 
     private AppWindow window;
 
diff --git a/src/config-editor.vala b/src/config-editor.vala
index e25efe50..a9f1bc75 100644
--- a/src/config-editor.vala
+++ b/src/config-editor.vala
@@ -8,7 +8,7 @@
 
     private Gtk.Button apply_config_button;
     [GtkChild]
-    private Gtk.SourceView view;
+    private unowned Gtk.SourceView view;
 
     private LibvirtMachine machine;
     private string domain_xml;
diff --git a/src/display-page.vala b/src/display-page.vala
index e6b709dd..ea0e5636 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -7,19 +7,19 @@
     private const uint8 SCREEN_EDGE_WIDTH = 100;
 
     [GtkChild]
-    public DisplayToolbar toolbar;
+    public unowned DisplayToolbar toolbar;
 
     [GtkChild]
-    public Gtk.Label size_label;
+    public unowned Gtk.Label size_label;
 
     [GtkChild]
-    public Gtk.Box transfer_message_box;
+    public unowned Gtk.Box transfer_message_box;
     [GtkChild]
-    private EventBox event_box;
+    private unowned EventBox event_box;
     [GtkChild]
-    private DisplayToolbar overlay_toolbar;
+    private unowned DisplayToolbar overlay_toolbar;
     [GtkChild]
-    private EventBox overlay_toolbar_box;
+    private unowned EventBox overlay_toolbar_box;
     public Boxes.TransferPopover transfer_popover;
     private uint toolbar_hide_id;
     private uint toolbar_show_id;
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index b02d03c7..91214b84 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -7,20 +7,19 @@
     public bool handle_drag { get; construct; } // Handle drag events to (un)fulscreen the main window
 
     [GtkChild]
-    private Gtk.Image fullscreen_image;
+    private unowned Gtk.Image fullscreen_image;
     [GtkChild]
-    private Gtk.DrawingArea transfers_drawing_area;
+    private unowned Gtk.DrawingArea transfers_drawing_area;
     [GtkChild]
-    public Gtk.Button transfers_button;
+    public unowned Gtk.Button transfers_button;
     [GtkChild]
-
-    private Gtk.Button back;
+    private unowned Gtk.Button back;
     [GtkChild]
-    private Gtk.Button fullscreen;
+    private unowned Gtk.Button fullscreen;
     [GtkChild]
-    private Gtk.MenuButton menu_button;
+    private unowned Gtk.MenuButton menu_button;
     [GtkChild]
-    private Gtk.MenuButton keys_menu_button;
+    private unowned Gtk.MenuButton keys_menu_button;
 
     private AppWindow window;
 
diff --git a/src/downloads-hub.vala b/src/downloads-hub.vala
index 11ea2724..2d8ee153 100644
--- a/src/downloads-hub.vala
+++ b/src/downloads-hub.vala
@@ -12,7 +12,7 @@ public static DownloadsHub get_default () {
     }
 
     [GtkChild]
-    private ListBox listbox;
+    private unowned ListBox listbox;
     private Widget button { get { return relative_to; } }
 
     private uint n_items = 0;
@@ -139,15 +139,15 @@ private bool draw_button_pie (Widget drawing_area, Cairo.Context context) {
 [GtkTemplate (ui= "/org/gnome/Boxes/ui/downloads-hub-row.ui")]
 private class Boxes.DownloadsHubRow : Gtk.ListBoxRow {
     [GtkChild]
-    private Label label;
+    private unowned Label label;
     [GtkChild]
-    private Image image;
+    private unowned Image image;
     [GtkChild]
-    private Stack download_status;
+    private unowned Stack download_status;
     [GtkChild]
-    private ProgressBar progress_bar;
+    private unowned ProgressBar progress_bar;
     [GtkChild]
-    private Label download_complete_label;
+    private unowned Label download_complete_label;
 
     public ActivityProgress progress = new ActivityProgress ();
     private ulong progress_notify_id;
diff --git a/src/editable-entry.vala b/src/editable-entry.vala
index df20e394..96637f41 100644
--- a/src/editable-entry.vala
+++ b/src/editable-entry.vala
@@ -105,11 +105,11 @@ valac picks (0) is invalid for the Pango.Weight enum.
     public bool scale_set { get; set; }
 
     [GtkChild]
-    private Gtk.Label label;
+    private unowned Gtk.Label label;
     [GtkChild]
-    private Gtk.Label button_label;
+    private unowned Gtk.Label button_label;
     [GtkChild]
-    private Gtk.Entry entry;
+    private unowned Gtk.Entry entry;
 
     private void update_entry_font (Gtk.Entry entry) {
         if (!scale_set && !weight_set)
diff --git a/src/empty-boxes.vala b/src/empty-boxes.vala
index 3f03d506..eb5699d5 100644
--- a/src/empty-boxes.vala
+++ b/src/empty-boxes.vala
@@ -6,7 +6,7 @@
     public UIState ui_state { get; protected set; }
 
     [GtkChild]
-    private Gtk.Box grid_box;
+    private unowned Gtk.Box grid_box;
 
     private AppWindow window;
 
diff --git a/src/icon-view-child.vala b/src/icon-view-child.vala
index f07751c0..dd9b4f38 100644
--- a/src/icon-view-child.vala
+++ b/src/icon-view-child.vala
@@ -29,19 +29,19 @@
     }
 
     [GtkChild]
-    private Gtk.CheckButton selection_button;
+    private unowned Gtk.CheckButton selection_button;
     [GtkChild]
-    private Gtk.Stack stack;
+    private unowned Gtk.Stack stack;
     [GtkChild]
-    public Gtk.Image thumbnail;
+    public unowned Gtk.Image thumbnail;
     [GtkChild]
-    private Gtk.Spinner spinner;
+    private unowned Gtk.Spinner spinner;
     [GtkChild]
-    private Gtk.Image favorite;
+    private unowned Gtk.Image favorite;
     [GtkChild]
-    private Gtk.Image live_thumbnail;
+    private unowned Gtk.Image live_thumbnail;
     [GtkChild]
-    private Gtk.Label machine_name;
+    private unowned Gtk.Label machine_name;
 
     private Boxes.MachineThumbnailer thumbnailer;
 
diff --git a/src/icon-view.vala b/src/icon-view.vala
index e0a75176..3ff0924c 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -14,7 +14,7 @@
     public CollectionFilter filter { get; protected set; }
 
     [GtkChild]
-    private Gtk.FlowBox flowbox;
+    private unowned Gtk.FlowBox flowbox;
 
     private AppWindow window;
     private Boxes.ActionsPopover context_popover;
diff --git a/src/list-view-row.vala b/src/list-view-row.vala
index 3bbee8cb..09c601c6 100644
--- a/src/list-view-row.vala
+++ b/src/list-view-row.vala
@@ -35,23 +35,23 @@
     }
 
     [GtkChild]
-    private Gtk.CheckButton selection_button;
+    private unowned Gtk.CheckButton selection_button;
     [GtkChild]
-    private Gtk.Stack stack;
+    private unowned Gtk.Stack stack;
     [GtkChild]
-    private Gtk.Image thumbnail;
+    private unowned Gtk.Image thumbnail;
     [GtkChild]
-    private Gtk.Image live_thumbnail;
+    private unowned Gtk.Image live_thumbnail;
     [GtkChild]
-    private Gtk.Spinner spinner;
+    private unowned Gtk.Spinner spinner;
     [GtkChild]
-    private Gtk.Image favorite;
+    private unowned Gtk.Image favorite;
     [GtkChild]
-    private Gtk.Label machine_name;
+    private unowned Gtk.Label machine_name;
     [GtkChild]
-    private Gtk.Label info_label;
+    private unowned Gtk.Label info_label;
     [GtkChild]
-    private Gtk.Label status_label;
+    private unowned Gtk.Label status_label;
 
     private Boxes.MachineThumbnailer thumbnailer;
 
diff --git a/src/list-view.vala b/src/list-view.vala
index d1995657..00f348fb 100644
--- a/src/list-view.vala
+++ b/src/list-view.vala
@@ -8,7 +8,7 @@
     public CollectionFilter filter { get; protected set; }
 
     [GtkChild]
-    private Gtk.ListBox list_box;
+    private unowned Gtk.ListBox list_box;
 
     private Gtk.SizeGroup size_group;
 
diff --git a/src/notification.vala b/src/notification.vala
index 627f4953..81831495 100644
--- a/src/notification.vala
+++ b/src/notification.vala
@@ -12,13 +12,13 @@
     public delegate void DismissFunc ();
 
     [GtkChild]
-    private Gtk.Label message_label;
+    private unowned Gtk.Label message_label;
     [GtkChild]
-    private Gtk.Label ok_button_label;
+    private unowned Gtk.Label ok_button_label;
     [GtkChild]
-    private Gtk.Button ok_button;
+    private unowned Gtk.Button ok_button;
     [GtkChild]
-    private Gtk.Button close_button;
+    private unowned Gtk.Button close_button;
 
     private uint notification_timeout_id = 0;
 
diff --git a/src/properties-page-widget.vala b/src/properties-page-widget.vala
index a26f8f87..54d86501 100644
--- a/src/properties-page-widget.vala
+++ b/src/properties-page-widget.vala
@@ -6,7 +6,7 @@
     public bool empty;
 
     [GtkChild]
-    private Gtk.Grid grid;
+    private unowned Gtk.Grid grid;
     private List<Boxes.Property> properties;
 
     public signal void refresh_properties ();
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index 04adb390..d8bc525e 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -14,18 +14,18 @@
     }
 
     [GtkChild]
-    public Gtk.HeaderBar main;
+    public unowned Gtk.HeaderBar main;
 
     [GtkChild]
-    public Gtk.HeaderBar config_editor;
+    public unowned Gtk.HeaderBar config_editor;
     [GtkChild]
-    public Gtk.Button apply_config_button;
+    public unowned Gtk.Button apply_config_button;
 
     [GtkChild]
-    public Gtk.Button troubleshooting_back_button;
+    public unowned Gtk.Button troubleshooting_back_button;
 
     [GtkChild]
-    private EditableEntry title_entry;
+    private unowned EditableEntry title_entry;
 
     private AppWindow window;
     private unowned PropertiesWindow props_window;
diff --git a/src/properties-window.vala b/src/properties-window.vala
index 1a16b148..60b4aca0 100644
--- a/src/properties-window.vala
+++ b/src/properties-window.vala
@@ -29,19 +29,19 @@
     }
 
     [GtkChild]
-    public Gtk.Stack view;
+    public unowned Gtk.Stack view;
     [GtkChild]
-    public Properties properties;
+    public unowned Properties properties;
     [GtkChild]
-    public TroubleshootLog troubleshoot_log;
+    public unowned TroubleshootLog troubleshoot_log;
     [GtkChild]
-    public MachineConfigEditor config_editor;
+    public unowned MachineConfigEditor config_editor;
 
     public Gtk.FileChooserNative file_chooser;
     [GtkChild]
-    public PropertiesToolbar topbar;
+    public unowned PropertiesToolbar topbar;
     [GtkChild]
-    public Notificationbar notificationbar;
+    public unowned Notificationbar notificationbar;
 
     private unowned AppWindow app_window;
 
diff --git a/src/searchbar.vala b/src/searchbar.vala
index 538129db..741750cb 100644
--- a/src/searchbar.vala
+++ b/src/searchbar.vala
@@ -11,7 +11,7 @@
         }
     }
     [GtkChild]
-    private Gtk.SearchEntry entry;
+    private unowned Gtk.SearchEntry entry;
 
     private AppWindow window;
 
diff --git a/src/selection-toolbar.vala b/src/selection-toolbar.vala
index 0f6d44be..ecba773f 100644
--- a/src/selection-toolbar.vala
+++ b/src/selection-toolbar.vala
@@ -4,11 +4,11 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/selection-toolbar.ui")]
 private class Boxes.SelectionToolbar: Hdy.HeaderBar {
     [GtkChild]
-    private Button search_btn;
+    private unowned Button search_btn;
     [GtkChild]
-    private MenuButton menu_button;
+    private unowned MenuButton menu_button;
     [GtkChild]
-    private Label menu_button_label;
+    private unowned Label menu_button_label;
 
     private AppWindow window;
 
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index fb42fab9..8dea8fcf 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -4,13 +4,13 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/selectionbar.ui")]
 private class Boxes.Selectionbar: Gtk.Revealer {
     [GtkChild]
-    private Gtk.ToggleButton favorite_btn;
+    private unowned Gtk.ToggleButton favorite_btn;
     [GtkChild]
-    private Gtk.Button pause_btn;
+    private unowned Gtk.Button pause_btn;
     [GtkChild]
-    private Gtk.Button remove_btn;
+    private unowned Gtk.Button remove_btn;
     [GtkChild]
-    private Gtk.Button open_btn;
+    private unowned Gtk.Button open_btn;
 
     private AppWindow window;
 
diff --git a/src/shared-folders.vala b/src/shared-folders.vala
index 0157025e..0c9863d3 100644
--- a/src/shared-folders.vala
+++ b/src/shared-folders.vala
@@ -184,9 +184,9 @@ private static string get_shared_folder_real_path (SharedFolder folder) {
 private class Boxes.SharedFolderRow : Gtk.ListBoxRow {
     public signal void removed (SharedFolder folder);
     [GtkChild]
-    private Gtk.Label folder_path_label;
+    private unowned Gtk.Label folder_path_label;
     [GtkChild]
-    private Gtk.Label folder_name_label;
+    private unowned Gtk.Label folder_name_label;
 
     public SharedFolder folder { get; private set; }
 
@@ -213,7 +213,7 @@ private void on_delete_button_clicked () {
 
     private Boxes.SharedFolderPopover popover;
     [GtkChild]
-    private Gtk.ListBox listbox;
+    private unowned Gtk.ListBox listbox;
 
     public SharedFoldersWidget (string machine_uuid) {
         this.machine_uuid = machine_uuid;
@@ -251,9 +251,9 @@ private void on_add_button_clicked (Gtk.Button button) {
     public signal bool saved (string path, string name);
 
     [GtkChild]
-    public Gtk.FileChooserButton file_chooser_button;
+    public unowned Gtk.FileChooserButton file_chooser_button;
     [GtkChild]
-    public Gtk.Entry name_entry;
+    public unowned Gtk.Entry name_entry;
 
     construct {
         var default_path = Environment.get_user_special_dir (UserDirectory.PUBLIC_SHARE);
diff --git a/src/snapshot-list-row.vala b/src/snapshot-list-row.vala
index 5a758661..dee9b007 100644
--- a/src/snapshot-list-row.vala
+++ b/src/snapshot-list-row.vala
@@ -6,15 +6,15 @@
     public string activity_message { get; set; default = ""; }
 
     [GtkChild]
-    private Gtk.Label name_label;
+    private unowned Gtk.Label name_label;
     [GtkChild]
-    private Gtk.Stack mode_stack;
+    private unowned Gtk.Stack mode_stack;
     [GtkChild]
-    private Gtk.Entry name_entry;
+    private unowned Gtk.Entry name_entry;
     [GtkChild]
-    private Gtk.Box edit_name_box;
+    private unowned Gtk.Box edit_name_box;
     [GtkChild]
-    private Gtk.Box show_name_box;
+    private unowned Gtk.Box show_name_box;
 
     // index of the snapshot in the list
     private int index;
diff --git a/src/topbar.vala b/src/topbar.vala
index d0131877..f0ca2626 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -15,11 +15,11 @@
     public UIState ui_state { get; protected set; }
 
     [GtkChild]
-    private CollectionToolbar collection_toolbar;
+    private unowned CollectionToolbar collection_toolbar;
     [GtkChild]
-    private SelectionToolbar selection_toolbar;
+    private unowned SelectionToolbar selection_toolbar;
     [GtkChild]
-    public DisplayToolbar display_toolbar;
+    public unowned DisplayToolbar display_toolbar;
 
     private AppWindow window;
 
diff --git a/src/transfer-info-row.vala b/src/transfer-info-row.vala
index 4dc1f7dc..eb3d69cb 100644
--- a/src/transfer-info-row.vala
+++ b/src/transfer-info-row.vala
@@ -4,15 +4,15 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/transfer-info-row.ui")]
 private class Boxes.TransferInfoRow: Gtk.Grid {
     [GtkChild]
-    private Gtk.Label status_label;
+    private unowned Gtk.Label status_label;
     [GtkChild]
-    private Gtk.Label details_label;
+    private unowned Gtk.Label details_label;
     [GtkChild]
-    private Gtk.Button cancel_button;
+    private unowned Gtk.Button cancel_button;
     [GtkChild]
-    private Gtk.ProgressBar progress_bar;
+    private unowned Gtk.ProgressBar progress_bar;
     [GtkChild]
-    private Gtk.Image done_image;
+    private unowned Gtk.Image done_image;
 
     public signal void finished ();
 
diff --git a/src/transfer-popover.vala b/src/transfer-popover.vala
index d9a0d395..ae50bc30 100644
--- a/src/transfer-popover.vala
+++ b/src/transfer-popover.vala
@@ -4,7 +4,7 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/transfer-popover.ui")]
 private class Boxes.TransferPopover: Gtk.Popover {
     [GtkChild]
-    public Gtk.Box transfers_container;
+    public unowned Gtk.Box transfers_container;
 
     public signal void all_finished ();
     public GLib.List<Spice.FileTransferTask> spice_tasks;
diff --git a/src/troubleshoot-log.vala b/src/troubleshoot-log.vala
index e17b1b2f..88022ecb 100644
--- a/src/troubleshoot-log.vala
+++ b/src/troubleshoot-log.vala
@@ -4,5 +4,5 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/troubleshoot-log.ui")]
 private class Boxes.TroubleshootLog: Gtk.ScrolledWindow {
     [GtkChild]
-    public Gtk.TextView view;
+    public unowned Gtk.TextView view;
 }
diff --git a/src/unattended-setup-box.vala b/src/unattended-setup-box.vala
index 330d5279..163197a3 100644
--- a/src/unattended-setup-box.vala
+++ b/src/unattended-setup-box.vala
@@ -88,27 +88,27 @@
     }
 
     [GtkChild]
-    private Gtk.InfoBar needs_internet_bar;
+    private unowned Gtk.InfoBar needs_internet_bar;
     [GtkChild]
-    private Gtk.Label needs_internet_label;
+    private unowned Gtk.Label needs_internet_label;
     [GtkChild]
-    private Gtk.Grid setup_grid;
+    private unowned Gtk.Grid setup_grid;
     [GtkChild]
-    private Gtk.Label express_label;
+    private unowned Gtk.Label express_label;
     [GtkChild]
-    private Gtk.Switch express_toggle;
+    private unowned Gtk.Switch express_toggle;
     [GtkChild]
-    private Gtk.Image user_avatar;
+    private unowned Gtk.Image user_avatar;
     [GtkChild]
-    private Gtk.Entry username_entry;
+    private unowned Gtk.Entry username_entry;
     [GtkChild]
-    private Gtk.Notebook password_notebook;
+    private unowned Gtk.Notebook password_notebook;
     [GtkChild]
-    private Gtk.Entry password_entry;
+    private unowned Gtk.Entry password_entry;
     [GtkChild]
-    private Gtk.Label product_key_label;
+    private unowned Gtk.Label product_key_label;
     [GtkChild]
-    private Gtk.Entry product_key_entry;
+    private unowned Gtk.Entry product_key_entry;
 
     private string? product_key_format;
     private string media_path;
diff --git a/src/welcome-tutorial-page.vala b/src/welcome-tutorial-page.vala
index c710408a..0df7b5f1 100644
--- a/src/welcome-tutorial-page.vala
+++ b/src/welcome-tutorial-page.vala
@@ -4,9 +4,9 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/welcome-tutorial-page.ui")]
 private class Boxes.WelcomeTutorialPage : Gtk.Box {
     [GtkChild]
-    private Label title_label;
+    private unowned Label title_label;
     [GtkChild]
-    private Label description_label;
+    private unowned Label description_label;
 
     public string title {
         set {
diff --git a/src/welcome-tutorial.vala b/src/welcome-tutorial.vala
index 2e9f9a12..be920cae 100644
--- a/src/welcome-tutorial.vala
+++ b/src/welcome-tutorial.vala
@@ -5,11 +5,11 @@
 [GtkTemplate (ui = "/org/gnome/Boxes/ui/welcome-tutorial.ui")]
 private class Boxes.WelcomeTutorial : Gtk.Dialog {
     [GtkChild]
-    private Carousel paginator;
+    private unowned Carousel paginator;
     [GtkChild]
-    private Button go_back_button;
+    private unowned Button go_back_button;
     [GtkChild]
-    private Button go_next_button;
+    private unowned Button go_next_button;
 
     private GLib.List<unowned WelcomeTutorialPage> pages;
     private CssProvider provider;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]