[gnome-games] core: Add GameCollection.get_accepted_mime_types()



commit 5c5a9e83549dee32c4e0521bf1bd62a5b5de1897
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun May 21 15:32:22 2017 +0200

    core: Add GameCollection.get_accepted_mime_types()
    
    This will be used in the next commit to filter files in a game file
    chooser.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782824

 src/core/game-collection.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/core/game-collection.vala b/src/core/game-collection.vala
index f9fae4a..ce7ac80 100644
--- a/src/core/game-collection.vala
+++ b/src/core/game-collection.vala
@@ -43,6 +43,10 @@ public class Games.GameCollection : Object {
                factory.game_added.connect ((game) => store_game (game));
        }
 
+       public string[] get_accepted_mime_types () {
+               return factories_for_mime_type.get_keys_as_array ();
+       }
+
        public async void add_uri (Uri uri) {
                foreach (var factory in yield get_factories_for_uri (uri))
                        yield factory.add_uri (uri);


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