/* MenuPicker.c generated by valac 0.56.19, the Vala compiler
 * generated from MenuPicker.vala, do not modify */

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * 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: Alain M. <alainmh23@gmail.com>
 */

#include "planify.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <glib-object.h>
#include <float.h>
#include <math.h>
#include <pango/pango.h>
#include <gio/gio.h>
#include <adwaita.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  {
	WIDGETS_CONTEXT_MENU_MENU_PICKER_0_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_NUM_PROPERTIES
};
static GParamSpec* widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_0_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_GROUP_PROPERTY,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_NUM_PROPERTIES
};
static GParamSpec* widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_NUM_PROPERTIES];
enum  {
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_SELECTED_SIGNAL,
	WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_NUM_SIGNALS
};
static guint widgets_context_menu_menu_picker_menu_item_picker_signals[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_NUM_SIGNALS] = {0};
typedef struct _Block26Data Block26Data;

struct _WidgetsContextMenuMenuPickerPrivate {
	gchar* _title;
	gchar* _icon;
	GtkImage* menu_icon;
	GtkRevealer* menu_icon_revealer;
	GtkLabel* menu_title;
	GtkLabel* value_label;
	GtkListBox* listbox;
	GtkCheckButton* group_radio;
	GeeHashMap* item_map;
};

struct _WidgetsContextMenuMenuPickerMenuItemPickerPrivate {
	gchar* _title;
	gchar* _value;
	GtkCheckButton* radio_button;
};

struct _Block26Data {
	int _ref_count_;
	WidgetsContextMenuMenuPicker* self;
	GtkImage* arrow_icon;
	GtkRevealer* listbox_revealer;
};

static gint WidgetsContextMenuMenuPicker_private_offset;
static gpointer widgets_context_menu_menu_picker_parent_class = NULL;
static gint WidgetsContextMenuMenuPickerMenuItemPicker_private_offset;
static gpointer widgets_context_menu_menu_picker_menu_item_picker_parent_class = NULL;

static void __lambda360_ (WidgetsContextMenuMenuPicker* self,
                   const gchar* value);
static void ___lambda360__widgets_context_menu_menu_picker_menu_item_picker_selected (WidgetsContextMenuMenuPickerMenuItemPicker* _sender,
                                                                               const gchar* value,
                                                                               gpointer self);
static GObject * widgets_context_menu_menu_picker_menu_item_picker_constructor (GType type,
                                                                         guint n_construct_properties,
                                                                         GObjectConstructParam * construct_properties);
static void _widgets_context_menu_menu_picker_menu_item_picker___lambda358_ (WidgetsContextMenuMenuPickerMenuItemPicker* self);
static void __widgets_context_menu_menu_picker_menu_item_picker___lambda358__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                                 gint n_press,
                                                                                                 gdouble x,
                                                                                                 gdouble y,
                                                                                                 gpointer self);
static void _widgets_context_menu_menu_picker_menu_item_picker___lambda359_ (WidgetsContextMenuMenuPickerMenuItemPicker* self);
static void __widgets_context_menu_menu_picker_menu_item_picker___lambda359__gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                                                 gpointer self);
static void widgets_context_menu_menu_picker_menu_item_picker_finalize (GObject * obj);
static GType widgets_context_menu_menu_picker_menu_item_picker_get_type_once (void);
static void _vala_widgets_context_menu_menu_picker_menu_item_picker_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_widgets_context_menu_menu_picker_menu_item_picker_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static GObject * widgets_context_menu_menu_picker_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void _widgets_context_menu_menu_picker___lambda361_ (Block26Data* _data26_);
static void __widgets_context_menu_menu_picker___lambda361__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void widgets_context_menu_menu_picker_finalize (GObject * obj);
static GType widgets_context_menu_menu_picker_get_type_once (void);
static void _vala_widgets_context_menu_menu_picker_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_widgets_context_menu_menu_picker_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_context_menu_menu_picker_get_instance_private (WidgetsContextMenuMenuPicker* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsContextMenuMenuPicker_private_offset);
}

WidgetsContextMenuMenuPicker*
widgets_context_menu_menu_picker_construct (GType object_type,
                                            const gchar* title,
                                            const gchar* icon)
{
	WidgetsContextMenuMenuPicker * self = NULL;
	g_return_val_if_fail (title != NULL, NULL);
	self = (WidgetsContextMenuMenuPicker*) g_object_new (object_type, "title", title, "icon", icon, "hexpand", TRUE, NULL);
	return self;
}

WidgetsContextMenuMenuPicker*
widgets_context_menu_menu_picker_new (const gchar* title,
                                      const gchar* icon)
{
	return widgets_context_menu_menu_picker_construct (WIDGETS_CONTEXT_MENU_TYPE_MENU_PICKER, title, icon);
}

void
widgets_context_menu_menu_picker_update_selected (WidgetsContextMenuMenuPicker* self,
                                                  const gchar* value)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->item_map;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, value)) {
		GeeHashMap* _tmp1_;
		gpointer _tmp2_;
		WidgetsContextMenuMenuPickerMenuItemPicker* _tmp3_;
		GtkLabel* _tmp4_;
		GeeHashMap* _tmp5_;
		gpointer _tmp6_;
		WidgetsContextMenuMenuPickerMenuItemPicker* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp1_ = self->priv->item_map;
		_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, value);
		_tmp3_ = (WidgetsContextMenuMenuPickerMenuItemPicker*) _tmp2_;
		widgets_context_menu_menu_picker_menu_item_picker_set_active (_tmp3_, TRUE);
		_g_object_unref0 (_tmp3_);
		_tmp4_ = self->priv->value_label;
		_tmp5_ = self->priv->item_map;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, value);
		_tmp7_ = (WidgetsContextMenuMenuPickerMenuItemPicker*) _tmp6_;
		_tmp8_ = widgets_context_menu_menu_picker_menu_item_picker_get_title (_tmp7_);
		_tmp9_ = _tmp8_;
		gtk_label_set_label (_tmp4_, _tmp9_);
		_g_object_unref0 (_tmp7_);
	}
}

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

static void
__lambda360_ (WidgetsContextMenuMenuPicker* self,
              const gchar* value)
{
	g_return_if_fail (value != NULL);
	widgets_context_menu_menu_picker_set_selected (self, value);
}

static void
___lambda360__widgets_context_menu_menu_picker_menu_item_picker_selected (WidgetsContextMenuMenuPickerMenuItemPicker* _sender,
                                                                          const gchar* value,
                                                                          gpointer self)
{
	__lambda360_ ((WidgetsContextMenuMenuPicker*) self, value);
}

void
widgets_context_menu_menu_picker_add_item (WidgetsContextMenuMenuPicker* self,
                                           const gchar* title,
                                           const gchar* value)
{
	GeeHashMap* _tmp0_;
	WidgetsContextMenuMenuPickerMenuItemPicker* row = NULL;
	GtkCheckButton* _tmp1_;
	GtkCheckButton* _tmp2_;
	WidgetsContextMenuMenuPickerMenuItemPicker* _tmp3_ = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	WidgetsContextMenuMenuPickerMenuItemPicker* _tmp8_;
	GeeHashMap* _tmp9_;
	WidgetsContextMenuMenuPickerMenuItemPicker* _tmp10_;
	GtkListBox* _tmp11_;
	GeeHashMap* _tmp12_;
	gpointer _tmp13_;
	WidgetsContextMenuMenuPickerMenuItemPicker* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->item_map;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, value)) {
		return;
	}
	_tmp1_ = self->priv->group_radio;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_tmp3_ = widgets_context_menu_menu_picker_menu_item_picker_new (title, value);
	widgets_context_menu_menu_picker_menu_item_picker_set_group (_tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	row = _tmp3_;
	_tmp4_ = widgets_context_menu_menu_picker_get_selected (self);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (value, _tmp5_) == 0) {
		WidgetsContextMenuMenuPickerMenuItemPicker* _tmp6_;
		GtkLabel* _tmp7_;
		_tmp6_ = row;
		widgets_context_menu_menu_picker_menu_item_picker_set_active (_tmp6_, TRUE);
		_tmp7_ = self->priv->value_label;
		gtk_label_set_label (_tmp7_, title);
	}
	_tmp8_ = row;
	g_signal_connect_object (_tmp8_, "selected", (GCallback) ___lambda360__widgets_context_menu_menu_picker_menu_item_picker_selected, self, 0);
	_tmp9_ = self->priv->item_map;
	_tmp10_ = row;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, value, _tmp10_);
	_tmp11_ = self->priv->listbox;
	_tmp12_ = self->priv->item_map;
	_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp12_, value);
	_tmp14_ = (WidgetsContextMenuMenuPickerMenuItemPicker*) _tmp13_;
	gtk_list_box_append (_tmp11_, (GtkWidget*) _tmp14_);
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (row);
}

const gchar*
widgets_context_menu_menu_picker_get_title (WidgetsContextMenuMenuPicker* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

static void
widgets_context_menu_menu_picker_set_title (WidgetsContextMenuMenuPicker* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_context_menu_menu_picker_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY]);
	}
}

const gchar*
widgets_context_menu_menu_picker_get_icon (WidgetsContextMenuMenuPicker* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

static void
widgets_context_menu_menu_picker_set_icon (WidgetsContextMenuMenuPicker* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_context_menu_menu_picker_get_icon (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY]);
	}
}

const gchar*
widgets_context_menu_menu_picker_get_selected (WidgetsContextMenuMenuPicker* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_selected;
	result = _tmp0_;
	return result;
}

void
widgets_context_menu_menu_picker_set_selected (WidgetsContextMenuMenuPicker* self,
                                               const gchar* value)
{
	gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->_selected);
	self->_selected = _tmp0_;
	_tmp1_ = self->_selected;
	widgets_context_menu_menu_picker_update_selected (self, _tmp1_);
	g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY]);
}

static inline gpointer
widgets_context_menu_menu_picker_menu_item_picker_get_instance_private (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsContextMenuMenuPickerMenuItemPicker_private_offset);
}

WidgetsContextMenuMenuPickerMenuItemPicker*
widgets_context_menu_menu_picker_menu_item_picker_construct (GType object_type,
                                                             const gchar* title,
                                                             const gchar* value)
{
	WidgetsContextMenuMenuPickerMenuItemPicker * self = NULL;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	self = (WidgetsContextMenuMenuPickerMenuItemPicker*) g_object_new (object_type, "title", title, "value", value, NULL);
	return self;
}

WidgetsContextMenuMenuPickerMenuItemPicker*
widgets_context_menu_menu_picker_menu_item_picker_new (const gchar* title,
                                                       const gchar* value)
{
	return widgets_context_menu_menu_picker_menu_item_picker_construct (WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, title, value);
}

const gchar*
widgets_context_menu_menu_picker_menu_item_picker_get_title (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

static void
widgets_context_menu_menu_picker_menu_item_picker_set_title (WidgetsContextMenuMenuPickerMenuItemPicker* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_context_menu_menu_picker_menu_item_picker_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY]);
	}
}

const gchar*
widgets_context_menu_menu_picker_menu_item_picker_get_value (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

static void
widgets_context_menu_menu_picker_menu_item_picker_set_value (WidgetsContextMenuMenuPickerMenuItemPicker* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_context_menu_menu_picker_menu_item_picker_get_value (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_value);
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY]);
	}
}

gboolean
widgets_context_menu_menu_picker_menu_item_picker_get_active (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	gboolean result;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->radio_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
widgets_context_menu_menu_picker_menu_item_picker_set_active (WidgetsContextMenuMenuPickerMenuItemPicker* self,
                                                              gboolean value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->radio_button;
	gtk_check_button_set_active (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY]);
}

void
widgets_context_menu_menu_picker_menu_item_picker_set_group (WidgetsContextMenuMenuPickerMenuItemPicker* self,
                                                             GtkCheckButton* value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->radio_button;
	gtk_check_button_set_group (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_GROUP_PROPERTY]);
}

static void
_widgets_context_menu_menu_picker_menu_item_picker___lambda358_ (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = self->priv->radio_button;
	_tmp1_ = self->priv->radio_button;
	_tmp2_ = gtk_check_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_check_button_set_active (_tmp0_, !_tmp3_);
	_tmp4_ = self->priv->_value;
	g_signal_emit (self, widgets_context_menu_menu_picker_menu_item_picker_signals[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_SELECTED_SIGNAL], 0, _tmp4_);
}

static void
__widgets_context_menu_menu_picker_menu_item_picker___lambda358__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                            gint n_press,
                                                                                            gdouble x,
                                                                                            gdouble y,
                                                                                            gpointer self)
{
	_widgets_context_menu_menu_picker_menu_item_picker___lambda358_ ((WidgetsContextMenuMenuPickerMenuItemPicker*) self);
}

static void
_widgets_context_menu_menu_picker_menu_item_picker___lambda359_ (WidgetsContextMenuMenuPickerMenuItemPicker* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = self->priv->radio_button;
	_tmp1_ = self->priv->radio_button;
	_tmp2_ = gtk_check_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_check_button_set_active (_tmp0_, !_tmp3_);
	_tmp4_ = self->priv->_value;
	g_signal_emit (self, widgets_context_menu_menu_picker_menu_item_picker_signals[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_SELECTED_SIGNAL], 0, _tmp4_);
}

static void
__widgets_context_menu_menu_picker_menu_item_picker___lambda359__gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                                            gpointer self)
{
	_widgets_context_menu_menu_picker_menu_item_picker___lambda359_ ((WidgetsContextMenuMenuPickerMenuItemPicker*) self);
}

static GObject *
widgets_context_menu_menu_picker_menu_item_picker_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsContextMenuMenuPickerMenuItemPicker * self;
	const gchar* _tmp0_;
	GtkCheckButton* _tmp1_ = NULL;
	GtkCheckButton* _tmp2_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkBox* _tmp4_;
	GtkCheckButton* _tmp5_;
	GtkBox* _tmp6_;
	GtkGestureClick* gesture = NULL;
	GtkGestureClick* _tmp7_;
	GtkCheckButton* _tmp8_;
	GtkGestureClick* _tmp9_;
	GtkEventController* _tmp10_;
	GtkGestureClick* _tmp11_;
	parent_class = G_OBJECT_CLASS (widgets_context_menu_menu_picker_menu_item_picker_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, WidgetsContextMenuMenuPickerMenuItemPicker);
	gtk_widget_add_css_class ((GtkWidget*) self, "border-radius-6");
	gtk_widget_add_css_class ((GtkWidget*) self, "transition");
	_tmp0_ = self->priv->_title;
	_tmp1_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp0_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_widget_set_focus_on_click ((GtkWidget*) _tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->radio_button);
	self->priv->radio_button = _tmp1_;
	_tmp2_ = self->priv->radio_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "checkbutton-label");
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp3_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 3);
	g_object_ref_sink (_tmp3_);
	content_box = _tmp3_;
	_tmp4_ = content_box;
	_tmp5_ = self->priv->radio_button;
	gtk_box_append (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = content_box;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp6_);
	_tmp7_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gesture = _tmp7_;
	_tmp8_ = self->priv->radio_button;
	_tmp9_ = gesture;
	_tmp10_ = _g_object_ref0 ((GtkEventController*) _tmp9_);
	gtk_widget_add_controller ((GtkWidget*) _tmp8_, _tmp10_);
	_tmp11_ = gesture;
	g_signal_connect_object (_tmp11_, "pressed", (GCallback) __widgets_context_menu_menu_picker_menu_item_picker___lambda358__gtk_gesture_click_pressed, self, 0);
	g_signal_connect_object ((GtkListBoxRow*) self, "activate", (GCallback) __widgets_context_menu_menu_picker_menu_item_picker___lambda359__gtk_list_box_row_activate, self, 0);
	_g_object_unref0 (gesture);
	_g_object_unref0 (content_box);
	return obj;
}

static void
widgets_context_menu_menu_picker_menu_item_picker_class_init (WidgetsContextMenuMenuPickerMenuItemPickerClass * klass,
                                                              gpointer klass_data)
{
	widgets_context_menu_menu_picker_menu_item_picker_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsContextMenuMenuPickerMenuItemPicker_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_context_menu_menu_picker_menu_item_picker_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_context_menu_menu_picker_menu_item_picker_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_context_menu_menu_picker_menu_item_picker_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_context_menu_menu_picker_menu_item_picker_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_GROUP_PROPERTY, widgets_context_menu_menu_picker_menu_item_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_GROUP_PROPERTY] = g_param_spec_object ("group", "group", "group", gtk_check_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	widgets_context_menu_menu_picker_menu_item_picker_signals[WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_SELECTED_SIGNAL] = g_signal_new ("selected", WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
widgets_context_menu_menu_picker_menu_item_picker_instance_init (WidgetsContextMenuMenuPickerMenuItemPicker * self,
                                                                 gpointer klass)
{
	self->priv = widgets_context_menu_menu_picker_menu_item_picker_get_instance_private (self);
}

static void
widgets_context_menu_menu_picker_menu_item_picker_finalize (GObject * obj)
{
	WidgetsContextMenuMenuPickerMenuItemPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, WidgetsContextMenuMenuPickerMenuItemPicker);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_value);
	_g_object_unref0 (self->priv->radio_button);
	G_OBJECT_CLASS (widgets_context_menu_menu_picker_menu_item_picker_parent_class)->finalize (obj);
}

static GType
widgets_context_menu_menu_picker_menu_item_picker_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsContextMenuMenuPickerMenuItemPickerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_context_menu_menu_picker_menu_item_picker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsContextMenuMenuPickerMenuItemPicker), 0, (GInstanceInitFunc) widgets_context_menu_menu_picker_menu_item_picker_instance_init, NULL };
	GType widgets_context_menu_menu_picker_menu_item_picker_type_id;
	widgets_context_menu_menu_picker_menu_item_picker_type_id = g_type_register_static (gtk_list_box_row_get_type (), "WidgetsContextMenuMenuPickerMenuItemPicker", &g_define_type_info, 0);
	WidgetsContextMenuMenuPickerMenuItemPicker_private_offset = g_type_add_instance_private (widgets_context_menu_menu_picker_menu_item_picker_type_id, sizeof (WidgetsContextMenuMenuPickerMenuItemPickerPrivate));
	return widgets_context_menu_menu_picker_menu_item_picker_type_id;
}

GType
widgets_context_menu_menu_picker_menu_item_picker_get_type (void)
{
	static volatile gsize widgets_context_menu_menu_picker_menu_item_picker_type_id__once = 0;
	if (g_once_init_enter (&widgets_context_menu_menu_picker_menu_item_picker_type_id__once)) {
		GType widgets_context_menu_menu_picker_menu_item_picker_type_id;
		widgets_context_menu_menu_picker_menu_item_picker_type_id = widgets_context_menu_menu_picker_menu_item_picker_get_type_once ();
		g_once_init_leave (&widgets_context_menu_menu_picker_menu_item_picker_type_id__once, widgets_context_menu_menu_picker_menu_item_picker_type_id);
	}
	return widgets_context_menu_menu_picker_menu_item_picker_type_id__once;
}

static void
_vala_widgets_context_menu_menu_picker_menu_item_picker_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	WidgetsContextMenuMenuPickerMenuItemPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, WidgetsContextMenuMenuPickerMenuItemPicker);
	switch (property_id) {
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY:
		g_value_set_string (value, widgets_context_menu_menu_picker_menu_item_picker_get_title (self));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY:
		g_value_set_string (value, widgets_context_menu_menu_picker_menu_item_picker_get_value (self));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY:
		g_value_set_boolean (value, widgets_context_menu_menu_picker_menu_item_picker_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_context_menu_menu_picker_menu_item_picker_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	WidgetsContextMenuMenuPickerMenuItemPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, WidgetsContextMenuMenuPickerMenuItemPicker);
	switch (property_id) {
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_TITLE_PROPERTY:
		widgets_context_menu_menu_picker_menu_item_picker_set_title (self, g_value_get_string (value));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_VALUE_PROPERTY:
		widgets_context_menu_menu_picker_menu_item_picker_set_value (self, g_value_get_string (value));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_ACTIVE_PROPERTY:
		widgets_context_menu_menu_picker_menu_item_picker_set_active (self, g_value_get_boolean (value));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_MENU_ITEM_PICKER_GROUP_PROPERTY:
		widgets_context_menu_menu_picker_menu_item_picker_set_group (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block26Data*
block26_data_ref (Block26Data* _data26_)
{
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}

static void
block26_data_unref (void * _userdata_)
{
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		WidgetsContextMenuMenuPicker* self;
		self = _data26_->self;
		_g_object_unref0 (_data26_->listbox_revealer);
		_g_object_unref0 (_data26_->arrow_icon);
		_g_object_unref0 (self);
		g_slice_free (Block26Data, _data26_);
	}
}

static void
_widgets_context_menu_menu_picker___lambda361_ (Block26Data* _data26_)
{
	WidgetsContextMenuMenuPicker* self;
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkRevealer* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data26_->self;
	_tmp0_ = _data26_->listbox_revealer;
	_tmp1_ = _data26_->listbox_revealer;
	_tmp2_ = gtk_revealer_get_reveal_child (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_revealer_set_reveal_child (_tmp0_, !_tmp3_);
	_tmp4_ = _data26_->listbox_revealer;
	_tmp5_ = gtk_revealer_get_reveal_child (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		GtkImage* _tmp7_;
		_tmp7_ = _data26_->arrow_icon;
		gtk_widget_add_css_class ((GtkWidget*) _tmp7_, "opened");
	} else {
		GtkImage* _tmp8_;
		_tmp8_ = _data26_->arrow_icon;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp8_, "opened");
	}
}

static void
__widgets_context_menu_menu_picker___lambda361__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_widgets_context_menu_menu_picker___lambda361_ (self);
}

static GObject *
widgets_context_menu_menu_picker_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsContextMenuMenuPicker * self;
	Block26Data* _data26_;
	GtkImage* _tmp0_ = NULL;
	GtkImage* _tmp1_;
	GtkWidget* _tmp2_;
	GtkRevealer* _tmp3_ = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_ = NULL;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GThemedIcon* _tmp14_;
	GtkImage* _tmp15_ = NULL;
	GtkImage* _tmp16_;
	GtkImage* _tmp17_;
	GtkBox* end_box = NULL;
	GtkBox* _tmp18_ = NULL;
	GtkBox* _tmp19_;
	GtkLabel* _tmp20_;
	GtkBox* _tmp21_;
	GtkImage* _tmp22_;
	GtkBox* itemselector_grid = NULL;
	GtkBox* _tmp23_ = NULL;
	GtkBox* _tmp24_;
	GtkRevealer* _tmp25_;
	GtkBox* _tmp26_;
	GtkLabel* _tmp27_;
	GtkBox* _tmp28_;
	GtkBox* _tmp29_;
	GtkButton* button = NULL;
	GtkButton* _tmp30_;
	GtkButton* _tmp31_;
	GtkBox* _tmp32_;
	GtkButton* _tmp33_;
	GtkButton* _tmp34_;
	GtkButton* _tmp35_;
	gchar* _tmp36_;
	gchar** _tmp37_;
	GtkListBox* _tmp38_ = NULL;
	GtkListBox* _tmp39_;
	GtkWidget* _tmp40_;
	GtkRevealer* _tmp41_ = NULL;
	GtkBox* main_grid = NULL;
	GtkBox* _tmp42_ = NULL;
	GtkBox* _tmp43_;
	GtkButton* _tmp44_;
	GtkBox* _tmp45_;
	GtkRevealer* _tmp46_;
	GtkBox* _tmp47_;
	GtkButton* _tmp48_;
	parent_class = G_OBJECT_CLASS (widgets_context_menu_menu_picker_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_CONTEXT_MENU_TYPE_MENU_PICKER, WidgetsContextMenuMenuPicker);
	_data26_ = g_slice_new0 (Block26Data);
	_data26_->_ref_count_ = 1;
	_data26_->self = g_object_ref (self);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->menu_icon);
	self->priv->menu_icon = _tmp0_;
	_tmp1_ = self->priv->menu_icon;
	_tmp2_ = _g_object_ref0 ((GtkWidget*) _tmp1_);
	_tmp3_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp3_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_reveal_child (_tmp3_, FALSE);
	gtk_revealer_set_child (_tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->menu_icon_revealer);
	self->priv->menu_icon_revealer = _tmp3_;
	_tmp4_ = self->priv->_icon;
	if (_tmp4_ != NULL) {
		GtkRevealer* _tmp5_;
		GtkImage* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->menu_icon_revealer;
		gtk_revealer_set_reveal_child (_tmp5_, TRUE);
		_tmp6_ = self->priv->menu_icon;
		_tmp7_ = self->priv->_icon;
		g_object_set (_tmp6_, "icon-name", _tmp7_, NULL);
	}
	_tmp8_ = self->priv->_title;
	_tmp9_ = (GtkLabel*) gtk_label_new (_tmp8_);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->menu_title);
	self->priv->menu_title = _tmp9_;
	_tmp10_ = self->priv->menu_title;
	gtk_label_set_use_markup (_tmp10_, TRUE);
	_tmp11_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_ellipsize (_tmp11_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->value_label);
	self->priv->value_label = _tmp11_;
	_tmp12_ = self->priv->value_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp12_, "dimmed");
	_tmp13_ = self->priv->value_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp13_, "caption");
	_tmp14_ = (GThemedIcon*) g_themed_icon_new ("go-next-symbolic");
	_tmp15_ = (GtkImage*) gtk_image_new ();
	g_object_set (_tmp15_, "gicon", (GIcon*) _tmp14_, NULL);
	_g_object_unref0 (_tmp14_);
	gtk_image_set_pixel_size (_tmp15_, 16);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp15_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp15_);
	_data26_->arrow_icon = _tmp15_;
	_tmp16_ = _data26_->arrow_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "transition");
	_tmp17_ = _data26_->arrow_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp17_, "hidden-button");
	_tmp18_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp18_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp18_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp18_);
	end_box = _tmp18_;
	_tmp19_ = end_box;
	_tmp20_ = self->priv->value_label;
	gtk_box_append (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = end_box;
	_tmp22_ = _data26_->arrow_icon;
	gtk_box_append (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp23_, TRUE);
	g_object_ref_sink (_tmp23_);
	itemselector_grid = _tmp23_;
	_tmp24_ = itemselector_grid;
	_tmp25_ = self->priv->menu_icon_revealer;
	gtk_box_append (_tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = itemselector_grid;
	_tmp27_ = self->priv->menu_title;
	gtk_box_append (_tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = itemselector_grid;
	_tmp29_ = end_box;
	gtk_box_append (_tmp28_, (GtkWidget*) _tmp29_);
	_tmp30_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp30_);
	button = _tmp30_;
	_tmp31_ = button;
	_tmp32_ = itemselector_grid;
	gtk_button_set_child (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp33_, "flat");
	_tmp34_ = button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp34_, "transition");
	_tmp35_ = button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp35_, "no-font-bold");
	_tmp36_ = g_strdup ("listbox-background");
	_tmp37_ = g_new0 (gchar*, 1 + 1);
	_tmp37_[0] = _tmp36_;
	_tmp38_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp38_, _tmp37_);
	_tmp37_ = (_vala_array_free (_tmp37_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp38_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp38_;
	_tmp39_ = self->priv->listbox;
	_tmp40_ = _g_object_ref0 ((GtkWidget*) _tmp39_);
	_tmp41_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp41_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp41_, _tmp40_);
	_g_object_unref0 (_tmp40_);
	g_object_ref_sink (_tmp41_);
	_data26_->listbox_revealer = _tmp41_;
	_tmp42_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp42_, TRUE);
	g_object_ref_sink (_tmp42_);
	main_grid = _tmp42_;
	_tmp43_ = main_grid;
	_tmp44_ = button;
	gtk_box_append (_tmp43_, (GtkWidget*) _tmp44_);
	_tmp45_ = main_grid;
	_tmp46_ = _data26_->listbox_revealer;
	gtk_box_append (_tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = main_grid;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp47_);
	_tmp48_ = button;
	g_signal_connect_data (_tmp48_, "clicked", (GCallback) __widgets_context_menu_menu_picker___lambda361__gtk_button_clicked, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
	_g_object_unref0 (main_grid);
	_g_object_unref0 (button);
	_g_object_unref0 (itemselector_grid);
	_g_object_unref0 (end_box);
	block26_data_unref (_data26_);
	_data26_ = NULL;
	return obj;
}

static void
widgets_context_menu_menu_picker_class_init (WidgetsContextMenuMenuPickerClass * klass,
                                             gpointer klass_data)
{
	widgets_context_menu_menu_picker_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsContextMenuMenuPicker_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_context_menu_menu_picker_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_context_menu_menu_picker_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_context_menu_menu_picker_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_context_menu_menu_picker_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY, widgets_context_menu_menu_picker_properties[WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY] = g_param_spec_string ("selected", "selected", "selected", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
widgets_context_menu_menu_picker_instance_init (WidgetsContextMenuMenuPicker * self,
                                                gpointer klass)
{
	GtkCheckButton* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = widgets_context_menu_menu_picker_get_instance_private (self);
	_tmp0_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->group_radio = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, WIDGETS_CONTEXT_MENU_MENU_PICKER_TYPE_MENU_ITEM_PICKER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->item_map = _tmp1_;
}

static void
widgets_context_menu_menu_picker_finalize (GObject * obj)
{
	WidgetsContextMenuMenuPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_CONTEXT_MENU_TYPE_MENU_PICKER, WidgetsContextMenuMenuPicker);
	g_debug ("MenuPicker.vala:56: Destroying - Widgets.ContextMenu.MenuPicker\n");
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_icon);
	_g_object_unref0 (self->priv->menu_icon);
	_g_object_unref0 (self->priv->menu_icon_revealer);
	_g_object_unref0 (self->priv->menu_title);
	_g_object_unref0 (self->priv->value_label);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->group_radio);
	_g_free0 (self->_selected);
	_g_object_unref0 (self->priv->item_map);
	G_OBJECT_CLASS (widgets_context_menu_menu_picker_parent_class)->finalize (obj);
}

static GType
widgets_context_menu_menu_picker_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsContextMenuMenuPickerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_context_menu_menu_picker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsContextMenuMenuPicker), 0, (GInstanceInitFunc) widgets_context_menu_menu_picker_instance_init, NULL };
	GType widgets_context_menu_menu_picker_type_id;
	widgets_context_menu_menu_picker_type_id = g_type_register_static (adw_bin_get_type (), "WidgetsContextMenuMenuPicker", &g_define_type_info, 0);
	WidgetsContextMenuMenuPicker_private_offset = g_type_add_instance_private (widgets_context_menu_menu_picker_type_id, sizeof (WidgetsContextMenuMenuPickerPrivate));
	return widgets_context_menu_menu_picker_type_id;
}

GType
widgets_context_menu_menu_picker_get_type (void)
{
	static volatile gsize widgets_context_menu_menu_picker_type_id__once = 0;
	if (g_once_init_enter (&widgets_context_menu_menu_picker_type_id__once)) {
		GType widgets_context_menu_menu_picker_type_id;
		widgets_context_menu_menu_picker_type_id = widgets_context_menu_menu_picker_get_type_once ();
		g_once_init_leave (&widgets_context_menu_menu_picker_type_id__once, widgets_context_menu_menu_picker_type_id);
	}
	return widgets_context_menu_menu_picker_type_id__once;
}

static void
_vala_widgets_context_menu_menu_picker_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	WidgetsContextMenuMenuPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_CONTEXT_MENU_TYPE_MENU_PICKER, WidgetsContextMenuMenuPicker);
	switch (property_id) {
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY:
		g_value_set_string (value, widgets_context_menu_menu_picker_get_title (self));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY:
		g_value_set_string (value, widgets_context_menu_menu_picker_get_icon (self));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY:
		g_value_set_string (value, widgets_context_menu_menu_picker_get_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_context_menu_menu_picker_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	WidgetsContextMenuMenuPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_CONTEXT_MENU_TYPE_MENU_PICKER, WidgetsContextMenuMenuPicker);
	switch (property_id) {
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_TITLE_PROPERTY:
		widgets_context_menu_menu_picker_set_title (self, g_value_get_string (value));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_ICON_PROPERTY:
		widgets_context_menu_menu_picker_set_icon (self, g_value_get_string (value));
		break;
		case WIDGETS_CONTEXT_MENU_MENU_PICKER_SELECTED_PROPERTY:
		widgets_context_menu_menu_picker_set_selected (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

