/* baobab-folder-display.c generated by valac 0.56.0, 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 <gtk/gtk.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>

enum  {
	BAOBAB_FOLDER_DISPLAY_0_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY,
	BAOBAB_FOLDER_DISPLAY_PATH_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 __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
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 {
	GtkCellRendererPixbuf* folder_column_icon_renderer;
	gulong location_progress_handler;
	BaobabLocation* location_;
	GtkTreePath* path_;
};

struct _Block1Data {
	int _ref_count_;
	BaobabFolderDisplay* self;
	GtkListStore* list_store;
};

static gint BaobabFolderDisplay_private_offset;
static gpointer baobab_folder_display_parent_class = NULL;

static void _vala_GtkTreePath_free (GtkTreePath* self);
static GtkListStore* baobab_folder_display_create_model (BaobabFolderDisplay* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void _baobab_folder_display_location___lambda11_ (Block1Data* _data1_);
static void __baobab_folder_display_location___lambda11__baobab_location_progress (BaobabLocation* _sender,
                                                                            gpointer self);
static GtkTreePath* _vala_GtkTreePath_copy (GtkTreePath* self);
static GObject * baobab_folder_display_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties);
static void _baobab_folder_display___lambda12_ (BaobabFolderDisplay* self);
static void __baobab_folder_display___lambda12__gtk_tree_view_row_activated (GtkTreeView* _sender,
                                                                      GtkTreePath* path,
                                                                      GtkTreeViewColumn* column,
                                                                      gpointer self);
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 void
_vala_GtkTreePath_free (GtkTreePath* self)
{
	g_boxed_free (gtk_tree_path_get_type (), self);
}

static GtkListStore*
baobab_folder_display_create_model (BaobabFolderDisplay* self)
{
	GtkListStore* list_store = NULL;
	GType* _tmp0_;
	GType* _tmp1_;
	gint _tmp1__length1;
	GtkListStore* _tmp2_;
	GtkListStore* _tmp3_;
	GtkListStore* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (GType, 7);
	_tmp0_[0] = G_TYPE_STRING;
	_tmp0_[1] = G_TYPE_DOUBLE;
	_tmp0_[2] = G_TYPE_UINT64;
	_tmp0_[3] = G_TYPE_UINT64;
	_tmp0_[4] = G_TYPE_STRING;
	_tmp0_[5] = G_TYPE_INT;
	_tmp0_[6] = BAOBAB_SCANNER_TYPE_STATE;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 7;
	_tmp2_ = gtk_list_store_newv (7, _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	list_store = _tmp3_;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) list_store, (gint) BAOBAB_SCANNER_COLUMNS_SIZE, GTK_SORT_DESCENDING);
	result = list_store;
	return result;
}

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_->list_store);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

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

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

static void
_baobab_folder_display_location___lambda11_ (Block1Data* _data1_)
{
	BaobabFolderDisplay* self;
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp0_ = {0};
	GtkTreeIter _tmp1_;
	BaobabLocation* _tmp2_;
	BaobabScanner* _tmp3_;
	BaobabScanner* _tmp4_;
	guint64 _tmp5_;
	guint64 _tmp6_;
	BaobabLocation* _tmp7_;
	BaobabScanner* _tmp8_;
	BaobabScanner* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	self = _data1_->self;
	gtk_tree_model_get_iter_first ((GtkTreeModel*) _data1_->list_store, &_tmp0_);
	iter = _tmp0_;
	_tmp1_ = iter;
	_tmp2_ = self->priv->location_;
	_tmp3_ = baobab_location_get_scanner (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = baobab_scanner_get_total_size (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->location_;
	_tmp8_ = baobab_location_get_scanner (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = baobab_scanner_get_total_elements (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_list_store_set (_data1_->list_store, &_tmp1_, BAOBAB_SCANNER_COLUMNS_SIZE, _tmp6_, BAOBAB_SCANNER_COLUMNS_ELEMENTS, _tmp11_, -1);
}

static void
__baobab_folder_display_location___lambda11__baobab_location_progress (BaobabLocation* _sender,
                                                                       gpointer self)
{
	_baobab_folder_display_location___lambda11_ (self);
}

void
baobab_folder_display_set_location (BaobabFolderDisplay* self,
                                    BaobabLocation* value)
{
	Block1Data* _data1_;
	BaobabLocation* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkTreeModel* _tmp3_;
	GtkListStore* _tmp4_;
	BaobabLocation* _tmp5_;
	BaobabLocation* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GtkCellRendererPixbuf* _tmp9_;
	BaobabLocation* _tmp10_;
	gulong _tmp11_;
	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_ = gtk_tree_view_get_model ((GtkTreeView*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_list_store_get_type (), GtkListStore));
	_data1_->list_store = _tmp4_;
	gtk_list_store_clear (_data1_->list_store);
	_tmp5_ = baobab_folder_display_get_location (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = baobab_location_get_name (_tmp6_);
	_tmp8_ = _tmp7_;
	gtk_list_store_insert_with_values (_data1_->list_store, NULL, -1, BAOBAB_SCANNER_COLUMNS_NAME, _tmp8_, -1);
	_tmp9_ = self->priv->folder_column_icon_renderer;
	gtk_cell_renderer_set_visible ((GtkCellRenderer*) _tmp9_, FALSE);
	_tmp10_ = self->priv->location_;
	_tmp11_ = g_signal_connect_data (_tmp10_, "progress", (GCallback) __baobab_folder_display_location___lambda11__baobab_location_progress, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	self->priv->location_progress_handler = _tmp11_;
	block1_data_unref (_data1_);
	_data1_ = NULL;
	g_object_notify_by_pspec ((GObject *) self, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_LOCATION_PROPERTY]);
}

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

static GtkTreePath*
_vala_GtkTreePath_copy (GtkTreePath* self)
{
	return g_boxed_copy (gtk_tree_path_get_type (), self);
}

static gpointer
__vala_GtkTreePath_copy0 (gpointer self)
{
	return self ? _vala_GtkTreePath_copy (self) : NULL;
}

void
baobab_folder_display_set_path (BaobabFolderDisplay* self,
                                GtkTreePath* value)
{
	GtkTreePath* _tmp0_;
	GtkTreeIter iter = {0};
	BaobabLocation* _tmp1_;
	BaobabLocation* _tmp2_;
	BaobabScanner* _tmp3_;
	BaobabScanner* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gchar* name = NULL;
	gchar* display_name = NULL;
	guint64 size = 0ULL;
	gint elements = 0;
	guint64 time = 0ULL;
	BaobabScannerState state = 0;
	BaobabLocation* _tmp6_;
	BaobabLocation* _tmp7_;
	BaobabScanner* _tmp8_;
	BaobabScanner* _tmp9_;
	GtkTreeIter _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	guint64 _tmp13_ = 0ULL;
	gint _tmp14_ = 0;
	guint64 _tmp15_ = 0ULL;
	BaobabScannerState _tmp16_ = 0;
	GtkListStore* list_store = NULL;
	GtkTreeModel* _tmp24_;
	GtkTreeModel* _tmp25_;
	GtkListStore* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	g_return_if_fail (self != NULL);
	_tmp0_ = __vala_GtkTreePath_copy0 (value);
	__vala_GtkTreePath_free0 (self->priv->path_);
	self->priv->path_ = _tmp0_;
	_tmp1_ = baobab_folder_display_get_location (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = baobab_location_get_scanner (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp4_, &_tmp5_, value);
	iter = _tmp5_;
	_tmp6_ = baobab_folder_display_get_location (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = baobab_location_get_scanner (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp9_, &_tmp10_, BAOBAB_SCANNER_COLUMNS_NAME, &_tmp11_, BAOBAB_SCANNER_COLUMNS_DISPLAY_NAME, &_tmp12_, BAOBAB_SCANNER_COLUMNS_SIZE, &_tmp13_, BAOBAB_SCANNER_COLUMNS_ELEMENTS, &_tmp14_, BAOBAB_SCANNER_COLUMNS_TIME_MODIFIED, &_tmp15_, BAOBAB_SCANNER_COLUMNS_STATE, &_tmp16_, -1);
	_g_free0 (name);
	name = _tmp11_;
	_g_free0 (display_name);
	display_name = _tmp12_;
	size = _tmp13_;
	elements = _tmp14_;
	time = _tmp15_;
	state = _tmp16_;
	if (gtk_tree_path_get_depth (value) == 1) {
		BaobabLocation* _tmp17_;
		BaobabLocation* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		GtkCellRendererPixbuf* _tmp22_;
		_tmp17_ = baobab_folder_display_get_location (self);
		_tmp18_ = _tmp17_;
		_tmp19_ = baobab_location_get_name (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strdup (_tmp20_);
		_g_free0 (name);
		name = _tmp21_;
		_tmp22_ = self->priv->folder_column_icon_renderer;
		gtk_cell_renderer_set_visible ((GtkCellRenderer*) _tmp22_, FALSE);
	} else {
		GtkCellRendererPixbuf* _tmp23_;
		_tmp23_ = self->priv->folder_column_icon_renderer;
		gtk_cell_renderer_set_visible ((GtkCellRenderer*) _tmp23_, TRUE);
	}
	_tmp24_ = gtk_tree_view_get_model ((GtkTreeView*) self);
	_tmp25_ = _tmp24_;
	_tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_list_store_get_type (), GtkListStore));
	list_store = _tmp26_;
	gtk_list_store_clear (list_store);
	_tmp27_ = name;
	_tmp28_ = display_name;
	gtk_list_store_insert_with_values (list_store, NULL, -1, BAOBAB_SCANNER_COLUMNS_NAME, _tmp27_, BAOBAB_SCANNER_COLUMNS_DISPLAY_NAME, _tmp28_, BAOBAB_SCANNER_COLUMNS_SIZE, size, BAOBAB_SCANNER_COLUMNS_ELEMENTS, elements, BAOBAB_SCANNER_COLUMNS_TIME_MODIFIED, time, BAOBAB_SCANNER_COLUMNS_STATE, state, -1);
	_g_object_unref0 (list_store);
	_g_free0 (display_name);
	_g_free0 (name);
	g_object_notify_by_pspec ((GObject *) self, baobab_folder_display_properties[BAOBAB_FOLDER_DISPLAY_PATH_PROPERTY]);
}

static void
_baobab_folder_display___lambda12_ (BaobabFolderDisplay* self)
{
	g_signal_emit (self, baobab_folder_display_signals[BAOBAB_FOLDER_DISPLAY_ACTIVATED_SIGNAL], 0);
}

static void
__baobab_folder_display___lambda12__gtk_tree_view_row_activated (GtkTreeView* _sender,
                                                                 GtkTreePath* path,
                                                                 GtkTreeViewColumn* column,
                                                                 gpointer self)
{
	_baobab_folder_display___lambda12_ ((BaobabFolderDisplay*) self);
}

static GObject *
baobab_folder_display_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BaobabFolderDisplay * self;
	GtkListStore* _tmp0_;
	GtkListStore* _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);
	g_signal_connect_object ((GtkTreeView*) self, "row-activated", (GCallback) __baobab_folder_display___lambda12__gtk_tree_view_row_activated, self, 0);
	_tmp0_ = baobab_folder_display_create_model (self);
	_tmp1_ = _tmp0_;
	gtk_tree_view_set_model ((GtkTreeView*) self, (GtkTreeModel*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	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_boxed ("path", "path", "path", gtk_tree_path_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	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), "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), "folder_column_icon_renderer", FALSE, BaobabFolderDisplay_private_offset + G_STRUCT_OFFSET (BaobabFolderDisplayPrivate, folder_column_icon_renderer));
}

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_);
	__vala_GtkTreePath_free0 (self->priv->path_);
	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 (gtk_tree_view_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_boxed (value, baobab_folder_display_get_path (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_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

