summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2022-08-08 08:10:49 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2022-08-08 08:10:49 +0200
commitfff05142b1f93a6fbab2ec3d0d64513338510dd9 (patch)
tree2d3825a452cdb3a67f0d780b82d26a13193ed056 /src
parentb4eb9c71f2f442f4b01d8a8802773053af916da3 (diff)
downloadgnome-contacts-fff05142b1f93a6fbab2ec3d0d64513338510dd9.tar.gz
accounts-list: Don't autoselect an address book
There's 2 reasons why we don't want the AccountsList widget to automatically select an address book: 1. In the initial setup, we want a user to explicitly choose which address book they'd like to use for storing contacts 2. We haven't setup the selection_changed handler yet, meaning the "selected-store" property will not get notified of the initial selection. Fixes: https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/260
Diffstat (limited to 'src')
-rw-r--r--src/contacts-accounts-list.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/contacts-accounts-list.vala b/src/contacts-accounts-list.vala
index db04cc9..0990f30 100644
--- a/src/contacts-accounts-list.vala
+++ b/src/contacts-accounts-list.vala
@@ -49,7 +49,9 @@ public class Contacts.AccountsList : Adw.PreferencesGroup {
on_model_items_changed (model, 0, 0, model.get_n_items ());
// Setup the selection model
- this.selection = new Gtk.SingleSelection (model);
+ this.selection = new Gtk.SingleSelection (null);
+ this.selection.autoselect = false;
+ this.selection.model = model;
// Update the row when the selection model changes
this.selection.selection_changed.connect ((sel, pos, n_items) => {