aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin/registry.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r--libdino/src/plugin/registry.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala
index 8c75784e..27cac6f3 100644
--- a/libdino/src/plugin/registry.vala
+++ b/libdino/src/plugin/registry.vala
@@ -4,6 +4,7 @@ namespace Dino.Plugins {
public class Registry {
internal ArrayList<EncryptionListEntry> encryption_list_entries = new ArrayList<EncryptionListEntry>();
+ internal ArrayList<AccountSettingsEntry> account_settings_entries = new ArrayList<AccountSettingsEntry>();
public bool register_encryption_list_entry(EncryptionListEntry entry) {
lock(encryption_list_entries) {
@@ -15,6 +16,18 @@ public class Registry {
return true;
}
}
+
+ public bool register_account_settings_entry(AccountSettingsEntry entry) {
+ lock(account_settings_entries) {
+ foreach(var e in account_settings_entries) {
+ if (e.id == entry.id) return false;
+ }
+ account_settings_entries.add(entry);
+ // TODO: Order by priority
+ account_settings_entries.sort((a,b) => b.name.collate(a.name));
+ return true;
+ }
+ }
}
} \ No newline at end of file