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

/*
* Copyright 2020 elementary, Inc. (https://elementary.io)
*
* 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 3 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
*
* Authored by: Marius Meisenzahl <mariusmeisenzahl@gmail.com>
*/

#include "applications.h"
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>
#include <granite-7.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  {
	PERMISSIONS_SIDEBAR_ROW_0_PROPERTY,
	PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY,
	PERMISSIONS_SIDEBAR_ROW_NUM_PROPERTIES
};
static GParamSpec* permissions_sidebar_row_properties[PERMISSIONS_SIDEBAR_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

struct _PermissionsSidebarRowPrivate {
	PermissionsBackendApp* _app;
	GtkLabel* description_label;
	GtkRevealer* description_revealer;
};

static gint PermissionsSidebarRow_private_offset;
static gpointer permissions_sidebar_row_parent_class = NULL;

static void permissions_sidebar_row_update_description (PermissionsSidebarRow* self);
static void _g_free0_ (gpointer var);
static GObject * permissions_sidebar_row_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static void _permissions_sidebar_row_update_description_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self);
static void permissions_sidebar_row_finalize (GObject * obj);
static GType permissions_sidebar_row_get_type_once (void);
static void _vala_permissions_sidebar_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_permissions_sidebar_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
permissions_sidebar_row_get_instance_private (PermissionsSidebarRow* self)
{
	return G_STRUCT_MEMBER_P (self, PermissionsSidebarRow_private_offset);
}

PermissionsSidebarRow*
permissions_sidebar_row_construct (GType object_type,
                                   PermissionsBackendApp* app)
{
	PermissionsSidebarRow * self = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	self = (PermissionsSidebarRow*) g_object_new (object_type, "app", app, NULL);
	return self;
}

PermissionsSidebarRow*
permissions_sidebar_row_new (PermissionsBackendApp* app)
{
	return permissions_sidebar_row_construct (PERMISSIONS_TYPE_SIDEBAR_ROW, app);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = (gint) self->len;
	return result;
}

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

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static void
permissions_sidebar_row_update_description (PermissionsSidebarRow* self)
{
	GPtrArray* current_permissions = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	current_permissions = _tmp0_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				PermissionsBackendApp* _tmp3_;
				GPtrArray* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				PermissionsBackendPermissionSettings* settings = NULL;
				PermissionsBackendApp* _tmp7_;
				GPtrArray* _tmp8_;
				gconstpointer _tmp9_;
				PermissionsBackendPermissionSettings* _tmp10_;
				PermissionsBackendPermissionSettings* _tmp11_;
				gboolean _tmp12_;
				gboolean _tmp13_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = self->priv->_app;
				_tmp4_ = _tmp3_->settings;
				_tmp5_ = vala_g_ptr_array_get_length (_tmp4_);
				_tmp6_ = _tmp5_;
				if (!(i < _tmp6_)) {
					break;
				}
				_tmp7_ = self->priv->_app;
				_tmp8_ = _tmp7_->settings;
				_tmp9_ = g_ptr_array_index (_tmp8_, (guint) i);
				_tmp10_ = _g_object_ref0 ((PermissionsBackendPermissionSettings*) _tmp9_);
				settings = _tmp10_;
				_tmp11_ = settings;
				_tmp12_ = permissions_backend_permission_settings_get_enabled (_tmp11_);
				_tmp13_ = _tmp12_;
				if (_tmp13_) {
					GPtrArray* _tmp14_;
					GHashTable* _tmp15_;
					GHashTable* _tmp16_;
					PermissionsBackendPermissionSettings* _tmp17_;
					const gchar* _tmp18_;
					const gchar* _tmp19_;
					gconstpointer _tmp20_;
					gchar* _tmp21_;
					_tmp14_ = current_permissions;
					_tmp15_ = permissions_backend_app_get_permission_names ();
					_tmp16_ = _tmp15_;
					_tmp17_ = settings;
					_tmp18_ = permissions_backend_permission_settings_get_context (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = g_hash_table_lookup (_tmp16_, _tmp19_);
					_tmp21_ = g_strdup ((const gchar*) _tmp20_);
					g_ptr_array_add (_tmp14_, _tmp21_);
				}
				_g_object_unref0 (settings);
			}
		}
	}
	_tmp22_ = current_permissions;
	_tmp23_ = vala_g_ptr_array_get_length (_tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_ > 0) {
		gchar* description = NULL;
		GPtrArray* _tmp25_;
		gpointer* _tmp26_;
		gint _tmp26__length1;
		gchar* _tmp27_;
		GtkLabel* _tmp28_;
		const gchar* _tmp29_;
		GtkRevealer* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		_tmp25_ = current_permissions;
		_tmp26_ = _tmp25_->pdata;
		_tmp26__length1 = _tmp25_->len;
		_tmp27_ = _vala_g_strjoinv (_ (", "), _tmp26_, (gint) _tmp26__length1);
		description = _tmp27_;
		_tmp28_ = self->priv->description_label;
		_tmp29_ = description;
		gtk_label_set_label (_tmp28_, _tmp29_);
		_tmp30_ = self->priv->description_revealer;
		gtk_revealer_set_reveal_child (_tmp30_, TRUE);
		_tmp31_ = description;
		gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp31_);
		_tmp32_ = description;
		gtk_accessible_update_property ((GtkAccessible*) self, GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, _tmp32_, -1, -1);
		_g_free0 (description);
	} else {
		GtkRevealer* _tmp33_;
		_tmp33_ = self->priv->description_revealer;
		gtk_revealer_set_reveal_child (_tmp33_, FALSE);
		gtk_widget_set_tooltip_text ((GtkWidget*) self, NULL);
		gtk_accessible_update_property ((GtkAccessible*) self, GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, NULL, -1, -1);
	}
	_g_ptr_array_unref0 (current_permissions);
}

PermissionsBackendApp*
permissions_sidebar_row_get_app (PermissionsSidebarRow* self)
{
	PermissionsBackendApp* result;
	PermissionsBackendApp* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app;
	result = _tmp0_;
	return result;
}

static void
permissions_sidebar_row_set_app (PermissionsSidebarRow* self,
                                 PermissionsBackendApp* value)
{
	PermissionsBackendApp* old_value;
	g_return_if_fail (self != NULL);
	old_value = permissions_sidebar_row_get_app (self);
	if (old_value != value) {
		PermissionsBackendApp* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_app);
		self->priv->_app = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, permissions_sidebar_row_properties[PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY]);
	}
}

static void
_permissions_sidebar_row_update_description_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self)
{
	permissions_sidebar_row_update_description ((PermissionsSidebarRow*) self);
}

static GObject *
permissions_sidebar_row_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PermissionsSidebarRow * self;
	GtkImage* image = NULL;
	PermissionsBackendApp* _tmp0_;
	GIcon* _tmp1_;
	GIcon* _tmp2_;
	GtkImage* _tmp3_ = NULL;
	GtkLabel* title_label = NULL;
	PermissionsBackendApp* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GtkLabel* _tmp7_ = NULL;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_ = NULL;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	GtkWidget* _tmp12_;
	GtkRevealer* _tmp13_ = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp14_ = NULL;
	GtkGrid* _tmp15_;
	GtkImage* _tmp16_;
	GtkGrid* _tmp17_;
	GtkLabel* _tmp18_;
	GtkGrid* _tmp19_;
	GtkRevealer* _tmp20_;
	GtkGrid* _tmp21_;
	PermissionsBackendApp* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	parent_class = G_OBJECT_CLASS (permissions_sidebar_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PERMISSIONS_TYPE_SIDEBAR_ROW, PermissionsSidebarRow);
	_tmp0_ = self->priv->_app;
	_tmp1_ = permissions_backend_app_get_icon (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkImage*) gtk_image_new_from_gicon (_tmp2_);
	gtk_image_set_pixel_size (_tmp3_, 32);
	g_object_ref_sink (_tmp3_);
	image = _tmp3_;
	_tmp4_ = self->priv->_app;
	_tmp5_ = permissions_backend_app_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = (GtkLabel*) gtk_label_new (_tmp6_);
	gtk_label_set_ellipsize (_tmp7_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_END);
	gtk_label_set_xalign (_tmp7_, (gfloat) 0);
	g_object_ref_sink (_tmp7_);
	title_label = _tmp7_;
	_tmp8_ = title_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp8_, GRANITE_STYLE_CLASS_H3_LABEL);
	_tmp9_ = (GtkLabel*) gtk_label_new ("");
	gtk_label_set_ellipsize (_tmp9_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp9_, (gfloat) 0);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->description_label);
	self->priv->description_label = _tmp9_;
	_tmp10_ = self->priv->description_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp10_, GRANITE_STYLE_CLASS_SMALL_LABEL);
	_tmp11_ = self->priv->description_label;
	_tmp12_ = _g_object_ref0 ((GtkWidget*) _tmp11_);
	_tmp13_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp13_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->description_revealer);
	self->priv->description_revealer = _tmp13_;
	_tmp14_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp14_, 6);
	g_object_ref_sink (_tmp14_);
	grid = _tmp14_;
	_tmp15_ = grid;
	_tmp16_ = image;
	gtk_grid_attach (_tmp15_, (GtkWidget*) _tmp16_, 0, 0, 1, 2);
	_tmp17_ = grid;
	_tmp18_ = title_label;
	gtk_grid_attach (_tmp17_, (GtkWidget*) _tmp18_, 1, 0, 1, 1);
	_tmp19_ = grid;
	_tmp20_ = self->priv->description_revealer;
	gtk_grid_attach (_tmp19_, (GtkWidget*) _tmp20_, 1, 1, 1, 1);
	g_object_set ((GtkAccessible*) self, "accessible-role", GTK_ACCESSIBLE_ROLE_TAB, NULL);
	_tmp21_ = grid;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp21_);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	_tmp22_ = self->priv->_app;
	_tmp23_ = permissions_backend_app_get_name (_tmp22_);
	_tmp24_ = _tmp23_;
	gtk_accessible_update_property ((GtkAccessible*) self, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp24_, -1, -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp25_ = FALSE;
			_tmp25_ = TRUE;
			while (TRUE) {
				PermissionsBackendApp* _tmp27_;
				GPtrArray* _tmp28_;
				gint _tmp29_;
				gint _tmp30_;
				PermissionsBackendApp* _tmp31_;
				GPtrArray* _tmp32_;
				gconstpointer _tmp33_;
				if (!_tmp25_) {
					gint _tmp26_;
					_tmp26_ = i;
					i = _tmp26_ + 1;
				}
				_tmp25_ = FALSE;
				_tmp27_ = self->priv->_app;
				_tmp28_ = _tmp27_->settings;
				_tmp29_ = vala_g_ptr_array_get_length (_tmp28_);
				_tmp30_ = _tmp29_;
				if (!(i < _tmp30_)) {
					break;
				}
				_tmp31_ = self->priv->_app;
				_tmp32_ = _tmp31_->settings;
				_tmp33_ = g_ptr_array_index (_tmp32_, (guint) i);
				g_signal_connect_object ((GObject*) ((PermissionsBackendPermissionSettings*) _tmp33_), "notify", (GCallback) _permissions_sidebar_row_update_description_g_object_notify, self, 0);
			}
		}
	}
	permissions_sidebar_row_update_description (self);
	_g_object_unref0 (grid);
	_g_object_unref0 (title_label);
	_g_object_unref0 (image);
	return obj;
}

static void
permissions_sidebar_row_class_init (PermissionsSidebarRowClass * klass,
                                    gpointer klass_data)
{
	permissions_sidebar_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PermissionsSidebarRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_permissions_sidebar_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_permissions_sidebar_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = permissions_sidebar_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = permissions_sidebar_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY, permissions_sidebar_row_properties[PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY] = g_param_spec_object ("app", "app", "app", PERMISSIONS_BACKEND_TYPE_APP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
permissions_sidebar_row_instance_init (PermissionsSidebarRow * self,
                                       gpointer klass)
{
	self->priv = permissions_sidebar_row_get_instance_private (self);
}

static void
permissions_sidebar_row_finalize (GObject * obj)
{
	PermissionsSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PERMISSIONS_TYPE_SIDEBAR_ROW, PermissionsSidebarRow);
	_g_object_unref0 (self->priv->_app);
	_g_object_unref0 (self->priv->description_label);
	_g_object_unref0 (self->priv->description_revealer);
	G_OBJECT_CLASS (permissions_sidebar_row_parent_class)->finalize (obj);
}

static GType
permissions_sidebar_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PermissionsSidebarRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) permissions_sidebar_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PermissionsSidebarRow), 0, (GInstanceInitFunc) permissions_sidebar_row_instance_init, NULL };
	GType permissions_sidebar_row_type_id;
	permissions_sidebar_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "PermissionsSidebarRow", &g_define_type_info, 0);
	PermissionsSidebarRow_private_offset = g_type_add_instance_private (permissions_sidebar_row_type_id, sizeof (PermissionsSidebarRowPrivate));
	return permissions_sidebar_row_type_id;
}

GType
permissions_sidebar_row_get_type (void)
{
	static volatile gsize permissions_sidebar_row_type_id__once = 0;
	if (g_once_init_enter (&permissions_sidebar_row_type_id__once)) {
		GType permissions_sidebar_row_type_id;
		permissions_sidebar_row_type_id = permissions_sidebar_row_get_type_once ();
		g_once_init_leave (&permissions_sidebar_row_type_id__once, permissions_sidebar_row_type_id);
	}
	return permissions_sidebar_row_type_id__once;
}

static void
_vala_permissions_sidebar_row_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	PermissionsSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PERMISSIONS_TYPE_SIDEBAR_ROW, PermissionsSidebarRow);
	switch (property_id) {
		case PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY:
		g_value_set_object (value, permissions_sidebar_row_get_app (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_permissions_sidebar_row_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	PermissionsSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PERMISSIONS_TYPE_SIDEBAR_ROW, PermissionsSidebarRow);
	switch (property_id) {
		case PERMISSIONS_SIDEBAR_ROW_APP_PROPERTY:
		permissions_sidebar_row_set_app (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

