[seahorse] KeyManagerStore: Fix view filter callback
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] KeyManagerStore: Fix view filter callback
- Date: Sun, 16 Sep 2018 16:30:52 +0000 (UTC)
commit d33e874d80295aa96cbac04f4428e0cdbf7eec7e
Author: Anukul Sangwan <anukulsangwan icloud com>
Date: Sun Sep 16 20:24:09 2018 +0530
KeyManagerStore: Fix view filter callback
common/key-manager-store.vala | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/common/key-manager-store.vala b/common/key-manager-store.vala
index f079c68f..404d8fd2 100644
--- a/common/key-manager-store.vala
+++ b/common/key-manager-store.vala
@@ -211,18 +211,16 @@ public class Seahorse.KeyManagerStore : Gcr.CollectionModel {
}
private bool apply_showfilter(GLib.Object? obj) {
- if (this.showfilter == ShowFilter.ANY)
- return true;
-
- unowned Object? object = obj as Object;
- if (object == null)
- return false;
+ Flags obj_flags = Flags.NONE;
+ obj.get("object-flags", out obj_flags, null);
switch (this.showfilter) {
case ShowFilter.PERSONAL:
- return Seahorse.Flags.PERSONAL in object.object_flags;
+ return Seahorse.Flags.PERSONAL in obj_flags;
case ShowFilter.TRUSTED:
- return Seahorse.Flags.TRUSTED in object.object_flags;
+ return Seahorse.Flags.TRUSTED in obj_flags;
+ case ShowFilter.ANY:
+ return true;
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]