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

/* SPDX-License-Identifier: GPL-3.0-or-later*/

#include "graphs.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>

#define GRAPHS_PAGE_RESOURCE "/se/sjoerd/Graphs/ui/figure-settings-page.ui"
#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  {
	GRAPHS_FIGURE_SETTINGS_0_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	GRAPHS_FIGURE_SETTINGS_DIALOG_0_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_NAVIGATION_VIEW_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_FIGURE_SETTINGS_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_DIALOG_NUM_PROPERTIES
};
static GParamSpec* graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _Block6Data Block6Data;

#define GRAPHS_TYPE_STYLE_PREVIEW (graphs_style_preview_get_type ())
#define GRAPHS_STYLE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAPHS_TYPE_STYLE_PREVIEW, GraphsStylePreview))
#define GRAPHS_STYLE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRAPHS_TYPE_STYLE_PREVIEW, GraphsStylePreviewClass))
#define GRAPHS_IS_STYLE_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAPHS_TYPE_STYLE_PREVIEW))
#define GRAPHS_IS_STYLE_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRAPHS_TYPE_STYLE_PREVIEW))
#define GRAPHS_STYLE_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAPHS_TYPE_STYLE_PREVIEW, GraphsStylePreviewClass))

typedef struct _GraphsStylePreview GraphsStylePreview;
typedef struct _GraphsStylePreviewClass GraphsStylePreviewClass;
typedef struct _Block7Data Block7Data;
enum  {
	GRAPHS_FIGURE_SETTINGS_DIALOG_ENTRY_CHANGE_SIGNAL,
	GRAPHS_FIGURE_SETTINGS_DIALOG_SET_AS_DEFAULT_SIGNAL,
	GRAPHS_FIGURE_SETTINGS_DIALOG_COPY_REQUEST_SIGNAL,
	GRAPHS_FIGURE_SETTINGS_DIALOG_LOAD_STYLE_REQUEST_SIGNAL,
	GRAPHS_FIGURE_SETTINGS_DIALOG_SAVE_STYLE_REQUEST_SIGNAL,
	GRAPHS_FIGURE_SETTINGS_DIALOG_NUM_SIGNALS
};
static guint graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GraphsFigureSettingsPrivate {
	gchar* _title;
	gchar* _bottom_label;
	gchar* _left_label;
	gchar* _top_label;
	gchar* _right_label;
	gint _bottom_scale;
	gint _left_scale;
	gint _top_scale;
	gint _right_scale;
	gboolean _legend;
	gint _legend_position;
	gboolean _use_custom_style;
	gchar* _custom_style;
	gboolean _hide_unselected;
	gdouble _min_bottom;
	gdouble _max_bottom;
	gdouble _min_left;
	gdouble _max_left;
	gdouble _min_top;
	gdouble _max_top;
	gdouble _min_right;
	gdouble _max_right;
	gdouble _min_selected;
	gdouble _max_selected;
};

struct _GraphsFigureSettingsDialogPrivate {
	AdwNavigationView* _navigation_view;
	GtkGridView* _grid_view;
	AdwNavigationPage* _style_overview;
	AdwToastOverlay* _toast_overlay;
	GraphsApplication* _application;
	AdwNavigationPage* _settings_page;
	AdwNavigationPage* _style_editor;
};

struct _Block6Data {
	int _ref_count_;
	GraphsFigureSettingsDialog* self;
	gchar* key;
	AdwEntryRow* entry;
};

struct _Block7Data {
	int _ref_count_;
	GraphsFigureSettingsDialog* self;
	GraphsStyle* style;
};

static gint GraphsFigureSettings_private_offset;
static gpointer graphs_figure_settings_parent_class = NULL;
static gint GraphsFigureSettingsDialog_private_offset;
static gpointer graphs_figure_settings_dialog_parent_class = NULL;

static void _vala_array_add1 (gdouble* * array,
                       gint* length,
                       gint* size,
                       gdouble value);
static void graphs_figure_settings_finalize (GObject * obj);
static GType graphs_figure_settings_get_type_once (void);
static void _vala_graphs_figure_settings_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_graphs_figure_settings_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void graphs_figure_settings_dialog_set_settings_page (GraphsFigureSettingsDialog* self,
                                                      AdwNavigationPage* value);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void ________lambda24_ (Block6Data* _data6_);
static void _________lambda24__g_object_notify (GObject* _sender,
                                         GParamSpec* pspec,
                                         gpointer self);
static void graphs_figure_settings_dialog_on_factory_setup (GraphsFigureSettingsDialog* self,
                                                     GObject* object);
static void _graphs_figure_settings_dialog_on_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                         GObject* object,
                                                                                         gpointer self);
static void graphs_figure_settings_dialog_on_factory_bind (GraphsFigureSettingsDialog* self,
                                                    GObject* object);
static void _graphs_figure_settings_dialog_on_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                       GObject* object,
                                                                                       gpointer self);
static GtkGridView* graphs_figure_settings_dialog_get_grid_view (GraphsFigureSettingsDialog* self);
static void __lambda26_ (GraphsFigureSettingsDialog* self);
static AdwNavigationPage* graphs_figure_settings_dialog_get_style_overview (GraphsFigureSettingsDialog* self);
static void ___lambda26__adw_action_row_activated (AdwActionRow* _sender,
                                            gpointer self);
static void __lambda27_ (GraphsFigureSettingsDialog* self);
static void ___lambda27__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static AdwToastOverlay* graphs_figure_settings_dialog_get_toast_overlay (GraphsFigureSettingsDialog* self);
static void graphs_figure_settings_dialog_on_pop (GraphsFigureSettingsDialog* self,
                                           AdwNavigationPage* page);
static void _graphs_figure_settings_dialog_on_pop_adw_navigation_view_popped (AdwNavigationView* _sender,
                                                                       AdwNavigationPage* page,
                                                                       gpointer self);
static void graphs_figure_settings_dialog_add_style (GraphsFigureSettingsDialog* self);
static void __lambda28_ (GraphsFigureSettingsDialog* self,
                  GraphsAddStyleDialog* d,
                  const gchar* template,
                  const gchar* name);
static void ___lambda28__graphs_add_style_dialog_accept (GraphsAddStyleDialog* _sender,
                                                  const gchar* template,
                                                  const gchar* name,
                                                  gpointer self);
static void _graphs_figure_settings_dialog_add_style_gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self);
VALA_EXTERN GraphsStylePreview* graphs_style_preview_new (void);
VALA_EXTERN GraphsStylePreview* graphs_style_preview_construct (GType object_type);
VALA_EXTERN GType graphs_style_preview_get_type (void) G_GNUC_CONST ;
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
VALA_EXTERN void graphs_style_preview_set_style (GraphsStylePreview* self,
                                     GraphsStyle* value);
VALA_EXTERN GtkButton* graphs_style_preview_get_edit_button (GraphsStylePreview* self);
static void ___lambda25_ (Block7Data* _data7_);
static void ____lambda25__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void graphs_figure_settings_dialog_finalize (GObject * obj);
static GType graphs_figure_settings_dialog_get_type_once (void);
static void _vala_graphs_figure_settings_dialog_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_graphs_figure_settings_dialog_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 gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

VALA_EXTERN const gchar* GRAPHS_LIMIT_NAMES[8];
VALA_EXTERN const gchar* GRAPHS_DIRECTION_NAMES[4];

static inline gpointer
graphs_figure_settings_get_instance_private (GraphsFigureSettings* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsFigureSettings_private_offset);
}

GraphsFigureSettings*
graphs_figure_settings_construct (GType object_type,
                                  GSettings* settings)
{
	GraphsFigureSettings * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	g_return_val_if_fail (settings != NULL, NULL);
	_tmp0_ = g_settings_get_string (settings, "title");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_settings_get_string (settings, "bottom-label");
	_tmp3_ = _tmp2_;
	_tmp4_ = g_settings_get_string (settings, "left-label");
	_tmp5_ = _tmp4_;
	_tmp6_ = g_settings_get_string (settings, "top-label");
	_tmp7_ = _tmp6_;
	_tmp8_ = g_settings_get_string (settings, "right-label");
	_tmp9_ = _tmp8_;
	_tmp10_ = g_settings_get_string (settings, "custom-style");
	_tmp11_ = _tmp10_;
	self = (GraphsFigureSettings*) g_object_new (object_type, "bottom-scale", g_settings_get_enum (settings, "bottom-scale"), "left-scale", g_settings_get_enum (settings, "left-scale"), "right-scale", g_settings_get_enum (settings, "right-scale"), "top-scale", g_settings_get_enum (settings, "top-scale"), "title", _tmp1_, "bottom-label", _tmp3_, "left-label", _tmp5_, "top-label", _tmp7_, "right-label", _tmp9_, "legend", g_settings_get_boolean (settings, "legend"), "use-custom-style", g_settings_get_boolean (settings, "use-custom-style"), "legend-position", g_settings_get_enum (settings, "legend-position"), "custom-style", _tmp11_, NULL);
	_g_free0 (_tmp11_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	return self;
}

GraphsFigureSettings*
graphs_figure_settings_new (GSettings* settings)
{
	return graphs_figure_settings_construct (GRAPHS_TYPE_FIGURE_SETTINGS, settings);
}

static void
_vala_array_add1 (gdouble* * array,
                  gint* length,
                  gint* size,
                  gdouble value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gdouble, *array, *size);
	}
	(*array)[(*length)++] = value;
}

gdouble*
graphs_figure_settings_get_limits (GraphsFigureSettings* self,
                                   gint* result_length1)
{
	gdouble* limits = NULL;
	gdouble* _tmp0_;
	gint limits_length1;
	gint _limits_size_;
	gdouble* _tmp4_;
	gint _tmp4__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gdouble, 0);
	limits = _tmp0_;
	limits_length1 = 0;
	_limits_size_ = limits_length1;
	{
		const gchar** limit_name_collection = NULL;
		gint limit_name_collection_length1 = 0;
		gint _limit_name_collection_size_ = 0;
		gint limit_name_it = 0;
		limit_name_collection = GRAPHS_LIMIT_NAMES;
		limit_name_collection_length1 = G_N_ELEMENTS (GRAPHS_LIMIT_NAMES);
		for (limit_name_it = 0; limit_name_it < limit_name_collection_length1; limit_name_it = limit_name_it + 1) {
			gchar* _tmp1_;
			gchar* limit_name = NULL;
			_tmp1_ = g_strdup (limit_name_collection[limit_name_it]);
			limit_name = _tmp1_;
			{
				gdouble limit = 0.0;
				const gchar* _tmp2_;
				gdouble _tmp3_ = 0.0;
				_tmp2_ = limit_name;
				g_object_get ((GObject*) self, _tmp2_, &_tmp3_, NULL);
				limit = _tmp3_;
				_vala_array_add1 (&limits, &limits_length1, &_limits_size_, limit);
				_g_free0 (limit_name);
			}
		}
	}
	_tmp4_ = limits;
	_tmp4__length1 = limits_length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}

void
graphs_figure_settings_set_limits (GraphsFigureSettings* self,
                                   gdouble* limits,
                                   gint limits_length1)
{
	g_return_if_fail (self != NULL);
	_vala_return_if_fail (limits_length1 == 8, "limits.length == 8");
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				gdouble _tmp3_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < G_N_ELEMENTS (GRAPHS_LIMIT_NAMES))) {
					break;
				}
				_tmp2_ = GRAPHS_LIMIT_NAMES[i];
				_tmp3_ = limits[i];
				g_object_set ((GObject*) self, _tmp2_, _tmp3_, NULL);
			}
		}
	}
}

void
graphs_figure_settings_set_selection_range (GraphsFigureSettings* self,
                                            gdouble minimum,
                                            gdouble maximum)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = minimum;
	_vala_return_if_fail ((((gdouble) 0) <= _tmp0_) && (_tmp0_ <= ((gdouble) 1)), "0 <= minimum <= 1");
	_tmp1_ = maximum;
	_vala_return_if_fail ((((gdouble) 0) <= _tmp1_) && (_tmp1_ <= ((gdouble) 1)), "0 <= maximum <= 1");
	_vala_return_if_fail (minimum <= maximum, "minimum <= maximum");
	graphs_figure_settings_set_min_selected (self, minimum);
	graphs_figure_settings_set_max_selected (self, maximum);
}

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

void
graphs_figure_settings_set_title (GraphsFigureSettings* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_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, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_bottom_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_bottom_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_bottom_label (GraphsFigureSettings* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_bottom_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_bottom_label);
		self->priv->_bottom_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_left_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_left_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_left_label (GraphsFigureSettings* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_left_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_left_label);
		self->priv->_left_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_top_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_top_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_top_label (GraphsFigureSettings* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_top_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_top_label);
		self->priv->_top_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_right_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_right_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_right_label (GraphsFigureSettings* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_right_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_right_label);
		self->priv->_right_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY]);
	}
}

gint
graphs_figure_settings_get_bottom_scale (GraphsFigureSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_bottom_scale;
	return result;
}

void
graphs_figure_settings_set_bottom_scale (GraphsFigureSettings* self,
                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_bottom_scale (self);
	if (old_value != value) {
		self->priv->_bottom_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY]);
	}
}

gint
graphs_figure_settings_get_left_scale (GraphsFigureSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_left_scale;
	return result;
}

void
graphs_figure_settings_set_left_scale (GraphsFigureSettings* self,
                                       gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_left_scale (self);
	if (old_value != value) {
		self->priv->_left_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY]);
	}
}

gint
graphs_figure_settings_get_top_scale (GraphsFigureSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_top_scale;
	return result;
}

void
graphs_figure_settings_set_top_scale (GraphsFigureSettings* self,
                                      gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_top_scale (self);
	if (old_value != value) {
		self->priv->_top_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY]);
	}
}

gint
graphs_figure_settings_get_right_scale (GraphsFigureSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_right_scale;
	return result;
}

void
graphs_figure_settings_set_right_scale (GraphsFigureSettings* self,
                                        gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_right_scale (self);
	if (old_value != value) {
		self->priv->_right_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_legend (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_legend;
	return result;
}

void
graphs_figure_settings_set_legend (GraphsFigureSettings* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_legend (self);
	if (old_value != value) {
		self->priv->_legend = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY]);
	}
}

gint
graphs_figure_settings_get_legend_position (GraphsFigureSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_legend_position;
	return result;
}

void
graphs_figure_settings_set_legend_position (GraphsFigureSettings* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_legend_position (self);
	if (old_value != value) {
		self->priv->_legend_position = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_use_custom_style (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_use_custom_style;
	return result;
}

void
graphs_figure_settings_set_use_custom_style (GraphsFigureSettings* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_use_custom_style (self);
	if (old_value != value) {
		self->priv->_use_custom_style = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_custom_style (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_custom_style;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_custom_style (GraphsFigureSettings* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_custom_style (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_custom_style);
		self->priv->_custom_style = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_hide_unselected (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_hide_unselected;
	return result;
}

void
graphs_figure_settings_set_hide_unselected (GraphsFigureSettings* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_hide_unselected (self);
	if (old_value != value) {
		self->priv->_hide_unselected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_bottom (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_bottom;
	return result;
}

void
graphs_figure_settings_set_min_bottom (GraphsFigureSettings* self,
                                       gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_bottom (self);
	if (old_value != value) {
		self->priv->_min_bottom = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_bottom (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_bottom;
	return result;
}

void
graphs_figure_settings_set_max_bottom (GraphsFigureSettings* self,
                                       gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_bottom (self);
	if (old_value != value) {
		self->priv->_max_bottom = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_left (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_left;
	return result;
}

void
graphs_figure_settings_set_min_left (GraphsFigureSettings* self,
                                     gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_left (self);
	if (old_value != value) {
		self->priv->_min_left = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_left (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_left;
	return result;
}

void
graphs_figure_settings_set_max_left (GraphsFigureSettings* self,
                                     gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_left (self);
	if (old_value != value) {
		self->priv->_max_left = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_top (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_top;
	return result;
}

void
graphs_figure_settings_set_min_top (GraphsFigureSettings* self,
                                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_top (self);
	if (old_value != value) {
		self->priv->_min_top = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_top (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_top;
	return result;
}

void
graphs_figure_settings_set_max_top (GraphsFigureSettings* self,
                                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_top (self);
	if (old_value != value) {
		self->priv->_max_top = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_right (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_right;
	return result;
}

void
graphs_figure_settings_set_min_right (GraphsFigureSettings* self,
                                      gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_right (self);
	if (old_value != value) {
		self->priv->_min_right = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_right (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_right;
	return result;
}

void
graphs_figure_settings_set_max_right (GraphsFigureSettings* self,
                                      gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_right (self);
	if (old_value != value) {
		self->priv->_max_right = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_selected (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_selected;
	return result;
}

void
graphs_figure_settings_set_min_selected (GraphsFigureSettings* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_selected (self);
	if (old_value != value) {
		self->priv->_min_selected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_selected (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_selected;
	return result;
}

void
graphs_figure_settings_set_max_selected (GraphsFigureSettings* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_selected (self);
	if (old_value != value) {
		self->priv->_max_selected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY]);
	}
}

static void
graphs_figure_settings_class_init (GraphsFigureSettingsClass * klass,
                                   gpointer klass_data)
{
	graphs_figure_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsFigureSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_figure_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_figure_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_figure_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY] = g_param_spec_string ("bottom-label", "bottom-label", "bottom-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY] = g_param_spec_string ("left-label", "left-label", "left-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY] = g_param_spec_string ("top-label", "top-label", "top-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY] = g_param_spec_string ("right-label", "right-label", "right-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY] = g_param_spec_int ("bottom-scale", "bottom-scale", "bottom-scale", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY] = g_param_spec_int ("left-scale", "left-scale", "left-scale", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY] = g_param_spec_int ("top-scale", "top-scale", "top-scale", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY] = g_param_spec_int ("right-scale", "right-scale", "right-scale", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY] = g_param_spec_boolean ("legend", "legend", "legend", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY] = g_param_spec_int ("legend-position", "legend-position", "legend-position", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY] = g_param_spec_boolean ("use-custom-style", "use-custom-style", "use-custom-style", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY] = g_param_spec_string ("custom-style", "custom-style", "custom-style", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY] = g_param_spec_boolean ("hide-unselected", "hide-unselected", "hide-unselected", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY] = g_param_spec_double ("min-bottom", "min-bottom", "min-bottom", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY] = g_param_spec_double ("max-bottom", "max-bottom", "max-bottom", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY] = g_param_spec_double ("min-left", "min-left", "min-left", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY] = g_param_spec_double ("max-left", "max-left", "max-left", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 10, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY] = g_param_spec_double ("min-top", "min-top", "min-top", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY] = g_param_spec_double ("max-top", "max-top", "max-top", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY] = g_param_spec_double ("min-right", "min-right", "min-right", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY] = g_param_spec_double ("max-right", "max-right", "max-right", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 10, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY] = g_param_spec_double ("min-selected", "min-selected", "min-selected", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY] = g_param_spec_double ("max-selected", "max-selected", "max-selected", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_figure_settings_instance_init (GraphsFigureSettings * self,
                                      gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	self->priv = graphs_figure_settings_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_title = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_bottom_label = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->priv->_left_label = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_top_label = _tmp3_;
	_tmp4_ = g_strdup ("");
	self->priv->_right_label = _tmp4_;
	self->priv->_bottom_scale = 0;
	self->priv->_left_scale = 0;
	self->priv->_top_scale = 0;
	self->priv->_right_scale = 0;
	self->priv->_legend = TRUE;
	self->priv->_legend_position = 0;
	self->priv->_use_custom_style = FALSE;
	_tmp5_ = g_strdup ("Adwaita");
	self->priv->_custom_style = _tmp5_;
	self->priv->_hide_unselected = FALSE;
	self->priv->_min_bottom = (gdouble) 0;
	self->priv->_max_bottom = (gdouble) 1;
	self->priv->_min_left = (gdouble) 0;
	self->priv->_max_left = (gdouble) 10;
	self->priv->_min_top = (gdouble) 0;
	self->priv->_max_top = (gdouble) 1;
	self->priv->_min_right = (gdouble) 0;
	self->priv->_max_right = (gdouble) 10;
	self->priv->_min_selected = (gdouble) 0;
	self->priv->_max_selected = (gdouble) 0;
}

static void
graphs_figure_settings_finalize (GObject * obj)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_bottom_label);
	_g_free0 (self->priv->_left_label);
	_g_free0 (self->priv->_top_label);
	_g_free0 (self->priv->_right_label);
	_g_free0 (self->priv->_custom_style);
	G_OBJECT_CLASS (graphs_figure_settings_parent_class)->finalize (obj);
}

/**
     * Figure settings
     */
static GType
graphs_figure_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsFigureSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_figure_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsFigureSettings), 0, (GInstanceInitFunc) graphs_figure_settings_instance_init, NULL };
	GType graphs_figure_settings_type_id;
	graphs_figure_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsFigureSettings", &g_define_type_info, 0);
	GraphsFigureSettings_private_offset = g_type_add_instance_private (graphs_figure_settings_type_id, sizeof (GraphsFigureSettingsPrivate));
	return graphs_figure_settings_type_id;
}

GType
graphs_figure_settings_get_type (void)
{
	static volatile gsize graphs_figure_settings_type_id__once = 0;
	if (g_once_init_enter (&graphs_figure_settings_type_id__once)) {
		GType graphs_figure_settings_type_id;
		graphs_figure_settings_type_id = graphs_figure_settings_get_type_once ();
		g_once_init_leave (&graphs_figure_settings_type_id__once, graphs_figure_settings_type_id);
	}
	return graphs_figure_settings_type_id__once;
}

static void
_vala_graphs_figure_settings_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_title (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_bottom_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_left_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_top_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_right_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY:
		g_value_set_int (value, graphs_figure_settings_get_bottom_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY:
		g_value_set_int (value, graphs_figure_settings_get_left_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY:
		g_value_set_int (value, graphs_figure_settings_get_top_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY:
		g_value_set_int (value, graphs_figure_settings_get_right_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_legend (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY:
		g_value_set_int (value, graphs_figure_settings_get_legend_position (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_use_custom_style (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_custom_style (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_hide_unselected (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_bottom (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_bottom (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_left (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_left (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_top (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_top (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_right (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_right (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_selected (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_figure_settings_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY:
		graphs_figure_settings_set_title (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY:
		graphs_figure_settings_set_bottom_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY:
		graphs_figure_settings_set_left_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY:
		graphs_figure_settings_set_top_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY:
		graphs_figure_settings_set_right_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY:
		graphs_figure_settings_set_bottom_scale (self, g_value_get_int (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY:
		graphs_figure_settings_set_left_scale (self, g_value_get_int (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY:
		graphs_figure_settings_set_top_scale (self, g_value_get_int (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY:
		graphs_figure_settings_set_right_scale (self, g_value_get_int (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY:
		graphs_figure_settings_set_legend (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY:
		graphs_figure_settings_set_legend_position (self, g_value_get_int (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY:
		graphs_figure_settings_set_use_custom_style (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY:
		graphs_figure_settings_set_custom_style (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY:
		graphs_figure_settings_set_hide_unselected (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY:
		graphs_figure_settings_set_min_bottom (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY:
		graphs_figure_settings_set_max_bottom (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY:
		graphs_figure_settings_set_min_left (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY:
		graphs_figure_settings_set_max_left (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY:
		graphs_figure_settings_set_min_top (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY:
		graphs_figure_settings_set_max_top (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY:
		graphs_figure_settings_set_min_right (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY:
		graphs_figure_settings_set_max_right (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY:
		graphs_figure_settings_set_min_selected (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY:
		graphs_figure_settings_set_max_selected (self, g_value_get_double (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
graphs_figure_settings_dialog_get_instance_private (GraphsFigureSettingsDialog* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsFigureSettingsDialog_private_offset);
}

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

static gchar*
string_slice (const gchar* self,
              glong start,
              glong end)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	_tmp4_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
	result = _tmp4_;
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		GraphsFigureSettingsDialog* self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->entry);
		_g_free0 (_data6_->key);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static gchar*
double_to_string (gdouble self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}

static void
________lambda24_ (Block6Data* _data6_)
{
	GraphsFigureSettingsDialog* self;
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	self = _data6_->self;
	_tmp0_ = _data6_->entry;
	_tmp1_ = _data6_->key;
	g_signal_emit (self, graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_ENTRY_CHANGE_SIGNAL], 0, _tmp0_, _tmp1_);
}

static void
_________lambda24__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self)
{
	________lambda24_ (self);
}

static void
_graphs_figure_settings_dialog_on_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                    GObject* object,
                                                                                    gpointer self)
{
	graphs_figure_settings_dialog_on_factory_setup ((GraphsFigureSettingsDialog*) self, object);
}

static void
_graphs_figure_settings_dialog_on_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self)
{
	graphs_figure_settings_dialog_on_factory_bind ((GraphsFigureSettingsDialog*) self, object);
}

static void
__lambda26_ (GraphsFigureSettingsDialog* self)
{
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	_tmp0_ = self->priv->_navigation_view;
	_tmp1_ = self->priv->_style_overview;
	adw_navigation_view_push (_tmp0_, _tmp1_);
}

static void
___lambda26__adw_action_row_activated (AdwActionRow* _sender,
                                       gpointer self)
{
	__lambda26_ ((GraphsFigureSettingsDialog*) self);
}

static void
__lambda27_ (GraphsFigureSettingsDialog* self)
{
	g_signal_emit (self, graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_SET_AS_DEFAULT_SIGNAL], 0);
}

static void
___lambda27__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda27_ ((GraphsFigureSettingsDialog*) self);
}

void
graphs_figure_settings_dialog_setup (GraphsFigureSettingsDialog* self,
                                     const gchar* highlighted)
{
	GraphsFigureSettings* figure_settings = NULL;
	GraphsFigureSettings* _tmp0_;
	GraphsFigureSettings* _tmp1_;
	GraphsFigureSettings* _tmp2_;
	GSettings* settings = NULL;
	GraphsApplication* _tmp3_;
	GSettings* _tmp4_;
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp5_;
	GtkBuilder* _tmp6_;
	GObject* _tmp7_;
	AdwNavigationView* _tmp8_;
	AdwNavigationPage* _tmp9_;
	GSettings* _tmp10_;
	GSettingsSchema* _tmp11_;
	GSettingsSchema* _tmp12_;
	GSettingsSchema* _tmp13_;
	gchar** _tmp14_;
	gchar** _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	gboolean* visible_axes = NULL;
	GraphsApplication* _tmp47_;
	GraphsData* _tmp48_;
	GraphsData* _tmp49_;
	gint _tmp50_ = 0;
	gboolean* _tmp51_;
	gint visible_axes_length1;
	gint _visible_axes_size_;
	gboolean _tmp52_ = FALSE;
	gboolean* _tmp53_;
	gint _tmp53__length1;
	gboolean _tmp54_;
	gboolean both_x = FALSE;
	gboolean _tmp57_ = FALSE;
	gboolean* _tmp58_;
	gint _tmp58__length1;
	gboolean _tmp59_;
	gboolean both_y = FALSE;
	gchar** min_max = NULL;
	gchar* _tmp62_;
	gchar* _tmp63_;
	gchar** _tmp64_;
	gint min_max_length1;
	gint _min_max_size_;
	GtkLabel* style_name = NULL;
	GtkBuilder* _tmp129_;
	GObject* _tmp130_;
	GtkLabel* _tmp131_;
	GraphsStyleManager* style_manager = NULL;
	GraphsApplication* _tmp132_;
	GraphsStyleManager* _tmp133_;
	GraphsStyleManager* _tmp134_;
	GraphsStyleManager* _tmp135_;
	GraphsStyleManager* _tmp136_;
	GtkLabel* _tmp137_;
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp138_;
	GtkSignalListItemFactory* _tmp139_;
	GtkSignalListItemFactory* _tmp140_;
	GtkGridView* _tmp141_;
	GtkSignalListItemFactory* _tmp142_;
	GtkGridView* _tmp143_;
	GraphsStyleManager* _tmp144_;
	GtkSingleSelection* _tmp145_;
	GtkSingleSelection* _tmp146_;
	AdwActionRow* style_row = NULL;
	GtkBuilder* _tmp147_;
	GObject* _tmp148_;
	AdwActionRow* _tmp149_;
	AdwActionRow* _tmp150_;
	GtkButton* button = NULL;
	GtkBuilder* _tmp151_;
	GObject* _tmp152_;
	GtkButton* _tmp153_;
	GtkButton* _tmp154_;
	GraphsApplication* _tmp155_;
	GraphsWindow* _tmp156_;
	GraphsWindow* _tmp157_;
	g_return_if_fail (self != NULL);
	_tmp0_ = graphs_figure_settings_dialog_get_figure_settings (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	figure_settings = _tmp2_;
	_tmp3_ = self->priv->_application;
	_tmp4_ = graphs_application_get_settings_child (_tmp3_, "figure");
	settings = _tmp4_;
	_tmp5_ = gtk_builder_new_from_resource (GRAPHS_PAGE_RESOURCE);
	builder = _tmp5_;
	_tmp6_ = builder;
	_tmp7_ = gtk_builder_get_object (_tmp6_, "settings_page");
	graphs_figure_settings_dialog_set_settings_page (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, adw_navigation_page_get_type (), AdwNavigationPage));
	_tmp8_ = self->priv->_navigation_view;
	_tmp9_ = self->priv->_settings_page;
	adw_navigation_view_push (_tmp8_, _tmp9_);
	_tmp10_ = settings;
	g_object_get (_tmp10_, "settings-schema", &_tmp11_, NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = _tmp12_;
	_tmp15_ = _tmp14_ = g_settings_schema_list_keys (_tmp13_);
	_tmp16_ = _tmp15_;
	_tmp16__length1 = _vala_array_length (_tmp14_);
	_g_settings_schema_unref0 (_tmp13_);
	{
		gchar** key_collection = NULL;
		gint key_collection_length1 = 0;
		gint _key_collection_size_ = 0;
		gint key_it = 0;
		key_collection = _tmp16_;
		key_collection_length1 = _tmp16__length1;
		for (key_it = 0; key_it < key_collection_length1; key_it = key_it + 1) {
			gchar* _tmp17_;
			gchar* key = NULL;
			_tmp17_ = g_strdup (key_collection[key_it]);
			key = _tmp17_;
			{
				const gchar* _tmp18_;
				const gchar* _tmp19_;
				gint _tmp20_;
				gint _tmp21_;
				gchar* _tmp22_;
				gchar* _tmp23_;
				gboolean _tmp24_;
				const gchar* _tmp25_;
				gchar* _tmp26_;
				GObject* object = NULL;
				GtkBuilder* _tmp27_;
				const gchar* _tmp28_;
				GObject* _tmp29_;
				GObject* _tmp30_;
				GObject* _tmp31_;
				_tmp18_ = key;
				_tmp19_ = key;
				_tmp20_ = strlen (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = string_slice (_tmp19_, (glong) -5, (glong) _tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = g_strcmp0 (_tmp23_, "style") == 0;
				_g_free0 (_tmp23_);
				if (_tmp24_) {
					_g_free0 (key);
					continue;
				}
				_tmp25_ = key;
				_tmp26_ = string_replace (_tmp25_, "-", "_");
				_g_free0 (key);
				key = _tmp26_;
				_tmp27_ = builder;
				_tmp28_ = key;
				_tmp29_ = gtk_builder_get_object (_tmp27_, _tmp28_);
				_tmp30_ = _g_object_ref0 (_tmp29_);
				object = _tmp30_;
				_tmp31_ = object;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, adw_entry_row_get_type ())) {
					GraphsFigureSettings* _tmp32_;
					const gchar* _tmp33_;
					GObject* _tmp34_;
					_tmp32_ = figure_settings;
					_tmp33_ = key;
					_tmp34_ = object;
					g_object_bind_property_with_closures ((GObject*) _tmp32_, _tmp33_, _tmp34_, "text", 1 | 2, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
				} else {
					GObject* _tmp35_;
					_tmp35_ = object;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp35_, adw_combo_row_get_type ())) {
						GraphsFigureSettings* _tmp36_;
						const gchar* _tmp37_;
						GObject* _tmp38_;
						_tmp36_ = figure_settings;
						_tmp37_ = key;
						_tmp38_ = object;
						g_object_bind_property_with_closures ((GObject*) _tmp36_, _tmp37_, _tmp38_, "selected", 1 | 2, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
					} else {
						GObject* _tmp39_;
						_tmp39_ = object;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, adw_expander_row_get_type ())) {
							GraphsFigureSettings* _tmp40_;
							const gchar* _tmp41_;
							GObject* _tmp42_;
							_tmp40_ = figure_settings;
							_tmp41_ = key;
							_tmp42_ = object;
							g_object_bind_property_with_closures ((GObject*) _tmp40_, _tmp41_, _tmp42_, "enable-expansion", 1 | 2, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
						} else {
							GObject* _tmp43_;
							_tmp43_ = object;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, adw_switch_row_get_type ())) {
								GraphsFigureSettings* _tmp44_;
								const gchar* _tmp45_;
								GObject* _tmp46_;
								_tmp44_ = figure_settings;
								_tmp45_ = key;
								_tmp46_ = object;
								g_object_bind_property_with_closures ((GObject*) _tmp44_, _tmp45_, _tmp46_, "active", 1 | 2, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
							} else {
								g_assert_not_reached ();
							}
						}
					}
				}
				_g_object_unref0 (object);
				_g_free0 (key);
			}
		}
		key_collection = (_vala_array_free (key_collection, key_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp47_ = self->priv->_application;
	_tmp48_ = graphs_application_get_data (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp51_ = graphs_data_get_used_positions (_tmp49_, &_tmp50_);
	visible_axes = _tmp51_;
	visible_axes_length1 = _tmp50_;
	_visible_axes_size_ = visible_axes_length1;
	_tmp53_ = visible_axes;
	_tmp53__length1 = visible_axes_length1;
	_tmp54_ = _tmp53_[0];
	if (_tmp54_) {
		gboolean* _tmp55_;
		gint _tmp55__length1;
		gboolean _tmp56_;
		_tmp55_ = visible_axes;
		_tmp55__length1 = visible_axes_length1;
		_tmp56_ = _tmp55_[1];
		_tmp52_ = _tmp56_;
	} else {
		_tmp52_ = FALSE;
	}
	both_x = _tmp52_;
	_tmp58_ = visible_axes;
	_tmp58__length1 = visible_axes_length1;
	_tmp59_ = _tmp58_[2];
	if (_tmp59_) {
		gboolean* _tmp60_;
		gint _tmp60__length1;
		gboolean _tmp61_;
		_tmp60_ = visible_axes;
		_tmp60__length1 = visible_axes_length1;
		_tmp61_ = _tmp60_[3];
		_tmp57_ = _tmp61_;
	} else {
		_tmp57_ = FALSE;
	}
	both_y = _tmp57_;
	_tmp62_ = g_strdup ("min");
	_tmp63_ = g_strdup ("max");
	_tmp64_ = g_new0 (gchar*, 2 + 1);
	_tmp64_[0] = _tmp62_;
	_tmp64_[1] = _tmp63_;
	min_max = _tmp64_;
	min_max_length1 = 2;
	_min_max_size_ = min_max_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp65_ = FALSE;
			_tmp65_ = TRUE;
			while (TRUE) {
				gchar* direction = NULL;
				const gchar* _tmp67_;
				gchar* _tmp68_;
				gboolean visible = FALSE;
				gboolean* _tmp69_;
				gint _tmp69__length1;
				gboolean _tmp70_;
				gboolean x = FALSE;
				if (!_tmp65_) {
					gint _tmp66_;
					_tmp66_ = i;
					i = _tmp66_ + 1;
				}
				_tmp65_ = FALSE;
				if (!(i < 4)) {
					break;
				}
				_tmp67_ = GRAPHS_DIRECTION_NAMES[i];
				_tmp68_ = g_strdup (_tmp67_);
				direction = _tmp68_;
				_tmp69_ = visible_axes;
				_tmp69__length1 = visible_axes_length1;
				_tmp70_ = _tmp69_[i];
				visible = _tmp70_;
				x = i < 2;
				if (visible) {
					gchar** _tmp71_;
					gint _tmp71__length1;
					AdwComboRow* scale = NULL;
					GtkBuilder* _tmp99_;
					const gchar* _tmp100_;
					gchar* _tmp101_;
					gchar* _tmp102_;
					GObject* _tmp103_;
					AdwComboRow* _tmp104_;
					AdwComboRow* _tmp105_;
					AdwEntryRow* label = NULL;
					GtkBuilder* _tmp106_;
					const gchar* _tmp107_;
					gchar* _tmp108_;
					gchar* _tmp109_;
					GObject* _tmp110_;
					AdwEntryRow* _tmp111_;
					AdwEntryRow* _tmp112_;
					GtkBox* limits = NULL;
					GtkBuilder* _tmp113_;
					const gchar* _tmp114_;
					gchar* _tmp115_;
					gchar* _tmp116_;
					GObject* _tmp117_;
					GtkBox* _tmp118_;
					GtkBox* _tmp119_;
					AdwComboRow* _tmp120_;
					AdwEntryRow* _tmp121_;
					GtkBox* _tmp122_;
					gboolean _tmp123_ = FALSE;
					_tmp71_ = min_max;
					_tmp71__length1 = min_max_length1;
					{
						gchar** s_collection = NULL;
						gint s_collection_length1 = 0;
						gint _s_collection_size_ = 0;
						gint s_it = 0;
						s_collection = _tmp71_;
						s_collection_length1 = _tmp71__length1;
						for (s_it = 0; s_it < s_collection_length1; s_it = s_it + 1) {
							gchar* _tmp72_;
							gchar* s = NULL;
							_tmp72_ = g_strdup (s_collection[s_it]);
							s = _tmp72_;
							{
								Block6Data* _data6_;
								const gchar* _tmp73_;
								gchar* _tmp74_;
								gchar* _tmp75_;
								const gchar* _tmp76_;
								gchar* _tmp77_;
								gchar* _tmp78_;
								GtkBuilder* _tmp79_;
								const gchar* _tmp80_;
								GObject* _tmp81_;
								AdwEntryRow* _tmp82_;
								gdouble val = 0.0;
								GraphsFigureSettings* _tmp83_;
								const gchar* _tmp84_;
								gdouble _tmp85_ = 0.0;
								AdwEntryRow* _tmp86_;
								gchar* _tmp87_;
								gchar* _tmp88_;
								AdwEntryRow* _tmp89_;
								const gchar* _tmp90_;
								_data6_ = g_slice_new0 (Block6Data);
								_data6_->_ref_count_ = 1;
								_data6_->self = g_object_ref (self);
								_tmp73_ = s;
								_tmp74_ = g_strconcat (_tmp73_, "_", NULL);
								_tmp75_ = _tmp74_;
								_tmp76_ = direction;
								_tmp77_ = g_strconcat (_tmp75_, _tmp76_, NULL);
								_tmp78_ = _tmp77_;
								_g_free0 (_tmp75_);
								_data6_->key = _tmp78_;
								_tmp79_ = builder;
								_tmp80_ = _data6_->key;
								_tmp81_ = gtk_builder_get_object (_tmp79_, _tmp80_);
								_tmp82_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, adw_entry_row_get_type (), AdwEntryRow));
								_data6_->entry = _tmp82_;
								_tmp83_ = figure_settings;
								_tmp84_ = _data6_->key;
								g_object_get ((GObject*) _tmp83_, _tmp84_, &_tmp85_, NULL);
								val = _tmp85_;
								_tmp86_ = _data6_->entry;
								_tmp87_ = double_to_string (val);
								_tmp88_ = _tmp87_;
								gtk_editable_set_text ((GtkEditable*) _tmp86_, _tmp88_);
								_g_free0 (_tmp88_);
								_tmp89_ = _data6_->entry;
								g_signal_connect_data ((GObject*) _tmp89_, "notify::text", (GCallback) _________lambda24__g_object_notify, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
								_tmp90_ = s;
								if (g_strcmp0 (_tmp90_, "min") == 0) {
									gboolean _tmp91_ = FALSE;
									if (x) {
										_tmp91_ = !both_x;
									} else {
										_tmp91_ = FALSE;
									}
									if (_tmp91_) {
										AdwEntryRow* _tmp92_;
										_tmp92_ = _data6_->entry;
										adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp92_, _ ("X Axis Minimum"));
									} else {
										gboolean _tmp93_ = FALSE;
										if (!x) {
											_tmp93_ = !both_y;
										} else {
											_tmp93_ = FALSE;
										}
										if (_tmp93_) {
											AdwEntryRow* _tmp94_;
											_tmp94_ = _data6_->entry;
											adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp94_, _ ("Y Axis Minimum"));
										}
									}
								} else {
									gboolean _tmp95_ = FALSE;
									if (x) {
										_tmp95_ = !both_x;
									} else {
										_tmp95_ = FALSE;
									}
									if (_tmp95_) {
										AdwEntryRow* _tmp96_;
										_tmp96_ = _data6_->entry;
										adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp96_, _ ("X Axis Maximum"));
									} else {
										gboolean _tmp97_ = FALSE;
										if (!x) {
											_tmp97_ = !both_y;
										} else {
											_tmp97_ = FALSE;
										}
										if (_tmp97_) {
											AdwEntryRow* _tmp98_;
											_tmp98_ = _data6_->entry;
											adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp98_, _ ("Y Axis Maximum"));
										}
									}
								}
								_g_free0 (s);
								block6_data_unref (_data6_);
								_data6_ = NULL;
							}
						}
					}
					_tmp99_ = builder;
					_tmp100_ = direction;
					_tmp101_ = g_strconcat (_tmp100_, "_scale", NULL);
					_tmp102_ = _tmp101_;
					_tmp103_ = gtk_builder_get_object (_tmp99_, _tmp102_);
					_tmp104_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp103_, adw_combo_row_get_type (), AdwComboRow));
					_tmp105_ = _tmp104_;
					_g_free0 (_tmp102_);
					scale = _tmp105_;
					_tmp106_ = builder;
					_tmp107_ = direction;
					_tmp108_ = g_strconcat (_tmp107_, "_label", NULL);
					_tmp109_ = _tmp108_;
					_tmp110_ = gtk_builder_get_object (_tmp106_, _tmp109_);
					_tmp111_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, adw_entry_row_get_type (), AdwEntryRow));
					_tmp112_ = _tmp111_;
					_g_free0 (_tmp109_);
					label = _tmp112_;
					_tmp113_ = builder;
					_tmp114_ = direction;
					_tmp115_ = g_strconcat (_tmp114_, "_limits", NULL);
					_tmp116_ = _tmp115_;
					_tmp117_ = gtk_builder_get_object (_tmp113_, _tmp116_);
					_tmp118_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp117_, gtk_box_get_type (), GtkBox));
					_tmp119_ = _tmp118_;
					_g_free0 (_tmp116_);
					limits = _tmp119_;
					_tmp120_ = scale;
					gtk_widget_set_visible ((GtkWidget*) _tmp120_, TRUE);
					_tmp121_ = label;
					gtk_widget_set_visible ((GtkWidget*) _tmp121_, TRUE);
					_tmp122_ = limits;
					gtk_widget_set_visible ((GtkWidget*) _tmp122_, TRUE);
					if (x) {
						_tmp123_ = !both_x;
					} else {
						_tmp123_ = FALSE;
					}
					if (_tmp123_) {
						AdwComboRow* _tmp124_;
						AdwEntryRow* _tmp125_;
						_tmp124_ = scale;
						adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp124_, _ ("X Axis Scale"));
						_tmp125_ = label;
						adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp125_, _ ("X Axis Label"));
					} else {
						gboolean _tmp126_ = FALSE;
						if (!x) {
							_tmp126_ = !both_y;
						} else {
							_tmp126_ = FALSE;
						}
						if (_tmp126_) {
							AdwComboRow* _tmp127_;
							AdwEntryRow* _tmp128_;
							_tmp127_ = scale;
							adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp127_, _ ("Y Axis Scale"));
							_tmp128_ = label;
							adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp128_, _ ("X Axis Label"));
						}
					}
					_g_object_unref0 (limits);
					_g_object_unref0 (label);
					_g_object_unref0 (scale);
				}
				_g_free0 (direction);
			}
		}
	}
	_tmp129_ = builder;
	_tmp130_ = gtk_builder_get_object (_tmp129_, "style_name");
	_tmp131_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp130_, gtk_label_get_type (), GtkLabel));
	style_name = _tmp131_;
	_tmp132_ = self->priv->_application;
	_tmp133_ = graphs_application_get_figure_style_manager (_tmp132_);
	_tmp134_ = _tmp133_;
	_tmp135_ = _g_object_ref0 (_tmp134_);
	style_manager = _tmp135_;
	_tmp136_ = style_manager;
	_tmp137_ = style_name;
	g_object_bind_property_with_closures ((GObject*) _tmp136_, "selected_stylename", (GObject*) _tmp137_, "label", 2, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp138_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp138_;
	_tmp139_ = factory;
	g_signal_connect_object (_tmp139_, "setup", (GCallback) _graphs_figure_settings_dialog_on_factory_setup_gtk_signal_list_item_factory_setup, self, 0);
	_tmp140_ = factory;
	g_signal_connect_object (_tmp140_, "bind", (GCallback) _graphs_figure_settings_dialog_on_factory_bind_gtk_signal_list_item_factory_bind, self, 0);
	_tmp141_ = self->priv->_grid_view;
	_tmp142_ = factory;
	gtk_grid_view_set_factory (_tmp141_, (GtkListItemFactory*) _tmp142_);
	_tmp143_ = self->priv->_grid_view;
	_tmp144_ = style_manager;
	_tmp145_ = graphs_style_manager_get_selection_model (_tmp144_);
	_tmp146_ = _tmp145_;
	gtk_grid_view_set_model (_tmp143_, (GtkSelectionModel*) _tmp146_);
	_tmp147_ = builder;
	_tmp148_ = gtk_builder_get_object (_tmp147_, "style_row");
	_tmp149_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp148_, adw_action_row_get_type (), AdwActionRow));
	style_row = _tmp149_;
	_tmp150_ = style_row;
	g_signal_connect_object (_tmp150_, "activated", (GCallback) ___lambda26__adw_action_row_activated, self, 0);
	_tmp151_ = builder;
	_tmp152_ = gtk_builder_get_object (_tmp151_, "set_as_default");
	_tmp153_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp152_, gtk_button_get_type (), GtkButton));
	button = _tmp153_;
	_tmp154_ = button;
	g_signal_connect_object (_tmp154_, "clicked", (GCallback) ___lambda27__gtk_button_clicked, self, 0);
	_tmp155_ = self->priv->_application;
	_tmp156_ = graphs_application_get_window (_tmp155_);
	_tmp157_ = _tmp156_;
	adw_dialog_present ((AdwDialog*) self, (GtkWidget*) _tmp157_);
	if (highlighted != NULL) {
		GtkWidget* widget = NULL;
		GtkBuilder* _tmp158_;
		GObject* _tmp159_;
		GtkWidget* _tmp160_;
		GtkWidget* _tmp161_;
		_tmp158_ = builder;
		_tmp159_ = gtk_builder_get_object (_tmp158_, highlighted);
		_tmp160_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp159_, gtk_widget_get_type (), GtkWidget));
		widget = _tmp160_;
		_tmp161_ = widget;
		gtk_widget_grab_focus (_tmp161_);
		_g_object_unref0 (widget);
	}
	_g_object_unref0 (button);
	_g_object_unref0 (style_row);
	_g_object_unref0 (factory);
	_g_object_unref0 (style_manager);
	_g_object_unref0 (style_name);
	min_max = (_vala_array_free (min_max, min_max_length1, (GDestroyNotify) g_free), NULL);
	visible_axes = (g_free (visible_axes), NULL);
	_g_object_unref0 (builder);
	_g_object_unref0 (settings);
	_g_object_unref0 (figure_settings);
}

void
graphs_figure_settings_dialog_add_toast_string (GraphsFigureSettingsDialog* self,
                                                const gchar* msg)
{
	AdwToastOverlay* _tmp0_;
	AdwToast* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (msg != NULL);
	_tmp0_ = self->priv->_toast_overlay;
	_tmp1_ = adw_toast_new (msg);
	adw_toast_overlay_add_toast (_tmp0_, _tmp1_);
}

static void
graphs_figure_settings_dialog_on_pop (GraphsFigureSettingsDialog* self,
                                      AdwNavigationPage* page)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (page != NULL);
	_tmp0_ = self->priv->_style_editor;
	if (page == _tmp0_) {
		g_signal_emit (self, graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_SAVE_STYLE_REQUEST_SIGNAL], 0);
	}
}

static void
_graphs_figure_settings_dialog_on_pop_adw_navigation_view_popped (AdwNavigationView* _sender,
                                                                  AdwNavigationPage* page,
                                                                  gpointer self)
{
	graphs_figure_settings_dialog_on_pop ((GraphsFigureSettingsDialog*) self, page);
}

static void
__lambda28_ (GraphsFigureSettingsDialog* self,
             GraphsAddStyleDialog* d,
             const gchar* template,
             const gchar* name)
{
	g_return_if_fail (d != NULL);
	g_return_if_fail (template != NULL);
	g_return_if_fail (name != NULL);
	g_signal_emit (self, graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_COPY_REQUEST_SIGNAL], 0, template, name);
}

static void
___lambda28__graphs_add_style_dialog_accept (GraphsAddStyleDialog* _sender,
                                             const gchar* template,
                                             const gchar* name,
                                             gpointer self)
{
	__lambda28_ ((GraphsFigureSettingsDialog*) self, _sender, template, name);
}

static void
graphs_figure_settings_dialog_add_style (GraphsFigureSettingsDialog* self)
{
	GraphsStyleManager* style_manager = NULL;
	GraphsApplication* _tmp0_;
	GraphsStyleManager* _tmp1_;
	GraphsStyleManager* _tmp2_;
	GraphsStyleManager* _tmp3_;
	GraphsAddStyleDialog* dialog = NULL;
	GraphsAddStyleDialog* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_application;
	_tmp1_ = graphs_application_get_figure_style_manager (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	style_manager = _tmp3_;
	_tmp4_ = graphs_add_style_dialog_new (style_manager, (GtkWidget*) self);
	g_object_ref_sink (_tmp4_);
	dialog = _tmp4_;
	g_signal_connect_object (dialog, "accept", (GCallback) ___lambda28__graphs_add_style_dialog_accept, self, 0);
	_g_object_unref0 (dialog);
	_g_object_unref0 (style_manager);
}

static void
_graphs_figure_settings_dialog_add_style_gtk_button_clicked (GtkButton* _sender,
                                                             gpointer self)
{
	graphs_figure_settings_dialog_add_style ((GraphsFigureSettingsDialog*) self);
}

static void
graphs_figure_settings_dialog_on_factory_setup (GraphsFigureSettingsDialog* self,
                                                GObject* object)
{
	GtkListItem* item = NULL;
	GtkListItem* _tmp0_;
	GraphsStylePreview* _tmp1_;
	GraphsStylePreview* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, gtk_list_item_get_type (), GtkListItem));
	item = _tmp0_;
	_tmp1_ = graphs_style_preview_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	gtk_list_item_set_child (item, (GtkWidget*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (item);
}

static Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		GraphsFigureSettingsDialog* self;
		self = _data7_->self;
		_g_object_unref0 (_data7_->style);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static void
___lambda25_ (Block7Data* _data7_)
{
	GraphsFigureSettingsDialog* self;
	GraphsStyle* _tmp0_;
	AdwNavigationView* _tmp1_;
	AdwNavigationPage* _tmp2_;
	self = _data7_->self;
	_tmp0_ = _data7_->style;
	g_signal_emit (self, graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_LOAD_STYLE_REQUEST_SIGNAL], 0, _tmp0_);
	_tmp1_ = self->priv->_navigation_view;
	_tmp2_ = self->priv->_style_editor;
	adw_navigation_view_push (_tmp1_, _tmp2_);
}

static void
____lambda25__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda25_ (self);
}

static void
graphs_figure_settings_dialog_on_factory_bind (GraphsFigureSettingsDialog* self,
                                               GObject* object)
{
	Block7Data* _data7_;
	GtkListItem* item = NULL;
	GtkListItem* _tmp0_;
	GraphsStylePreview* preview = NULL;
	GtkListItem* _tmp1_;
	GtkWidget* _tmp2_;
	GraphsStylePreview* _tmp3_;
	GtkListItem* _tmp4_;
	GObject* _tmp5_;
	GraphsStyle* _tmp6_;
	GraphsStylePreview* _tmp7_;
	GraphsStyle* _tmp8_;
	gboolean _tmp9_ = FALSE;
	GraphsStyle* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, gtk_list_item_get_type (), GtkListItem));
	item = _tmp0_;
	_tmp1_ = item;
	_tmp2_ = gtk_list_item_get_child (_tmp1_);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GRAPHS_TYPE_STYLE_PREVIEW, GraphsStylePreview));
	preview = _tmp3_;
	_tmp4_ = item;
	_tmp5_ = gtk_list_item_get_item (_tmp4_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GRAPHS_TYPE_STYLE, GraphsStyle));
	_data7_->style = _tmp6_;
	_tmp7_ = preview;
	_tmp8_ = _data7_->style;
	graphs_style_preview_set_style (_tmp7_, _tmp8_);
	_tmp10_ = _data7_->style;
	_tmp11_ = graphs_style_get_mutable (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_) {
		GraphsStylePreview* _tmp13_;
		GtkButton* _tmp14_;
		GtkButton* _tmp15_;
		_tmp13_ = preview;
		_tmp14_ = graphs_style_preview_get_edit_button (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp9_ = !gtk_widget_get_visible ((GtkWidget*) _tmp15_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		GraphsStylePreview* _tmp16_;
		GtkButton* _tmp17_;
		GtkButton* _tmp18_;
		GraphsStylePreview* _tmp19_;
		GtkButton* _tmp20_;
		GtkButton* _tmp21_;
		_tmp16_ = preview;
		_tmp17_ = graphs_style_preview_get_edit_button (_tmp16_);
		_tmp18_ = _tmp17_;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, TRUE);
		_tmp19_ = preview;
		_tmp20_ = graphs_style_preview_get_edit_button (_tmp19_);
		_tmp21_ = _tmp20_;
		g_signal_connect_data (_tmp21_, "clicked", (GCallback) ____lambda25__gtk_button_clicked, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	}
	_g_object_unref0 (preview);
	_g_object_unref0 (item);
	block7_data_unref (_data7_);
	_data7_ = NULL;
}

GraphsFigureSettingsDialog*
graphs_figure_settings_dialog_construct (GType object_type)
{
	GraphsFigureSettingsDialog * self = NULL;
	self = (GraphsFigureSettingsDialog*) g_object_new (object_type, NULL);
	return self;
}

GraphsFigureSettingsDialog*
graphs_figure_settings_dialog_new (void)
{
	return graphs_figure_settings_dialog_construct (GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG);
}

AdwNavigationView*
graphs_figure_settings_dialog_get_navigation_view (GraphsFigureSettingsDialog* self)
{
	AdwNavigationView* result;
	AdwNavigationView* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_navigation_view;
	result = _tmp0_;
	return result;
}

static GtkGridView*
graphs_figure_settings_dialog_get_grid_view (GraphsFigureSettingsDialog* self)
{
	GtkGridView* result;
	GtkGridView* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_grid_view;
	result = _tmp0_;
	return result;
}

static AdwNavigationPage*
graphs_figure_settings_dialog_get_style_overview (GraphsFigureSettingsDialog* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_style_overview;
	result = _tmp0_;
	return result;
}

static AdwToastOverlay*
graphs_figure_settings_dialog_get_toast_overlay (GraphsFigureSettingsDialog* self)
{
	AdwToastOverlay* result;
	AdwToastOverlay* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_toast_overlay;
	result = _tmp0_;
	return result;
}

GraphsApplication*
graphs_figure_settings_dialog_get_application (GraphsFigureSettingsDialog* self)
{
	GraphsApplication* result;
	GraphsApplication* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_application;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_dialog_set_application (GraphsFigureSettingsDialog* self,
                                               GraphsApplication* value)
{
	GraphsApplication* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_dialog_get_application (self);
	if (old_value != value) {
		GraphsApplication* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_application);
		self->priv->_application = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY]);
	}
}

AdwNavigationPage*
graphs_figure_settings_dialog_get_settings_page (GraphsFigureSettingsDialog* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_settings_page;
	result = _tmp0_;
	return result;
}

static void
graphs_figure_settings_dialog_set_settings_page (GraphsFigureSettingsDialog* self,
                                                 AdwNavigationPage* value)
{
	AdwNavigationPage* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_dialog_get_settings_page (self);
	if (old_value != value) {
		AdwNavigationPage* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_settings_page);
		self->priv->_settings_page = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY]);
	}
}

AdwNavigationPage*
graphs_figure_settings_dialog_get_style_editor (GraphsFigureSettingsDialog* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_style_editor;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_dialog_set_style_editor (GraphsFigureSettingsDialog* self,
                                                AdwNavigationPage* value)
{
	AdwNavigationPage* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_dialog_get_style_editor (self);
	if (old_value != value) {
		AdwNavigationPage* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_style_editor);
		self->priv->_style_editor = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY]);
	}
}

GraphsFigureSettings*
graphs_figure_settings_dialog_get_figure_settings (GraphsFigureSettingsDialog* self)
{
	GraphsFigureSettings* result;
	GraphsApplication* _tmp0_;
	GraphsData* _tmp1_;
	GraphsData* _tmp2_;
	GraphsFigureSettings* _tmp3_;
	GraphsFigureSettings* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_application;
	_tmp1_ = graphs_application_get_data (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = graphs_data_get_figure_settings (_tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_;
	return result;
}

static void
g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
graphs_figure_settings_dialog_class_init (GraphsFigureSettingsDialogClass * klass,
                                          gpointer klass_data)
{
	graphs_figure_settings_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsFigureSettingsDialog_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_figure_settings_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_figure_settings_dialog_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_figure_settings_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_DIALOG_NAVIGATION_VIEW_PROPERTY, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_NAVIGATION_VIEW_PROPERTY] = g_param_spec_object ("navigation-view", "navigation-view", "navigation-view", adw_navigation_view_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY] = g_param_spec_object ("application", "application", "application", GRAPHS_TYPE_APPLICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY] = g_param_spec_object ("settings-page", "settings-page", "settings-page", adw_navigation_page_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY] = g_param_spec_object ("style-editor", "style-editor", "style-editor", adw_navigation_page_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_DIALOG_FIGURE_SETTINGS_PROPERTY, graphs_figure_settings_dialog_properties[GRAPHS_FIGURE_SETTINGS_DIALOG_FIGURE_SETTINGS_PROPERTY] = g_param_spec_object ("figure-settings", "figure-settings", "figure-settings", GRAPHS_TYPE_FIGURE_SETTINGS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/se/sjoerd/Graphs/ui/figure-settings-dialog.ui");
	graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_ENTRY_CHANGE_SIGNAL] = g_signal_new ("entry-change", GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2, adw_entry_row_get_type (), G_TYPE_STRING);
	graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_SET_AS_DEFAULT_SIGNAL] = g_signal_new ("set-as-default", GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_COPY_REQUEST_SIGNAL] = g_signal_new ("copy-request", GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
	graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_LOAD_STYLE_REQUEST_SIGNAL] = g_signal_new ("load-style-request", GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GRAPHS_TYPE_STYLE);
	graphs_figure_settings_dialog_signals[GRAPHS_FIGURE_SETTINGS_DIALOG_SAVE_STYLE_REQUEST_SIGNAL] = g_signal_new ("save-style-request", GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "navigation_view", FALSE, GraphsFigureSettingsDialog_private_offset + G_STRUCT_OFFSET (GraphsFigureSettingsDialogPrivate, _navigation_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid_view", FALSE, GraphsFigureSettingsDialog_private_offset + G_STRUCT_OFFSET (GraphsFigureSettingsDialogPrivate, _grid_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "style_overview", FALSE, GraphsFigureSettingsDialog_private_offset + G_STRUCT_OFFSET (GraphsFigureSettingsDialogPrivate, _style_overview));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toast_overlay", FALSE, GraphsFigureSettingsDialog_private_offset + G_STRUCT_OFFSET (GraphsFigureSettingsDialogPrivate, _toast_overlay));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_pop", G_CALLBACK(_graphs_figure_settings_dialog_on_pop_adw_navigation_view_popped));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "add_style", G_CALLBACK(_graphs_figure_settings_dialog_add_style_gtk_button_clicked));
}

static void
graphs_figure_settings_dialog_instance_init (GraphsFigureSettingsDialog * self,
                                             gpointer klass)
{
	self->priv = graphs_figure_settings_dialog_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
graphs_figure_settings_dialog_finalize (GObject * obj)
{
	GraphsFigureSettingsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, GraphsFigureSettingsDialog);
	_g_object_unref0 (self->priv->_application);
	_g_object_unref0 (self->priv->_settings_page);
	_g_object_unref0 (self->priv->_style_editor);
	G_OBJECT_CLASS (graphs_figure_settings_dialog_parent_class)->finalize (obj);
}

/**
     * Figure settings dialog
     */
static GType
graphs_figure_settings_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsFigureSettingsDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_figure_settings_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsFigureSettingsDialog), 0, (GInstanceInitFunc) graphs_figure_settings_dialog_instance_init, NULL };
	GType graphs_figure_settings_dialog_type_id;
	graphs_figure_settings_dialog_type_id = g_type_register_static (adw_dialog_get_type (), "GraphsFigureSettingsDialog", &g_define_type_info, 0);
	GraphsFigureSettingsDialog_private_offset = g_type_add_instance_private (graphs_figure_settings_dialog_type_id, sizeof (GraphsFigureSettingsDialogPrivate));
	return graphs_figure_settings_dialog_type_id;
}

GType
graphs_figure_settings_dialog_get_type (void)
{
	static volatile gsize graphs_figure_settings_dialog_type_id__once = 0;
	if (g_once_init_enter (&graphs_figure_settings_dialog_type_id__once)) {
		GType graphs_figure_settings_dialog_type_id;
		graphs_figure_settings_dialog_type_id = graphs_figure_settings_dialog_get_type_once ();
		g_once_init_leave (&graphs_figure_settings_dialog_type_id__once, graphs_figure_settings_dialog_type_id);
	}
	return graphs_figure_settings_dialog_type_id__once;
}

static void
_vala_graphs_figure_settings_dialog_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GraphsFigureSettingsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, GraphsFigureSettingsDialog);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_DIALOG_NAVIGATION_VIEW_PROPERTY:
		g_value_set_object (value, graphs_figure_settings_dialog_get_navigation_view (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY:
		g_value_set_object (value, graphs_figure_settings_dialog_get_application (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY:
		g_value_set_object (value, graphs_figure_settings_dialog_get_settings_page (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY:
		g_value_set_object (value, graphs_figure_settings_dialog_get_style_editor (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_FIGURE_SETTINGS_PROPERTY:
		g_value_set_object (value, graphs_figure_settings_dialog_get_figure_settings (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_figure_settings_dialog_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GraphsFigureSettingsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS_DIALOG, GraphsFigureSettingsDialog);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_DIALOG_APPLICATION_PROPERTY:
		graphs_figure_settings_dialog_set_application (self, g_value_get_object (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_SETTINGS_PAGE_PROPERTY:
		graphs_figure_settings_dialog_set_settings_page (self, g_value_get_object (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_DIALOG_STYLE_EDITOR_PROPERTY:
		graphs_figure_settings_dialog_set_style_editor (self, g_value_get_object (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 gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

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

