aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin/registry.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-02 17:29:55 +0200
committerfiaxh <git@mx.ax.lt>2017-08-03 15:59:04 +0200
commitea174ab632ced082eb0f1c51cea1bc9dc5c7c89e (patch)
tree8f83d1379a48e7aa49af5a5146d76a4c595f2363 /libdino/src/plugin/registry.vala
parentf83e1188c5dcf1981832f296203f94503b467e30 (diff)
downloaddino-ea174ab632ced082eb0f1c51cea1bc9dc5c7c89e.tar.gz
dino-ea174ab632ced082eb0f1c51cea1bc9dc5c7c89e.zip
Http file upload
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r--libdino/src/plugin/registry.vala21
1 files changed, 20 insertions, 1 deletions
diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala
index e1ba605d..01d18d5f 100644
--- a/libdino/src/plugin/registry.vala
+++ b/libdino/src/plugin/registry.vala
@@ -6,6 +6,15 @@ public class Registry {
internal ArrayList<EncryptionListEntry> encryption_list_entries = new ArrayList<EncryptionListEntry>();
internal ArrayList<AccountSettingsEntry> account_settings_entries = new ArrayList<AccountSettingsEntry>();
internal ArrayList<ContactDetailsProvider> contact_details_entries = new ArrayList<ContactDetailsProvider>();
+ internal Gee.Collection<ConversationTitlebarEntry> conversation_titlebar_entries = new Gee.TreeSet<ConversationTitlebarEntry>((a, b) => {
+ if (a.order < b.order) {
+ return -1;
+ } else if (a.order > b.order) {
+ return 1;
+ } else {
+ return 0;
+ }
+ });
public bool register_encryption_list_entry(EncryptionListEntry entry) {
lock(encryption_list_entries) {
@@ -39,6 +48,16 @@ public class Registry {
return true;
}
}
+
+ public bool register_contact_titlebar_entry(ConversationTitlebarEntry entry) {
+ lock(conversation_titlebar_entries) {
+ foreach(ConversationTitlebarEntry e in conversation_titlebar_entries) {
+ if (e.id == entry.id) return false;
+ }
+ conversation_titlebar_entries.add(entry);
+ return true;
+ }
+ }
}
-} \ No newline at end of file
+}