[seahorse] Mark all [GtkChild] fields as unowned
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Mark all [GtkChild] fields as unowned
- Date: Wed, 17 Feb 2021 09:47:58 +0000 (UTC)
commit ebf02cd1c154179f6f6d2fc78fbefbba2dc96f43
Author: Niels De Graef <nielsdegraef gmail com>
Date: Wed Feb 17 10:46:53 2021 +0100
Mark all [GtkChild] fields as unowned
This fixes quite a few warnings when compiling with latest Vala. (It
actually makes sense also, since the widgets are owned by their parent
widgets, not by the composite class).
gkr/gkr-item-add.vala | 10 +++++-----
gkr/gkr-item-properties.vala | 20 ++++++++++----------
gkr/gkr-keyring-add.vala | 2 +-
gkr/gkr-keyring-properties.vala | 12 ++++++------
pkcs11/pkcs11-generate.vala | 8 ++++----
pkcs11/pkcs11-properties.vala | 8 ++++----
src/key-manager.vala | 24 ++++++++++++------------
ssh/generate.vala | 10 +++++-----
ssh/key-properties.vala | 20 ++++++++++----------
ssh/upload.vala | 6 +++---
10 files changed, 60 insertions(+), 60 deletions(-)
---
diff --git a/gkr/gkr-item-add.vala b/gkr/gkr-item-add.vala
index 9e2532b0..aad437c9 100644
--- a/gkr/gkr-item-add.vala
+++ b/gkr/gkr-item-add.vala
@@ -20,16 +20,16 @@
[GtkTemplate (ui = "/org/gnome/Seahorse/seahorse-gkr-add-item.ui")]
public class Seahorse.Gkr.ItemAdd : Gtk.Dialog {
[GtkChild]
- private Gtk.ComboBox item_keyring_combo;
+ private unowned Gtk.ComboBox item_keyring_combo;
[GtkChild]
- private Gtk.Container password_area;
+ private unowned Gtk.Container password_area;
private Gtk.Entry password_entry;
[GtkChild]
- private Gtk.Entry item_entry;
+ private unowned Gtk.Entry item_entry;
[GtkChild]
- private Gtk.LevelBar password_strength_bar;
+ private unowned Gtk.LevelBar password_strength_bar;
[GtkChild]
- private Gtk.Image password_strength_icon;
+ private unowned Gtk.Image password_strength_icon;
private PasswordQuality.Settings pwquality = new PasswordQuality.Settings();
diff --git a/gkr/gkr-item-properties.vala b/gkr/gkr-item-properties.vala
index f809f592..6d6e43f3 100644
--- a/gkr/gkr-item-properties.vala
+++ b/gkr/gkr-item-properties.vala
@@ -23,26 +23,26 @@ public class Seahorse.Gkr.ItemProperties : Gtk.Dialog {
public Item item { construct; get; }
[GtkChild]
- private Gtk.Entry description_field;
+ private unowned Gtk.Entry description_field;
private bool description_has_changed;
[GtkChild]
- private Gtk.Label use_field;
+ private unowned Gtk.Label use_field;
[GtkChild]
- private Gtk.Label type_field;
+ private unowned Gtk.Label type_field;
[GtkChild]
- private Gtk.Label details_label;
+ private unowned Gtk.Label details_label;
[GtkChild]
- private Gtk.Label details_box;
+ private unowned Gtk.Label details_box;
[GtkChild]
- private Gtk.Label server_label;
+ private unowned Gtk.Label server_label;
[GtkChild]
- private Gtk.Label server_field;
+ private unowned Gtk.Label server_field;
[GtkChild]
- private Gtk.Label login_label;
+ private unowned Gtk.Label login_label;
[GtkChild]
- private Gtk.Label login_field;
+ private unowned Gtk.Label login_field;
[GtkChild]
- private Gtk.Box password_box_area;
+ private unowned Gtk.Box password_box_area;
private PasswordEntry password_entry;
construct {
diff --git a/gkr/gkr-keyring-add.vala b/gkr/gkr-keyring-add.vala
index f60c9a22..1dd94e86 100644
--- a/gkr/gkr-keyring-add.vala
+++ b/gkr/gkr-keyring-add.vala
@@ -20,7 +20,7 @@
[GtkTemplate (ui = "/org/gnome/Seahorse/seahorse-gkr-add-keyring.ui")]
public class Seahorse.Gkr.KeyringAdd : Gtk.Dialog {
[GtkChild]
- private Gtk.Entry name_entry;
+ private unowned Gtk.Entry name_entry;
construct {
set_response_sensitive(Gtk.ResponseType.ACCEPT, false);
diff --git a/gkr/gkr-keyring-properties.vala b/gkr/gkr-keyring-properties.vala
index 33329c09..e1a2c679 100644
--- a/gkr/gkr-keyring-properties.vala
+++ b/gkr/gkr-keyring-properties.vala
@@ -21,17 +21,17 @@ public class Seahorse.Gkr.KeyringProperties : Gtk.Dialog {
public Keyring keyring { construct; get; }
[GtkChild]
- private Gtk.HeaderBar header;
+ private unowned Gtk.HeaderBar header;
[GtkChild]
- private Gtk.Label name_label;
+ private unowned Gtk.Label name_label;
[GtkChild]
- private Gtk.Label created_label;
+ private unowned Gtk.Label created_label;
[GtkChild]
- private Gtk.Image keyring_image;
+ private unowned Gtk.Image keyring_image;
[GtkChild]
- private Gtk.Button set_default_button;
+ private unowned Gtk.Button set_default_button;
[GtkChild]
- private Gtk.LockButton lock_button;
+ private unowned Gtk.LockButton lock_button;
construct {
this.use_header_bar = 1;
diff --git a/pkcs11/pkcs11-generate.vala b/pkcs11/pkcs11-generate.vala
index adb575aa..a7dbb499 100644
--- a/pkcs11/pkcs11-generate.vala
+++ b/pkcs11/pkcs11-generate.vala
@@ -27,20 +27,20 @@ extern Gcr.CollectionModel gcr_collection_model_new(Gcr.Collection collection,
public class Seahorse.Pkcs11.Generate : Gtk.Dialog {
[GtkChild]
- private Gtk.Entry label_entry;
+ private unowned Gtk.Entry label_entry;
private Pkcs11.Token? token;
[GtkChild]
- private Gtk.ComboBox token_box;
+ private unowned Gtk.ComboBox token_box;
private Gcr.CollectionModel? token_model;
private Gck.Mechanism? mechanism;
private Gtk.ListStore? mechanism_store;
[GtkChild]
- private Gtk.ComboBox mechanism_box;
+ private unowned Gtk.ComboBox mechanism_box;
[GtkChild]
- private Gtk.SpinButton key_bits;
+ private unowned Gtk.SpinButton key_bits;
private Cancellable? cancellable;
private Gck.Attributes? pub_attrs;
diff --git a/pkcs11/pkcs11-properties.vala b/pkcs11/pkcs11-properties.vala
index 01b6adb3..e24c355b 100644
--- a/pkcs11/pkcs11-properties.vala
+++ b/pkcs11/pkcs11-properties.vala
@@ -31,14 +31,14 @@ public class Seahorse.Pkcs11.Properties : Gtk.Dialog {
/* [GtkChild] */
/* private Gtk.HeaderBar header; */
[GtkChild]
- private Gtk.Button delete_button;
+ private unowned Gtk.Button delete_button;
[GtkChild]
- private Gtk.Button export_button;
+ private unowned Gtk.Button export_button;
[GtkChild]
- private Gtk.Button request_certificate_button;
+ private unowned Gtk.Button request_certificate_button;
[GtkChild]
- private Gtk.Box content;
+ private unowned Gtk.Box content;
private Gcr.Viewer _viewer;
private GLib.Cancellable _cancellable;
diff --git a/src/key-manager.vala b/src/key-manager.vala
index 5b62fd76..ed5e4ca0 100644
--- a/src/key-manager.vala
+++ b/src/key-manager.vala
@@ -24,33 +24,33 @@
public class Seahorse.KeyManager : Catalog {
[GtkChild]
- private Hdy.Leaflet header;
+ private unowned Hdy.Leaflet header;
[GtkChild]
- private Gtk.HeaderBar left_header;
+ private unowned Gtk.HeaderBar left_header;
[GtkChild]
- private Gtk.HeaderBar right_header;
+ private unowned Gtk.HeaderBar right_header;
[GtkChild]
- private Gtk.Revealer back_revealer;
+ private unowned Gtk.Revealer back_revealer;
[GtkChild]
- private Gtk.SearchBar search_bar;
+ private unowned Gtk.SearchBar search_bar;
[GtkChild]
- private Gtk.SearchEntry filter_entry;
+ private unowned Gtk.SearchEntry filter_entry;
[GtkChild]
- private Hdy.Leaflet content_box;
+ private unowned Hdy.Leaflet content_box;
[GtkChild]
- private Gtk.ScrolledWindow sidebar_area;
+ private unowned Gtk.ScrolledWindow sidebar_area;
private Sidebar sidebar;
[GtkChild]
- private Gtk.Stack content_stack;
+ private unowned Gtk.Stack content_stack;
[GtkChild]
- private Gtk.ListBox item_listbox;
+ private unowned Gtk.ListBox item_listbox;
[GtkChild]
- private Gtk.MenuButton new_item_button;
+ private unowned Gtk.MenuButton new_item_button;
[GtkChild]
- private Gtk.ToggleButton show_search_button;
+ private unowned Gtk.ToggleButton show_search_button;
private Seahorse.ItemList item_list;
private Gcr.Collection collection;
diff --git a/ssh/generate.vala b/ssh/generate.vala
index 05b83c96..eb577a55 100644
--- a/ssh/generate.vala
+++ b/ssh/generate.vala
@@ -27,16 +27,16 @@ public class Seahorse.Ssh.Generate : Gtk.Dialog {
private Source source;
[GtkChild]
- private Gtk.Grid details_grid;
+ private unowned Gtk.Grid details_grid;
private KeyLengthChooser key_length_chooser;
[GtkChild]
- private Gtk.Entry email_entry;
+ private unowned Gtk.Entry email_entry;
[GtkChild]
- private Gtk.ComboBoxText algorithm_combo_box;
+ private unowned Gtk.ComboBoxText algorithm_combo_box;
[GtkChild]
- private Gtk.Button create_with_setup_button;
+ private unowned Gtk.Button create_with_setup_button;
[GtkChild]
- private Gtk.Button create_no_setup_button;
+ private unowned Gtk.Button create_no_setup_button;
public Generate(Source src, Gtk.Window parent) {
this.transient_for = parent;
diff --git a/ssh/key-properties.vala b/ssh/key-properties.vala
index 6cf74353..102940d5 100644
--- a/ssh/key-properties.vala
+++ b/ssh/key-properties.vala
@@ -28,25 +28,25 @@ public class Seahorse.Ssh.KeyProperties : Gtk.Dialog {
private bool updating_ui = false;
[GtkChild]
- private Gtk.Entry comment_entry;
+ private unowned Gtk.Entry comment_entry;
[GtkChild]
- private Gtk.Switch trust_check;
+ private unowned Gtk.Switch trust_check;
[GtkChild]
- private Gtk.Button passphrase_button;
+ private unowned Gtk.Button passphrase_button;
[GtkChild]
- private Gtk.Button export_button;
+ private unowned Gtk.Button export_button;
[GtkChild]
- private Gtk.Button copy_button;
+ private unowned Gtk.Button copy_button;
[GtkChild]
- private Gtk.Label fingerprint_label;
+ private unowned Gtk.Label fingerprint_label;
[GtkChild]
- private Gtk.Label algo_label;
+ private unowned Gtk.Label algo_label;
[GtkChild]
- private Gtk.Label location_label;
+ private unowned Gtk.Label location_label;
[GtkChild]
- private Gtk.Label pubkey_label;
+ private unowned Gtk.Label pubkey_label;
[GtkChild]
- private Gtk.Label key_length_label;
+ private unowned Gtk.Label key_length_label;
public KeyProperties(Key key, Gtk.Window parent) {
GLib.Object(
diff --git a/ssh/upload.vala b/ssh/upload.vala
index 5c650298..aa76801d 100644
--- a/ssh/upload.vala
+++ b/ssh/upload.vala
@@ -25,11 +25,11 @@ public class Seahorse.Ssh.Upload : Gtk.Dialog {
private unowned List<Key> keys;
[GtkChild]
- private Gtk.Entry user_entry;
+ private unowned Gtk.Entry user_entry;
[GtkChild]
- private Gtk.Entry host_entry;
+ private unowned Gtk.Entry host_entry;
[GtkChild]
- private Gtk.Button setup_button;
+ private unowned Gtk.Button setup_button;
public Upload(List<Key> keys, Gtk.Window? parent) {
GLib.Object(use_header_bar: 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]