[gnome-games] game-collection: Add only unique games



commit 4f4901308910ae43681ef7e68aeed9a92e220eee
Author: theawless <theawless gmail com>
Date:   Thu Jul 19 18:51:20 2018 +0530

    game-collection: Add only unique games
    
    Prevent adding a game to the collection if it has already been added.
    
    https://gitlab.gnome.org/GNOME/gnome-games/issues/23
    https://gitlab.gnome.org/GNOME/gnome-games/issues/56

 src/core/game-collection.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/game-collection.vala b/src/core/game-collection.vala
index 12a7c63..00d6447 100644
--- a/src/core/game-collection.vala
+++ b/src/core/game-collection.vala
@@ -11,7 +11,7 @@ private class Games.GameCollection : Object {
        private HashTable<string, Array<UriGameFactory>> factories_for_scheme;
 
        construct {
-               games = new GenericSet<Game> (direct_hash, direct_equal);
+               games = new GenericSet<Game> (Game.hash, Game.equal);
                list_store = new ListStore (typeof (Game));
                factories_for_mime_type = new HashTable<string, Array<UriGameFactory>> (str_hash, str_equal);
                factories_for_scheme = new HashTable<string, Array<UriGameFactory>> (str_hash, str_equal);


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