[geary/mjog/mail-merge-plugin] Application.AccountContext: Make folder context methods public



commit 5115e34231f8f526c20811c02b3bc68545e0efa7
Author: Michael Gratton <mike vee net>
Date:   Fri Jul 17 17:42:39 2020 +1000

    Application.AccountContext: Make folder context methods public
    
    Making the context public allows third-party code (e.g. trusted plugins)
    insert additional folders into the application.

 src/client/application/application-account-context.vala | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/application-account-context.vala 
b/src/client/application/application-account-context.vala
index ada24c0e8..0d18648ff 100644
--- a/src/client/application/application-account-context.vala
+++ b/src/client/application/application-account-context.vala
@@ -112,14 +112,14 @@ public class Application.AccountContext : Geary.BaseObject {
     /**
      * Returns read-only collection of all known folder contexts.
      */
-    internal Gee.Collection<FolderContext> get_folders() {
+    public Gee.Collection<FolderContext> get_folders() {
         return this.folders.values.read_only_view;
     }
 
     /**
      * Returns context for a folder belonging to this context's account.
      */
-    internal FolderContext? get_folder(Geary.Folder target) {
+    public FolderContext? get_folder(Geary.Folder target) {
         FolderContext? context = null;
         if (this.account == target.account) {
             context = this.folders.get(target.path);
@@ -128,7 +128,7 @@ public class Application.AccountContext : Geary.BaseObject {
     }
 
     /** Adds a context for a folder belonging to the account. */
-    internal void add_folders(Gee.Collection<FolderContext> to_add) {
+    public void add_folders(Gee.Collection<FolderContext> to_add) {
         foreach (var context in to_add) {
             this.folders.set(context.folder.path, context);
         }
@@ -136,7 +136,7 @@ public class Application.AccountContext : Geary.BaseObject {
     }
 
     /** Adds a context for a folder belonging to the account. */
-    internal void remove_folders(Gee.Collection<FolderContext> to_remove) {
+    public void remove_folders(Gee.Collection<FolderContext> to_remove) {
         foreach (var context in to_remove) {
             this.folders.unset(context.folder.path);
         }


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