diff options
author | fiaxh <git@lightrise.org> | 2021-02-10 18:32:39 -0600 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-02-10 18:32:39 -0600 |
commit | 0626bad8e9c2f7dfd4d8eccc86ec1e8bec6c7308 (patch) | |
tree | 8d0d550dc8b07ae05c30dce279243b00dd77b4b6 /main/src/ui/add_conversation | |
parent | ad031ee33366aefc003ed3cac3a74079d963bfe9 (diff) | |
download | dino-0626bad8e9c2f7dfd4d8eccc86ec1e8bec6c7308.tar.gz dino-0626bad8e9c2f7dfd4d8eccc86ec1e8bec6c7308.zip |
Reduce use of Widget.destroy()
On non-toplevel windows, use Container.remove() instead of Widget.destroy()
Needed for migration to GTK4
https://developer.gnome.org/gtk4/unstable/gtk-migrating-3-to-4.html#id-1.7.4.3.17
Diffstat (limited to 'main/src/ui/add_conversation')
-rw-r--r-- | main/src/ui/add_conversation/conference_list.vala | 2 | ||||
-rw-r--r-- | main/src/ui/add_conversation/select_jid_fragment.vala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/main/src/ui/add_conversation/conference_list.vala b/main/src/ui/add_conversation/conference_list.vala index f18a89d5..fa71f98f 100644 --- a/main/src/ui/add_conversation/conference_list.vala +++ b/main/src/ui/add_conversation/conference_list.vala @@ -49,7 +49,7 @@ protected class ConferenceList : FilterableList { private void remove_conference(Account account, Jid jid) { if (widgets.has_key(account) && widgets[account].has_key(jid)) { - widgets[account][jid].destroy(); + remove(widgets[account][jid]); widgets[account].unset(jid); } } diff --git a/main/src/ui/add_conversation/select_jid_fragment.vala b/main/src/ui/add_conversation/select_jid_fragment.vala index f0170cfb..2035b14b 100644 --- a/main/src/ui/add_conversation/select_jid_fragment.vala +++ b/main/src/ui/add_conversation/select_jid_fragment.vala @@ -48,7 +48,7 @@ public class SelectJidFragment : Gtk.Box { public void set_filter(string str) { if (entry.text != str) entry.text = str; - foreach (AddListRow row in added_rows) row.destroy(); + foreach (AddListRow row in added_rows) filterable_list.remove(row); added_rows.clear(); string[] ? values = str == "" ? null : str.split(" "); |