[gnome-games/wip/ricotz/vala] Fix type-argument mismatches related to GLib.List



commit 1d18ba6a989b731c7f96cd9df050829bd0904ede
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Nov 5 15:30:57 2018 +0100

    Fix type-argument mismatches related to GLib.List

 src/generic/generic-uri-game-factory.vala | 2 +-
 src/ui/collection-box.vala                | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/generic/generic-uri-game-factory.vala b/src/generic/generic-uri-game-factory.vala
index 08519d3a..4a79169c 100644
--- a/src/generic/generic-uri-game-factory.vala
+++ b/src/generic/generic-uri-game-factory.vala
@@ -62,7 +62,7 @@ public class Games.GenericUriGameFactory : Object, UriGameFactory {
        public async void foreach_game (GameCallback game_callback) {
                uint handled_uris = 0;
                var games = game_for_uri.get_values ();
-               for (unowned List<Game> game = games; game != null; game = game.next) {
+               for (unowned List<weak Game> game = games; game != null; game = game.next) {
                        game_callback (game.data);
 
                        if (handled_uris++ < GAMES_PER_CYCLE)
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 63fb2776..954d72bb 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -78,7 +78,7 @@ private class Games.CollectionBox : Gtk.Box {
                switch (button) {
                case EventCode.BTN_TL:
                        var views = viewstack.get_children ();
-                       unowned List<Gtk.Widget> current_view = views.find (viewstack.visible_child);
+                       unowned List<weak Gtk.Widget> current_view = views.find (viewstack.visible_child);
 
                        assert (current_view != null);
 
@@ -88,7 +88,7 @@ private class Games.CollectionBox : Gtk.Box {
                        return true;
                case EventCode.BTN_TR:
                        var views = viewstack.get_children ();
-                       unowned List<Gtk.Widget> current_view = views.find (viewstack.visible_child);
+                       unowned List<weak Gtk.Widget> current_view = views.find (viewstack.visible_child);
 
                        assert (current_view != null);
 


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