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

/*
 * This file is part of budgie-desktop
 *
 * Copyright Budgie Desktop Developers
 *
 * 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 2 of the License, or
 * (at your option) any later version.
 */

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

#define BUDGIE_SETTINGS_GROUP_APPEARANCE "appearance"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BUDGIE_TYPE_SETTINGS_PAGE (budgie_settings_page_get_type ())
#define BUDGIE_SETTINGS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SETTINGS_PAGE, BudgieSettingsPage))
#define BUDGIE_SETTINGS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SETTINGS_PAGE, BudgieSettingsPageClass))
#define BUDGIE_IS_SETTINGS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SETTINGS_PAGE))
#define BUDGIE_IS_SETTINGS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SETTINGS_PAGE))
#define BUDGIE_SETTINGS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SETTINGS_PAGE, BudgieSettingsPageClass))

typedef struct _BudgieSettingsPage BudgieSettingsPage;
typedef struct _BudgieSettingsPageClass BudgieSettingsPageClass;
typedef struct _BudgieSettingsPagePrivate BudgieSettingsPagePrivate;

#define BUDGIE_TYPE_FONT_PAGE (budgie_font_page_get_type ())
#define BUDGIE_FONT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_FONT_PAGE, BudgieFontPage))
#define BUDGIE_FONT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_FONT_PAGE, BudgieFontPageClass))
#define BUDGIE_IS_FONT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_FONT_PAGE))
#define BUDGIE_IS_FONT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_FONT_PAGE))
#define BUDGIE_FONT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_FONT_PAGE, BudgieFontPageClass))

typedef struct _BudgieFontPage BudgieFontPage;
typedef struct _BudgieFontPageClass BudgieFontPageClass;
typedef struct _BudgieFontPagePrivate BudgieFontPagePrivate;
enum  {
	BUDGIE_FONT_PAGE_0_PROPERTY,
	BUDGIE_FONT_PAGE_NUM_PROPERTIES
};
static GParamSpec* budgie_font_page_properties[BUDGIE_FONT_PAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BUDGIE_TYPE_SETTINGS_GRID (budgie_settings_grid_get_type ())
#define BUDGIE_SETTINGS_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SETTINGS_GRID, BudgieSettingsGrid))
#define BUDGIE_SETTINGS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SETTINGS_GRID, BudgieSettingsGridClass))
#define BUDGIE_IS_SETTINGS_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SETTINGS_GRID))
#define BUDGIE_IS_SETTINGS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SETTINGS_GRID))
#define BUDGIE_SETTINGS_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SETTINGS_GRID, BudgieSettingsGridClass))

typedef struct _BudgieSettingsGrid BudgieSettingsGrid;
typedef struct _BudgieSettingsGridClass BudgieSettingsGridClass;

#define BUDGIE_TYPE_SETTINGS_ROW (budgie_settings_row_get_type ())
#define BUDGIE_SETTINGS_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SETTINGS_ROW, BudgieSettingsRow))
#define BUDGIE_SETTINGS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SETTINGS_ROW, BudgieSettingsRowClass))
#define BUDGIE_IS_SETTINGS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SETTINGS_ROW))
#define BUDGIE_IS_SETTINGS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SETTINGS_ROW))
#define BUDGIE_SETTINGS_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SETTINGS_ROW, BudgieSettingsRowClass))

typedef struct _BudgieSettingsRow BudgieSettingsRow;
typedef struct _BudgieSettingsRowClass BudgieSettingsRowClass;

struct _BudgieSettingsPage {
	GtkBox parent_instance;
	BudgieSettingsPagePrivate * priv;
};

struct _BudgieSettingsPageClass {
	GtkBoxClass parent_class;
};

struct _BudgieFontPage {
	BudgieSettingsPage parent_instance;
	BudgieFontPagePrivate * priv;
};

struct _BudgieFontPageClass {
	BudgieSettingsPageClass parent_class;
};

struct _BudgieFontPagePrivate {
	GtkFontButton* fontbutton_title;
	GtkFontButton* fontbutton_document;
	GtkFontButton* fontbutton_interface;
	GtkFontButton* fontbutton_monospace;
	GtkSpinButton* spinbutton_scaling;
	GtkComboBox* combobox_hinting;
	GtkComboBox* combobox_antialias;
	GSettings* ui_settings;
	GSettings* wm_settings;
};

static gint BudgieFontPage_private_offset;
static gpointer budgie_font_page_parent_class = NULL;

VALA_EXTERN GType budgie_settings_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieSettingsPage, g_object_unref)
VALA_EXTERN GType budgie_font_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieFontPage, g_object_unref)
VALA_EXTERN BudgieFontPage* budgie_font_page_new (void);
VALA_EXTERN BudgieFontPage* budgie_font_page_construct (GType object_type);
VALA_EXTERN GType budgie_settings_grid_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieSettingsGrid, g_object_unref)
VALA_EXTERN BudgieSettingsGrid* budgie_settings_grid_new (void);
VALA_EXTERN BudgieSettingsGrid* budgie_settings_grid_construct (GType object_type);
VALA_EXTERN GType budgie_settings_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieSettingsRow, g_object_unref)
VALA_EXTERN void budgie_settings_grid_add_row (BudgieSettingsGrid* self,
                                   BudgieSettingsRow* row);
VALA_EXTERN BudgieSettingsRow* budgie_settings_row_new (GtkWidget* widget,
                                            const gchar* label,
                                            const gchar* description);
VALA_EXTERN BudgieSettingsRow* budgie_settings_row_construct (GType object_type,
                                                  GtkWidget* widget,
                                                  const gchar* label,
                                                  const gchar* description);
static void budgie_font_page_finalize (GObject * obj);
static GType budgie_font_page_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
budgie_font_page_get_instance_private (BudgieFontPage* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieFontPage_private_offset);
}

BudgieFontPage*
budgie_font_page_construct (GType object_type)
{
	BudgieFontPage * self = NULL;
	BudgieSettingsGrid* grid = NULL;
	BudgieSettingsGrid* _tmp0_;
	BudgieSettingsGrid* _tmp1_;
	GtkSizeGroup* group = NULL;
	GtkSizeGroup* _tmp2_;
	GtkFontButton* _tmp3_;
	BudgieSettingsGrid* _tmp4_;
	GtkFontButton* _tmp5_;
	BudgieSettingsRow* _tmp6_;
	BudgieSettingsRow* _tmp7_;
	GtkSizeGroup* _tmp8_;
	GtkFontButton* _tmp9_;
	GtkFontButton* _tmp10_;
	BudgieSettingsGrid* _tmp11_;
	GtkFontButton* _tmp12_;
	BudgieSettingsRow* _tmp13_;
	BudgieSettingsRow* _tmp14_;
	GtkSizeGroup* _tmp15_;
	GtkFontButton* _tmp16_;
	GtkFontButton* _tmp17_;
	BudgieSettingsGrid* _tmp18_;
	GtkFontButton* _tmp19_;
	BudgieSettingsRow* _tmp20_;
	BudgieSettingsRow* _tmp21_;
	GtkSizeGroup* _tmp22_;
	GtkFontButton* _tmp23_;
	GtkFontButton* _tmp24_;
	BudgieSettingsGrid* _tmp25_;
	GtkFontButton* _tmp26_;
	BudgieSettingsRow* _tmp27_;
	BudgieSettingsRow* _tmp28_;
	GtkSizeGroup* _tmp29_;
	GtkFontButton* _tmp30_;
	GtkSpinButton* _tmp31_;
	BudgieSettingsGrid* _tmp32_;
	GtkSpinButton* _tmp33_;
	BudgieSettingsRow* _tmp34_;
	BudgieSettingsRow* _tmp35_;
	GtkSizeGroup* _tmp36_;
	GtkSpinButton* _tmp37_;
	GtkTreeIter iter = {0};
	GtkComboBox* _tmp38_;
	GtkListStore* hinting_model = NULL;
	GtkListStore* _tmp39_;
	gchar** hinting_display = NULL;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar** _tmp44_;
	gint hinting_display_length1;
	gint _hinting_display_size_;
	static const gchar* hinting_values[4] = {"full", "medium", "slight", "none"};
	GtkComboBox* _tmp54_;
	GtkListStore* _tmp55_;
	GtkComboBox* _tmp56_;
	BudgieSettingsGrid* _tmp57_;
	GtkComboBox* _tmp58_;
	BudgieSettingsRow* _tmp59_;
	BudgieSettingsRow* _tmp60_;
	GtkSizeGroup* _tmp61_;
	GtkComboBox* _tmp62_;
	GtkComboBox* _tmp63_;
	GtkListStore* antialias_model = NULL;
	GtkListStore* _tmp64_;
	gchar** antialias_display = NULL;
	gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	gchar** _tmp68_;
	gint antialias_display_length1;
	gint _antialias_display_size_;
	static const gchar* antialias_values[3] = {"rgba", "grayscale", "none"};
	GtkComboBox* _tmp78_;
	GtkListStore* _tmp79_;
	GtkComboBox* _tmp80_;
	BudgieSettingsGrid* _tmp81_;
	GtkComboBox* _tmp82_;
	BudgieSettingsRow* _tmp83_;
	BudgieSettingsRow* _tmp84_;
	GtkSizeGroup* _tmp85_;
	GtkComboBox* _tmp86_;
	GtkCellRendererText* render = NULL;
	GtkCellRendererText* _tmp87_;
	GtkComboBox* _tmp88_;
	GtkComboBox* _tmp89_;
	GtkComboBox* _tmp90_;
	GtkComboBox* _tmp91_;
	GSettings* _tmp92_;
	GSettings* _tmp93_;
	GSettings* _tmp94_;
	GtkFontButton* _tmp95_;
	GSettings* _tmp96_;
	GtkFontButton* _tmp97_;
	GSettings* _tmp98_;
	GtkFontButton* _tmp99_;
	GSettings* _tmp100_;
	GtkFontButton* _tmp101_;
	GSettings* _tmp102_;
	GtkSpinButton* _tmp103_;
	GSettings* _tmp104_;
	GtkComboBox* _tmp105_;
	GSettings* _tmp106_;
	GtkComboBox* _tmp107_;
	self = (BudgieFontPage*) g_object_new (object_type, "group", BUDGIE_SETTINGS_GROUP_APPEARANCE, "content-id", "fonts", "title", _ ("Fonts"), "display-weight", 2, "icon-name", "preferences-desktop-font", NULL);
	_tmp0_ = budgie_settings_grid_new ();
	g_object_ref_sink (_tmp0_);
	grid = _tmp0_;
	_tmp1_ = grid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp1_);
	_tmp2_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	group = _tmp2_;
	_tmp3_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->fontbutton_title);
	self->priv->fontbutton_title = _tmp3_;
	_tmp4_ = grid;
	_tmp5_ = self->priv->fontbutton_title;
	_tmp6_ = budgie_settings_row_new ((GtkWidget*) _tmp5_, _ ("Window Titles"), _ ("Set the font used in the titlebars of applications."));
	_tmp7_ = _tmp6_;
	budgie_settings_grid_add_row (_tmp4_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = group;
	_tmp9_ = self->priv->fontbutton_title;
	gtk_size_group_add_widget (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->fontbutton_document);
	self->priv->fontbutton_document = _tmp10_;
	_tmp11_ = grid;
	_tmp12_ = self->priv->fontbutton_document;
	_tmp13_ = budgie_settings_row_new ((GtkWidget*) _tmp12_, _ ("Documents"), _ ("Set the display font used by for documents."));
	_tmp14_ = _tmp13_;
	budgie_settings_grid_add_row (_tmp11_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = group;
	_tmp16_ = self->priv->fontbutton_document;
	gtk_size_group_add_widget (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->fontbutton_interface);
	self->priv->fontbutton_interface = _tmp17_;
	_tmp18_ = grid;
	_tmp19_ = self->priv->fontbutton_interface;
	_tmp20_ = budgie_settings_row_new ((GtkWidget*) _tmp19_, _ ("Interface"), _ ("Set the primary font used by application controls."));
	_tmp21_ = _tmp20_;
	budgie_settings_grid_add_row (_tmp18_, _tmp21_);
	_g_object_unref0 (_tmp21_);
	_tmp22_ = group;
	_tmp23_ = self->priv->fontbutton_interface;
	gtk_size_group_add_widget (_tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->fontbutton_monospace);
	self->priv->fontbutton_monospace = _tmp24_;
	_tmp25_ = grid;
	_tmp26_ = self->priv->fontbutton_monospace;
	_tmp27_ = budgie_settings_row_new ((GtkWidget*) _tmp26_, _ ("Monospace"), _ ("Set the fixed-width font used by text dominant applications."));
	_tmp28_ = _tmp27_;
	budgie_settings_grid_add_row (_tmp25_, _tmp28_);
	_g_object_unref0 (_tmp28_);
	_tmp29_ = group;
	_tmp30_ = self->priv->fontbutton_monospace;
	gtk_size_group_add_widget (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = (GtkSpinButton*) gtk_spin_button_new_with_range (0.5, (gdouble) 3, 0.01);
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->spinbutton_scaling);
	self->priv->spinbutton_scaling = _tmp31_;
	_tmp32_ = grid;
	_tmp33_ = self->priv->spinbutton_scaling;
	_tmp34_ = budgie_settings_row_new ((GtkWidget*) _tmp33_, _ ("Text scaling"), _ ("Set the text scaling factor."));
	_tmp35_ = _tmp34_;
	budgie_settings_grid_add_row (_tmp32_, _tmp35_);
	_g_object_unref0 (_tmp35_);
	_tmp36_ = group;
	_tmp37_ = self->priv->spinbutton_scaling;
	gtk_size_group_add_widget (_tmp36_, (GtkWidget*) _tmp37_);
	_tmp38_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp38_);
	_g_object_unref0 (self->priv->combobox_hinting);
	self->priv->combobox_hinting = _tmp38_;
	_tmp39_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	hinting_model = _tmp39_;
	_tmp40_ = g_strdup (_ ("Full"));
	_tmp41_ = g_strdup (_ ("Medium"));
	_tmp42_ = g_strdup (_ ("Slight"));
	_tmp43_ = g_strdup (_ ("None"));
	_tmp44_ = g_new0 (gchar*, 4 + 1);
	_tmp44_[0] = _tmp40_;
	_tmp44_[1] = _tmp41_;
	_tmp44_[2] = _tmp42_;
	_tmp44_[3] = _tmp43_;
	hinting_display = _tmp44_;
	hinting_display_length1 = 4;
	_hinting_display_size_ = hinting_display_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp45_ = FALSE;
			_tmp45_ = TRUE;
			while (TRUE) {
				GtkListStore* _tmp47_;
				GtkTreeIter _tmp48_ = {0};
				GtkListStore* _tmp49_;
				GtkTreeIter _tmp50_;
				const gchar* _tmp51_;
				gchar** _tmp52_;
				gint _tmp52__length1;
				const gchar* _tmp53_;
				if (!_tmp45_) {
					gint _tmp46_;
					_tmp46_ = i;
					i = _tmp46_ + 1;
				}
				_tmp45_ = FALSE;
				if (!(i < G_N_ELEMENTS (hinting_values))) {
					break;
				}
				_tmp47_ = hinting_model;
				gtk_list_store_append (_tmp47_, &_tmp48_);
				iter = _tmp48_;
				_tmp49_ = hinting_model;
				_tmp50_ = iter;
				_tmp51_ = hinting_values[i];
				_tmp52_ = hinting_display;
				_tmp52__length1 = hinting_display_length1;
				_tmp53_ = _tmp52_[i];
				gtk_list_store_set (_tmp49_, &_tmp50_, 0, _tmp51_, 1, _tmp53_, -1, -1);
			}
		}
	}
	_tmp54_ = self->priv->combobox_hinting;
	_tmp55_ = hinting_model;
	gtk_combo_box_set_model (_tmp54_, (GtkTreeModel*) _tmp55_);
	_tmp56_ = self->priv->combobox_hinting;
	gtk_combo_box_set_id_column (_tmp56_, 0);
	_tmp57_ = grid;
	_tmp58_ = self->priv->combobox_hinting;
	_tmp59_ = budgie_settings_row_new ((GtkWidget*) _tmp58_, _ ("Hinting"), _ ("Set the type of hinting to use."));
	_tmp60_ = _tmp59_;
	budgie_settings_grid_add_row (_tmp57_, _tmp60_);
	_g_object_unref0 (_tmp60_);
	_tmp61_ = group;
	_tmp62_ = self->priv->combobox_hinting;
	gtk_size_group_add_widget (_tmp61_, (GtkWidget*) _tmp62_);
	_tmp63_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp63_);
	_g_object_unref0 (self->priv->combobox_antialias);
	self->priv->combobox_antialias = _tmp63_;
	_tmp64_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	antialias_model = _tmp64_;
	_tmp65_ = g_strdup (_ ("Subpixel (for LCD screens)"));
	_tmp66_ = g_strdup (_ ("Standard (grayscale)"));
	_tmp67_ = g_strdup (_ ("None"));
	_tmp68_ = g_new0 (gchar*, 3 + 1);
	_tmp68_[0] = _tmp65_;
	_tmp68_[1] = _tmp66_;
	_tmp68_[2] = _tmp67_;
	antialias_display = _tmp68_;
	antialias_display_length1 = 3;
	_antialias_display_size_ = antialias_display_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp69_ = FALSE;
			_tmp69_ = TRUE;
			while (TRUE) {
				GtkListStore* _tmp71_;
				GtkTreeIter _tmp72_ = {0};
				GtkListStore* _tmp73_;
				GtkTreeIter _tmp74_;
				const gchar* _tmp75_;
				gchar** _tmp76_;
				gint _tmp76__length1;
				const gchar* _tmp77_;
				if (!_tmp69_) {
					gint _tmp70_;
					_tmp70_ = i;
					i = _tmp70_ + 1;
				}
				_tmp69_ = FALSE;
				if (!(i < G_N_ELEMENTS (antialias_values))) {
					break;
				}
				_tmp71_ = antialias_model;
				gtk_list_store_append (_tmp71_, &_tmp72_);
				iter = _tmp72_;
				_tmp73_ = antialias_model;
				_tmp74_ = iter;
				_tmp75_ = antialias_values[i];
				_tmp76_ = antialias_display;
				_tmp76__length1 = antialias_display_length1;
				_tmp77_ = _tmp76_[i];
				gtk_list_store_set (_tmp73_, &_tmp74_, 0, _tmp75_, 1, _tmp77_, -1, -1);
			}
		}
	}
	_tmp78_ = self->priv->combobox_antialias;
	_tmp79_ = antialias_model;
	gtk_combo_box_set_model (_tmp78_, (GtkTreeModel*) _tmp79_);
	_tmp80_ = self->priv->combobox_antialias;
	gtk_combo_box_set_id_column (_tmp80_, 0);
	_tmp81_ = grid;
	_tmp82_ = self->priv->combobox_antialias;
	_tmp83_ = budgie_settings_row_new ((GtkWidget*) _tmp82_, _ ("Antialiasing"), _ ("Set the type of antialiasing to use."));
	_tmp84_ = _tmp83_;
	budgie_settings_grid_add_row (_tmp81_, _tmp84_);
	_g_object_unref0 (_tmp84_);
	_tmp85_ = group;
	_tmp86_ = self->priv->combobox_antialias;
	gtk_size_group_add_widget (_tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp87_);
	render = _tmp87_;
	_tmp88_ = self->priv->combobox_hinting;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp88_, (GtkCellRenderer*) render, TRUE);
	_tmp89_ = self->priv->combobox_hinting;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp89_, (GtkCellRenderer*) render, "text", 1);
	_tmp90_ = self->priv->combobox_antialias;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp90_, (GtkCellRenderer*) render, TRUE);
	_tmp91_ = self->priv->combobox_antialias;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp91_, (GtkCellRenderer*) render, "text", 1);
	_tmp92_ = g_settings_new ("org.gnome.desktop.interface");
	_g_object_unref0 (self->priv->ui_settings);
	self->priv->ui_settings = _tmp92_;
	_tmp93_ = g_settings_new ("org.gnome.desktop.wm.preferences");
	_g_object_unref0 (self->priv->wm_settings);
	self->priv->wm_settings = _tmp93_;
	_tmp94_ = self->priv->ui_settings;
	_tmp95_ = self->priv->fontbutton_document;
	g_settings_bind (_tmp94_, "document-font-name", (GObject*) _tmp95_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp96_ = self->priv->ui_settings;
	_tmp97_ = self->priv->fontbutton_interface;
	g_settings_bind (_tmp96_, "font-name", (GObject*) _tmp97_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp98_ = self->priv->ui_settings;
	_tmp99_ = self->priv->fontbutton_monospace;
	g_settings_bind (_tmp98_, "monospace-font-name", (GObject*) _tmp99_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp100_ = self->priv->wm_settings;
	_tmp101_ = self->priv->fontbutton_title;
	g_settings_bind (_tmp100_, "titlebar-font", (GObject*) _tmp101_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp102_ = self->priv->ui_settings;
	_tmp103_ = self->priv->spinbutton_scaling;
	g_settings_bind (_tmp102_, "text-scaling-factor", (GObject*) _tmp103_, "value", G_SETTINGS_BIND_DEFAULT);
	_tmp104_ = self->priv->ui_settings;
	_tmp105_ = self->priv->combobox_antialias;
	g_settings_bind (_tmp104_, "font-antialiasing", (GObject*) _tmp105_, "active-id", G_SETTINGS_BIND_DEFAULT);
	_tmp106_ = self->priv->ui_settings;
	_tmp107_ = self->priv->combobox_hinting;
	g_settings_bind (_tmp106_, "font-hinting", (GObject*) _tmp107_, "active-id", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (render);
	antialias_display = (_vala_array_free (antialias_display, antialias_display_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (antialias_model);
	hinting_display = (_vala_array_free (hinting_display, hinting_display_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (hinting_model);
	_g_object_unref0 (group);
	_g_object_unref0 (grid);
	return self;
}

BudgieFontPage*
budgie_font_page_new (void)
{
	return budgie_font_page_construct (BUDGIE_TYPE_FONT_PAGE);
}

static void
budgie_font_page_class_init (BudgieFontPageClass * klass,
                             gpointer klass_data)
{
	budgie_font_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieFontPage_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_font_page_finalize;
}

static void
budgie_font_page_instance_init (BudgieFontPage * self,
                                gpointer klass)
{
	self->priv = budgie_font_page_get_instance_private (self);
}

static void
budgie_font_page_finalize (GObject * obj)
{
	BudgieFontPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_FONT_PAGE, BudgieFontPage);
	_g_object_unref0 (self->priv->fontbutton_title);
	_g_object_unref0 (self->priv->fontbutton_document);
	_g_object_unref0 (self->priv->fontbutton_interface);
	_g_object_unref0 (self->priv->fontbutton_monospace);
	_g_object_unref0 (self->priv->spinbutton_scaling);
	_g_object_unref0 (self->priv->combobox_hinting);
	_g_object_unref0 (self->priv->combobox_antialias);
	_g_object_unref0 (self->priv->ui_settings);
	_g_object_unref0 (self->priv->wm_settings);
	G_OBJECT_CLASS (budgie_font_page_parent_class)->finalize (obj);
}

/**
* FontPage allows users to change aspects of the fonts used
*/
static GType
budgie_font_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieFontPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_font_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieFontPage), 0, (GInstanceInitFunc) budgie_font_page_instance_init, NULL };
	GType budgie_font_page_type_id;
	budgie_font_page_type_id = g_type_register_static (BUDGIE_TYPE_SETTINGS_PAGE, "BudgieFontPage", &g_define_type_info, 0);
	BudgieFontPage_private_offset = g_type_add_instance_private (budgie_font_page_type_id, sizeof (BudgieFontPagePrivate));
	return budgie_font_page_type_id;
}

GType
budgie_font_page_get_type (void)
{
	static volatile gsize budgie_font_page_type_id__once = 0;
	if (g_once_init_enter (&budgie_font_page_type_id__once)) {
		GType budgie_font_page_type_id;
		budgie_font_page_type_id = budgie_font_page_get_type_once ();
		g_once_init_leave (&budgie_font_page_type_id__once, budgie_font_page_type_id);
	}
	return budgie_font_page_type_id__once;
}

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

