[seahorse/paint-issue-315] key-manager: Make sure to update after unlocking




commit a635e5df77ced15dbc7ac3b7b461108133cdb4d7
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sat Feb 20 09:06:44 2021 +0100

    key-manager: Make sure to update after unlocking
    
    When we unlock a keyring, the main list view gets updated due to a
    signal that gets triggered when the number of elements in a collection
    changes. In the case of an empty keying however, we won't get this
    signal as the number of elements will remain zero. We can fix this by
    explicitly triggering an update.
    
    Fixes https://gitlab.gnome.org/GNOME/seahorse/-/issues/315

 src/key-manager.vala | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/key-manager.vala b/src/key-manager.vala
index ed5e4ca0..559188f1 100644
--- a/src/key-manager.vala
+++ b/src/key-manager.vala
@@ -492,6 +492,8 @@ public class Seahorse.KeyManager : Catalog {
             try {
                 unlock_button.sensitive = true;
                 place.unlock.end(res);
+                // Explicitly trigger an update of the main view
+                check_empty_state();
             } catch (GLib.Error e) {
                 unlock_button.sensitive = true;
                 Util.show_error(this, _("Couldn’t unlock keyring"), e.message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]