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

/*
  This file is part of Dconf Editor

  Dconf Editor 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.

  Dconf Editor 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 Dconf Editor.  If not, see <https://www.gnu.org/licenses/>.
*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_ADAPTATIVE_WIDGET (adaptative_widget_get_type ())
#define ADAPTATIVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADAPTATIVE_WIDGET, AdaptativeWidget))
#define IS_ADAPTATIVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADAPTATIVE_WIDGET))
#define ADAPTATIVE_WIDGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_ADAPTATIVE_WIDGET, AdaptativeWidgetIface))

typedef struct _AdaptativeWidget AdaptativeWidget;
typedef struct _AdaptativeWidgetIface AdaptativeWidgetIface;
typedef enum  {
	ADAPTATIVE_WIDGET_WINDOW_SIZE_START_SIZE,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_USUAL_SIZE,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_QUITE_THIN,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_VERT,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_HZTL,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_BOTH,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_EXTRA_THIN,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_EXTRA_FLAT
} AdaptativeWidgetWindowSize;

#define ADAPTATIVE_WIDGET_TYPE_WINDOW_SIZE (adaptative_widget_window_size_get_type ())

#define TYPE_OVERLAYED_LIST (overlayed_list_get_type ())
#define OVERLAYED_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OVERLAYED_LIST, OverlayedList))
#define OVERLAYED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_OVERLAYED_LIST, OverlayedListClass))
#define IS_OVERLAYED_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OVERLAYED_LIST))
#define IS_OVERLAYED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_OVERLAYED_LIST))
#define OVERLAYED_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_OVERLAYED_LIST, OverlayedListClass))

typedef struct _OverlayedList OverlayedList;
typedef struct _OverlayedListClass OverlayedListClass;
typedef struct _OverlayedListPrivate OverlayedListPrivate;

#define TYPE_MODIFICATIONS_LIST (modifications_list_get_type ())
#define MODIFICATIONS_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MODIFICATIONS_LIST, ModificationsList))
#define MODIFICATIONS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MODIFICATIONS_LIST, ModificationsListClass))
#define IS_MODIFICATIONS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MODIFICATIONS_LIST))
#define IS_MODIFICATIONS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MODIFICATIONS_LIST))
#define MODIFICATIONS_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MODIFICATIONS_LIST, ModificationsListClass))

typedef struct _ModificationsList ModificationsList;
typedef struct _ModificationsListClass ModificationsListClass;
typedef struct _ModificationsListPrivate ModificationsListPrivate;
enum  {
	MODIFICATIONS_LIST_0_PROPERTY,
	MODIFICATIONS_LIST_NUM_PROPERTIES
};
static GParamSpec* modifications_list_properties[MODIFICATIONS_LIST_NUM_PROPERTIES];

#define TYPE_OVERLAYED_LIST_ROW (overlayed_list_row_get_type ())
#define OVERLAYED_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OVERLAYED_LIST_ROW, OverlayedListRow))
#define OVERLAYED_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_OVERLAYED_LIST_ROW, OverlayedListRowClass))
#define IS_OVERLAYED_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OVERLAYED_LIST_ROW))
#define IS_OVERLAYED_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_OVERLAYED_LIST_ROW))
#define OVERLAYED_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_OVERLAYED_LIST_ROW, OverlayedListRowClass))

typedef struct _OverlayedListRow OverlayedListRow;
typedef struct _OverlayedListRowClass OverlayedListRowClass;

#define TYPE_DELAYED_SETTING_VIEW (delayed_setting_view_get_type ())
#define DELAYED_SETTING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELAYED_SETTING_VIEW, DelayedSettingView))
#define DELAYED_SETTING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELAYED_SETTING_VIEW, DelayedSettingViewClass))
#define IS_DELAYED_SETTING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELAYED_SETTING_VIEW))
#define IS_DELAYED_SETTING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELAYED_SETTING_VIEW))
#define DELAYED_SETTING_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELAYED_SETTING_VIEW, DelayedSettingViewClass))

typedef struct _DelayedSettingView DelayedSettingView;
typedef struct _DelayedSettingViewClass DelayedSettingViewClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _Block21Data Block21Data;
typedef struct _Block22Data Block22Data;

struct _AdaptativeWidgetIface {
	GTypeInterface parent_iface;
	void (*set_window_size) (AdaptativeWidget* self, AdaptativeWidgetWindowSize new_size);
};

struct _OverlayedList {
	GtkOverlay parent_instance;
	OverlayedListPrivate * priv;
	GtkListBox* main_list_box;
	GListStore* main_list_store;
	gchar* placeholder_icon;
	gchar* placeholder_text;
	gulong content_changed_handler;
};

struct _OverlayedListClass {
	GtkOverlayClass parent_class;
	void (*reset) (OverlayedList* self);
};

struct _ModificationsList {
	OverlayedList parent_instance;
	ModificationsListPrivate * priv;
};

struct _ModificationsListClass {
	OverlayedListClass parent_class;
};

struct _Block21Data {
	int _ref_count_;
	ModificationsList* self;
	gchar* full_name;
	guint16 context_id;
	GVariant* key_value;
	gboolean is_key_default;
};

struct _Block22Data {
	int _ref_count_;
	ModificationsList* self;
	gchar* full_name;
	GVariant* key_value_or_null;
};

static gpointer modifications_list_parent_class = NULL;

VALA_EXTERN GType adaptative_widget_window_size_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType adaptative_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AdaptativeWidget, g_object_unref)
VALA_EXTERN GType overlayed_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OverlayedList, g_object_unref)
VALA_EXTERN GType modifications_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModificationsList, g_object_unref)
VALA_EXTERN void overlayed_list_reset (OverlayedList* self);
VALA_EXTERN ModificationsList* modifications_list_new (gboolean needs_shadows,
                                           gboolean big_placeholder);
VALA_EXTERN ModificationsList* modifications_list_construct (GType object_type,
                                                 gboolean needs_shadows,
                                                 gboolean big_placeholder);
static void modifications_list_real_reset (OverlayedList* base);
VALA_EXTERN void overlayed_list_scroll_top (OverlayedList* self);
static inline void modifications_list_select_first_row (GtkListBox* main_list_box);
static void modifications_list_delayed_setting_row_update_header (GtkListBoxRow* _row,
                                                           GtkListBoxRow* before);
VALA_EXTERN GType overlayed_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OverlayedListRow, g_object_unref)
VALA_EXTERN GType delayed_setting_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DelayedSettingView, g_object_unref)
VALA_EXTERN const gchar* delayed_setting_view_get_full_name (DelayedSettingView* self);
VALA_EXTERN gchar* model_utils_get_parent_path (const gchar* path);
VALA_EXTERN gchar* modifications_list_get_selected_row_name (ModificationsList* self);
VALA_EXTERN void modifications_list_bind_model (ModificationsList* self,
                                    GListStore* modifications,
                                    GtkListBoxCreateWidgetFunc delayed_setting_row_create,
                                    gpointer delayed_setting_row_create_target);
VALA_EXTERN void modifications_list_gkey_value_push (ModificationsList* self,
                                         const gchar* full_name,
                                         guint16 context_id,
                                         GVariant* key_value,
                                         gboolean is_key_default);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void __lambda89_ (Block21Data* _data21_,
                  GtkWidget* widget);
VALA_EXTERN guint16 delayed_setting_view_get_context_id (DelayedSettingView* self);
VALA_EXTERN void delayed_setting_view_update_gsettings_key_current_value (DelayedSettingView* self,
                                                              GVariant* key_value,
                                                              gboolean is_default);
static void ___lambda89__gtk_callback (GtkWidget* widget,
                                gpointer self);
VALA_EXTERN void modifications_list_dkey_value_push (ModificationsList* self,
                                         const gchar* full_name,
                                         GVariant* key_value_or_null);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void __lambda90_ (Block22Data* _data22_,
                  GtkWidget* widget);
VALA_EXTERN void delayed_setting_view_update_dconf_key_current_value (DelayedSettingView* self,
                                                          GVariant* key_value_or_null);
static void ___lambda90__gtk_callback (GtkWidget* widget,
                                gpointer self);
static GObject * modifications_list_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
VALA_EXTERN void overlayed_list_add_placeholder (OverlayedList* self);
VALA_EXTERN void overlayed_list_set_first_mode_name (OverlayedList* self,
                                         const gchar* value);
VALA_EXTERN void overlayed_list_set_second_mode_name (OverlayedList* self,
                                          const gchar* value);
static void _modifications_list_delayed_setting_row_update_header_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                                            GtkListBoxRow* before,
                                                                                            gpointer self);
static GType modifications_list_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

ModificationsList*
modifications_list_construct (GType object_type,
                              gboolean needs_shadows,
                              gboolean big_placeholder)
{
	ModificationsList * self = NULL;
	self = (ModificationsList*) g_object_new (object_type, "needs-shadows", needs_shadows, "big-placeholder", big_placeholder, NULL);
	return self;
}

ModificationsList*
modifications_list_new (gboolean needs_shadows,
                        gboolean big_placeholder)
{
	return modifications_list_construct (TYPE_MODIFICATIONS_LIST, needs_shadows, big_placeholder);
}

static void
modifications_list_real_reset (OverlayedList* base)
{
	ModificationsList * self;
	GtkListBox* _tmp0_;
	self = (ModificationsList*) base;
	overlayed_list_scroll_top ((OverlayedList*) self);
	_tmp0_ = ((OverlayedList*) self)->main_list_box;
	modifications_list_select_first_row (_tmp0_);
}

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

static void
modifications_list_delayed_setting_row_update_header (GtkListBoxRow* _row,
                                                      GtkListBoxRow* before)
{
	DelayedSettingView* row = NULL;
	DelayedSettingView* _tmp0_;
	gchar* row_key_name = NULL;
	DelayedSettingView* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean add_location_header = FALSE;
	g_return_if_fail (_row != NULL);
	if (!IS_DELAYED_SETTING_VIEW (_row)) {
		g_assert_not_reached ();
	}
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_row, gtk_list_box_row_get_type (), GtkListBoxRow), TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
	row = _tmp0_;
	_tmp1_ = row;
	_tmp2_ = delayed_setting_view_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	row_key_name = _tmp4_;
	add_location_header = FALSE;
	if (before == NULL) {
		add_location_header = TRUE;
	} else {
		gchar* before_key_name = NULL;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gboolean _tmp14_;
		_tmp5_ = delayed_setting_view_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (before, gtk_list_box_row_get_type (), GtkListBoxRow), TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup (_tmp6_);
		before_key_name = _tmp7_;
		_tmp8_ = row_key_name;
		_tmp9_ = model_utils_get_parent_path (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = before_key_name;
		_tmp12_ = model_utils_get_parent_path (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strcmp0 (_tmp10_, _tmp13_) != 0;
		_g_free0 (_tmp13_);
		_g_free0 (_tmp10_);
		if (_tmp14_) {
			add_location_header = TRUE;
		}
		_g_free0 (before_key_name);
	}
	if (add_location_header) {
		GtkGrid* location_header = NULL;
		GtkGrid* _tmp15_;
		GtkGrid* _tmp16_;
		GtkGrid* _tmp17_;
		GtkLabel* location_header_label = NULL;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		GtkLabel* _tmp21_;
		GtkLabel* _tmp22_;
		GtkLabel* _tmp23_;
		GtkLabel* _tmp24_;
		GtkLabel* _tmp25_;
		GtkStyleContext* context = NULL;
		GtkLabel* _tmp26_;
		GtkStyleContext* _tmp27_;
		GtkStyleContext* _tmp28_;
		GtkStyleContext* _tmp29_;
		GtkStyleContext* _tmp30_;
		GtkStyleContext* _tmp31_;
		GtkGrid* _tmp32_;
		GtkLabel* _tmp33_;
		GtkSeparator* separator_header = NULL;
		GtkSeparator* _tmp34_;
		GtkSeparator* _tmp35_;
		GtkGrid* _tmp36_;
		GtkSeparator* _tmp37_;
		DelayedSettingView* _tmp38_;
		GtkGrid* _tmp39_;
		_tmp15_ = (GtkGrid*) gtk_grid_new ();
		g_object_ref_sink (_tmp15_);
		location_header = _tmp15_;
		_tmp16_ = location_header;
		gtk_widget_show ((GtkWidget*) _tmp16_);
		_tmp17_ = location_header;
		gtk_orientable_set_orientation ((GtkOrientable*) _tmp17_, GTK_ORIENTATION_VERTICAL);
		_tmp18_ = row_key_name;
		_tmp19_ = model_utils_get_parent_path (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = (GtkLabel*) gtk_label_new (_tmp20_);
		g_object_ref_sink (_tmp21_);
		_tmp22_ = _tmp21_;
		_g_free0 (_tmp20_);
		location_header_label = _tmp22_;
		_tmp23_ = location_header_label;
		gtk_widget_show ((GtkWidget*) _tmp23_);
		_tmp24_ = location_header_label;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp24_, TRUE);
		_tmp25_ = location_header_label;
		gtk_widget_set_halign ((GtkWidget*) _tmp25_, GTK_ALIGN_START);
		_tmp26_ = location_header_label;
		_tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _tmp26_);
		_tmp28_ = _g_object_ref0 (_tmp27_);
		context = _tmp28_;
		_tmp29_ = context;
		gtk_style_context_add_class (_tmp29_, "dim-label");
		_tmp30_ = context;
		gtk_style_context_add_class (_tmp30_, "bold-label");
		_tmp31_ = context;
		gtk_style_context_add_class (_tmp31_, "list-row-header");
		_tmp32_ = location_header;
		_tmp33_ = location_header_label;
		gtk_container_add ((GtkContainer*) _tmp32_, (GtkWidget*) _tmp33_);
		_tmp34_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp34_);
		separator_header = _tmp34_;
		_tmp35_ = separator_header;
		gtk_widget_show ((GtkWidget*) _tmp35_);
		_tmp36_ = location_header;
		_tmp37_ = separator_header;
		gtk_container_add ((GtkContainer*) _tmp36_, (GtkWidget*) _tmp37_);
		_tmp38_ = row;
		_tmp39_ = location_header;
		gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp38_, (GtkWidget*) _tmp39_);
		_g_object_unref0 (separator_header);
		_g_object_unref0 (context);
		_g_object_unref0 (location_header_label);
		_g_object_unref0 (location_header);
	} else {
		GtkSeparator* separator_header = NULL;
		GtkSeparator* _tmp40_;
		GtkSeparator* _tmp41_;
		DelayedSettingView* _tmp42_;
		GtkSeparator* _tmp43_;
		_tmp40_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp40_);
		separator_header = _tmp40_;
		_tmp41_ = separator_header;
		gtk_widget_show ((GtkWidget*) _tmp41_);
		_tmp42_ = row;
		_tmp43_ = separator_header;
		gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp42_, (GtkWidget*) _tmp43_);
		_g_object_unref0 (separator_header);
	}
	_g_free0 (row_key_name);
	_g_object_unref0 (row);
}

gchar*
modifications_list_get_selected_row_name (ModificationsList* self)
{
	GtkListBoxRow* selected_row = NULL;
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	GtkListBoxRow* _tmp2_;
	GtkListBoxRow* _tmp3_;
	GtkListBoxRow* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = ((OverlayedList*) self)->main_list_box;
	_tmp1_ = gtk_list_box_get_selected_row (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	selected_row = _tmp2_;
	_tmp3_ = selected_row;
	if (_tmp3_ == NULL) {
		result = NULL;
		_g_object_unref0 (selected_row);
		return result;
	}
	_tmp4_ = selected_row;
	_tmp5_ = delayed_setting_view_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_box_row_get_type (), GtkListBoxRow), TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	result = _tmp7_;
	_g_object_unref0 (selected_row);
	return result;
}

void
modifications_list_bind_model (ModificationsList* self,
                               GListStore* modifications,
                               GtkListBoxCreateWidgetFunc delayed_setting_row_create,
                               gpointer delayed_setting_row_create_target)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (modifications != NULL);
	_tmp0_ = ((OverlayedList*) self)->main_list_box;
	gtk_list_box_bind_model (_tmp0_, (GListModel*) modifications, delayed_setting_row_create, delayed_setting_row_create_target, NULL);
	_tmp1_ = ((OverlayedList*) self)->main_list_box;
	modifications_list_select_first_row (_tmp1_);
}

static inline void
modifications_list_select_first_row (GtkListBox* main_list_box)
{
	GtkListBoxRow* first_row = NULL;
	GtkListBoxRow* _tmp0_;
	GtkListBoxRow* _tmp1_;
	GtkListBoxRow* _tmp2_;
	g_return_if_fail (main_list_box != NULL);
	_tmp0_ = gtk_list_box_get_row_at_index (main_list_box, 0);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	first_row = _tmp1_;
	_tmp2_ = first_row;
	if (_tmp2_ != NULL) {
		GtkListBoxRow* _tmp3_;
		_tmp3_ = first_row;
		gtk_list_box_select_row (main_list_box, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_list_box_row_get_type (), GtkListBoxRow));
	}
	_g_object_unref0 (first_row);
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

static Block21Data*
block21_data_ref (Block21Data* _data21_)
{
	g_atomic_int_inc (&_data21_->_ref_count_);
	return _data21_;
}

static void
block21_data_unref (void * _userdata_)
{
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		ModificationsList* self;
		self = _data21_->self;
		_g_free0 (_data21_->full_name);
		_g_variant_unref0 (_data21_->key_value);
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}

static void
__lambda89_ (Block21Data* _data21_,
             GtkWidget* widget)
{
	ModificationsList* self;
	DelayedSettingView* row = NULL;
	DelayedSettingView* _tmp0_;
	gboolean _tmp1_ = FALSE;
	DelayedSettingView* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	self = _data21_->self;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (widget, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
	row = _tmp0_;
	_tmp2_ = row;
	_tmp3_ = delayed_setting_view_get_full_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, _data21_->full_name) == 0) {
		DelayedSettingView* _tmp5_;
		guint16 _tmp6_;
		guint16 _tmp7_;
		_tmp5_ = row;
		_tmp6_ = delayed_setting_view_get_context_id (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ == _data21_->context_id;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		DelayedSettingView* _tmp8_;
		_tmp8_ = row;
		delayed_setting_view_update_gsettings_key_current_value (_tmp8_, _data21_->key_value, _data21_->is_key_default);
	}
	_g_object_unref0 (row);
}

static void
___lambda89__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda89_ (self, widget);
}

void
modifications_list_gkey_value_push (ModificationsList* self,
                                    const gchar* full_name,
                                    guint16 context_id,
                                    GVariant* key_value,
                                    gboolean is_key_default)
{
	Block21Data* _data21_;
	gchar* _tmp0_;
	GVariant* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (full_name != NULL);
	g_return_if_fail (key_value != NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_tmp0_ = g_strdup (full_name);
	_g_free0 (_data21_->full_name);
	_data21_->full_name = _tmp0_;
	_data21_->context_id = context_id;
	_tmp1_ = _g_variant_ref0 (key_value);
	_g_variant_unref0 (_data21_->key_value);
	_data21_->key_value = _tmp1_;
	_data21_->is_key_default = is_key_default;
	_tmp2_ = ((OverlayedList*) self)->main_list_box;
	gtk_container_foreach ((GtkContainer*) _tmp2_, ___lambda89__gtk_callback, _data21_);
	block21_data_unref (_data21_);
	_data21_ = NULL;
}

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		ModificationsList* self;
		self = _data22_->self;
		_g_free0 (_data22_->full_name);
		_g_variant_unref0 (_data22_->key_value_or_null);
		_g_object_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static void
__lambda90_ (Block22Data* _data22_,
             GtkWidget* widget)
{
	ModificationsList* self;
	DelayedSettingView* row = NULL;
	DelayedSettingView* _tmp0_;
	DelayedSettingView* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	self = _data22_->self;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (widget, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView));
	row = _tmp0_;
	_tmp1_ = row;
	_tmp2_ = delayed_setting_view_get_full_name (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, _data22_->full_name) == 0) {
		DelayedSettingView* _tmp4_;
		_tmp4_ = row;
		delayed_setting_view_update_dconf_key_current_value (_tmp4_, _data22_->key_value_or_null);
	}
	_g_object_unref0 (row);
}

static void
___lambda90__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda90_ (self, widget);
}

void
modifications_list_dkey_value_push (ModificationsList* self,
                                    const gchar* full_name,
                                    GVariant* key_value_or_null)
{
	Block22Data* _data22_;
	gchar* _tmp0_;
	GVariant* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (full_name != NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_data22_->self = g_object_ref (self);
	_tmp0_ = g_strdup (full_name);
	_g_free0 (_data22_->full_name);
	_data22_->full_name = _tmp0_;
	_tmp1_ = _g_variant_ref0 (key_value_or_null);
	_g_variant_unref0 (_data22_->key_value_or_null);
	_data22_->key_value_or_null = _tmp1_;
	_tmp2_ = ((OverlayedList*) self)->main_list_box;
	gtk_container_foreach ((GtkContainer*) _tmp2_, ___lambda90__gtk_callback, _data22_);
	block22_data_unref (_data22_);
	_data22_ = NULL;
}

static void
_modifications_list_delayed_setting_row_update_header_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                                       GtkListBoxRow* before,
                                                                                       gpointer self)
{
	modifications_list_delayed_setting_row_update_header (row, before);
}

static GObject *
modifications_list_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ModificationsList * self;
	GtkStyleContext* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GtkListBox* _tmp3_;
	parent_class = G_OBJECT_CLASS (modifications_list_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MODIFICATIONS_LIST, ModificationsList);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "delayed-list");
	_tmp1_ = g_strdup ("document-open-recent-symbolic");
	_g_free0 (((OverlayedList*) self)->placeholder_icon);
	((OverlayedList*) self)->placeholder_icon = _tmp1_;
	_tmp2_ = g_strdup (_ ("Delayed mode is on\nbut\nno pending changes"));
	_g_free0 (((OverlayedList*) self)->placeholder_text);
	((OverlayedList*) self)->placeholder_text = _tmp2_;
	overlayed_list_add_placeholder ((OverlayedList*) self);
	overlayed_list_set_first_mode_name ((OverlayedList*) self, _ ("Rule all"));
	overlayed_list_set_second_mode_name ((OverlayedList*) self, _ ("Select"));
	_tmp3_ = ((OverlayedList*) self)->main_list_box;
	gtk_list_box_set_header_func (_tmp3_, _modifications_list_delayed_setting_row_update_header_gtk_list_box_update_header_func, NULL, NULL);
	return obj;
}

static void
modifications_list_class_init (ModificationsListClass * klass,
                               gpointer klass_data)
{
	modifications_list_parent_class = g_type_class_peek_parent (klass);
	((OverlayedListClass *) klass)->reset = (void (*) (OverlayedList*)) modifications_list_real_reset;
	G_OBJECT_CLASS (klass)->constructor = modifications_list_constructor;
}

static void
modifications_list_instance_init (ModificationsList * self,
                                  gpointer klass)
{
}

static GType
modifications_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ModificationsListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) modifications_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ModificationsList), 0, (GInstanceInitFunc) modifications_list_instance_init, NULL };
	GType modifications_list_type_id;
	modifications_list_type_id = g_type_register_static (TYPE_OVERLAYED_LIST, "ModificationsList", &g_define_type_info, 0);
	return modifications_list_type_id;
}

GType
modifications_list_get_type (void)
{
	static volatile gsize modifications_list_type_id__once = 0;
	if (g_once_init_enter (&modifications_list_type_id__once)) {
		GType modifications_list_type_id;
		modifications_list_type_id = modifications_list_get_type_once ();
		g_once_init_leave (&modifications_list_type_id__once, modifications_list_type_id);
	}
	return modifications_list_type_id__once;
}

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

