[gtk] tree-list-model: Return the correct item type



commit 1a4b60fb36f0102d29654ac355c2144654d41ae5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Sep 18 00:51:57 2018 -0300

    tree-list-model: Return the correct item type
    
    When passthrough is enabled, it should return the GType
    of the child GListModels; when disabled, it should be
    GTK_TYPE_TREE_LIST_ROW.
    
    The conditions are inverted however, causing a few
    warnings to trigger.
    
    Fix that by returning the correct GType.

 gtk/gtktreelistmodel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
index a612057d96..c619347e54 100644
--- a/gtk/gtktreelistmodel.c
+++ b/gtk/gtktreelistmodel.c
@@ -576,9 +576,9 @@ gtk_tree_list_model_get_item_type (GListModel *list)
   GtkTreeListModel *self = GTK_TREE_LIST_MODEL (list);
 
   if (self->passthrough)
-    return GTK_TYPE_TREE_LIST_ROW;
-  else
     return g_list_model_get_item_type (self->root_node.model);
+  else
+    return GTK_TYPE_TREE_LIST_ROW;
 }
 
 static guint


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