/* baobab-tree-list-row-sorter.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from baobab-tree-list-row-sorter.vala, do not modify */

/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Baobab - disk usage analyzer
 *
 * Copyright © 2024 Adrien Plazas <aplazas@gnome.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include "baobab.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define BAOBAB_TYPE_TREE_LIST_ROW_SORTER (baobab_tree_list_row_sorter_get_type ())
#define BAOBAB_TREE_LIST_ROW_SORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorter))
#define BAOBAB_TREE_LIST_ROW_SORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorterClass))
#define BAOBAB_IS_TREE_LIST_ROW_SORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAOBAB_TYPE_TREE_LIST_ROW_SORTER))
#define BAOBAB_IS_TREE_LIST_ROW_SORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BAOBAB_TYPE_TREE_LIST_ROW_SORTER))
#define BAOBAB_TREE_LIST_ROW_SORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorterClass))

typedef struct _BaobabTreeListRowSorter BaobabTreeListRowSorter;
typedef struct _BaobabTreeListRowSorterClass BaobabTreeListRowSorterClass;
typedef struct _BaobabTreeListRowSorterPrivate BaobabTreeListRowSorterPrivate;
enum  {
	BAOBAB_TREE_LIST_ROW_SORTER_0_PROPERTY,
	BAOBAB_TREE_LIST_ROW_SORTER_SORTER_PROPERTY,
	BAOBAB_TREE_LIST_ROW_SORTER_SORT_ORDER_PROPERTY,
	BAOBAB_TREE_LIST_ROW_SORTER_NUM_PROPERTIES
};
static GParamSpec* baobab_tree_list_row_sorter_properties[BAOBAB_TREE_LIST_ROW_SORTER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _BaobabTreeListRowSorter {
	GtkSorter parent_instance;
	BaobabTreeListRowSorterPrivate * priv;
};

struct _BaobabTreeListRowSorterClass {
	GtkSorterClass parent_class;
};

struct _BaobabTreeListRowSorterPrivate {
	GtkSorter* _sorter;
	GtkSortType _sort_order;
};

static gint BaobabTreeListRowSorter_private_offset;
static gpointer baobab_tree_list_row_sorter_parent_class = NULL;

VALA_EXTERN GType baobab_tree_list_row_sorter_get_type (void) G_GNUC_CONST ;
static void baobab_tree_list_row_sorter_propagate_changed (BaobabTreeListRowSorter* self,
                                                    GtkSorterChange change);
static void _baobab_tree_list_row_sorter_propagate_changed_gtk_sorter_changed (GtkSorter* _sender,
                                                                        GtkSorterChange change,
                                                                        gpointer self);
static BaobabTreeListRowSorter* baobab_tree_list_row_sorter_new (GtkSorter* sorter);
static BaobabTreeListRowSorter* baobab_tree_list_row_sorter_construct (GType object_type,
                                                                GtkSorter* sorter);
static GtkOrdering baobab_tree_list_row_sorter_real_compare (GtkSorter* base,
                                                      GObject* item1,
                                                      GObject* item2);
VALA_EXTERN GtkSortType baobab_tree_list_row_sorter_get_sort_order (BaobabTreeListRowSorter* self);
VALA_EXTERN GtkSorter* baobab_tree_list_row_sorter_get_sorter (BaobabTreeListRowSorter* self);
static GtkSorterOrder baobab_tree_list_row_sorter_real_get_order (GtkSorter* base);
VALA_EXTERN void baobab_tree_list_row_sorter_set_sorter (BaobabTreeListRowSorter* self,
                                             GtkSorter* value);
VALA_EXTERN void baobab_tree_list_row_sorter_set_sort_order (BaobabTreeListRowSorter* self,
                                                 GtkSortType value);
static void baobab_tree_list_row_sorter_finalize (GObject * obj);
static GType baobab_tree_list_row_sorter_get_type_once (void);
static void _vala_baobab_tree_list_row_sorter_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_baobab_tree_list_row_sorter_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);

static inline gpointer
baobab_tree_list_row_sorter_get_instance_private (BaobabTreeListRowSorter* self)
{
	return G_STRUCT_MEMBER_P (self, BaobabTreeListRowSorter_private_offset);
}

static void
_baobab_tree_list_row_sorter_propagate_changed_gtk_sorter_changed (GtkSorter* _sender,
                                                                   GtkSorterChange change,
                                                                   gpointer self)
{
	baobab_tree_list_row_sorter_propagate_changed ((BaobabTreeListRowSorter*) self, change);
}

static BaobabTreeListRowSorter*
baobab_tree_list_row_sorter_construct (GType object_type,
                                       GtkSorter* sorter)
{
	BaobabTreeListRowSorter * self = NULL;
	g_return_val_if_fail (sorter != NULL, NULL);
	self = (BaobabTreeListRowSorter*) g_object_new (object_type, "sorter", sorter, NULL);
	return self;
}

static BaobabTreeListRowSorter*
baobab_tree_list_row_sorter_new (GtkSorter* sorter)
{
	return baobab_tree_list_row_sorter_construct (BAOBAB_TYPE_TREE_LIST_ROW_SORTER, sorter);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static GtkOrdering
baobab_tree_list_row_sorter_real_compare (GtkSorter* base,
                                          GObject* item1,
                                          GObject* item2)
{
	BaobabTreeListRowSorter * self;
	GtkTreeListRow* row1 = NULL;
	GtkTreeListRow* _tmp1_;
	GtkTreeListRow* row2 = NULL;
	GtkTreeListRow* _tmp2_;
	guint depth1 = 0U;
	GtkTreeListRow* _tmp3_;
	guint depth2 = 0U;
	GtkTreeListRow* _tmp4_;
	GtkOrdering _result_ = 0;
	GtkTreeListRow* _tmp15_;
	GtkTreeListRow* _tmp16_;
	GtkOrdering result;
	self = (BaobabTreeListRowSorter*) base;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (item1, gtk_tree_list_row_get_type ())) {
		if (G_TYPE_CHECK_INSTANCE_TYPE (item2, gtk_tree_list_row_get_type ())) {
			result = GTK_ORDERING_LARGER;
			return result;
		} else {
			GtkOrdering _tmp0_ = 0;
			if ((&item1) < (&item2)) {
				_tmp0_ = GTK_ORDERING_SMALLER;
			} else {
				_tmp0_ = GTK_ORDERING_LARGER;
			}
			result = _tmp0_;
			return result;
		}
	} else {
		if (!G_TYPE_CHECK_INSTANCE_TYPE (item2, gtk_tree_list_row_get_type ())) {
			result = GTK_ORDERING_SMALLER;
			return result;
		}
	}
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (item1, gtk_tree_list_row_get_type ()) ? ((GtkTreeListRow*) item1) : NULL);
	row1 = _tmp1_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (item2, gtk_tree_list_row_get_type ()) ? ((GtkTreeListRow*) item2) : NULL);
	row2 = _tmp2_;
	_tmp3_ = row1;
	depth1 = gtk_tree_list_row_get_depth (_tmp3_);
	_tmp4_ = row2;
	depth2 = gtk_tree_list_row_get_depth (_tmp4_);
	_result_ = GTK_ORDERING_EQUAL;
	while (TRUE) {
		GtkTreeListRow* _tmp5_;
		GtkTreeListRow* _tmp6_;
		guint _tmp7_;
		GtkSortType _tmp8_;
		GtkSortType _tmp9_;
		if (!(depth1 > depth2)) {
			break;
		}
		_tmp5_ = row1;
		_tmp6_ = gtk_tree_list_row_get_parent (_tmp5_);
		_g_object_unref0 (row1);
		row1 = _tmp6_;
		_tmp7_ = depth1;
		depth1 = _tmp7_ - 1;
		_tmp8_ = baobab_tree_list_row_sorter_get_sort_order (self);
		_tmp9_ = _tmp8_;
		if (_tmp9_ == GTK_SORT_ASCENDING) {
			_result_ = GTK_ORDERING_LARGER;
		} else {
			_result_ = GTK_ORDERING_SMALLER;
		}
	}
	while (TRUE) {
		GtkTreeListRow* _tmp10_;
		GtkTreeListRow* _tmp11_;
		guint _tmp12_;
		GtkSortType _tmp13_;
		GtkSortType _tmp14_;
		if (!(depth2 > depth1)) {
			break;
		}
		_tmp10_ = row2;
		_tmp11_ = gtk_tree_list_row_get_parent (_tmp10_);
		_g_object_unref0 (row2);
		row2 = _tmp11_;
		_tmp12_ = depth2;
		depth2 = _tmp12_ - 1;
		_tmp13_ = baobab_tree_list_row_sorter_get_sort_order (self);
		_tmp14_ = _tmp13_;
		if (_tmp14_ == GTK_SORT_ASCENDING) {
			_result_ = GTK_ORDERING_SMALLER;
		} else {
			_result_ = GTK_ORDERING_LARGER;
		}
	}
	_tmp15_ = row1;
	_tmp16_ = row2;
	if (_tmp15_ == _tmp16_) {
		result = _result_;
		_g_object_unref0 (row2);
		_g_object_unref0 (row1);
		return result;
	}
	while (TRUE) {
		GtkTreeListRow* parent1 = NULL;
		GtkTreeListRow* _tmp17_;
		GtkTreeListRow* _tmp18_;
		GtkTreeListRow* parent2 = NULL;
		GtkTreeListRow* _tmp19_;
		GtkTreeListRow* _tmp20_;
		GtkTreeListRow* _tmp21_;
		GtkTreeListRow* _tmp22_;
		GtkSorter* _tmp27_;
		GtkSorter* _tmp28_;
		_tmp17_ = row1;
		_tmp18_ = gtk_tree_list_row_get_parent (_tmp17_);
		parent1 = _tmp18_;
		_tmp19_ = row2;
		_tmp20_ = gtk_tree_list_row_get_parent (_tmp19_);
		parent2 = _tmp20_;
		_tmp21_ = parent1;
		_tmp22_ = parent2;
		if (_tmp21_ != _tmp22_) {
			GtkTreeListRow* _tmp23_;
			GtkTreeListRow* _tmp24_;
			GtkTreeListRow* _tmp25_;
			GtkTreeListRow* _tmp26_;
			_tmp23_ = parent1;
			_tmp24_ = _g_object_ref0 (_tmp23_);
			_g_object_unref0 (row1);
			row1 = _tmp24_;
			_tmp25_ = parent2;
			_tmp26_ = _g_object_ref0 (_tmp25_);
			_g_object_unref0 (row2);
			row2 = _tmp26_;
			_g_object_unref0 (parent2);
			_g_object_unref0 (parent1);
			continue;
		}
		_tmp27_ = baobab_tree_list_row_sorter_get_sorter (self);
		_tmp28_ = _tmp27_;
		if (_tmp28_ == NULL) {
			_result_ = GTK_ORDERING_EQUAL;
		} else {
			GtkSorter* _tmp29_;
			GtkSorter* _tmp30_;
			GtkTreeListRow* _tmp31_;
			GObject* _tmp32_;
			GObject* _tmp33_;
			GtkTreeListRow* _tmp34_;
			GObject* _tmp35_;
			GObject* _tmp36_;
			_tmp29_ = baobab_tree_list_row_sorter_get_sorter (self);
			_tmp30_ = _tmp29_;
			_tmp31_ = row1;
			_tmp32_ = gtk_tree_list_row_get_item (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = row2;
			_tmp35_ = gtk_tree_list_row_get_item (_tmp34_);
			_tmp36_ = _tmp35_;
			_result_ = gtk_sorter_compare (_tmp30_, _tmp33_, _tmp36_);
			_g_object_unref0 (_tmp36_);
			_g_object_unref0 (_tmp33_);
		}
		if (_result_ == GTK_ORDERING_EQUAL) {
			GtkTreeListRow* _tmp37_;
			GtkTreeListRow* _tmp38_;
			_tmp37_ = row1;
			_tmp38_ = row2;
			if (gtk_tree_list_row_get_position (_tmp37_) < gtk_tree_list_row_get_position (_tmp38_)) {
				GtkSortType _tmp39_;
				GtkSortType _tmp40_;
				_tmp39_ = baobab_tree_list_row_sorter_get_sort_order (self);
				_tmp40_ = _tmp39_;
				if (_tmp40_ == GTK_SORT_ASCENDING) {
					_result_ = GTK_ORDERING_SMALLER;
				} else {
					_result_ = GTK_ORDERING_LARGER;
				}
			} else {
				GtkSortType _tmp41_;
				GtkSortType _tmp42_;
				_tmp41_ = baobab_tree_list_row_sorter_get_sort_order (self);
				_tmp42_ = _tmp41_;
				if (_tmp42_ == GTK_SORT_ASCENDING) {
					_result_ = GTK_ORDERING_LARGER;
				} else {
					_result_ = GTK_ORDERING_SMALLER;
				}
			}
		}
		_g_object_unref0 (parent2);
		_g_object_unref0 (parent1);
		break;
	}
	result = _result_;
	_g_object_unref0 (row2);
	_g_object_unref0 (row1);
	return result;
}

static GtkSorterOrder
baobab_tree_list_row_sorter_real_get_order (GtkSorter* base)
{
	BaobabTreeListRowSorter * self;
	GtkSorterOrder result;
	self = (BaobabTreeListRowSorter*) base;
	result = GTK_SORTER_ORDER_TOTAL;
	return result;
}

static void
baobab_tree_list_row_sorter_propagate_changed (BaobabTreeListRowSorter* self,
                                               GtkSorterChange change)
{
	g_return_if_fail (self != NULL);
	gtk_sorter_changed ((GtkSorter*) self, change);
}

GtkSorter*
baobab_tree_list_row_sorter_get_sorter (BaobabTreeListRowSorter* self)
{
	GtkSorter* result;
	GtkSorter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_sorter;
	result = _tmp0_;
	return result;
}

void
baobab_tree_list_row_sorter_set_sorter (BaobabTreeListRowSorter* self,
                                        GtkSorter* value)
{
	GtkSorter* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp4_;
	GtkSorter* _tmp5_;
	g_return_if_fail (self != NULL);
	if (value == NULL) {
		return;
	}
	_tmp0_ = self->priv->_sorter;
	if (_tmp0_ == value) {
		return;
	}
	_tmp1_ = self->priv->_sorter;
	if (_tmp1_ != NULL) {
		GtkSorter* _tmp2_;
		guint _tmp3_;
		_tmp2_ = self->priv->_sorter;
		g_signal_parse_name ("changed", gtk_sorter_get_type (), &_tmp3_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _baobab_tree_list_row_sorter_propagate_changed_gtk_sorter_changed, self);
	}
	_tmp4_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_sorter);
	self->priv->_sorter = _tmp4_;
	_tmp5_ = self->priv->_sorter;
	g_signal_connect_object (_tmp5_, "changed", (GCallback) _baobab_tree_list_row_sorter_propagate_changed_gtk_sorter_changed, self, 0);
	gtk_sorter_changed ((GtkSorter*) self, GTK_SORTER_CHANGE_DIFFERENT);
	g_object_notify ((GObject*) self, "sorter");
}

GtkSortType
baobab_tree_list_row_sorter_get_sort_order (BaobabTreeListRowSorter* self)
{
	GtkSortType result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_sort_order;
	return result;
}

void
baobab_tree_list_row_sorter_set_sort_order (BaobabTreeListRowSorter* self,
                                            GtkSortType value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_sort_order == value) {
		return;
	}
	self->priv->_sort_order = value;
	gtk_sorter_changed ((GtkSorter*) self, GTK_SORTER_CHANGE_DIFFERENT);
	g_object_notify ((GObject*) self, "sort-order");
}

static void
baobab_tree_list_row_sorter_class_init (BaobabTreeListRowSorterClass * klass,
                                        gpointer klass_data)
{
	baobab_tree_list_row_sorter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BaobabTreeListRowSorter_private_offset);
	((GtkSorterClass *) klass)->compare = (GtkOrdering (*) (GtkSorter*, GObject*, GObject*)) baobab_tree_list_row_sorter_real_compare;
	((GtkSorterClass *) klass)->get_order = (GtkSorterOrder (*) (GtkSorter*)) baobab_tree_list_row_sorter_real_get_order;
	G_OBJECT_CLASS (klass)->get_property = _vala_baobab_tree_list_row_sorter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_baobab_tree_list_row_sorter_set_property;
	G_OBJECT_CLASS (klass)->finalize = baobab_tree_list_row_sorter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_TREE_LIST_ROW_SORTER_SORTER_PROPERTY, baobab_tree_list_row_sorter_properties[BAOBAB_TREE_LIST_ROW_SORTER_SORTER_PROPERTY] = g_param_spec_object ("sorter", "sorter", "sorter", gtk_sorter_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_TREE_LIST_ROW_SORTER_SORT_ORDER_PROPERTY, baobab_tree_list_row_sorter_properties[BAOBAB_TREE_LIST_ROW_SORTER_SORT_ORDER_PROPERTY] = g_param_spec_enum ("sort-order", "sort-order", "sort-order", gtk_sort_type_get_type (), 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
}

static void
baobab_tree_list_row_sorter_instance_init (BaobabTreeListRowSorter * self,
                                           gpointer klass)
{
	self->priv = baobab_tree_list_row_sorter_get_instance_private (self);
}

static void
baobab_tree_list_row_sorter_finalize (GObject * obj)
{
	BaobabTreeListRowSorter * self;
	GtkSorter* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorter);
	_tmp0_ = self->priv->_sorter;
	if (_tmp0_ != NULL) {
		GtkSorter* _tmp1_;
		guint _tmp2_;
		_tmp1_ = self->priv->_sorter;
		g_signal_parse_name ("changed", gtk_sorter_get_type (), &_tmp2_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _baobab_tree_list_row_sorter_propagate_changed_gtk_sorter_changed, self);
	}
	_g_object_unref0 (self->priv->_sorter);
	G_OBJECT_CLASS (baobab_tree_list_row_sorter_parent_class)->finalize (obj);
}

static GType
baobab_tree_list_row_sorter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BaobabTreeListRowSorterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) baobab_tree_list_row_sorter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BaobabTreeListRowSorter), 0, (GInstanceInitFunc) baobab_tree_list_row_sorter_instance_init, NULL };
	GType baobab_tree_list_row_sorter_type_id;
	baobab_tree_list_row_sorter_type_id = g_type_register_static (gtk_sorter_get_type (), "BaobabTreeListRowSorter", &g_define_type_info, 0);
	BaobabTreeListRowSorter_private_offset = g_type_add_instance_private (baobab_tree_list_row_sorter_type_id, sizeof (BaobabTreeListRowSorterPrivate));
	return baobab_tree_list_row_sorter_type_id;
}

GType
baobab_tree_list_row_sorter_get_type (void)
{
	static volatile gsize baobab_tree_list_row_sorter_type_id__once = 0;
	if (g_once_init_enter (&baobab_tree_list_row_sorter_type_id__once)) {
		GType baobab_tree_list_row_sorter_type_id;
		baobab_tree_list_row_sorter_type_id = baobab_tree_list_row_sorter_get_type_once ();
		g_once_init_leave (&baobab_tree_list_row_sorter_type_id__once, baobab_tree_list_row_sorter_type_id);
	}
	return baobab_tree_list_row_sorter_type_id__once;
}

static void
_vala_baobab_tree_list_row_sorter_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	BaobabTreeListRowSorter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorter);
	switch (property_id) {
		case BAOBAB_TREE_LIST_ROW_SORTER_SORTER_PROPERTY:
		g_value_set_object (value, baobab_tree_list_row_sorter_get_sorter (self));
		break;
		case BAOBAB_TREE_LIST_ROW_SORTER_SORT_ORDER_PROPERTY:
		g_value_set_enum (value, baobab_tree_list_row_sorter_get_sort_order (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_baobab_tree_list_row_sorter_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	BaobabTreeListRowSorter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_TREE_LIST_ROW_SORTER, BaobabTreeListRowSorter);
	switch (property_id) {
		case BAOBAB_TREE_LIST_ROW_SORTER_SORTER_PROPERTY:
		baobab_tree_list_row_sorter_set_sorter (self, g_value_get_object (value));
		break;
		case BAOBAB_TREE_LIST_ROW_SORTER_SORT_ORDER_PROPERTY:
		baobab_tree_list_row_sorter_set_sort_order (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

