/* baobab-pathbar.c generated by valac 0.56.3, the Vala compiler
 * generated from baobab-pathbar.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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib-object.h>

enum  {
	BAOBAB_PATH_BUTTON_0_PROPERTY,
	BAOBAB_PATH_BUTTON_NUM_PROPERTIES
};
static GParamSpec* baobab_path_button_properties[BAOBAB_PATH_BUTTON_NUM_PROPERTIES];
enum  {
	BAOBAB_PATHBAR_0_PROPERTY,
	BAOBAB_PATHBAR_LOCATION_PROPERTY,
	BAOBAB_PATHBAR_PATH_PROPERTY,
	BAOBAB_PATHBAR_NUM_PROPERTIES
};
static GParamSpec* baobab_pathbar_properties[BAOBAB_PATHBAR_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)))
#define __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))
typedef struct _Block3Data Block3Data;
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	BAOBAB_PATHBAR_ITEM_ACTIVATED_SIGNAL,
	BAOBAB_PATHBAR_NUM_SIGNALS
};
static guint baobab_pathbar_signals[BAOBAB_PATHBAR_NUM_SIGNALS] = {0};

struct _BaobabPathButtonPrivate {
	GtkLabel* label;
	GtkImage* icon;
};

struct _BaobabPathbarPrivate {
	BaobabLocation* location_;
};

struct _Block3Data {
	int _ref_count_;
	BaobabPathbar* self;
	GtkTreePath* path;
};

static gint BaobabPathButton_private_offset;
static gpointer baobab_path_button_parent_class = NULL;
static gint BaobabPathbar_private_offset;
static gpointer baobab_pathbar_parent_class = NULL;

static void baobab_path_button_finalize (GObject * obj);
static GType baobab_path_button_get_type_once (void);
static void baobab_pathbar_clear (BaobabPathbar* self);
static BaobabPathButton* baobab_pathbar_make_button (BaobabPathbar* self,
                                              GtkTreePath* path);
static GtkTreePath* _vala_GtkTreePath_copy (GtkTreePath* self);
static void _vala_GtkTreePath_free (GtkTreePath* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda6_ (Block3Data* _data3_);
static void ___lambda6__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void baobab_pathbar_finalize (GObject * obj);
static GType baobab_pathbar_get_type_once (void);
static void _vala_baobab_pathbar_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec);
static void _vala_baobab_pathbar_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec);

static inline gpointer
baobab_path_button_get_instance_private (BaobabPathButton* self)
{
	return G_STRUCT_MEMBER_P (self, BaobabPathButton_private_offset);
}

BaobabPathButton*
baobab_path_button_construct (GType object_type,
                              const gchar* name,
                              GIcon* gicon)
{
	BaobabPathButton * self = NULL;
	GtkLabel* _tmp0_;
	GtkImage* _tmp1_;
	g_return_val_if_fail (name != NULL, NULL);
	self = (BaobabPathButton*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->label;
	gtk_label_set_label (_tmp0_, name);
	_tmp1_ = self->priv->icon;
	gtk_widget_hide ((GtkWidget*) _tmp1_);
	if (gicon != NULL) {
		GtkImage* _tmp2_;
		GtkImage* _tmp3_;
		_tmp2_ = self->priv->icon;
		g_object_set (_tmp2_, "gicon", gicon, NULL);
		_tmp3_ = self->priv->icon;
		gtk_widget_show ((GtkWidget*) _tmp3_);
	}
	return self;
}

BaobabPathButton*
baobab_path_button_new (const gchar* name,
                        GIcon* gicon)
{
	return baobab_path_button_construct (BAOBAB_TYPE_PATH_BUTTON, name, gicon);
}

static void
baobab_path_button_class_init (BaobabPathButtonClass * klass,
                               gpointer klass_data)
{
	baobab_path_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BaobabPathButton_private_offset);
	G_OBJECT_CLASS (klass)->finalize = baobab_path_button_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/baobab/ui/baobab-pathbutton.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label", FALSE, BaobabPathButton_private_offset + G_STRUCT_OFFSET (BaobabPathButtonPrivate, label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "icon", FALSE, BaobabPathButton_private_offset + G_STRUCT_OFFSET (BaobabPathButtonPrivate, icon));
}

static void
baobab_path_button_instance_init (BaobabPathButton * self,
                                  gpointer klass)
{
	self->priv = baobab_path_button_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
baobab_path_button_finalize (GObject * obj)
{
	BaobabPathButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BAOBAB_TYPE_PATH_BUTTON, BaobabPathButton);
	G_OBJECT_CLASS (baobab_path_button_parent_class)->finalize (obj);
}

static GType
baobab_path_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BaobabPathButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) baobab_path_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BaobabPathButton), 0, (GInstanceInitFunc) baobab_path_button_instance_init, NULL };
	GType baobab_path_button_type_id;
	baobab_path_button_type_id = g_type_register_static (gtk_button_get_type (), "BaobabPathButton", &g_define_type_info, 0);
	BaobabPathButton_private_offset = g_type_add_instance_private (baobab_path_button_type_id, sizeof (BaobabPathButtonPrivate));
	return baobab_path_button_type_id;
}

GType
baobab_path_button_get_type (void)
{
	static volatile gsize baobab_path_button_type_id__once = 0;
	if (g_once_init_enter (&baobab_path_button_type_id__once)) {
		GType baobab_path_button_type_id;
		baobab_path_button_type_id = baobab_path_button_get_type_once ();
		g_once_init_leave (&baobab_path_button_type_id__once, baobab_path_button_type_id);
	}
	return baobab_path_button_type_id__once;
}

static inline gpointer
baobab_pathbar_get_instance_private (BaobabPathbar* self)
{
	return G_STRUCT_MEMBER_P (self, BaobabPathbar_private_offset);
}

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

static void
baobab_pathbar_clear (BaobabPathbar* self)
{
	g_return_if_fail (self != NULL);
	{
		GtkWidget* child = NULL;
		GtkWidget* _tmp0_;
		GtkWidget* _tmp1_;
		_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) self);
		_tmp1_ = _g_object_ref0 (_tmp0_);
		child = _tmp1_;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GtkWidget* _tmp5_;
				GtkWidget* _tmp6_;
				if (!_tmp2_) {
					GtkWidget* _tmp3_;
					GtkWidget* _tmp4_;
					_tmp3_ = gtk_widget_get_first_child ((GtkWidget*) self);
					_tmp4_ = _g_object_ref0 (_tmp3_);
					_g_object_unref0 (child);
					child = _tmp4_;
				}
				_tmp2_ = FALSE;
				_tmp5_ = child;
				if (!(_tmp5_ != NULL)) {
					break;
				}
				_tmp6_ = child;
				gtk_box_remove ((GtkBox*) self, _tmp6_);
			}
		}
		_g_object_unref0 (child);
	}
}

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;
}

static void
_vala_GtkTreePath_free (GtkTreePath* self)
{
	g_boxed_free (gtk_tree_path_get_type (), self);
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		BaobabPathbar* self;
		self = _data3_->self;
		__vala_GtkTreePath_free0 (_data3_->path);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static void
__lambda6_ (Block3Data* _data3_)
{
	BaobabPathbar* self;
	self = _data3_->self;
	g_signal_emit (self, baobab_pathbar_signals[BAOBAB_PATHBAR_ITEM_ACTIVATED_SIGNAL], 0, _data3_->path);
}

static void
___lambda6__gtk_button_clicked (GtkButton* _sender,
                                gpointer self)
{
	__lambda6_ (self);
}

static BaobabPathButton*
baobab_pathbar_make_button (BaobabPathbar* self,
                            GtkTreePath* path)
{
	Block3Data* _data3_;
	GtkTreePath* _tmp0_;
	gchar* label = NULL;
	GIcon* gicon = NULL;
	BaobabPathButton* button = NULL;
	const gchar* _tmp28_;
	GIcon* _tmp29_;
	BaobabPathButton* _tmp30_;
	BaobabPathButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = __vala_GtkTreePath_copy0 (path);
	__vala_GtkTreePath_free0 (_data3_->path);
	_data3_->path = _tmp0_;
	gicon = NULL;
	if (gtk_tree_path_get_depth (_data3_->path) == 1) {
		BaobabLocation* _tmp1_;
		BaobabLocation* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		BaobabLocation* _tmp6_;
		BaobabLocation* _tmp7_;
		GIcon* _tmp8_;
		GIcon* _tmp9_;
		GIcon* _tmp10_;
		_tmp1_ = baobab_pathbar_get_location (self);
		_tmp2_ = _tmp1_;
		_tmp3_ = baobab_location_get_name (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_g_free0 (label);
		label = _tmp5_;
		_tmp6_ = baobab_pathbar_get_location (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = baobab_location_get_symbolic_icon (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (gicon);
		gicon = _tmp10_;
	} else {
		GtkTreeIter iter = {0};
		gchar* name = NULL;
		gchar* display_name = NULL;
		BaobabLocation* _tmp11_;
		BaobabLocation* _tmp12_;
		BaobabScanner* _tmp13_;
		BaobabScanner* _tmp14_;
		GtkTreeIter _tmp15_ = {0};
		BaobabLocation* _tmp16_;
		BaobabLocation* _tmp17_;
		BaobabScanner* _tmp18_;
		BaobabScanner* _tmp19_;
		GtkTreeIter _tmp20_;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		const gchar* _tmp23_ = NULL;
		const gchar* _tmp24_;
		gchar* _tmp27_;
		_tmp11_ = baobab_pathbar_get_location (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = baobab_location_get_scanner (_tmp12_);
		_tmp14_ = _tmp13_;
		gtk_tree_model_get_iter ((GtkTreeModel*) _tmp14_, &_tmp15_, _data3_->path);
		iter = _tmp15_;
		_tmp16_ = baobab_pathbar_get_location (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = baobab_location_get_scanner (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = iter;
		gtk_tree_model_get ((GtkTreeModel*) _tmp19_, &_tmp20_, BAOBAB_SCANNER_COLUMNS_NAME, &_tmp21_, BAOBAB_SCANNER_COLUMNS_DISPLAY_NAME, &_tmp22_, -1);
		_g_free0 (name);
		name = _tmp21_;
		_g_free0 (display_name);
		display_name = _tmp22_;
		_tmp24_ = display_name;
		if (_tmp24_ != NULL) {
			const gchar* _tmp25_;
			_tmp25_ = display_name;
			_tmp23_ = _tmp25_;
		} else {
			const gchar* _tmp26_;
			_tmp26_ = name;
			_tmp23_ = _tmp26_;
		}
		_tmp27_ = g_strdup (_tmp23_);
		_g_free0 (label);
		label = _tmp27_;
		_g_free0 (display_name);
		_g_free0 (name);
	}
	_tmp28_ = label;
	_tmp29_ = gicon;
	_tmp30_ = baobab_path_button_new (_tmp28_, _tmp29_);
	g_object_ref_sink (_tmp30_);
	button = _tmp30_;
	g_signal_connect_data ((GtkButton*) button, "clicked", (GCallback) ___lambda6__gtk_button_clicked, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	result = button;
	_g_object_unref0 (gicon);
	_g_free0 (label);
	block3_data_unref (_data3_);
	_data3_ = NULL;
	return result;
}

BaobabPathbar*
baobab_pathbar_construct (GType object_type)
{
	BaobabPathbar * self = NULL;
	self = (BaobabPathbar*) g_object_new (object_type, NULL);
	return self;
}

BaobabPathbar*
baobab_pathbar_new (void)
{
	return baobab_pathbar_construct (BAOBAB_TYPE_PATHBAR);
}

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

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

void
baobab_pathbar_set_location (BaobabPathbar* self,
                             BaobabLocation* value)
{
	BaobabLocation* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreePath* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _baobab_location_ref0 (value);
	_baobab_location_unref0 (self->priv->location_);
	self->priv->location_ = _tmp0_;
	_tmp1_ = gtk_tree_path_new_first ();
	_tmp2_ = _tmp1_;
	baobab_pathbar_set_path (self, _tmp2_);
	__vala_GtkTreePath_free0 (_tmp2_);
	g_object_notify_by_pspec ((GObject *) self, baobab_pathbar_properties[BAOBAB_PATHBAR_LOCATION_PROPERTY]);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

void
baobab_pathbar_set_path (BaobabPathbar* self,
                         GtkTreePath* value)
{
	gboolean _tmp0_ = FALSE;
	BaobabLocation* _tmp1_;
	BaobabLocation* _tmp2_;
	GtkTreePath* path_tmp = NULL;
	GtkTreePath* _tmp7_;
	GList* buttons = NULL;
	GList* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp1_ = baobab_pathbar_get_location (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		BaobabLocation* _tmp3_;
		BaobabLocation* _tmp4_;
		BaobabScanner* _tmp5_;
		BaobabScanner* _tmp6_;
		_tmp3_ = baobab_pathbar_get_location (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = baobab_location_get_scanner (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	baobab_pathbar_clear (self);
	_tmp7_ = __vala_GtkTreePath_copy0 (value);
	path_tmp = _tmp7_;
	buttons = NULL;
	while (TRUE) {
		GtkTreePath* _tmp8_;
		GtkTreePath* _tmp9_;
		BaobabPathButton* _tmp10_;
		GtkTreePath* _tmp11_;
		_tmp8_ = path_tmp;
		if (!(gtk_tree_path_get_depth (_tmp8_) > 0)) {
			break;
		}
		_tmp9_ = path_tmp;
		_tmp10_ = baobab_pathbar_make_button (self, _tmp9_);
		buttons = g_list_append (buttons, _tmp10_);
		_tmp11_ = path_tmp;
		gtk_tree_path_up (_tmp11_);
	}
	buttons = g_list_reverse (buttons);
	_tmp12_ = buttons;
	{
		GList* button_collection = NULL;
		GList* button_it = NULL;
		button_collection = _tmp12_;
		for (button_it = button_collection; button_it != NULL; button_it = button_it->next) {
			BaobabPathButton* _tmp13_;
			BaobabPathButton* button = NULL;
			_tmp13_ = _g_object_ref0 ((BaobabPathButton*) button_it->data);
			button = _tmp13_;
			{
				BaobabPathButton* _tmp14_;
				_tmp14_ = button;
				gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp14_);
				_g_object_unref0 (button);
			}
		}
	}
	(buttons == NULL) ? NULL : (buttons = (_g_list_free__g_object_unref0_ (buttons), NULL));
	__vala_GtkTreePath_free0 (path_tmp);
	g_object_notify_by_pspec ((GObject *) self, baobab_pathbar_properties[BAOBAB_PATHBAR_PATH_PROPERTY]);
}

static void
baobab_pathbar_class_init (BaobabPathbarClass * klass,
                           gpointer klass_data)
{
	baobab_pathbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BaobabPathbar_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_baobab_pathbar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_baobab_pathbar_set_property;
	G_OBJECT_CLASS (klass)->finalize = baobab_pathbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BAOBAB_PATHBAR_LOCATION_PROPERTY, baobab_pathbar_properties[BAOBAB_PATHBAR_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_PATHBAR_PATH_PROPERTY, baobab_pathbar_properties[BAOBAB_PATHBAR_PATH_PROPERTY] = g_param_spec_boxed ("path", "path", "path", gtk_tree_path_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	baobab_pathbar_signals[BAOBAB_PATHBAR_ITEM_ACTIVATED_SIGNAL] = g_signal_new ("item-activated", BAOBAB_TYPE_PATHBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, gtk_tree_path_get_type ());
}

static void
baobab_pathbar_instance_init (BaobabPathbar * self,
                              gpointer klass)
{
	self->priv = baobab_pathbar_get_instance_private (self);
}

static void
baobab_pathbar_finalize (GObject * obj)
{
	BaobabPathbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BAOBAB_TYPE_PATHBAR, BaobabPathbar);
	_baobab_location_unref0 (self->priv->location_);
	G_OBJECT_CLASS (baobab_pathbar_parent_class)->finalize (obj);
}

static GType
baobab_pathbar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BaobabPathbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) baobab_pathbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BaobabPathbar), 0, (GInstanceInitFunc) baobab_pathbar_instance_init, NULL };
	GType baobab_pathbar_type_id;
	baobab_pathbar_type_id = g_type_register_static (gtk_box_get_type (), "BaobabPathbar", &g_define_type_info, 0);
	BaobabPathbar_private_offset = g_type_add_instance_private (baobab_pathbar_type_id, sizeof (BaobabPathbarPrivate));
	return baobab_pathbar_type_id;
}

GType
baobab_pathbar_get_type (void)
{
	static volatile gsize baobab_pathbar_type_id__once = 0;
	if (g_once_init_enter (&baobab_pathbar_type_id__once)) {
		GType baobab_pathbar_type_id;
		baobab_pathbar_type_id = baobab_pathbar_get_type_once ();
		g_once_init_leave (&baobab_pathbar_type_id__once, baobab_pathbar_type_id);
	}
	return baobab_pathbar_type_id__once;
}

static void
_vala_baobab_pathbar_get_property (GObject * object,
                                   guint property_id,
                                   GValue * value,
                                   GParamSpec * pspec)
{
	BaobabPathbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_PATHBAR, BaobabPathbar);
	switch (property_id) {
		case BAOBAB_PATHBAR_LOCATION_PROPERTY:
		baobab_value_set_location (value, baobab_pathbar_get_location (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_baobab_pathbar_set_property (GObject * object,
                                   guint property_id,
                                   const GValue * value,
                                   GParamSpec * pspec)
{
	BaobabPathbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BAOBAB_TYPE_PATHBAR, BaobabPathbar);
	switch (property_id) {
		case BAOBAB_PATHBAR_LOCATION_PROPERTY:
		baobab_pathbar_set_location (self, baobab_value_get_location (value));
		break;
		case BAOBAB_PATHBAR_PATH_PROPERTY:
		baobab_pathbar_set_path (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

