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

/*
* Copyright 2021 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
*/

#include "desktop.h"
#include <glib.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <pango/pango.h>
#include <gtk/gtk.h>
#include <granite-7.h>
#include <float.h>
#include <math.h>
#include <switchboard.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PANTHEON_SHELL_TEXT_0_PROPERTY,
	PANTHEON_SHELL_TEXT_NUM_PROPERTIES
};
static GParamSpec* pantheon_shell_text_properties[PANTHEON_SHELL_TEXT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block2Data Block2Data;
#define __vala_PangoLanguage_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoLanguage_free (var), NULL)))

struct _PantheonShellTextPrivate {
	guint scale_timeout;
};

struct _Block2Data {
	int _ref_count_;
	PantheonShellText* self;
	GtkAdjustment* size_adjustment;
	GSettings* interface_settings;
};

static gint PantheonShellText_private_offset;
static gpointer pantheon_shell_text_parent_class = NULL;

static gboolean pantheon_shell_text_to_fontbutton_fontdesc (GValue* font_desc,
                                                     GVariant* settings_value,
                                                     void* user_data);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static GVariant* pantheon_shell_text_from_fontbutton_fontdesc (GValue* font_desc,
                                                        const GVariantType* expected_type,
                                                        void* user_data);
static PangoFontDescription* _vala_PangoFontDescription_copy (PangoFontDescription* self);
static gboolean pantheon_shell_text_noto_filter_func (GObject* item);
static GObject * pantheon_shell_text_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gboolean _pantheon_shell_text_noto_filter_func_gtk_custom_filter_func (GObject* item,
                                                                       gpointer self);
static PangoLanguage* _vala_PangoLanguage_copy (PangoLanguage* self);
static void _vala_PangoLanguage_free (PangoLanguage* self);
static void _pantheon_shell_text___lambda41_ (Block2Data* _data2_);
static gboolean __lambda42_ (Block2Data* _data2_);
static gboolean ___lambda42__gsource_func (gpointer self);
static void __pantheon_shell_text___lambda41__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                     gpointer self);
static void pantheon_shell_text_finalize (GObject * obj);
static GType pantheon_shell_text_get_type_once (void);

static inline gpointer
pantheon_shell_text_get_instance_private (PantheonShellText* self)
{
	return G_STRUCT_MEMBER_P (self, PantheonShellText_private_offset);
}

PantheonShellText*
pantheon_shell_text_construct (GType object_type)
{
	PantheonShellText * self = NULL;
	GThemedIcon* _tmp0_;
	GThemedIcon* _tmp1_;
	_tmp0_ = (GThemedIcon*) g_themed_icon_new ("preferences-desktop-font");
	_tmp1_ = _tmp0_;
	self = (PantheonShellText*) g_object_new (object_type, "title", _ ("Text"), "icon", _tmp1_, "show-end-title-buttons", TRUE, NULL);
	_g_object_unref0 (_tmp1_);
	return self;
}

PantheonShellText*
pantheon_shell_text_new (void)
{
	return pantheon_shell_text_construct (PANTHEON_SHELL_TYPE_TEXT);
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

static gboolean
pantheon_shell_text_to_fontbutton_fontdesc (GValue* font_desc,
                                            GVariant* settings_value,
                                            void* user_data)
{
	gchar* font = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	PangoFontDescription* desc = NULL;
	PangoFontDescription* _tmp2_;
	gboolean result;
	g_return_val_if_fail (font_desc != NULL, FALSE);
	g_return_val_if_fail (settings_value != NULL, FALSE);
	_tmp0_ = g_variant_get_string (settings_value, NULL);
	_tmp1_ = g_strdup (_tmp0_);
	font = _tmp1_;
	_tmp2_ = pango_font_description_from_string (font);
	desc = _tmp2_;
	g_value_set_boxed (font_desc, desc);
	result = TRUE;
	__vala_PangoFontDescription_free0 (desc);
	_g_free0 (font);
	return result;
}

static PangoFontDescription*
_vala_PangoFontDescription_copy (PangoFontDescription* self)
{
	return g_boxed_copy (pango_font_description_get_type (), self);
}

static gpointer
__vala_PangoFontDescription_copy0 (gpointer self)
{
	return self ? _vala_PangoFontDescription_copy (self) : NULL;
}

static GVariant*
pantheon_shell_text_from_fontbutton_fontdesc (GValue* font_desc,
                                              const GVariantType* expected_type,
                                              void* user_data)
{
	PangoFontDescription* desc = NULL;
	void* _tmp0_;
	PangoFontDescription* _tmp1_;
	gchar* font_string = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GVariant* _tmp6_;
	GVariant* result;
	g_return_val_if_fail (font_desc != NULL, NULL);
	g_return_val_if_fail (expected_type != NULL, NULL);
	_tmp0_ = g_value_get_boxed (font_desc);
	_tmp1_ = __vala_PangoFontDescription_copy0 ((PangoFontDescription*) _tmp0_);
	desc = _tmp1_;
	_tmp2_ = pango_font_description_to_string (desc);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup_printf ("%s %i", _tmp3_, (gint) g_variant_get_int32 ((GVariant*) user_data));
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	font_string = _tmp5_;
	_tmp6_ = g_variant_new_string (font_string);
	g_variant_ref_sink (_tmp6_);
	result = _tmp6_;
	_g_free0 (font_string);
	__vala_PangoFontDescription_free0 (desc);
	return result;
}

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

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gboolean
pantheon_shell_text_noto_filter_func (GObject* item)
{
	PangoFontFamily* font_family = NULL;
	PangoFontFamily* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, pango_font_family_get_type (), PangoFontFamily));
	font_family = _tmp0_;
	_tmp1_ = pango_font_family_get_name (font_family);
	result = !string_contains (_tmp1_, "Noto");
	_g_object_unref0 (font_family);
	return result;
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		PantheonShellText* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->interface_settings);
		_g_object_unref0 (_data2_->size_adjustment);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static gboolean
_pantheon_shell_text_noto_filter_func_gtk_custom_filter_func (GObject* item,
                                                              gpointer self)
{
	gboolean result;
	result = pantheon_shell_text_noto_filter_func (item);
	return result;
}

static PangoLanguage*
_vala_PangoLanguage_copy (PangoLanguage* self)
{
	return g_boxed_copy (pango_language_get_type (), self);
}

static gpointer
__vala_PangoLanguage_copy0 (gpointer self)
{
	return self ? _vala_PangoLanguage_copy (self) : NULL;
}

static void
_vala_PangoLanguage_free (PangoLanguage* self)
{
	g_boxed_free (pango_language_get_type (), self);
}

static gboolean
__lambda42_ (Block2Data* _data2_)
{
	PantheonShellText* self;
	GSettings* _tmp0_;
	GtkAdjustment* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gboolean result;
	self = _data2_->self;
	self->priv->scale_timeout = (guint) 0;
	_tmp0_ = _data2_->interface_settings;
	_tmp1_ = _data2_->size_adjustment;
	_tmp2_ = gtk_adjustment_get_value (_tmp1_);
	_tmp3_ = _tmp2_;
	g_settings_set_double (_tmp0_, "text-scaling-factor", _tmp3_);
	result = FALSE;
	return result;
}

static gboolean
___lambda42__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda42_ (self);
	return result;
}

static void
_pantheon_shell_text___lambda41_ (Block2Data* _data2_)
{
	PantheonShellText* self;
	self = _data2_->self;
	if (self->priv->scale_timeout != ((guint) 0)) {
		g_source_remove (self->priv->scale_timeout);
	}
	self->priv->scale_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, ___lambda42__gsource_func, block2_data_ref (_data2_), block2_data_unref);
}

static void
__pantheon_shell_text___lambda41__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                gpointer self)
{
	_pantheon_shell_text___lambda41_ (self);
}

static GObject *
pantheon_shell_text_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PantheonShellText * self;
	Block2Data* _data2_;
	GtkBoolFilter* mono_filter = NULL;
	GtkPropertyExpression* _tmp0_;
	GtkBoolFilter* _tmp1_;
	GtkCustomFilter* noto_filter = NULL;
	GtkCustomFilter* _tmp2_;
	GtkEveryFilter* mono_font_filter = NULL;
	GtkEveryFilter* _tmp3_;
	GtkEveryFilter* _tmp4_;
	GtkCustomFilter* _tmp5_;
	GtkFilter* _tmp6_;
	GtkEveryFilter* _tmp7_;
	GtkBoolFilter* _tmp8_;
	GtkFilter* _tmp9_;
	GtkFontDialog* default_font_dialog = NULL;
	GtkCustomFilter* _tmp10_;
	GtkFilter* _tmp11_;
	PangoLanguage* _tmp12_;
	PangoLanguage* _tmp13_;
	GtkFontDialog* _tmp14_ = NULL;
	GtkFontDialogButton* default_font_button = NULL;
	GtkFontDialog* _tmp15_;
	GtkFontDialog* _tmp16_;
	GtkFontDialogButton* _tmp17_ = NULL;
	GraniteHeaderLabel* default_font_label = NULL;
	gchar* _tmp18_;
	GtkFontDialogButton* _tmp19_;
	GtkWidget* _tmp20_;
	GraniteHeaderLabel* _tmp21_ = NULL;
	GtkFontDialog* mono_font_dialog = NULL;
	GtkEveryFilter* _tmp22_;
	GtkFilter* _tmp23_;
	GtkFontDialog* _tmp24_ = NULL;
	GtkFontDialogButton* mono_font_button = NULL;
	GtkFontDialog* _tmp25_;
	GtkFontDialog* _tmp26_;
	GtkFontDialogButton* _tmp27_ = NULL;
	GraniteHeaderLabel* mono_font_label = NULL;
	gchar* _tmp28_;
	GtkFontDialogButton* _tmp29_;
	GtkWidget* _tmp30_;
	GraniteHeaderLabel* _tmp31_ = NULL;
	GraniteBox* font_box = NULL;
	GraniteBox* _tmp32_;
	GraniteBox* _tmp33_;
	GraniteHeaderLabel* _tmp34_;
	GraniteBox* _tmp35_;
	GtkFontDialogButton* _tmp36_;
	GraniteBox* _tmp37_;
	GraniteHeaderLabel* _tmp38_;
	GraniteBox* _tmp39_;
	GtkFontDialogButton* _tmp40_;
	GraniteHeaderLabel* size_label = NULL;
	GraniteHeaderLabel* _tmp41_;
	GtkAdjustment* _tmp42_;
	GtkScale* size_scale = NULL;
	GtkAdjustment* _tmp43_;
	GtkScale* _tmp44_ = NULL;
	GtkScale* _tmp45_;
	GtkScale* _tmp46_;
	GtkSpinButton* size_spinbutton = NULL;
	GtkAdjustment* _tmp47_;
	GtkSpinButton* _tmp48_ = NULL;
	GtkGrid* size_grid = NULL;
	GtkGrid* _tmp49_ = NULL;
	GtkGrid* _tmp50_;
	GraniteHeaderLabel* _tmp51_;
	GtkGrid* _tmp52_;
	GtkScale* _tmp53_;
	GtkGrid* _tmp54_;
	GtkSpinButton* _tmp55_;
	GraniteBox* box = NULL;
	GraniteBox* _tmp56_;
	GraniteBox* _tmp57_;
	GraniteBox* _tmp58_;
	GraniteBox* _tmp59_;
	GtkGrid* _tmp60_;
	GraniteBox* _tmp61_;
	GSettings* _tmp62_;
	GSettings* _tmp63_;
	GtkAdjustment* _tmp64_;
	GtkAdjustment* _tmp65_;
	GSettings* _tmp66_;
	GtkFontDialogButton* _tmp67_;
	GVariant* _tmp68_;
	GSettings* _tmp69_;
	GtkFontDialogButton* _tmp70_;
	GVariant* _tmp71_;
	parent_class = G_OBJECT_CLASS (pantheon_shell_text_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PANTHEON_SHELL_TYPE_TEXT, PantheonShellText);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = (GtkPropertyExpression*) gtk_property_expression_new (pango_font_family_get_type (), NULL, "is-monospace");
	_tmp1_ = gtk_bool_filter_new ((GtkExpression*) _tmp0_);
	mono_filter = _tmp1_;
	_tmp2_ = gtk_custom_filter_new (_pantheon_shell_text_noto_filter_func_gtk_custom_filter_func, NULL, NULL);
	noto_filter = _tmp2_;
	_tmp3_ = gtk_every_filter_new ();
	mono_font_filter = _tmp3_;
	_tmp4_ = mono_font_filter;
	_tmp5_ = noto_filter;
	_tmp6_ = _g_object_ref0 ((GtkFilter*) _tmp5_);
	gtk_multi_filter_append ((GtkMultiFilter*) _tmp4_, _tmp6_);
	_tmp7_ = mono_font_filter;
	_tmp8_ = mono_filter;
	_tmp9_ = _g_object_ref0 ((GtkFilter*) _tmp8_);
	gtk_multi_filter_append ((GtkMultiFilter*) _tmp7_, _tmp9_);
	_tmp10_ = noto_filter;
	_tmp11_ = _g_object_ref0 ((GtkFilter*) _tmp10_);
	_tmp12_ = pango_language_get_default ();
	_tmp13_ = __vala_PangoLanguage_copy0 (_tmp12_);
	_tmp14_ = gtk_font_dialog_new ();
	gtk_font_dialog_set_filter (_tmp14_, _tmp11_);
	_g_object_unref0 (_tmp11_);
	gtk_font_dialog_set_language (_tmp14_, _tmp13_);
	__vala_PangoLanguage_free0 (_tmp13_);
	default_font_dialog = _tmp14_;
	_tmp15_ = default_font_dialog;
	_tmp16_ = _g_object_ref0 (_tmp15_);
	_tmp17_ = (GtkFontDialogButton*) gtk_font_dialog_button_new (_tmp16_);
	gtk_font_dialog_button_set_use_font (_tmp17_, TRUE);
	gtk_font_dialog_button_set_use_size (_tmp17_, TRUE);
	gtk_font_dialog_button_set_level (_tmp17_, GTK_FONT_LEVEL_FAMILY);
	g_object_ref_sink (_tmp17_);
	default_font_button = _tmp17_;
	_tmp18_ = g_strdup (_ ("The default font used throughout the operating system."));
	_tmp19_ = default_font_button;
	_tmp20_ = _g_object_ref0 ((GtkWidget*) _tmp19_);
	_tmp21_ = granite_header_label_new (_ ("Interface Font"));
	granite_header_label_set_secondary_text (_tmp21_, _tmp18_);
	_g_free0 (_tmp18_);
	granite_header_label_set_mnemonic_widget (_tmp21_, _tmp20_);
	_g_object_unref0 (_tmp20_);
	g_object_ref_sink (_tmp21_);
	default_font_label = _tmp21_;
	_tmp22_ = mono_font_filter;
	_tmp23_ = _g_object_ref0 ((GtkFilter*) _tmp22_);
	_tmp24_ = gtk_font_dialog_new ();
	gtk_font_dialog_set_filter (_tmp24_, _tmp23_);
	_g_object_unref0 (_tmp23_);
	mono_font_dialog = _tmp24_;
	_tmp25_ = mono_font_dialog;
	_tmp26_ = _g_object_ref0 (_tmp25_);
	_tmp27_ = (GtkFontDialogButton*) gtk_font_dialog_button_new (_tmp26_);
	gtk_font_dialog_button_set_use_font (_tmp27_, TRUE);
	gtk_font_dialog_button_set_use_size (_tmp27_, TRUE);
	gtk_font_dialog_button_set_level (_tmp27_, GTK_FONT_LEVEL_FAMILY);
	g_object_ref_sink (_tmp27_);
	mono_font_button = _tmp27_;
	_tmp28_ = g_strdup (_ ("Used in Code and Terminal for example."));
	_tmp29_ = mono_font_button;
	_tmp30_ = _g_object_ref0 ((GtkWidget*) _tmp29_);
	_tmp31_ = granite_header_label_new (_ ("Monospace Font"));
	granite_header_label_set_secondary_text (_tmp31_, _tmp28_);
	_g_free0 (_tmp28_);
	granite_header_label_set_mnemonic_widget (_tmp31_, _tmp30_);
	_g_object_unref0 (_tmp30_);
	g_object_ref_sink (_tmp31_);
	mono_font_label = _tmp31_;
	_tmp32_ = granite_box_new (GTK_ORIENTATION_VERTICAL, GRANITE_BOX_SPACING_HALF);
	g_object_ref_sink (_tmp32_);
	font_box = _tmp32_;
	_tmp33_ = font_box;
	_tmp34_ = default_font_label;
	gtk_box_append ((GtkBox*) _tmp33_, (GtkWidget*) _tmp34_);
	_tmp35_ = font_box;
	_tmp36_ = default_font_button;
	gtk_box_append ((GtkBox*) _tmp35_, (GtkWidget*) _tmp36_);
	_tmp37_ = font_box;
	_tmp38_ = mono_font_label;
	gtk_box_append ((GtkBox*) _tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = font_box;
	_tmp40_ = mono_font_button;
	gtk_box_append ((GtkBox*) _tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = granite_header_label_new (_ ("Size"));
	g_object_ref_sink (_tmp41_);
	size_label = _tmp41_;
	_tmp42_ = gtk_adjustment_new ((gdouble) -1, 0.75, 1.5, 0.05, (gdouble) 0, (gdouble) 0);
	g_object_ref_sink (_tmp42_);
	_data2_->size_adjustment = _tmp42_;
	_tmp43_ = _data2_->size_adjustment;
	_tmp44_ = (GtkScale*) gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, _tmp43_);
	gtk_scale_set_draw_value (_tmp44_, FALSE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp44_, TRUE);
	g_object_ref_sink (_tmp44_);
	size_scale = _tmp44_;
	_tmp45_ = size_scale;
	gtk_scale_add_mark (_tmp45_, (gdouble) 1, GTK_POS_TOP, NULL);
	_tmp46_ = size_scale;
	gtk_scale_add_mark (_tmp46_, 1.25, GTK_POS_TOP, NULL);
	_tmp47_ = _data2_->size_adjustment;
	_tmp48_ = (GtkSpinButton*) gtk_spin_button_new (_tmp47_, 0.25, (guint) 2);
	gtk_widget_set_valign ((GtkWidget*) _tmp48_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp48_);
	size_spinbutton = _tmp48_;
	_tmp49_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp49_, 12);
	g_object_ref_sink (_tmp49_);
	size_grid = _tmp49_;
	_tmp50_ = size_grid;
	_tmp51_ = size_label;
	gtk_grid_attach (_tmp50_, (GtkWidget*) _tmp51_, 0, 0, 1, 1);
	_tmp52_ = size_grid;
	_tmp53_ = size_scale;
	gtk_grid_attach (_tmp52_, (GtkWidget*) _tmp53_, 0, 1, 1, 1);
	_tmp54_ = size_grid;
	_tmp55_ = size_spinbutton;
	gtk_grid_attach (_tmp54_, (GtkWidget*) _tmp55_, 1, 1, 1, 1);
	_tmp56_ = granite_box_new (GTK_ORIENTATION_VERTICAL, GRANITE_BOX_SPACING_DOUBLE);
	g_object_ref_sink (_tmp56_);
	box = _tmp56_;
	_tmp57_ = box;
	_tmp58_ = font_box;
	gtk_box_append ((GtkBox*) _tmp57_, (GtkWidget*) _tmp58_);
	_tmp59_ = box;
	_tmp60_ = size_grid;
	gtk_box_append ((GtkBox*) _tmp59_, (GtkWidget*) _tmp60_);
	_tmp61_ = box;
	switchboard_settings_page_set_child ((SwitchboardSettingsPage*) self, (GtkWidget*) _tmp61_);
	_tmp62_ = g_settings_new ("org.gnome.desktop.interface");
	_data2_->interface_settings = _tmp62_;
	_tmp63_ = _data2_->interface_settings;
	_tmp64_ = _data2_->size_adjustment;
	g_settings_bind (_tmp63_, "text-scaling-factor", (GObject*) _tmp64_, "value", G_SETTINGS_BIND_GET);
	_tmp65_ = _data2_->size_adjustment;
	g_signal_connect_data (_tmp65_, "value-changed", (GCallback) __pantheon_shell_text___lambda41__gtk_adjustment_value_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp66_ = _data2_->interface_settings;
	_tmp67_ = default_font_button;
	_tmp68_ = g_variant_new_int32 ((gint32) 9);
	g_variant_ref_sink (_tmp68_);
	g_settings_bind_with_mapping (_tmp66_, "font-name", (GObject*) _tmp67_, "font-desc", G_SETTINGS_BIND_DEFAULT, (GSettingsBindGetMapping) pantheon_shell_text_to_fontbutton_fontdesc, (GSettingsBindSetMapping) pantheon_shell_text_from_fontbutton_fontdesc, _tmp68_, NULL);
	_tmp69_ = _data2_->interface_settings;
	_tmp70_ = mono_font_button;
	_tmp71_ = g_variant_new_int32 ((gint32) 10);
	g_variant_ref_sink (_tmp71_);
	g_settings_bind_with_mapping (_tmp69_, "monospace-font-name", (GObject*) _tmp70_, "font-desc", G_SETTINGS_BIND_DEFAULT, (GSettingsBindGetMapping) pantheon_shell_text_to_fontbutton_fontdesc, (GSettingsBindSetMapping) pantheon_shell_text_from_fontbutton_fontdesc, _tmp71_, NULL);
	_g_object_unref0 (box);
	_g_object_unref0 (size_grid);
	_g_object_unref0 (size_spinbutton);
	_g_object_unref0 (size_scale);
	_g_object_unref0 (size_label);
	_g_object_unref0 (font_box);
	_g_object_unref0 (mono_font_label);
	_g_object_unref0 (mono_font_button);
	_g_object_unref0 (mono_font_dialog);
	_g_object_unref0 (default_font_label);
	_g_object_unref0 (default_font_button);
	_g_object_unref0 (default_font_dialog);
	_g_object_unref0 (mono_font_filter);
	_g_object_unref0 (noto_filter);
	_g_object_unref0 (mono_filter);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return obj;
}

static void
pantheon_shell_text_class_init (PantheonShellTextClass * klass,
                                gpointer klass_data)
{
	pantheon_shell_text_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PantheonShellText_private_offset);
	G_OBJECT_CLASS (klass)->constructor = pantheon_shell_text_constructor;
	G_OBJECT_CLASS (klass)->finalize = pantheon_shell_text_finalize;
}

static void
pantheon_shell_text_instance_init (PantheonShellText * self,
                                   gpointer klass)
{
	self->priv = pantheon_shell_text_get_instance_private (self);
}

static void
pantheon_shell_text_finalize (GObject * obj)
{
	PantheonShellText * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PANTHEON_SHELL_TYPE_TEXT, PantheonShellText);
	G_OBJECT_CLASS (pantheon_shell_text_parent_class)->finalize (obj);
}

static GType
pantheon_shell_text_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PantheonShellTextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pantheon_shell_text_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PantheonShellText), 0, (GInstanceInitFunc) pantheon_shell_text_instance_init, NULL };
	GType pantheon_shell_text_type_id;
	pantheon_shell_text_type_id = g_type_register_static (SWITCHBOARD_TYPE_SETTINGS_PAGE, "PantheonShellText", &g_define_type_info, 0);
	PantheonShellText_private_offset = g_type_add_instance_private (pantheon_shell_text_type_id, sizeof (PantheonShellTextPrivate));
	return pantheon_shell_text_type_id;
}

GType
pantheon_shell_text_get_type (void)
{
	static volatile gsize pantheon_shell_text_type_id__once = 0;
	if (g_once_init_enter (&pantheon_shell_text_type_id__once)) {
		GType pantheon_shell_text_type_id;
		pantheon_shell_text_type_id = pantheon_shell_text_get_type_once ();
		g_once_init_leave (&pantheon_shell_text_type_id__once, pantheon_shell_text_type_id);
	}
	return pantheon_shell_text_type_id__once;
}

