/* baobab-folder-display.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from baobab-folder-display.vala, do not modify */

/* Baobab - disk usage analyzer
 *
 * Copyright (C) 2020  Stefano Facchini <stefano.facchini@gmail.com>
 *
 * 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 "baobab.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.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

enum  {
	BAOBAB_FOLDER_DISPLAY_0_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_SORTER_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_SIZE_SIZE_GROUP_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_FOLDER_SIZE_GROUP_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_CONTENTS_SIZE_GROUP_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_TIME_MODIFIED_SIZE_GROUP_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_NUM_PROPERTIES
};
static GParamSpec* baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_NUM_PROPERTIES];
#define _baobab_location_unref0(var) ((var == NULL) ? NULL : (var = (baobab_location_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
enum  {
	BAOBAB_FOLDER_DISPLAY_ACTIVATED_SIGNAL,
	BAOBAB_FOLDER_DISPLAY_NUM_SIGNALS
};
static guint baobab_folder_display_signals[BAOBAB_FOLDER_DISPLAY_NUM_SIGNALS] = {0};

struct _BaobabFolderDisplayPrivate {
	gulong location_progress_handler;
	BaobabLocation* location_;
	BaobabScannerResults* path_;
	GtkSizeGroup* _size_size_group;
	GtkSizeGroup* _folder_size_group;
	GtkSizeGroup* _contents_size_group;
	GtkSizeGroup* _time_modified_size_group;
};

struct _Block1Data {
	int _ref_count_;
	BaobabFolderDisplay* self;
	BaobabScannerResults* results;
};

static gint BaobabFolderDisplay_private_offset;
static gpointer baobab_folder_display_parent_class = NULL;

static void baobab_folder_display_add_header_cells_to_size_groups (BaobabFolderDisplay* self);
static void baobab_folder_display_on_columnview_activate (BaobabFolderDisplay* self);
static void _baobab_folder_display_on_columnview_activate_gtk_column_view_activate (GtkColumnView* _sender,
                                                                             guint position,
                                                                             gpointer self);
static void baobab_folder_display_on_columnview_notify_sorter (BaobabFolderDisplay* self);
static void _baobab_folder_display_on_columnview_notify_sorter_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void baobab_folder_display_folder_cell_setup (BaobabFolderDisplay* self,
                                              GObject* object);
static void _baobab_folder_display_folder_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self);
static void baobab_folder_display_folder_cell_bind (BaobabFolderDisplay* self,
                                             GObject* object);
static void _baobab_folder_display_folder_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                GObject* object,
                                                                                gpointer self);
static void baobab_folder_display_folder_cell_unbind (BaobabFolderDisplay* self,
                                               GObject* object);
static void _baobab_folder_display_folder_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                    GObject* object,
                                                                                    gpointer self);
static void baobab_folder_display_folder_cell_teardown (BaobabFolderDisplay* self,
                                                 GObject* object);
static void _baobab_folder_display_folder_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                        GObject* object,
                                                                                        gpointer self);
static void baobab_folder_display_size_cell_setup (BaobabFolderDisplay* self,
                                            GObject* object);
static void _baobab_folder_display_size_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                GObject* object,
                                                                                gpointer self);
static void baobab_folder_display_size_cell_bind (BaobabFolderDisplay* self,
                                           GObject* object);
static void _baobab_folder_display_size_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                              GObject* object,
                                                                              gpointer self);
static void baobab_folder_display_size_cell_unbind (BaobabFolderDisplay* self,
                                             GObject* object);
static void _baobab_folder_display_size_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self);
static void baobab_folder_display_size_cell_teardown (BaobabFolderDisplay* self,
                                               GObject* object);
static void _baobab_folder_display_size_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                      GObject* object,
                                                                                      gpointer self);
static void baobab_folder_display_contents_cell_setup (BaobabFolderDisplay* self,
                                                GObject* object);
static void _baobab_folder_display_contents_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                    GObject* object,
                                                                                    gpointer self);
static void baobab_folder_display_contents_cell_bind (BaobabFolderDisplay* self,
                                               GObject* object);
static void _baobab_folder_display_contents_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self);
static void baobab_folder_display_contents_cell_unbind (BaobabFolderDisplay* self,
                                                 GObject* object);
static void _baobab_folder_display_contents_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                      GObject* object,
                                                                                      gpointer self);
static void baobab_folder_display_contents_cell_teardown (BaobabFolderDisplay* self,
                                                   GObject* object);
static void _baobab_folder_display_contents_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                          GObject* object,
                                                                                          gpointer self);
static void baobab_folder_display_time_modified_cell_setup (BaobabFolderDisplay* self,
                                                     GObject* object);
static void _baobab_folder_display_time_modified_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                         GObject* object,
                                                                                         gpointer self);
static void baobab_folder_display_time_modified_cell_bind (BaobabFolderDisplay* self,
                                                    GObject* object);
static void _baobab_folder_display_time_modified_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                       GObject* object,
                                                                                       gpointer self);
static void baobab_folder_display_time_modified_cell_unbind (BaobabFolderDisplay* self,
                                                      GObject* object);
static void _baobab_folder_display_time_modified_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                           GObject* object,
                                                                                           gpointer self);
static void baobab_folder_display_time_modified_cell_teardown (BaobabFolderDisplay* self,
                                                        GObject* object);
static void _baobab_folder_display_time_modified_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                               GObject* object,
                                                                                               gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
VALA_EXTERN void baobab_scanner_results_set_display_name (BaobabScannerResults* self,
                                              const gchar* value);
static void _baobab_folder_display_location___lambda12_ (Block1Data* _data1_);
VALA_EXTERN void baobab_scanner_results_set_size (BaobabScannerResults* self,
                                      guint64 value);
VALA_EXTERN void baobab_scanner_results_set_elements (BaobabScannerResults* self,
                                          gint value);
static void __baobab_folder_display_location___lambda12__baobab_location_progress (BaobabLocation* _sender,
                                                                            gpointer self);
static GObject * baobab_folder_display_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties);
static void baobab_folder_display_finalize (GObject * obj);
static GType baobab_folder_display_get_type_once (void);
static void _vala_baobab_folder_display_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_baobab_folder_display_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);

static inline gpointer
baobab_folder_display_get_instance_private (BaobabFolderDisplay* self)
{
	return G_STRUCT_MEMBER_P (self, BaobabFolderDisplay_private_offset);
}

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

static void
baobab_folder_display_add_header_cells_to_size_groups (BaobabFolderDisplay* self)
{
	GType row_type = 0UL;
	GType title_type = 0UL;
	g_return_if_fail (self != NULL);
	row_type = g_type_from_name ("GtkColumnViewRowWidget");
	title_type = g_type_from_name ("GtkColumnViewTitle");
	{
		GtkWidget* child = NULL;
		GtkColumnView* _tmp0_;
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		_tmp0_ = self->columnview;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		child = _tmp2_;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				GtkWidget* _tmp7_;
				GtkWidget* _tmp8_;
				GtkWidget* name_cell = NULL;
				GtkWidget* _tmp9_;
				GtkWidget* _tmp10_;
				GtkWidget* _tmp11_;
				GtkWidget* _tmp12_;
				GtkWidget* size_cell = NULL;
				GtkWidget* _tmp13_;
				GtkWidget* _tmp14_;
				GtkWidget* _tmp15_;
				GtkWidget* _tmp16_;
				GtkWidget* contents_cell = NULL;
				GtkWidget* _tmp17_;
				GtkWidget* _tmp18_;
				GtkWidget* _tmp19_;
				GtkWidget* _tmp20_;
				GtkWidget* time_modified_cell = NULL;
				GtkWidget* _tmp21_;
				GtkWidget* _tmp22_;
				GtkWidget* _tmp23_;
				GtkWidget* _tmp24_;
				GtkSizeGroup* _tmp25_;
				GtkSizeGroup* _tmp26_;
				GtkWidget* _tmp27_;
				GtkWidget* _tmp28_;
				GtkSizeGroup* _tmp29_;
				GtkSizeGroup* _tmp30_;
				GtkWidget* _tmp31_;
				GtkWidget* _tmp32_;
				GtkSizeGroup* _tmp33_;
				GtkSizeGroup* _tmp34_;
				GtkWidget* _tmp35_;
				GtkWidget* _tmp36_;
				GtkSizeGroup* _tmp37_;
				GtkSizeGroup* _tmp38_;
				GtkWidget* _tmp39_;
				GtkWidget* _tmp40_;
				if (!_tmp3_) {
					GtkWidget* _tmp4_;
					GtkWidget* _tmp5_;
					GtkWidget* _tmp6_;
					_tmp4_ = child;
					_tmp5_ = gtk_widget_get_next_sibling (_tmp4_);
					_tmp6_ = _g_object_ref0 (_tmp5_);
					_g_object_unref0 (child);
					child = _tmp6_;
				}
				_tmp3_ = FALSE;
				_tmp7_ = child;
				if (!(_tmp7_ != NULL)) {
					break;
				}
				_tmp8_ = child;
				if (G_TYPE_FROM_INSTANCE ((GObject*) _tmp8_) != row_type) {
					continue;
				}
				_tmp9_ = child;
				_tmp10_ = gtk_widget_get_first_child (_tmp9_);
				_tmp11_ = _g_object_ref0 (_tmp10_);
				name_cell = _tmp11_;
				_tmp12_ = name_cell;
				if (G_TYPE_FROM_INSTANCE ((GObject*) _tmp12_) != title_type) {
					_g_object_unref0 (name_cell);
					continue;
				}
				_tmp13_ = name_cell;
				_tmp14_ = gtk_widget_get_next_sibling (_tmp13_);
				_tmp15_ = _g_object_ref0 (_tmp14_);
				size_cell = _tmp15_;
				_tmp16_ = size_cell;
				if (G_TYPE_FROM_INSTANCE ((GObject*) _tmp16_) != title_type) {
					_g_object_unref0 (size_cell);
					_g_object_unref0 (name_cell);
					continue;
				}
				_tmp17_ = size_cell;
				_tmp18_ = gtk_widget_get_next_sibling (_tmp17_);
				_tmp19_ = _g_object_ref0 (_tmp18_);
				contents_cell = _tmp19_;
				_tmp20_ = contents_cell;
				if (G_TYPE_FROM_INSTANCE ((GObject*) _tmp20_) != title_type) {
					_g_object_unref0 (contents_cell);
					_g_object_unref0 (size_cell);
					_g_object_unref0 (name_cell);
					continue;
				}
				_tmp21_ = contents_cell;
				_tmp22_ = gtk_widget_get_next_sibling (_tmp21_);
				_tmp23_ = _g_object_ref0 (_tmp22_);
				time_modified_cell = _tmp23_;
				_tmp24_ = time_modified_cell;
				if (G_TYPE_FROM_INSTANCE ((GObject*) _tmp24_) != title_type) {
					_g_object_unref0 (time_modified_cell);
					_g_object_unref0 (contents_cell);
					_g_object_unref0 (size_cell);
					_g_object_unref0 (name_cell);
					continue;
				}
				_tmp25_ = baobab_folder_display_get_folder_size_group (self);
				_tmp26_ = _tmp25_;
				_tmp27_ = name_cell;
				_tmp28_ = gtk_widget_get_first_child (_tmp27_);
				gtk_size_group_add_widget (_tmp26_, _tmp28_);
				_tmp29_ = baobab_folder_display_get_size_size_group (self);
				_tmp30_ = _tmp29_;
				_tmp31_ = size_cell;
				_tmp32_ = gtk_widget_get_first_child (_tmp31_);
				gtk_size_group_add_widget (_tmp30_, _tmp32_);
				_tmp33_ = baobab_folder_display_get_contents_size_group (self);
				_tmp34_ = _tmp33_;
				_tmp35_ = contents_cell;
				_tmp36_ = gtk_widget_get_first_child (_tmp35_);
				gtk_size_group_add_widget (_tmp34_, _tmp36_);
				_tmp37_ = baobab_folder_display_get_time_modified_size_group (self);
				_tmp38_ = _tmp37_;
				_tmp39_ = time_modified_cell;
				_tmp40_ = gtk_widget_get_first_child (_tmp39_);
				gtk_size_group_add_widget (_tmp38_, _tmp40_);
				_g_object_unref0 (time_modified_cell);
				_g_object_unref0 (contents_cell);
				_g_object_unref0 (size_cell);
				_g_object_unref0 (name_cell);
			}
		}
		_g_object_unref0 (child);
	}
}

static void
baobab_folder_display_on_columnview_activate (BaobabFolderDisplay* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, baobab_folder_display_signals[BAOBAB_FOLDER_DISPLAY_ACTIVATED_SIGNAL], 0);
}

static void
_baobab_folder_display_on_columnview_activate_gtk_column_view_activate (GtkColumnView* _sender,
                                                                        guint position,
                                                                        gpointer self)
{
	baobab_folder_display_on_columnview_activate ((BaobabFolderDisplay*) self);
}

static void
baobab_folder_display_on_columnview_notify_sorter (BaobabFolderDisplay* self)
{
	g_return_if_fail (self != NULL);
	g_object_notify ((GObject*) self, "sorter");
}

static void
_baobab_folder_display_on_columnview_notify_sorter_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	baobab_folder_display_on_columnview_notify_sorter ((BaobabFolderDisplay*) self);
}

static void
baobab_folder_display_folder_cell_setup (BaobabFolderDisplay* self,
                                         GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabFolderCell* child = NULL;
	BaobabFolderCell* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkSizeGroup* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_folder_cell_new ();
	g_object_ref_sink (_tmp1_);
	child = _tmp1_;
	gtk_column_view_cell_set_child (item, (GtkWidget*) child);
	_tmp2_ = baobab_folder_display_get_folder_size_group (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	gtk_size_group_add_widget (_tmp3_, _tmp5_);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_folder_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                             GObject* object,
                                                                             gpointer self)
{
	baobab_folder_display_folder_cell_setup ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_folder_cell_bind (BaobabFolderDisplay* self,
                                        GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabScannerResults* results = NULL;
	GObject* _tmp1_;
	GObject* _tmp2_;
	BaobabScannerResults* _tmp3_;
	BaobabFolderCell* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	BaobabFolderCell* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_item (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_SCANNER_IS_RESULTS (_tmp2_) ? ((BaobabScannerResults*) _tmp2_) : NULL);
	results = _tmp3_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (BAOBAB_IS_FOLDER_CELL (_tmp5_) ? ((BaobabFolderCell*) _tmp5_) : NULL);
	child = _tmp6_;
	baobab_folder_cell_set_item (child, results);
	_g_object_unref0 (child);
	_g_object_unref0 (results);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_folder_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                           GObject* object,
                                                                           gpointer self)
{
	baobab_folder_display_folder_cell_bind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_folder_cell_unbind (BaobabFolderDisplay* self,
                                          GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabFolderCell* child = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	BaobabFolderCell* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_child (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_IS_FOLDER_CELL (_tmp2_) ? ((BaobabFolderCell*) _tmp2_) : NULL);
	child = _tmp3_;
	baobab_folder_cell_set_item (child, NULL);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_folder_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                               GObject* object,
                                                                               gpointer self)
{
	baobab_folder_display_folder_cell_unbind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_folder_cell_teardown (BaobabFolderDisplay* self,
                                            GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	GtkSizeGroup* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_folder_display_get_folder_size_group (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_column_view_cell_get_child (item);
	_tmp4_ = _tmp3_;
	gtk_size_group_remove_widget (_tmp2_, _tmp4_);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_folder_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                   GObject* object,
                                                                                   gpointer self)
{
	baobab_folder_display_folder_cell_teardown ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_size_cell_setup (BaobabFolderDisplay* self,
                                       GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabSizeCell* child = NULL;
	BaobabSizeCell* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkSizeGroup* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_size_cell_new ();
	g_object_ref_sink (_tmp1_);
	child = _tmp1_;
	gtk_column_view_cell_set_child (item, (GtkWidget*) child);
	_tmp2_ = baobab_folder_display_get_size_size_group (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	gtk_size_group_add_widget (_tmp3_, _tmp5_);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_size_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                           GObject* object,
                                                                           gpointer self)
{
	baobab_folder_display_size_cell_setup ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_size_cell_bind (BaobabFolderDisplay* self,
                                      GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabScannerResults* results = NULL;
	GObject* _tmp1_;
	GObject* _tmp2_;
	BaobabScannerResults* _tmp3_;
	BaobabSizeCell* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	BaobabSizeCell* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_item (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_SCANNER_IS_RESULTS (_tmp2_) ? ((BaobabScannerResults*) _tmp2_) : NULL);
	results = _tmp3_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (BAOBAB_IS_SIZE_CELL (_tmp5_) ? ((BaobabSizeCell*) _tmp5_) : NULL);
	child = _tmp6_;
	baobab_size_cell_set_item (child, results);
	_g_object_unref0 (child);
	_g_object_unref0 (results);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_size_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                         GObject* object,
                                                                         gpointer self)
{
	baobab_folder_display_size_cell_bind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_size_cell_unbind (BaobabFolderDisplay* self,
                                        GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabSizeCell* child = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	BaobabSizeCell* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_child (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_IS_SIZE_CELL (_tmp2_) ? ((BaobabSizeCell*) _tmp2_) : NULL);
	child = _tmp3_;
	baobab_size_cell_set_item (child, NULL);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_size_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                             GObject* object,
                                                                             gpointer self)
{
	baobab_folder_display_size_cell_unbind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_size_cell_teardown (BaobabFolderDisplay* self,
                                          GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	GtkSizeGroup* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_folder_display_get_size_size_group (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_column_view_cell_get_child (item);
	_tmp4_ = _tmp3_;
	gtk_size_group_remove_widget (_tmp2_, _tmp4_);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_size_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                 GObject* object,
                                                                                 gpointer self)
{
	baobab_folder_display_size_cell_teardown ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_contents_cell_setup (BaobabFolderDisplay* self,
                                           GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabContentsCell* child = NULL;
	BaobabContentsCell* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkSizeGroup* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_contents_cell_new ();
	g_object_ref_sink (_tmp1_);
	child = _tmp1_;
	gtk_column_view_cell_set_child (item, (GtkWidget*) child);
	_tmp2_ = baobab_folder_display_get_contents_size_group (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	gtk_size_group_add_widget (_tmp3_, _tmp5_);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_contents_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                               GObject* object,
                                                                               gpointer self)
{
	baobab_folder_display_contents_cell_setup ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_contents_cell_bind (BaobabFolderDisplay* self,
                                          GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabScannerResults* results = NULL;
	GObject* _tmp1_;
	GObject* _tmp2_;
	BaobabScannerResults* _tmp3_;
	BaobabContentsCell* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	BaobabContentsCell* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_item (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_SCANNER_IS_RESULTS (_tmp2_) ? ((BaobabScannerResults*) _tmp2_) : NULL);
	results = _tmp3_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (BAOBAB_IS_CONTENTS_CELL (_tmp5_) ? ((BaobabContentsCell*) _tmp5_) : NULL);
	child = _tmp6_;
	baobab_contents_cell_set_item (child, results);
	_g_object_unref0 (child);
	_g_object_unref0 (results);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_contents_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                             GObject* object,
                                                                             gpointer self)
{
	baobab_folder_display_contents_cell_bind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_contents_cell_unbind (BaobabFolderDisplay* self,
                                            GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabContentsCell* child = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	BaobabContentsCell* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_child (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_IS_CONTENTS_CELL (_tmp2_) ? ((BaobabContentsCell*) _tmp2_) : NULL);
	child = _tmp3_;
	baobab_contents_cell_set_item (child, NULL);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_contents_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                 GObject* object,
                                                                                 gpointer self)
{
	baobab_folder_display_contents_cell_unbind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_contents_cell_teardown (BaobabFolderDisplay* self,
                                              GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	GtkSizeGroup* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_folder_display_get_contents_size_group (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_column_view_cell_get_child (item);
	_tmp4_ = _tmp3_;
	gtk_size_group_remove_widget (_tmp2_, _tmp4_);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_contents_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                     GObject* object,
                                                                                     gpointer self)
{
	baobab_folder_display_contents_cell_teardown ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_time_modified_cell_setup (BaobabFolderDisplay* self,
                                                GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabTimeModifiedCell* child = NULL;
	BaobabTimeModifiedCell* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkSizeGroup* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_time_modified_cell_new ();
	g_object_ref_sink (_tmp1_);
	child = _tmp1_;
	gtk_column_view_cell_set_child (item, (GtkWidget*) child);
	_tmp2_ = baobab_folder_display_get_time_modified_size_group (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	gtk_size_group_add_widget (_tmp3_, _tmp5_);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_time_modified_cell_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                    GObject* object,
                                                                                    gpointer self)
{
	baobab_folder_display_time_modified_cell_setup ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_time_modified_cell_bind (BaobabFolderDisplay* self,
                                               GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabScannerResults* results = NULL;
	GObject* _tmp1_;
	GObject* _tmp2_;
	BaobabScannerResults* _tmp3_;
	BaobabTimeModifiedCell* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	BaobabTimeModifiedCell* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_item (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_SCANNER_IS_RESULTS (_tmp2_) ? ((BaobabScannerResults*) _tmp2_) : NULL);
	results = _tmp3_;
	_tmp4_ = gtk_column_view_cell_get_child (item);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (BAOBAB_IS_TIME_MODIFIED_CELL (_tmp5_) ? ((BaobabTimeModifiedCell*) _tmp5_) : NULL);
	child = _tmp6_;
	baobab_time_modified_cell_set_item (child, results);
	_g_object_unref0 (child);
	_g_object_unref0 (results);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_time_modified_cell_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self)
{
	baobab_folder_display_time_modified_cell_bind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_time_modified_cell_unbind (BaobabFolderDisplay* self,
                                                 GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	BaobabTimeModifiedCell* child = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	BaobabTimeModifiedCell* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = gtk_column_view_cell_get_child (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (BAOBAB_IS_TIME_MODIFIED_CELL (_tmp2_) ? ((BaobabTimeModifiedCell*) _tmp2_) : NULL);
	child = _tmp3_;
	baobab_time_modified_cell_set_item (child, NULL);
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_time_modified_cell_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                      GObject* object,
                                                                                      gpointer self)
{
	baobab_folder_display_time_modified_cell_unbind ((BaobabFolderDisplay*) self, object);
}

static void
baobab_folder_display_time_modified_cell_teardown (BaobabFolderDisplay* self,
                                                   GObject* object)
{
	GtkColumnViewCell* item = NULL;
	GtkColumnViewCell* _tmp0_;
	GtkSizeGroup* _tmp1_;
	GtkSizeGroup* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_column_view_cell_get_type ()) ? ((GtkColumnViewCell*) object) : NULL);
	item = _tmp0_;
	_tmp1_ = baobab_folder_display_get_time_modified_size_group (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_column_view_cell_get_child (item);
	_tmp4_ = _tmp3_;
	gtk_size_group_remove_widget (_tmp2_, _tmp4_);
	_g_object_unref0 (item);
}

static void
_baobab_folder_display_time_modified_cell_teardown_gtk_signal_list_item_factory_teardown (GtkSignalListItemFactory* _sender,
                                                                                          GObject* object,
                                                                                          gpointer self)
{
	baobab_folder_display_time_modified_cell_teardown ((BaobabFolderDisplay*) self, object);
}

BaobabFolderDisplay*
baobab_folder_display_construct (GType object_type)
{
	BaobabFolderDisplay * self = NULL;
	self = (BaobabFolderDisplay*) g_object_new (object_type, NULL);
	return self;
}

BaobabFolderDisplay*
baobab_folder_display_new (void)
{
	return baobab_folder_display_construct (BAOBAB_TYPE_FOLDER_DISPLAY);
}

BaobabLocation*
baobab_folder_display_get_location (BaobabFolderDisplay* self)
{
	BaobabLocation* result;
	BaobabLocation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->location_;
	result = _tmp0_;
	return result;
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		BaobabFolderDisplay* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->results);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static gpointer
_baobab_location_ref0 (gpointer self)
{
	return self ? baobab_location_ref (self) : NULL;
}

static void
_baobab_folder_display_location___lambda12_ (Block1Data* _data1_)
{
	BaobabFolderDisplay* self;
	BaobabLocation* _tmp0_;
	BaobabScanner* _tmp1_;
	BaobabScanner* _tmp2_;
	guint64 _tmp3_;
	guint64 _tmp4_;
	BaobabLocation* _tmp5_;
	BaobabScanner* _tmp6_;
	BaobabScanner* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	self = _data1_->self;
	_tmp0_ = self->priv->location_;
	_tmp1_ = baobab_location_get_scanner (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = baobab_scanner_get_total_size (_tmp2_);
	_tmp4_ = _tmp3_;
	baobab_scanner_results_set_size (_data1_->results, _tmp4_);
	_tmp5_ = self->priv->location_;
	_tmp6_ = baobab_location_get_scanner (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = baobab_scanner_get_total_elements (_tmp7_);
	_tmp9_ = _tmp8_;
	baobab_scanner_results_set_elements (_data1_->results, _tmp9_);
}

static void
__baobab_folder_display_location___lambda12__baobab_location_progress (BaobabLocation* _sender,
                                                                       gpointer self)
{
	_baobab_folder_display_location___lambda12_ (self);
}

void
baobab_folder_display_set_location (BaobabFolderDisplay* self,
                                    BaobabLocation* value)
{
	Block1Data* _data1_;
	BaobabLocation* _tmp1_;
	BaobabScannerResults* _tmp2_;
	BaobabLocation* _tmp3_;
	BaobabLocation* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GListStore* list_store = NULL;
	GListStore* _tmp7_;
	GtkSortListModel* _tmp8_;
	BaobabLocation* _tmp9_;
	gulong _tmp10_;
	g_return_if_fail (self != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	if (self->priv->location_progress_handler > ((gulong) 0)) {
		BaobabLocation* _tmp0_;
		_tmp0_ = self->priv->location_;
		g_signal_handler_disconnect (_tmp0_, self->priv->location_progress_handler);
		self->priv->location_progress_handler = (gulong) 0;
	}
	_tmp1_ = _baobab_location_ref0 (value);
	_baobab_location_unref0 (self->priv->location_);
	self->priv->location_ = _tmp1_;
	_tmp2_ = baobab_scanner_results_new_empty ();
	_data1_->results = _tmp2_;
	_tmp3_ = baobab_folder_display_get_location (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = baobab_location_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	baobab_scanner_results_set_display_name (_data1_->results, _tmp6_);
	_tmp7_ = g_list_store_new (BAOBAB_SCANNER_TYPE_RESULTS);
	list_store = _tmp7_;
	g_list_store_append (list_store, (GObject*) _data1_->results);
	_tmp8_ = self->columnview_sort_model;
	gtk_sort_list_model_set_model (_tmp8_, (GListModel*) list_store);
	_tmp9_ = self->priv->location_;
	_tmp10_ = g_signal_connect_data (_tmp9_, "progress", (GCallback) __baobab_folder_display_location___lambda12__baobab_location_progress, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	self->priv->location_progress_handler = _tmp10_;
	_g_object_unref0 (list_store);
	block1_data_unref (_data1_);
	_data1_ = NULL;
	g_object_notify_by_pspec ((GObject *) self, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY]);
}

BaobabScannerResults*
baobab_folder_display_get_path (BaobabFolderDisplay* self)
{
	BaobabScannerResults* result;
	BaobabScannerResults* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->path_;
	result = _tmp0_;
	return result;
}

void
baobab_folder_display_set_path (BaobabFolderDisplay* self,
                                BaobabScannerResults* value)
{
	BaobabScannerResults* _tmp0_;
	GListStore* list_store = NULL;
	GListStore* _tmp1_;
	BaobabScannerResults* _tmp2_;
	BaobabScannerResults* _tmp3_;
	GtkSortListModel* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->path_);
	self->priv->path_ = _tmp0_;
	_tmp1_ = g_list_store_new (BAOBAB_SCANNER_TYPE_RESULTS);
	list_store = _tmp1_;
	_tmp2_ = baobab_folder_display_get_path (self);
	_tmp3_ = _tmp2_;
	g_list_store_append (list_store, (GObject*) _tmp3_);
	_tmp4_ = self->columnview_sort_model;
	gtk_sort_list_model_set_model (_tmp4_, (GListModel*) list_store);
	_g_object_unref0 (list_store);
	g_object_notify_by_pspec ((GObject *) self, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY]);
}

GtkSorter*
baobab_folder_display_get_sorter (BaobabFolderDisplay* self)
{
	GtkSorter* result;
	GtkColumnView* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->columnview;
	_tmp1_ = gtk_column_view_get_sorter (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

GtkSizeGroup*
baobab_folder_display_get_size_size_group (BaobabFolderDisplay* self)
{
	GtkSizeGroup* result;
	GtkSizeGroup* _tmp0_;
	GtkSizeGroup* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_size_size_group;
	if (_tmp0_ == NULL) {
		GtkSizeGroup* _tmp1_;
		_tmp1_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->_size_size_group);
		self->priv->_size_size_group = _tmp1_;
	}
	_tmp2_ = self->priv->_size_size_group;
	result = _tmp2_;
	return result;
}

GtkSizeGroup*
baobab_folder_display_get_folder_size_group (BaobabFolderDisplay* self)
{
	GtkSizeGroup* result;
	GtkSizeGroup* _tmp0_;
	GtkSizeGroup* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_folder_size_group;
	if (_tmp0_ == NULL) {
		GtkSizeGroup* _tmp1_;
		_tmp1_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->_folder_size_group);
		self->priv->_folder_size_group = _tmp1_;
	}
	_tmp2_ = self->priv->_folder_size_group;
	result = _tmp2_;
	return result;
}

GtkSizeGroup*
baobab_folder_display_get_contents_size_group (BaobabFolderDisplay* self)
{
	GtkSizeGroup* result;
	GtkSizeGroup* _tmp0_;
	GtkSizeGroup* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_contents_size_group;
	if (_tmp0_ == NULL) {
		GtkSizeGroup* _tmp1_;
		_tmp1_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->_contents_size_group);
		self->priv->_contents_size_group = _tmp1_;
	}
	_tmp2_ = self->priv->_contents_size_group;
	result = _tmp2_;
	return result;
}

GtkSizeGroup*
baobab_folder_display_get_time_modified_size_group (BaobabFolderDisplay* self)
{
	GtkSizeGroup* result;
	GtkSizeGroup* _tmp0_;
	GtkSizeGroup* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_time_modified_size_group;
	if (_tmp0_ == NULL) {
		GtkSizeGroup* _tmp1_;
		_tmp1_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->_time_modified_size_group);
		self->priv->_time_modified_size_group = _tmp1_;
	}
	_tmp2_ = self->priv->_time_modified_size_group;
	result = _tmp2_;
	return result;
}

static GObject *
baobab_folder_display_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BaobabFolderDisplay * self;
	GtkColumnView* _tmp0_;
	GtkColumnViewColumn* _tmp1_;
	parent_class = G_OBJECT_CLASS (baobab_folder_display_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BAOBAB_TYPE_FOLDER_DISPLAY, BaobabFolderDisplay);
	baobab_folder_display_add_header_cells_to_size_groups (self);
	_tmp0_ = self->columnview;
	_tmp1_ = self->size_column;
	gtk_column_view_sort_by_column (_tmp0_, _tmp1_, GTK_SORT_DESCENDING);
	return obj;
}

static void
baobab_folder_display_class_init (BaobabFolderDisplayClass * klass,
                                  gpointer klass_data)
{
	baobab_folder_display_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BaobabFolderDisplay_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_baobab_folder_display_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_baobab_folder_display_set_property;
	G_OBJECT_CLASS (klass)->constructor = baobab_folder_display_constructor;
	G_OBJECT_CLASS (klass)->finalize = baobab_folder_display_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY] = baobab_param_spec_location ("location", "location", "location", BAOBAB_TYPE_LOCATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY] = g_param_spec_object ("path", "path", "path", BAOBAB_SCANNER_TYPE_RESULTS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_SORTER_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_SORTER_PROPERTY] = g_param_spec_object ("sorter", "sorter", "sorter", gtk_sorter_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_SIZE_SIZE_GROUP_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_SIZE_SIZE_GROUP_PROPERTY] = g_param_spec_object ("size-size-group", "size-size-group", "size-size-group", gtk_size_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_FOLDER_SIZE_GROUP_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_FOLDER_SIZE_GROUP_PROPERTY] = g_param_spec_object ("folder-size-group", "folder-size-group", "folder-size-group", gtk_size_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_CONTENTS_SIZE_GROUP_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_CONTENTS_SIZE_GROUP_PROPERTY] = g_param_spec_object ("contents-size-group", "contents-size-group", "contents-size-group", gtk_size_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_FOLDER_DISPLAY_TIME_MODIFIED_SIZE_GROUP_PROPERTY, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_TIME_MODIFIED_SIZE_GROUP_PROPERTY] = g_param_spec_object ("time-modified-size-group", "time-modified-size-group", "time-modified-size-group", gtk_size_group_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/baobab/ui/baobab-folder-display.ui");
	baobab_folder_display_signals[BAOBAB_FOLDER_DISPLAY_ACTIVATED_SIGNAL] = g_signal_new ("activated", BAOBAB_TYPE_FOLDER_DISPLAY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "columnview", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, columnview));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "folder_column", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, folder_column));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "size_column", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, size_column));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "contents_column", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, contents_column));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "time_modified_column", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, time_modified_column));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "columnview_sort_model", FALSE, G_STRUCT_OFFSET (BaobabFolderDisplay, columnview_sort_model));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_columnview_activate", G_CALLBACK(_baobab_folder_display_on_columnview_activate_gtk_column_view_activate));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_columnview_notify_sorter", G_CALLBACK(_baobab_folder_display_on_columnview_notify_sorter_g_object_notify));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "folder_cell_setup", G_CALLBACK(_baobab_folder_display_folder_cell_setup_gtk_signal_list_item_factory_setup));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "folder_cell_bind", G_CALLBACK(_baobab_folder_display_folder_cell_bind_gtk_signal_list_item_factory_bind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "folder_cell_unbind", G_CALLBACK(_baobab_folder_display_folder_cell_unbind_gtk_signal_list_item_factory_unbind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "folder_cell_teardown", G_CALLBACK(_baobab_folder_display_folder_cell_teardown_gtk_signal_list_item_factory_teardown));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "size_cell_setup", G_CALLBACK(_baobab_folder_display_size_cell_setup_gtk_signal_list_item_factory_setup));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "size_cell_bind", G_CALLBACK(_baobab_folder_display_size_cell_bind_gtk_signal_list_item_factory_bind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "size_cell_unbind", G_CALLBACK(_baobab_folder_display_size_cell_unbind_gtk_signal_list_item_factory_unbind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "size_cell_teardown", G_CALLBACK(_baobab_folder_display_size_cell_teardown_gtk_signal_list_item_factory_teardown));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "contents_cell_setup", G_CALLBACK(_baobab_folder_display_contents_cell_setup_gtk_signal_list_item_factory_setup));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "contents_cell_bind", G_CALLBACK(_baobab_folder_display_contents_cell_bind_gtk_signal_list_item_factory_bind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "contents_cell_unbind", G_CALLBACK(_baobab_folder_display_contents_cell_unbind_gtk_signal_list_item_factory_unbind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "contents_cell_teardown", G_CALLBACK(_baobab_folder_display_contents_cell_teardown_gtk_signal_list_item_factory_teardown));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "time_modified_cell_setup", G_CALLBACK(_baobab_folder_display_time_modified_cell_setup_gtk_signal_list_item_factory_setup));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "time_modified_cell_bind", G_CALLBACK(_baobab_folder_display_time_modified_cell_bind_gtk_signal_list_item_factory_bind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "time_modified_cell_unbind", G_CALLBACK(_baobab_folder_display_time_modified_cell_unbind_gtk_signal_list_item_factory_unbind));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "time_modified_cell_teardown", G_CALLBACK(_baobab_folder_display_time_modified_cell_teardown_gtk_signal_list_item_factory_teardown));
}

static void
baobab_folder_display_instance_init (BaobabFolderDisplay * self,
                                     gpointer klass)
{
	self->priv = baobab_folder_display_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
baobab_folder_display_finalize (GObject * obj)
{
	BaobabFolderDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BAOBAB_TYPE_FOLDER_DISPLAY, BaobabFolderDisplay);
	_baobab_location_unref0 (self->priv->location_);
	_g_object_unref0 (self->priv->path_);
	_g_object_unref0 (self->priv->_size_size_group);
	_g_object_unref0 (self->priv->_folder_size_group);
	_g_object_unref0 (self->priv->_contents_size_group);
	_g_object_unref0 (self->priv->_time_modified_size_group);
	G_OBJECT_CLASS (baobab_folder_display_parent_class)->finalize (obj);
}

static GType
baobab_folder_display_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BaobabFolderDisplayClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) baobab_folder_display_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BaobabFolderDisplay), 0, (GInstanceInitFunc) baobab_folder_display_instance_init, NULL };
	GType baobab_folder_display_type_id;
	baobab_folder_display_type_id = g_type_register_static (adw_bin_get_type (), "BaobabFolderDisplay", &g_define_type_info, 0);
	BaobabFolderDisplay_private_offset = g_type_add_instance_private (baobab_folder_display_type_id, sizeof (BaobabFolderDisplayPrivate));
	return baobab_folder_display_type_id;
}

GType
baobab_folder_display_get_type (void)
{
	static volatile gsize baobab_folder_display_type_id__once = 0;
	if (g_once_init_enter (&baobab_folder_display_type_id__once)) {
		GType baobab_folder_display_type_id;
		baobab_folder_display_type_id = baobab_folder_display_get_type_once ();
		g_once_init_leave (&baobab_folder_display_type_id__once, baobab_folder_display_type_id);
	}
	return baobab_folder_display_type_id__once;
}

static void
_vala_baobab_folder_display_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	BaobabFolderDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_FOLDER_DISPLAY, BaobabFolderDisplay);
	switch (property_id) {
		case BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY:
		baobab_value_set_location (value, baobab_folder_display_get_location (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_path (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_SORTER_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_sorter (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_SIZE_SIZE_GROUP_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_size_size_group (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_FOLDER_SIZE_GROUP_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_folder_size_group (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_CONTENTS_SIZE_GROUP_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_contents_size_group (self));
		break;
		case BAOBAB_FOLDER_DISPLAY_TIME_MODIFIED_SIZE_GROUP_PROPERTY:
		g_value_set_object (value, baobab_folder_display_get_time_modified_size_group (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_baobab_folder_display_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	BaobabFolderDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_FOLDER_DISPLAY, BaobabFolderDisplay);
	switch (property_id) {
		case BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY:
		baobab_folder_display_set_location (self, baobab_value_get_location (value));
		break;
		case BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY:
		baobab_folder_display_set_path (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

