summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-09-18 00:51:57 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-09-18 00:51:57 -0300
commit1a4b60fb36f0102d29654ac355c2144654d41ae5 (patch)
tree68618500e0c2cb0707fa4ae1b7e3636088b84d22
parent05b2ae0f31c2400bf730006f59b67fb3627f55a1 (diff)
downloadgtk+-1a4b60fb36f0102d29654ac355c2144654d41ae5.tar.gz
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.
-rw-r--r--gtk/gtktreelistmodel.c4
1 files 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