[gnome-usage/ricotz/vala] Reference of [GtkChild] fields is handled by GtkBuilder, type must be unowned
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage/ricotz/vala] Reference of [GtkChild] fields is handled by GtkBuilder, type must be unowned
- Date: Wed, 17 Mar 2021 10:12:39 +0000 (UTC)
commit b62fcfcd75081139ff1046d689172ed255a51ab7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Mar 17 11:11:40 2021 +0100
Reference of [GtkChild] fields is handled by GtkBuilder, type must be unowned
src/loading-notification.vala | 2 +-
src/memory-speedometer.vala | 8 ++++----
src/performance-view.vala | 10 +++++-----
src/primary-menu.vala | 2 +-
src/process-row.vala | 12 ++++++------
src/speedometer.vala | 4 ++--
src/storage/storage-actionbar.vala | 2 +-
src/storage/storage-row-popover.vala | 2 +-
src/storage/storage-view-row.vala | 10 +++++-----
src/storage/storage-view.vala | 14 +++++++-------
src/swap-speedometer.vala | 8 ++++----
src/window.vala | 10 +++++-----
12 files changed, 42 insertions(+), 42 deletions(-)
---
diff --git a/src/loading-notification.vala b/src/loading-notification.vala
index 99d3c6c..28d44ef 100644
--- a/src/loading-notification.vala
+++ b/src/loading-notification.vala
@@ -28,7 +28,7 @@ namespace Usage {
public delegate void DismissFunc ();
[GtkChild]
- private Gtk.Label message_label;
+ private unowned Gtk.Label message_label;
public LoadingNotification (string message, owned DismissFunc? dismiss_func) {
set_reveal_child (true);
diff --git a/src/memory-speedometer.vala b/src/memory-speedometer.vala
index f0190a4..65a6ab6 100644
--- a/src/memory-speedometer.vala
+++ b/src/memory-speedometer.vala
@@ -26,16 +26,16 @@ namespace Usage
public class MemorySpeedometer : Gtk.Bin
{
[GtkChild]
- private Usage.Speedometer speedometer;
+ private unowned Usage.Speedometer speedometer;
[GtkChild]
- private Gtk.Label label;
+ private unowned Gtk.Label label;
[GtkChild]
- private Gtk.Label ram_used;
+ private unowned Gtk.Label ram_used;
[GtkChild]
- private Gtk.Label ram_available;
+ private unowned Gtk.Label ram_available;
private double ram_usage { get; set; }
diff --git a/src/performance-view.vala b/src/performance-view.vala
index eb06365..bfdeb2e 100644
--- a/src/performance-view.vala
+++ b/src/performance-view.vala
@@ -26,19 +26,19 @@ namespace Usage
public class PerformanceView : View
{
[GtkChild]
- private Gtk.Box switcher_box;
+ private unowned Gtk.Box switcher_box;
[GtkChild]
- private Gtk.Box performance_content;
+ private unowned Gtk.Box performance_content;
[GtkChild]
- private Hdy.SearchBar search_bar;
+ private unowned Hdy.SearchBar search_bar;
[GtkChild]
- private Gtk.SearchEntry search_entry;
+ private unowned Gtk.SearchEntry search_entry;
[GtkChild]
- private AnimatedScrolledWindow scrolled_window;
+ private unowned AnimatedScrolledWindow scrolled_window;
View[] sub_views;
diff --git a/src/primary-menu.vala b/src/primary-menu.vala
index 2275f17..3dd10b3 100644
--- a/src/primary-menu.vala
+++ b/src/primary-menu.vala
@@ -25,7 +25,7 @@ namespace Usage {
public class PrimaryMenu : Gtk.Popover {
[GtkChild]
- private Gtk.Box performance_container;
+ private unowned Gtk.Box performance_container;
public HeaderBarMode mode { get; set; }
diff --git a/src/process-row.vala b/src/process-row.vala
index e526501..3c4cab8 100644
--- a/src/process-row.vala
+++ b/src/process-row.vala
@@ -31,22 +31,22 @@ namespace Usage
private const string CSS_TAG_SYSTEM = "tag-system";
[GtkChild]
- private Gtk.Image icon;
+ private unowned Gtk.Image icon;
[GtkChild]
- private Gtk.Label title_label;
+ private unowned Gtk.Label title_label;
[GtkChild]
- private Gtk.Box user_tag_box;
+ private unowned Gtk.Box user_tag_box;
[GtkChild]
- private Gtk.Image gamemode;
+ private unowned Gtk.Image gamemode;
[GtkChild]
- private Gtk.Label user_tag_label;
+ private unowned Gtk.Label user_tag_label;
[GtkChild]
- private Gtk.Label load_label;
+ private unowned Gtk.Label load_label;
private ProcessListBoxType type;
diff --git a/src/speedometer.vala b/src/speedometer.vala
index c7adc89..66a8646 100644
--- a/src/speedometer.vala
+++ b/src/speedometer.vala
@@ -26,10 +26,10 @@ namespace Usage
public class Speedometer : Buildable, Gtk.Bin
{
[GtkChild]
- private Gtk.Box inner;
+ private unowned Gtk.Box inner;
[GtkChild]
- private Gtk.Box content_area;
+ private unowned Gtk.Box content_area;
private Gtk.CssProvider css_provider;
diff --git a/src/storage/storage-actionbar.vala b/src/storage/storage-actionbar.vala
index 1626662..ac2539f 100644
--- a/src/storage/storage-actionbar.vala
+++ b/src/storage/storage-actionbar.vala
@@ -26,7 +26,7 @@ namespace Usage
private unowned List<StorageViewItem> selected_items;
[GtkChild]
- private Gtk.Label size_label;
+ private unowned Gtk.Label size_label;
public signal void refresh_listbox ();
diff --git a/src/storage/storage-row-popover.vala b/src/storage/storage-row-popover.vala
index 8a7e7c3..9a6a922 100644
--- a/src/storage/storage-row-popover.vala
+++ b/src/storage/storage-row-popover.vala
@@ -22,7 +22,7 @@
public class Usage.StorageRowPopover : Gtk.Popover {
[GtkChild]
- private Gtk.Label label;
+ private unowned Gtk.Label label;
public void present (StorageViewRow row) {
relative_to = row;
diff --git a/src/storage/storage-view-row.vala b/src/storage/storage-view-row.vala
index 4541e5f..670dd80 100644
--- a/src/storage/storage-view-row.vala
+++ b/src/storage/storage-view-row.vala
@@ -30,19 +30,19 @@ public class Usage.StorageViewRow : Gtk.ListBoxRow {
}
[GtkChild]
- private Gtk.Label title;
+ private unowned Gtk.Label title;
[GtkChild]
- public Gtk.CheckButton check_button;
+ public unowned Gtk.CheckButton check_button;
[GtkChild]
- public Gtk.Label size_label;
+ public unowned Gtk.Label size_label;
[GtkChild]
- public Gtk.Spinner spinner;
+ public unowned Gtk.Spinner spinner;
[GtkChild]
- public Gtk.Box tag;
+ public unowned Gtk.Box tag;
public enum TagSize {
SMALL,
diff --git a/src/storage/storage-view.vala b/src/storage/storage-view.vala
index 8b4dabb..caa6b8c 100644
--- a/src/storage/storage-view.vala
+++ b/src/storage/storage-view.vala
@@ -27,25 +27,25 @@ public class Usage.StorageView : Usage.View {
public const uint MIN_PERCENTAGE_SHOWN_FILES = 2;
[GtkChild]
- private Gtk.Label header_label;
+ private unowned Gtk.Label header_label;
[GtkChild]
- private StorageViewRow used_row;
+ private unowned StorageViewRow used_row;
[GtkChild]
- private StorageViewRow available_row;
+ private unowned StorageViewRow available_row;
[GtkChild]
- private Dazzle.StackList listbox;
+ private unowned Dazzle.StackList listbox;
[GtkChild]
- private StorageGraph graph;
+ private unowned StorageGraph graph;
[GtkChild]
- private StorageActionBar actionbar;
+ private unowned StorageActionBar actionbar;
[GtkChild]
- private NotificationBar notificationbar;
+ private unowned NotificationBar notificationbar;
private Sparql.Connection connection;
private TrackerController controller;
diff --git a/src/swap-speedometer.vala b/src/swap-speedometer.vala
index e194d65..0672729 100644
--- a/src/swap-speedometer.vala
+++ b/src/swap-speedometer.vala
@@ -26,16 +26,16 @@ namespace Usage
public class SwapSpeedometer : Gtk.Bin
{
[GtkChild]
- private Usage.Speedometer speedometer;
+ private unowned Usage.Speedometer speedometer;
[GtkChild]
- private Gtk.Label label;
+ private unowned Gtk.Label label;
[GtkChild]
- private Gtk.Label swap_used;
+ private unowned Gtk.Label swap_used;
[GtkChild]
- private Gtk.Label swap_available;
+ private unowned Gtk.Label swap_available;
private double swap_usage { get; set; }
diff --git a/src/window.vala b/src/window.vala
index 819162a..7394cdc 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -37,22 +37,22 @@ namespace Usage
public class Window : Hdy.ApplicationWindow
{
[GtkChild]
- private Gtk.Stack stack;
+ private unowned Gtk.Stack stack;
[GtkChild]
- private Gtk.Revealer performance_search_revealer;
+ private unowned Gtk.Revealer performance_search_revealer;
[GtkChild]
- private Gtk.ToggleButton performance_search_button;
+ private unowned Gtk.ToggleButton performance_search_button;
[GtkChild]
- private Gtk.MenuButton primary_menu_button;
+ private unowned Gtk.MenuButton primary_menu_button;
private HeaderBarMode mode;
private Usage.PrimaryMenu menu;
[GtkChild]
- private Hdy.ViewSwitcherBar view_switcher_bar;
+ private unowned Hdy.ViewSwitcherBar view_switcher_bar;
private View[] views;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]