[connections/gtkchild-unowned] Mark GtkChild object references as unowned




commit 16656f991f4205fd7f2c0f911f9387dfd08dc1da
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Mar 2 12:29:52 2021 +0100

    Mark GtkChild object references as unowned
    
    The reference of the [GtkChild] is now handled by GtkBuilder.
    
    See https://gitlab.gnome.org/GNOME/gnome-boxes/-/commit/dc07f3c1

 src/assistant.vala             |  4 ++--
 src/collection-view-child.vala |  4 ++--
 src/collection-view.vala       |  6 +++---
 src/display-view.vala          |  8 ++++----
 src/notifications.vala         | 14 +++++++-------
 src/properties.vala            | 12 ++++++------
 src/topbar.vala                |  6 +++---
 src/window.vala                | 12 ++++++------
 8 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/src/assistant.vala b/src/assistant.vala
index 704929a..3d00810 100644
--- a/src/assistant.vala
+++ b/src/assistant.vala
@@ -23,9 +23,9 @@ namespace Connections {
     [GtkTemplate (ui = "/org/gnome/Connections/ui/assistant.ui")]
     private class Assistant : Gtk.Dialog {
         [GtkChild]
-        private Gtk.Entry url_entry;
+        private unowned Gtk.Entry url_entry;
         [GtkChild]
-        private Gtk.Button create_button; 
+        private unowned Gtk.Button create_button; 
 
         construct {
             use_header_bar = 1;
diff --git a/src/collection-view-child.vala b/src/collection-view-child.vala
index 800f581..e2a21ad 100644
--- a/src/collection-view-child.vala
+++ b/src/collection-view-child.vala
@@ -25,10 +25,10 @@ namespace Connections {
         public Connection connection;
 
         [GtkChild]
-        private Gtk.Label connection_name;
+        private unowned Gtk.Label connection_name;
 
         [GtkChild]
-        public Gtk.Image thumbnail; 
+        public unowned Gtk.Image thumbnail; 
 
         public CollectionViewChild (Connection connection) {
             this.connection = connection;
diff --git a/src/collection-view.vala b/src/collection-view.vala
index 862f945..bb5e1d1 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -23,11 +23,11 @@ namespace Connections {
     [GtkTemplate (ui = "/org/gnome/Connections/ui/collection-view.ui")]
     public class CollectionView : Gtk.ScrolledWindow {
         [GtkChild]
-        private Gtk.FlowBox flowbox; 
+        private unowned Gtk.FlowBox flowbox; 
         [GtkChild]
-        public Gtk.SearchBar search_bar;
+        public unowned Gtk.SearchBar search_bar;
         [GtkChild]
-        private Gtk.SearchEntry search_entry;
+        private unowned Gtk.SearchEntry search_entry;
 
         private Connections.ActionsPopover popover;
 
diff --git a/src/display-view.vala b/src/display-view.vala
index b66ea01..98ea09c 100644
--- a/src/display-view.vala
+++ b/src/display-view.vala
@@ -26,16 +26,16 @@ namespace Connections {
     [GtkTemplate (ui = "/org/gnome/Connections/ui/display-view.ui")]
     private class DisplayView : Gtk.Box {
         [GtkChild]
-        private EventBox event_box;
+        private unowned EventBox event_box;
 
         [GtkChild]
-        private Stack stack;
+        private unowned Stack stack;
 
         [GtkChild]
-        private Widget display_widget;
+        private unowned Widget display_widget;
 
         [GtkChild]
-        private Label size_label;
+        private unowned Label size_label;
 
         private Widget? display;
 
diff --git a/src/notifications.vala b/src/notifications.vala
index a1654d6..b82d4c7 100644
--- a/src/notifications.vala
+++ b/src/notifications.vala
@@ -87,9 +87,9 @@ namespace Connections {
         private DismissFunc? dismiss_func;
 
         [GtkChild]
-        private Gtk.Label message_label; 
+        private unowned Gtk.Label message_label; 
         [GtkChild]
-        private Gtk.Button ok_button; 
+        private unowned Gtk.Button ok_button; 
 
         private uint notification_timeout_id = 0;
 
@@ -151,15 +151,15 @@ namespace Connections {
         public signal void dismissed ();
 
         [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;
 
diff --git a/src/properties.vala b/src/properties.vala
index 2dd90df..378529d 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -24,17 +24,17 @@ namespace Connections {
     private class PropertiesDialog : Gtk.Dialog {
         private GLib.ListStore model = new GLib.ListStore (typeof (Property));
         [GtkChild]
-        private Gtk.ListBox listbox;
+        private unowned Gtk.ListBox listbox;
         [GtkChild]
-        private Gtk.ListBox default_properties_listbox;
+        private unowned Gtk.ListBox default_properties_listbox;
         [GtkChild]
-        private Gtk.Stack connection_name_stack;
+        private unowned Gtk.Stack connection_name_stack;
         [GtkChild]
-        private Gtk.Entry connection_name_entry;
+        private unowned Gtk.Entry connection_name_entry;
         [GtkChild]
-        private Gtk.Label connection_name_label;
+        private unowned Gtk.Label connection_name_label;
         [GtkChild]
-        private Gtk.Label host_address_label;
+        private unowned Gtk.Label host_address_label;
 
         protected weak Connection connection { get; set; }
 
diff --git a/src/topbar.vala b/src/topbar.vala
index b492231..322de19 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -23,11 +23,11 @@ namespace Connections {
     [GtkTemplate (ui = "/org/gnome/Connections/ui/topbar.ui")]
     private class Topbar : Gtk.Stack {
         [GtkChild]
-        private Gtk.HeaderBar collection_toolbar;
+        private unowned Gtk.HeaderBar collection_toolbar;
         [GtkChild]
-        public Gtk.Button search_button;
+        public unowned Gtk.Button search_button;
         [GtkChild]
-        private Gtk.HeaderBar display_toolbar;
+        private unowned Gtk.HeaderBar display_toolbar;
 
         private weak Connections.Connection connection;
         private const GLib.ActionEntry[] action_entries = {
diff --git a/src/window.vala b/src/window.vala
index eadd50d..ca0fd06 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -23,22 +23,22 @@ namespace Connections {
     [GtkTemplate (ui = "/org/gnome/Connections/ui/window.ui")]
     private class Window : Gtk.ApplicationWindow {
         [GtkChild]
-        private Topbar topbar;
+        private unowned Topbar topbar;
 
         [GtkChild]
-        private Gtk.Stack stack;
+        private unowned Gtk.Stack stack;
 
         [GtkChild]
-        private EmptyView empty_view;
+        private unowned EmptyView empty_view;
 
         [GtkChild]
-        public CollectionView collection_view;
+        public unowned CollectionView collection_view;
 
         [GtkChild]
-        private DisplayView display_view;
+        private unowned DisplayView display_view;
 
         [GtkChild]
-        public NotificationsBar notifications_bar;
+        public unowned NotificationsBar notifications_bar;
 
         public Window (Gtk.Application app) {
             Object (application: app);


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