[seahorse/bugfix/306] sidebar: Fix loading items of unlocked places
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/bugfix/306] sidebar: Fix loading items of unlocked places
- Date: Mon, 23 Nov 2020 22:26:36 +0000 (UTC)
commit 5695e05bcb747d58d7d73b1d085c90acc22b01b7
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Nov 23 23:21:26 2020 +0100
sidebar: Fix loading items of unlocked places
When clicking the unlock button in the sidebar, we automatically select
that row. In turn, that activates the base collection to start loading
the items that are part of the GkrKeyring, before it's been fully
unlocked. As a consequence, we can't load the labels or other relevant
information yet.
This commit introduces a (temporary) workaround, which clears the
selection (clearing the collection), before selecting the row again,
leading to all the items being loaded _after_ the keyring has been
unlocked.
Fixes https://gitlab.gnome.org/GNOME/seahorse/-/issues/306
src/key-manager.vala | 7 ++++---
src/sidebar.vala | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/key-manager.vala b/src/key-manager.vala
index 5b62fd76..d638b71d 100644
--- a/src/key-manager.vala
+++ b/src/key-manager.vala
@@ -461,11 +461,12 @@ public class Seahorse.KeyManager : Catalog {
}
private void on_sidebar_selected_rows_changed(Gtk.ListBox sidebar) {
- check_empty_state();
+ Place? place = this.sidebar.get_focused_place();
+ if (place == null) // FIXME: temporary workaround
+ return;
+ check_empty_state();
show_item_list_pane();
-
- Place? place = this.sidebar.get_focused_place();
return_if_fail (place != null);
this.right_header.title = place.label;
diff --git a/src/sidebar.vala b/src/sidebar.vala
index b991d006..dfa01704 100644
--- a/src/sidebar.vala
+++ b/src/sidebar.vala
@@ -103,6 +103,7 @@ public class Seahorse.Sidebar : Gtk.ListBox {
}
private void on_sidebar_item_changed(SidebarItem item) {
+ select_row(null);
select_row(item);
current_collection_changed();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]