From 8d8dcf5af67ad89c328e67dc2c3469ef90283d9a Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 11 Oct 2021 23:08:50 +0200 Subject: Fix compiler warnings ('[GtkChild] fields must be declared as `unowned'') --- .../ui/add_conversation/add_contact_dialog.vala | 10 ++--- .../ui/add_conversation/add_groupchat_dialog.vala | 14 +++---- .../conference_details_fragment.vala | 48 +++++++++++----------- main/src/ui/add_conversation/list_row.vala | 6 +-- .../ui/add_conversation/select_jid_fragment.vala | 8 ++-- 5 files changed, 43 insertions(+), 43 deletions(-) (limited to 'main/src/ui/add_conversation') diff --git a/main/src/ui/add_conversation/add_contact_dialog.vala b/main/src/ui/add_conversation/add_contact_dialog.vala index 7e9b5185..7b4f40a0 100644 --- a/main/src/ui/add_conversation/add_contact_dialog.vala +++ b/main/src/ui/add_conversation/add_contact_dialog.vala @@ -19,11 +19,11 @@ protected class AddContactDialog : Gtk.Dialog { set { jid_entry.text = value; } } - [GtkChild] private AccountComboBox account_combobox; - [GtkChild] private Button ok_button; - [GtkChild] private Button cancel_button; - [GtkChild] private Entry jid_entry; - [GtkChild] private Entry alias_entry; + [GtkChild] private unowned AccountComboBox account_combobox; + [GtkChild] private unowned Button ok_button; + [GtkChild] private unowned Button cancel_button; + [GtkChild] private unowned Entry jid_entry; + [GtkChild] private unowned Entry alias_entry; private StreamInteractor stream_interactor; diff --git a/main/src/ui/add_conversation/add_groupchat_dialog.vala b/main/src/ui/add_conversation/add_groupchat_dialog.vala index 46298d81..a71c0a15 100644 --- a/main/src/ui/add_conversation/add_groupchat_dialog.vala +++ b/main/src/ui/add_conversation/add_groupchat_dialog.vala @@ -9,13 +9,13 @@ namespace Dino.Ui { [GtkTemplate (ui = "/im/dino/Dino/add_conversation/add_groupchat_dialog.ui")] protected class AddGroupchatDialog : Gtk.Dialog { - [GtkChild] private Stack accounts_stack; - [GtkChild] private AccountComboBox account_combobox; - [GtkChild] private Button ok_button; - [GtkChild] private Button cancel_button; - [GtkChild] private Entry jid_entry; - [GtkChild] private Entry alias_entry; - [GtkChild] private Entry nick_entry; + [GtkChild] private unowned Stack accounts_stack; + [GtkChild] private unowned AccountComboBox account_combobox; + [GtkChild] private unowned Button ok_button; + [GtkChild] private unowned Button cancel_button; + [GtkChild] private unowned Entry jid_entry; + [GtkChild] private unowned Entry alias_entry; + [GtkChild] private unowned Entry nick_entry; private StreamInteractor stream_interactor; private bool alias_entry_changed = false; diff --git a/main/src/ui/add_conversation/conference_details_fragment.vala b/main/src/ui/add_conversation/conference_details_fragment.vala index 0b8306e4..88f9cc73 100644 --- a/main/src/ui/add_conversation/conference_details_fragment.vala +++ b/main/src/ui/add_conversation/conference_details_fragment.vala @@ -62,30 +62,30 @@ protected class ConferenceDetailsFragment : Box { public bool fragment_active { get; set; default=true; } - [GtkChild] private Stack accounts_stack; - [GtkChild] private Button accounts_button; - [GtkChild] private Label accounts_label; - [GtkChild] private AccountComboBox account_combobox; - - [GtkChild] private Stack jid_stack; - [GtkChild] private Button jid_button; - [GtkChild] private Label jid_label; - [GtkChild] private Entry jid_entry; - - [GtkChild] private Stack nick_stack; - [GtkChild] private Button nick_button; - [GtkChild] private Label nick_label; - [GtkChild] private Entry nick_entry; - - [GtkChild] private Stack password_stack; - [GtkChild] private Button password_button; - [GtkChild] private Label password_label; - [GtkChild] private Label password_text_label; - [GtkChild] private Entry password_entry; - - [GtkChild] private Revealer notification_revealer; - [GtkChild] private Button notification_button; - [GtkChild] private Label notification_label; + [GtkChild] private unowned Stack accounts_stack; + [GtkChild] private unowned Button accounts_button; + [GtkChild] private unowned Label accounts_label; + [GtkChild] private unowned AccountComboBox account_combobox; + + [GtkChild] private unowned Stack jid_stack; + [GtkChild] private unowned Button jid_button; + [GtkChild] private unowned Label jid_label; + [GtkChild] private unowned Entry jid_entry; + + [GtkChild] private unowned Stack nick_stack; + [GtkChild] private unowned Button nick_button; + [GtkChild] private unowned Label nick_label; + [GtkChild] private unowned Entry nick_entry; + + [GtkChild] private unowned Stack password_stack; + [GtkChild] private unowned Button password_button; + [GtkChild] private unowned Label password_label; + [GtkChild] private unowned Label password_text_label; + [GtkChild] private unowned Entry password_entry; + + [GtkChild] private unowned Revealer notification_revealer; + [GtkChild] private unowned Button notification_button; + [GtkChild] private unowned Label notification_label; private StreamInteractor stream_interactor; private Button ok_button_; diff --git a/main/src/ui/add_conversation/list_row.vala b/main/src/ui/add_conversation/list_row.vala index 4dec567a..97c2b2fe 100644 --- a/main/src/ui/add_conversation/list_row.vala +++ b/main/src/ui/add_conversation/list_row.vala @@ -9,9 +9,9 @@ namespace Dino.Ui { [GtkTemplate (ui = "/im/dino/Dino/add_conversation/list_row.ui")] public class ListRow : ListBoxRow { - [GtkChild] public AvatarImage image; - [GtkChild] public Label name_label; - [GtkChild] public Label via_label; + [GtkChild] public unowned AvatarImage image; + [GtkChild] public unowned Label name_label; + [GtkChild] public unowned Label via_label; public Jid? jid; public Account? account; diff --git a/main/src/ui/add_conversation/select_jid_fragment.vala b/main/src/ui/add_conversation/select_jid_fragment.vala index 2035b14b..bc349b6c 100644 --- a/main/src/ui/add_conversation/select_jid_fragment.vala +++ b/main/src/ui/add_conversation/select_jid_fragment.vala @@ -16,10 +16,10 @@ public class SelectJidFragment : Gtk.Box { private set {} } - [GtkChild] private Entry entry; - [GtkChild] private Box box; - [GtkChild] private Button add_button; - [GtkChild] private Button remove_button; + [GtkChild] private unowned Entry entry; + [GtkChild] private unowned Box box; + [GtkChild] private unowned Button add_button; + [GtkChild] private unowned Button remove_button; private StreamInteractor stream_interactor; private FilterableList filterable_list; -- cgit v1.2.3-70-g09d2