[gnome-boxes] icon-view: GtkListStore.remove() requires ref arg



commit 81731936c0149192a30e99b81713dbda4868bf41
Author: Felipe Borges <felipeborges gnome org>
Date:   Sun Feb 26 14:05:30 2017 +0100

    icon-view: GtkListStore.remove() requires ref arg
    
    Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e
    the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove
    as 'ref'.
    
    This way, we now increase the internal reference counting of the
    Gtk.TreeIter while passing it to store.remove ().
    
    This patch adds an (undesired) #if VALA_0_36 conditional check in
    order to keep Boxes building against older versions of Vala.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779251

 src/icon-view.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/icon-view.vala b/src/icon-view.vala
index 74e88d6..4fb98d9 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -218,7 +218,11 @@ private class Boxes.IconView: Gd.MainView, Boxes.ICollectionView, Boxes.UI {
             return;
         }
 
+#if VALA_0_36
+        store.remove (ref iter);
+#else
         store.remove (iter);
+#endif
         item.set_data<Gtk.TreeIter?> ("iter", null);
 
         var name_id = item.get_data<ulong> ("name_id");


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