/* settings_style.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from settings_style.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 <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include "budgie-private.h"
#include <pango/pango.h>
#include <glib/gstdio.h>
#include <unistd.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_STYLE_PAGE (budgie_style_page_get_type ())
#define BUDGIE_STYLE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_STYLE_PAGE, BudgieStylePage))
#define BUDGIE_STYLE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_STYLE_PAGE, BudgieStylePageClass))
#define BUDGIE_IS_STYLE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_STYLE_PAGE))
#define BUDGIE_IS_STYLE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_STYLE_PAGE))
#define BUDGIE_STYLE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_STYLE_PAGE, BudgieStylePageClass))

typedef struct _BudgieStylePage BudgieStylePage;
typedef struct _BudgieStylePageClass BudgieStylePageClass;
typedef struct _BudgieStylePagePrivate BudgieStylePagePrivate;

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

#define TYPE_THEME_SCANNER (theme_scanner_get_type ())
#define THEME_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEME_SCANNER, ThemeScanner))
#define THEME_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEME_SCANNER, ThemeScannerClass))
#define IS_THEME_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEME_SCANNER))
#define IS_THEME_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEME_SCANNER))
#define THEME_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEME_SCANNER, ThemeScannerClass))

typedef struct _ThemeScanner ThemeScanner;
typedef struct _ThemeScannerClass ThemeScannerClass;
enum  {
	BUDGIE_STYLE_PAGE_0_PROPERTY,
	BUDGIE_STYLE_PAGE_NUM_PROPERTIES
};
static GParamSpec* budgie_style_page_properties[BUDGIE_STYLE_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 _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block5Data Block5Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
typedef struct _Block6Data Block6Data;

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

struct _BudgieSettingsPageClass {
	GtkBoxClass parent_class;
};

struct _BudgieStylePage {
	BudgieSettingsPage parent_instance;
	BudgieStylePagePrivate * priv;
};

struct _BudgieStylePageClass {
	BudgieSettingsPageClass parent_class;
};

struct _BudgieStylePagePrivate {
	GtkComboBox* combobox_gtk;
	GtkComboBox* combobox_icon;
	GtkComboBox* combobox_cursor;
	GtkComboBox* combobox_notification_position;
	GtkSwitch* switch_dark;
	GtkSwitch* switch_builtin;
	GtkSwitch* switch_animations;
	GtkComboBox* labwc_theme_override;
	GSettings* ui_settings;
	GSettings* budgie_settings;
	BudgieSettingsRow* builtin_row;
	BudgieSettingsRow* labwc_theme_row;
	ThemeScanner* theme_scanner;
	gboolean is_labwc_running;
};

struct _Block5Data {
	int _ref_count_;
	BudgieStylePage* self;
	gchar** themes;
	gint themes_length1;
	gint _themes_size_;
};

struct _Block6Data {
	int _ref_count_;
	GHashTable* self;
	GFunc func;
	gpointer func_target;
};

static gint BudgieStylePage_private_offset;
static gpointer budgie_style_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_style_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieStylePage, g_object_unref)
VALA_EXTERN GType budgie_settings_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieSettingsRow, g_object_unref)
VALA_EXTERN GType theme_scanner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ThemeScanner, g_object_unref)
VALA_EXTERN BudgieStylePage* budgie_style_page_new (void);
VALA_EXTERN BudgieStylePage* budgie_style_page_construct (GType object_type);
static gboolean budgie_style_page_check_labwc_running (BudgieStylePage* self);
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 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_style_page_setup_labwc_theme_override (BudgieStylePage* self);
VALA_EXTERN gchar* budgie_style_page_notification_position_to_display (BudgieStylePage* self,
                                                           BudgieNotificationPosition position);
VALA_EXTERN ThemeScanner* theme_scanner_new (void);
VALA_EXTERN ThemeScanner* theme_scanner_construct (GType object_type);
static gboolean __lambda13_ (BudgieStylePage* self);
VALA_EXTERN void budgie_style_page_load_themes (BudgieStylePage* self);
static gboolean ___lambda13__gsource_func (gpointer self);
static gchar** budgie_style_page_get_labwc_themes (BudgieStylePage* self,
                                            gint* result_length1);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void _g_free0_ (gpointer var);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void ___lambda2__gh_func (gconstpointer key,
                          gconstpointer value,
                          gpointer self);
static void __lambda11_ (Block5Data* _data5_,
                  const gchar* theme);
static void _vala_array_add5 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void ___lambda11__gfunc (gconstpointer data,
                         gpointer self);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static gchar* budgie_style_page_get_theme_display_name (BudgieStylePage* self,
                                                 const gchar* theme_id);
static gchar* budgie_style_page_get_current_labwc_theme (BudgieStylePage* self);
static void budgie_style_page_set_labwc_theme (BudgieStylePage* self,
                                        const gchar* theme_id);
static void __lambda12_ (BudgieStylePage* self);
static void ___lambda12__gtk_combo_box_changed (GtkComboBox* _sender,
                                         gpointer self);
VALA_EXTERN void theme_scanner_scan_themes (ThemeScanner* self,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN void theme_scanner_scan_themes_finish (ThemeScanner* self,
                                       GAsyncResult* _res_);
static void __lambda14_ (BudgieStylePage* self);
VALA_EXTERN gchar** theme_scanner_get_gtk_themes (ThemeScanner* self,
                                      gint* result_length1);
VALA_EXTERN gchar** theme_scanner_get_icon_themes (ThemeScanner* self,
                                       gint* result_length1);
VALA_EXTERN gchar** theme_scanner_get_cursor_themes (ThemeScanner* self,
                                         gint* result_length1);
static void ___lambda14__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void budgie_style_page_finalize (GObject * obj);
static GType budgie_style_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 gssize _vala_array_length (gpointer array);

static inline gpointer
budgie_style_page_get_instance_private (BudgieStylePage* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieStylePage_private_offset);
}

static gboolean
__lambda13_ (BudgieStylePage* self)
{
	gboolean result;
	budgie_style_page_load_themes (self);
	result = FALSE;
	return result;
}

static gboolean
___lambda13__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda13_ ((BudgieStylePage*) self);
	return result;
}

BudgieStylePage*
budgie_style_page_construct (GType object_type)
{
	BudgieStylePage * self = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GtkSizeGroup* group = NULL;
	GtkSizeGroup* _tmp2_;
	BudgieSettingsGrid* grid = NULL;
	BudgieSettingsGrid* _tmp3_;
	BudgieSettingsGrid* _tmp4_;
	GtkComboBox* _tmp5_;
	BudgieSettingsGrid* _tmp6_;
	GtkComboBox* _tmp7_;
	BudgieSettingsRow* _tmp8_;
	BudgieSettingsRow* _tmp9_;
	GtkComboBox* _tmp10_;
	BudgieSettingsGrid* _tmp11_;
	GtkComboBox* _tmp12_;
	BudgieSettingsRow* _tmp13_;
	BudgieSettingsRow* _tmp14_;
	GtkComboBox* _tmp15_;
	BudgieSettingsGrid* _tmp16_;
	GtkComboBox* _tmp17_;
	BudgieSettingsRow* _tmp18_;
	BudgieSettingsRow* _tmp19_;
	GtkComboBox* _tmp20_;
	BudgieSettingsGrid* _tmp21_;
	GtkComboBox* _tmp22_;
	BudgieSettingsRow* _tmp23_;
	BudgieSettingsRow* _tmp24_;
	GtkSizeGroup* _tmp25_;
	GtkComboBox* _tmp26_;
	GtkSizeGroup* _tmp27_;
	GtkComboBox* _tmp28_;
	GtkSizeGroup* _tmp29_;
	GtkComboBox* _tmp30_;
	GtkSizeGroup* _tmp31_;
	GtkComboBox* _tmp32_;
	GtkSwitch* _tmp33_;
	BudgieSettingsGrid* _tmp34_;
	GtkSwitch* _tmp35_;
	BudgieSettingsRow* _tmp36_;
	BudgieSettingsRow* _tmp37_;
	gboolean show_builtin = FALSE;
	GSettings* _tmp38_;
	GtkSwitch* _tmp48_;
	BudgieSettingsGrid* _tmp49_;
	GtkSwitch* _tmp50_;
	BudgieSettingsRow* _tmp51_;
	BudgieSettingsRow* _tmp52_;
	GtkListStore* model = NULL;
	GtkListStore* _tmp53_;
	GtkTreeIter iter = {0};
	static const BudgieNotificationPosition positions[4] = {BUDGIE_NOTIFICATION_POSITION_TOP_LEFT, BUDGIE_NOTIFICATION_POSITION_TOP_RIGHT, BUDGIE_NOTIFICATION_POSITION_BOTTOM_LEFT, BUDGIE_NOTIFICATION_POSITION_BOTTOM_RIGHT};
	GtkComboBox* _tmp61_;
	GtkListStore* _tmp62_;
	GtkComboBox* _tmp63_;
	GtkCellRendererText* render = NULL;
	GtkCellRendererText* _tmp64_;
	GtkCellRendererText* _tmp65_;
	GtkCellRendererText* _tmp66_;
	GtkComboBox* _tmp67_;
	GtkCellRendererText* _tmp68_;
	GtkComboBox* _tmp69_;
	GtkCellRendererText* _tmp70_;
	GtkComboBox* _tmp71_;
	GtkCellRendererText* _tmp72_;
	GtkComboBox* _tmp73_;
	GtkCellRendererText* _tmp74_;
	GtkComboBox* _tmp75_;
	GtkCellRendererText* _tmp76_;
	GtkComboBox* _tmp77_;
	GtkCellRendererText* _tmp78_;
	GtkComboBox* _tmp79_;
	GtkCellRendererText* _tmp80_;
	GtkComboBox* _tmp81_;
	GtkCellRendererText* _tmp82_;
	GSettings* _tmp83_;
	GtkSwitch* _tmp84_;
	GSettings* _tmp87_;
	GtkComboBox* _tmp88_;
	GSettings* _tmp89_;
	GtkSwitch* _tmp90_;
	ThemeScanner* _tmp91_;
	self = (BudgieStylePage*) g_object_new (object_type, "group", BUDGIE_SETTINGS_GROUP_APPEARANCE, "content-id", "style", "title", _ ("Style"), "display-weight", 0, "icon-name", "preferences-desktop-theme", NULL);
	_tmp0_ = g_settings_new ("com.solus-project.budgie-panel");
	_g_object_unref0 (self->priv->budgie_settings);
	self->priv->budgie_settings = _tmp0_;
	_tmp1_ = g_settings_new ("org.gnome.desktop.interface");
	_g_object_unref0 (self->priv->ui_settings);
	self->priv->ui_settings = _tmp1_;
	self->priv->is_labwc_running = budgie_style_page_check_labwc_running (self);
	_tmp2_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	group = _tmp2_;
	_tmp3_ = budgie_settings_grid_new ();
	g_object_ref_sink (_tmp3_);
	grid = _tmp3_;
	_tmp4_ = grid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp4_);
	_tmp5_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->combobox_gtk);
	self->priv->combobox_gtk = _tmp5_;
	_tmp6_ = grid;
	_tmp7_ = self->priv->combobox_gtk;
	_tmp8_ = budgie_settings_row_new ((GtkWidget*) _tmp7_, _ ("Widgets"), _ ("Set the appearance of window decorations and controls"));
	_tmp9_ = _tmp8_;
	budgie_settings_grid_add_row (_tmp6_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->combobox_icon);
	self->priv->combobox_icon = _tmp10_;
	_tmp11_ = grid;
	_tmp12_ = self->priv->combobox_icon;
	_tmp13_ = budgie_settings_row_new ((GtkWidget*) _tmp12_, _ ("Icons"), _ ("Set the globally used icon theme"));
	_tmp14_ = _tmp13_;
	budgie_settings_grid_add_row (_tmp11_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->combobox_cursor);
	self->priv->combobox_cursor = _tmp15_;
	_tmp16_ = grid;
	_tmp17_ = self->priv->combobox_cursor;
	_tmp18_ = budgie_settings_row_new ((GtkWidget*) _tmp17_, _ ("Cursors"), _ ("Set the globally used mouse cursor theme"));
	_tmp19_ = _tmp18_;
	budgie_settings_grid_add_row (_tmp16_, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_tmp20_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->combobox_notification_position);
	self->priv->combobox_notification_position = _tmp20_;
	_tmp21_ = grid;
	_tmp22_ = self->priv->combobox_notification_position;
	_tmp23_ = budgie_settings_row_new ((GtkWidget*) _tmp22_, _ ("Notification Position"), _ ("Set the location for notification popups"));
	_tmp24_ = _tmp23_;
	budgie_settings_grid_add_row (_tmp21_, _tmp24_);
	_g_object_unref0 (_tmp24_);
	_tmp25_ = group;
	_tmp26_ = self->priv->combobox_gtk;
	gtk_size_group_add_widget (_tmp25_, (GtkWidget*) _tmp26_);
	_tmp27_ = group;
	_tmp28_ = self->priv->combobox_icon;
	gtk_size_group_add_widget (_tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = group;
	_tmp30_ = self->priv->combobox_cursor;
	gtk_size_group_add_widget (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = group;
	_tmp32_ = self->priv->combobox_notification_position;
	gtk_size_group_add_widget (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp33_);
	_g_object_unref0 (self->priv->switch_dark);
	self->priv->switch_dark = _tmp33_;
	_tmp34_ = grid;
	_tmp35_ = self->priv->switch_dark;
	_tmp36_ = budgie_settings_row_new ((GtkWidget*) _tmp35_, _ ("Dark theme"), NULL);
	_tmp37_ = _tmp36_;
	budgie_settings_grid_add_row (_tmp34_, _tmp37_);
	_g_object_unref0 (_tmp37_);
	_tmp38_ = self->priv->budgie_settings;
	show_builtin = g_settings_get_boolean (_tmp38_, "show-builtin-theme-option");
	if (show_builtin) {
		GtkSwitch* _tmp39_;
		GtkSwitch* _tmp40_;
		BudgieSettingsRow* _tmp41_;
		BudgieSettingsGrid* _tmp42_;
		BudgieSettingsRow* _tmp43_;
		_tmp39_ = (GtkSwitch*) gtk_switch_new ();
		g_object_ref_sink (_tmp39_);
		_g_object_unref0 (self->priv->switch_builtin);
		self->priv->switch_builtin = _tmp39_;
		_tmp40_ = self->priv->switch_builtin;
		_tmp41_ = budgie_settings_row_new ((GtkWidget*) _tmp40_, _ ("Built-in theme"), _ ("When enabled, the built-in theme will override the desktop component s" \
"tyling"));
		_g_object_unref0 (self->priv->builtin_row);
		self->priv->builtin_row = _tmp41_;
		_tmp42_ = grid;
		_tmp43_ = self->priv->builtin_row;
		budgie_settings_grid_add_row (_tmp42_, _tmp43_);
	}
	if (self->priv->is_labwc_running) {
		BudgieSettingsGrid* _tmp44_;
		BudgieSettingsRow* _tmp45_;
		GtkSizeGroup* _tmp46_;
		GtkComboBox* _tmp47_;
		budgie_style_page_setup_labwc_theme_override (self);
		_tmp44_ = grid;
		_tmp45_ = self->priv->labwc_theme_row;
		budgie_settings_grid_add_row (_tmp44_, _tmp45_);
		_tmp46_ = group;
		_tmp47_ = self->priv->labwc_theme_override;
		gtk_size_group_add_widget (_tmp46_, (GtkWidget*) _tmp47_);
	}
	_tmp48_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (self->priv->switch_animations);
	self->priv->switch_animations = _tmp48_;
	_tmp49_ = grid;
	_tmp50_ = self->priv->switch_animations;
	_tmp51_ = budgie_settings_row_new ((GtkWidget*) _tmp50_, _ ("Animations"), _ ("Control whether windows and controls use animations"));
	_tmp52_ = _tmp51_;
	budgie_settings_grid_add_row (_tmp49_, _tmp52_);
	_g_object_unref0 (_tmp52_);
	_tmp53_ = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, BUDGIE_TYPE_NOTIFICATION_POSITION, -1);
	model = _tmp53_;
	{
		BudgieNotificationPosition* pos_collection = NULL;
		gint pos_collection_length1 = 0;
		gint _pos_collection_size_ = 0;
		gint pos_it = 0;
		pos_collection = positions;
		pos_collection_length1 = G_N_ELEMENTS (positions);
		for (pos_it = 0; pos_it < pos_collection_length1; pos_it = pos_it + 1) {
			BudgieNotificationPosition pos = 0;
			pos = pos_collection[pos_it];
			{
				GtkListStore* _tmp54_;
				GtkTreeIter _tmp55_ = {0};
				GtkListStore* _tmp56_;
				GtkTreeIter _tmp57_;
				GEnumValue* _tmp58_;
				gchar* _tmp59_;
				gchar* _tmp60_;
				_tmp54_ = model;
				gtk_list_store_append (_tmp54_, &_tmp55_);
				iter = _tmp55_;
				_tmp56_ = model;
				_tmp57_ = iter;
				_tmp58_ = g_enum_get_value (g_type_class_ref (BUDGIE_TYPE_NOTIFICATION_POSITION), pos);
				_tmp59_ = budgie_style_page_notification_position_to_display (self, pos);
				_tmp60_ = _tmp59_;
				gtk_list_store_set (_tmp56_, &_tmp57_, 0, (_tmp58_ != NULL) ? _tmp58_->value_name : NULL, 1, _tmp60_, 2, pos, -1, -1);
				_g_free0 (_tmp60_);
			}
		}
	}
	_tmp61_ = self->priv->combobox_notification_position;
	_tmp62_ = model;
	gtk_combo_box_set_model (_tmp61_, (GtkTreeModel*) _tmp62_);
	_tmp63_ = self->priv->combobox_notification_position;
	gtk_combo_box_set_id_column (_tmp63_, 0);
	_tmp64_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp64_);
	render = _tmp64_;
	_tmp65_ = render;
	g_object_set (_tmp65_, "width-chars", 1, NULL);
	_tmp66_ = render;
	g_object_set (_tmp66_, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
	_tmp67_ = self->priv->combobox_gtk;
	_tmp68_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp67_, (GtkCellRenderer*) _tmp68_, TRUE);
	_tmp69_ = self->priv->combobox_gtk;
	_tmp70_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp69_, (GtkCellRenderer*) _tmp70_, "text", 0);
	_tmp71_ = self->priv->combobox_icon;
	_tmp72_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp71_, (GtkCellRenderer*) _tmp72_, TRUE);
	_tmp73_ = self->priv->combobox_icon;
	_tmp74_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp73_, (GtkCellRenderer*) _tmp74_, "text", 0);
	_tmp75_ = self->priv->combobox_cursor;
	_tmp76_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp75_, (GtkCellRenderer*) _tmp76_, TRUE);
	_tmp77_ = self->priv->combobox_cursor;
	_tmp78_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp77_, (GtkCellRenderer*) _tmp78_, "text", 0);
	_tmp79_ = self->priv->combobox_notification_position;
	_tmp80_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp79_, (GtkCellRenderer*) _tmp80_, TRUE);
	_tmp81_ = self->priv->combobox_notification_position;
	_tmp82_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp81_, (GtkCellRenderer*) _tmp82_, "text", 1);
	_tmp83_ = self->priv->budgie_settings;
	_tmp84_ = self->priv->switch_dark;
	g_settings_bind (_tmp83_, "dark-theme", (GObject*) _tmp84_, "active", G_SETTINGS_BIND_DEFAULT);
	if (show_builtin) {
		GSettings* _tmp85_;
		GtkSwitch* _tmp86_;
		_tmp85_ = self->priv->budgie_settings;
		_tmp86_ = self->priv->switch_builtin;
		g_settings_bind (_tmp85_, "builtin-theme", (GObject*) _tmp86_, "active", G_SETTINGS_BIND_DEFAULT);
	}
	_tmp87_ = self->priv->budgie_settings;
	_tmp88_ = self->priv->combobox_notification_position;
	g_settings_bind (_tmp87_, "notification-position", (GObject*) _tmp88_, "active-id", G_SETTINGS_BIND_DEFAULT);
	_tmp89_ = self->priv->ui_settings;
	_tmp90_ = self->priv->switch_animations;
	g_settings_bind (_tmp89_, "enable-animations", (GObject*) _tmp90_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp91_ = theme_scanner_new ();
	_g_object_unref0 (self->priv->theme_scanner);
	self->priv->theme_scanner = _tmp91_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda13__gsource_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (render);
	_g_object_unref0 (model);
	_g_object_unref0 (grid);
	_g_object_unref0 (group);
	return self;
}

BudgieStylePage*
budgie_style_page_new (void)
{
	return budgie_style_page_construct (BUDGIE_TYPE_STYLE_PAGE);
}

static gboolean
budgie_style_page_check_labwc_running (BudgieStylePage* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		gchar* output = NULL;
		gint exit_status = 0;
		gchar* _tmp0_ = NULL;
		gint _tmp1_ = 0;
		g_spawn_command_line_sync ("pgrep -x labwc", &_tmp0_, NULL, &_tmp1_, &_inner_error0_);
		_g_free0 (output);
		output = _tmp0_;
		exit_status = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp2_ = FALSE;
			_g_free0 (output);
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_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 _tmp2_;
		}
		result = exit_status == 0;
		_g_free0 (output);
		return result;
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("settings_style.vala:162: Failed to check for labwc: %s", _tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp5_ = FALSE;
		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 _tmp5_;
	}
	result = FALSE;
	return result;
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		BudgieStylePage* self;
		self = _data5_->self;
		_data5_->themes = (_vala_array_free (_data5_->themes, _data5_->themes_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

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

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_)) {
		GHashTable* self;
		self = _data6_->self;
		_g_hash_table_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static void
__lambda2_ (Block6Data* _data6_,
            gconstpointer k,
            gconstpointer v)
{
	GHashTable* self;
	self = _data6_->self;
	_data6_->func (v, _data6_->func_target);
}

static void
___lambda2__gh_func (gconstpointer key,
                     gconstpointer value,
                     gpointer self)
{
	__lambda2_ (self, key, value);
}

static void
_vala_g_hash_set_foreach (GHashTable* self,
                          GFunc func,
                          gpointer func_target)
{
	Block6Data* _data6_;
	g_return_if_fail (self != NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_hash_table_ref (self);
	_data6_->func = func;
	_data6_->func_target = func_target;
	g_hash_table_foreach ((GHashTable*) self, ___lambda2__gh_func, _data6_);
	block6_data_unref (_data6_);
	_data6_ = NULL;
}

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

static void
__lambda11_ (Block5Data* _data5_,
             const gchar* theme)
{
	BudgieStylePage* self;
	gchar* _tmp0_;
	self = _data5_->self;
	g_return_if_fail (theme != NULL);
	_tmp0_ = g_strdup (theme);
	_vala_array_add5 (&_data5_->themes, &_data5_->themes_length1, &_data5_->_themes_size_, _tmp0_);
}

static void
___lambda11__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda11_ (self, (const gchar*) data);
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
budgie_style_page_get_labwc_themes (BudgieStylePage* self,
                                    gint* result_length1)
{
	Block5Data* _data5_;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GHashTable* theme_set = NULL;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GHashTable* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	GHashTable* _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	gchar** _tmp28_;
	gint _tmp28__length1;
	gchar** _tmp29_;
	gint _tmp29__length1;
	GError* _inner_error0_ = NULL;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("use-theme");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_data5_->themes = _tmp1_;
	_data5_->themes_length1 = 1;
	_data5_->_themes_size_ = _data5_->themes_length1;
	_tmp2_ = g_str_hash;
	_tmp3_ = g_str_equal;
	_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, NULL, _g_free0_);
	theme_set = _tmp4_;
	_tmp6_ = _tmp5_ = g_get_system_data_dirs ();
	{
		gchar** data_dir_collection = NULL;
		gint data_dir_collection_length1 = 0;
		gint _data_dir_collection_size_ = 0;
		gint data_dir_it = 0;
		data_dir_collection = _tmp6_;
		data_dir_collection_length1 = _vala_array_length (_tmp5_);
		for (data_dir_it = 0; data_dir_it < data_dir_collection_length1; data_dir_it = data_dir_it + 1) {
			gchar* _tmp7_;
			gchar* data_dir = NULL;
			_tmp7_ = g_strdup (data_dir_collection[data_dir_it]);
			data_dir = _tmp7_;
			{
				gchar* themes_dir = NULL;
				const gchar* _tmp8_;
				gchar* _tmp9_;
				const gchar* _tmp10_;
				_tmp8_ = data_dir;
				_tmp9_ = g_build_filename (_tmp8_, "budgie-desktop", "labwc", NULL);
				themes_dir = _tmp9_;
				_tmp10_ = themes_dir;
				if (!g_file_test (_tmp10_, G_FILE_TEST_IS_DIR)) {
					_g_free0 (themes_dir);
					_g_free0 (data_dir);
					continue;
				}
				{
					GDir* dir = NULL;
					const gchar* _tmp11_;
					GDir* _tmp12_;
					gchar* name = NULL;
					_tmp11_ = themes_dir;
					_tmp12_ = g_dir_open (_tmp11_, (guint) 0, &_inner_error0_);
					dir = _tmp12_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						if (_inner_error0_->domain == G_FILE_ERROR) {
							goto __catch0_g_file_error;
						}
						_g_free0 (themes_dir);
						_g_free0 (data_dir);
						_g_hash_table_unref0 (theme_set);
						block5_data_unref (_data5_);
						_data5_ = NULL;
						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;
					}
					name = NULL;
					while (TRUE) {
						GDir* _tmp13_;
						const gchar* _tmp14_;
						gchar* _tmp15_;
						const gchar* _tmp16_;
						const gchar* _tmp17_;
						_tmp13_ = dir;
						_tmp14_ = g_dir_read_name (_tmp13_);
						_tmp15_ = g_strdup (_tmp14_);
						_g_free0 (name);
						name = _tmp15_;
						_tmp16_ = name;
						if (!(_tmp16_ != NULL)) {
							break;
						}
						_tmp17_ = name;
						if (g_str_has_prefix (_tmp17_, "themerc-")) {
							gchar* theme_name = NULL;
							const gchar* _tmp18_;
							gchar* _tmp19_;
							GHashTable* _tmp20_;
							const gchar* _tmp21_;
							gchar* _tmp22_;
							_tmp18_ = name;
							_tmp19_ = string_substring (_tmp18_, (glong) 8, (glong) -1);
							theme_name = _tmp19_;
							_tmp20_ = theme_set;
							_tmp21_ = theme_name;
							_tmp22_ = g_strdup (_tmp21_);
							g_hash_table_add (_tmp20_, _tmp22_);
							_g_free0 (theme_name);
						}
					}
					_g_free0 (name);
					_g_dir_close0 (dir);
				}
				goto __finally0;
				__catch0_g_file_error:
				{
					GError* e = NULL;
					const gchar* _tmp23_;
					GError* _tmp24_;
					const gchar* _tmp25_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp23_ = themes_dir;
					_tmp24_ = e;
					_tmp25_ = _tmp24_->message;
					g_warning ("settings_style.vala:193: Could not read labwc themes directory %s: %s", _tmp23_, _tmp25_);
					_g_error_free0 (e);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_free0 (themes_dir);
					_g_free0 (data_dir);
					_g_hash_table_unref0 (theme_set);
					block5_data_unref (_data5_);
					_data5_ = NULL;
					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;
				}
				_g_free0 (themes_dir);
				_g_free0 (data_dir);
			}
		}
	}
	_tmp26_ = theme_set;
	_vala_g_hash_set_foreach (_tmp26_, ___lambda11__gfunc, _data5_);
	_tmp27_ = _data5_->themes;
	_tmp27__length1 = _data5_->themes_length1;
	_tmp28_ = (_tmp27_ != NULL) ? _vala_array_dup2 (_tmp27_, _tmp27__length1) : _tmp27_;
	_tmp28__length1 = _tmp27__length1;
	_tmp29_ = _tmp28_;
	_tmp29__length1 = _tmp28__length1;
	if (result_length1) {
		*result_length1 = _tmp29__length1;
	}
	result = _tmp29_;
	_g_hash_table_unref0 (theme_set);
	block5_data_unref (_data5_);
	_data5_ = NULL;
	return result;
}

static gchar*
budgie_style_page_get_theme_display_name (BudgieStylePage* self,
                                          const gchar* theme_id)
{
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (theme_id != NULL, NULL);
	if (g_strcmp0 (theme_id, "use-theme") == 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (_ ("Use theme"));
		result = _tmp0_;
		return result;
	}
	_tmp1_ = string_substring (theme_id, (glong) 0, (glong) 1);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_utf8_strup (_tmp2_, (gssize) -1);
	_tmp4_ = _tmp3_;
	_tmp5_ = string_substring (theme_id, (glong) 1, (glong) -1);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp4_, _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp8_;
	return result;
}

static gchar*
budgie_style_page_get_current_labwc_theme (BudgieStylePage* self)
{
	gchar* config_dir = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* override_path = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp14_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_get_user_config_dir ();
	_tmp1_ = g_build_filename (_tmp0_, "budgie-desktop", "labwc", NULL);
	config_dir = _tmp1_;
	_tmp2_ = config_dir;
	_tmp3_ = g_build_filename (_tmp2_, "themerc-override", NULL);
	override_path = _tmp3_;
	_tmp4_ = override_path;
	if (g_file_test (_tmp4_, G_FILE_TEST_IS_SYMLINK)) {
		{
			gchar* target = NULL;
			const gchar* _tmp5_;
			gchar* _tmp6_;
			gchar* basename = NULL;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			const gchar* _tmp9_;
			_tmp5_ = override_path;
			_tmp6_ = g_file_read_link (_tmp5_, &_inner_error0_);
			target = _tmp6_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_FILE_ERROR) {
					goto __catch0_g_file_error;
				}
				_g_free0 (override_path);
				_g_free0 (config_dir);
				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;
			}
			_tmp7_ = target;
			_tmp8_ = g_path_get_basename (_tmp7_);
			basename = _tmp8_;
			_tmp9_ = basename;
			if (g_str_has_prefix (_tmp9_, "themerc-")) {
				const gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp10_ = basename;
				_tmp11_ = string_substring (_tmp10_, (glong) 8, (glong) -1);
				result = _tmp11_;
				_g_free0 (basename);
				_g_free0 (target);
				_g_free0 (override_path);
				_g_free0 (config_dir);
				return result;
			}
			_g_free0 (basename);
			_g_free0 (target);
		}
		goto __finally0;
		__catch0_g_file_error:
		{
			GError* e = NULL;
			GError* _tmp12_;
			const gchar* _tmp13_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp12_ = e;
			_tmp13_ = _tmp12_->message;
			g_warning ("settings_style.vala:228: Could not read labwc theme override: %s", _tmp13_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (override_path);
			_g_free0 (config_dir);
			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;
		}
	}
	_tmp14_ = g_strdup ("use-theme");
	result = _tmp14_;
	_g_free0 (override_path);
	_g_free0 (config_dir);
	return result;
}

static void
budgie_style_page_set_labwc_theme (BudgieStylePage* self,
                                   const gchar* theme_id)
{
	gchar* config_dir = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* override_path = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (theme_id != NULL);
	_tmp0_ = g_get_user_config_dir ();
	_tmp1_ = g_build_filename (_tmp0_, "budgie-desktop", "labwc", NULL);
	config_dir = _tmp1_;
	_tmp2_ = config_dir;
	_tmp3_ = g_build_filename (_tmp2_, "themerc-override", NULL);
	override_path = _tmp3_;
	_tmp4_ = config_dir;
	g_mkdir_with_parents (_tmp4_, 0755);
	_tmp5_ = override_path;
	if (g_file_test (_tmp5_, G_FILE_TEST_EXISTS)) {
		const gchar* _tmp6_;
		_tmp6_ = override_path;
		g_unlink (_tmp6_);
	}
	if (g_strcmp0 (theme_id, "use-theme") != 0) {
		gchar* target = NULL;
		gchar** _tmp7_;
		gchar** _tmp8_;
		const gchar* _tmp18_;
		target = NULL;
		_tmp8_ = _tmp7_ = g_get_system_data_dirs ();
		{
			gchar** data_dir_collection = NULL;
			gint data_dir_collection_length1 = 0;
			gint _data_dir_collection_size_ = 0;
			gint data_dir_it = 0;
			data_dir_collection = _tmp8_;
			data_dir_collection_length1 = _vala_array_length (_tmp7_);
			for (data_dir_it = 0; data_dir_it < data_dir_collection_length1; data_dir_it = data_dir_it + 1) {
				gchar* _tmp9_;
				gchar* data_dir = NULL;
				_tmp9_ = g_strdup (data_dir_collection[data_dir_it]);
				data_dir = _tmp9_;
				{
					gchar* theme_path = NULL;
					const gchar* _tmp10_;
					gchar* _tmp11_;
					gchar* _tmp12_;
					gchar* _tmp13_;
					gchar* _tmp14_;
					const gchar* _tmp15_;
					_tmp10_ = data_dir;
					_tmp11_ = g_strconcat ("themerc-", theme_id, NULL);
					_tmp12_ = _tmp11_;
					_tmp13_ = g_build_filename (_tmp10_, "budgie-desktop", "labwc", _tmp12_, NULL);
					_tmp14_ = _tmp13_;
					_g_free0 (_tmp12_);
					theme_path = _tmp14_;
					_tmp15_ = theme_path;
					if (g_file_test (_tmp15_, G_FILE_TEST_EXISTS)) {
						const gchar* _tmp16_;
						gchar* _tmp17_;
						_tmp16_ = theme_path;
						_tmp17_ = g_strdup (_tmp16_);
						_g_free0 (target);
						target = _tmp17_;
						_g_free0 (theme_path);
						_g_free0 (data_dir);
						break;
					}
					_g_free0 (theme_path);
					_g_free0 (data_dir);
				}
			}
		}
		_tmp18_ = target;
		if (_tmp18_ == NULL) {
			g_warning ("settings_style.vala:263: Could not find labwc theme file for: %s", theme_id);
			_g_free0 (target);
			_g_free0 (override_path);
			_g_free0 (config_dir);
			return;
		}
		{
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			_tmp19_ = target;
			_tmp20_ = override_path;
			symlink (_tmp19_, _tmp20_);
			g_spawn_command_line_async ("labwc -r", &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp21_;
			const gchar* _tmp22_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp21_ = e;
			_tmp22_ = _tmp21_->message;
			g_warning ("settings_style.vala:272: Could not create labwc theme override: %s", _tmp22_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (target);
			_g_free0 (override_path);
			_g_free0 (config_dir);
			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;
		}
		_g_free0 (target);
	} else {
		{
			g_spawn_command_line_async ("labwc -r", &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_SPAWN_ERROR) {
					goto __catch1_g_spawn_error;
				}
				_g_free0 (override_path);
				_g_free0 (config_dir);
				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;
			}
		}
		goto __finally1;
		__catch1_g_spawn_error:
		{
			GError* e = NULL;
			GError* _tmp23_;
			const gchar* _tmp24_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp23_ = e;
			_tmp24_ = _tmp23_->message;
			g_warning ("settings_style.vala:279: Could not reload labwc: %s", _tmp24_);
			_g_error_free0 (e);
		}
		__finally1:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (override_path);
			_g_free0 (config_dir);
			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;
		}
	}
	_g_free0 (override_path);
	_g_free0 (config_dir);
}

static void
__lambda12_ (BudgieStylePage* self)
{
	gchar* theme_id = NULL;
	GtkComboBox* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	_tmp0_ = self->priv->labwc_theme_override;
	_tmp1_ = gtk_combo_box_get_active_id (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	theme_id = _tmp2_;
	_tmp3_ = theme_id;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_;
		_tmp4_ = theme_id;
		budgie_style_page_set_labwc_theme (self, _tmp4_);
	}
	_g_free0 (theme_id);
}

static void
___lambda12__gtk_combo_box_changed (GtkComboBox* _sender,
                                    gpointer self)
{
	__lambda12_ ((BudgieStylePage*) self);
}

static void
budgie_style_page_setup_labwc_theme_override (BudgieStylePage* self)
{
	GtkComboBox* _tmp0_;
	GtkListStore* model = NULL;
	GtkListStore* _tmp1_;
	GtkTreeIter iter = {0};
	gchar** themes = NULL;
	gint _tmp2_ = 0;
	gchar** _tmp3_;
	gint themes_length1;
	gint _themes_size_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	GtkComboBox* _tmp14_;
	GtkListStore* _tmp15_;
	GtkComboBox* _tmp16_;
	GtkCellRendererText* render = NULL;
	GtkCellRendererText* _tmp17_;
	GtkComboBox* _tmp18_;
	GtkComboBox* _tmp19_;
	GtkComboBox* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	GtkComboBox* _tmp23_;
	GtkComboBox* _tmp24_;
	BudgieSettingsRow* _tmp25_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkComboBox*) gtk_combo_box_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->labwc_theme_override);
	self->priv->labwc_theme_override = _tmp0_;
	_tmp1_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	model = _tmp1_;
	_tmp3_ = budgie_style_page_get_labwc_themes (self, &_tmp2_);
	themes = _tmp3_;
	themes_length1 = _tmp2_;
	_themes_size_ = themes_length1;
	_tmp4_ = themes;
	_tmp4__length1 = themes_length1;
	{
		gchar** theme_collection = NULL;
		gint theme_collection_length1 = 0;
		gint _theme_collection_size_ = 0;
		gint theme_it = 0;
		theme_collection = _tmp4_;
		theme_collection_length1 = _tmp4__length1;
		for (theme_it = 0; theme_it < theme_collection_length1; theme_it = theme_it + 1) {
			gchar* _tmp5_;
			gchar* theme = NULL;
			_tmp5_ = g_strdup (theme_collection[theme_it]);
			theme = _tmp5_;
			{
				GtkListStore* _tmp6_;
				GtkTreeIter _tmp7_ = {0};
				GtkListStore* _tmp8_;
				GtkTreeIter _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp6_ = model;
				gtk_list_store_append (_tmp6_, &_tmp7_);
				iter = _tmp7_;
				_tmp8_ = model;
				_tmp9_ = iter;
				_tmp10_ = theme;
				_tmp11_ = theme;
				_tmp12_ = budgie_style_page_get_theme_display_name (self, _tmp11_);
				_tmp13_ = _tmp12_;
				gtk_list_store_set (_tmp8_, &_tmp9_, 0, _tmp10_, 1, _tmp13_, -1, -1);
				_g_free0 (_tmp13_);
				_g_free0 (theme);
			}
		}
	}
	_tmp14_ = self->priv->labwc_theme_override;
	_tmp15_ = model;
	gtk_combo_box_set_model (_tmp14_, (GtkTreeModel*) _tmp15_);
	_tmp16_ = self->priv->labwc_theme_override;
	gtk_combo_box_set_id_column (_tmp16_, 0);
	_tmp17_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp17_);
	render = _tmp17_;
	g_object_set (render, "width-chars", 1, NULL);
	g_object_set (render, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
	_tmp18_ = self->priv->labwc_theme_override;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp18_, (GtkCellRenderer*) render, TRUE);
	_tmp19_ = self->priv->labwc_theme_override;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp19_, (GtkCellRenderer*) render, "text", 1);
	_tmp20_ = self->priv->labwc_theme_override;
	_tmp21_ = budgie_style_page_get_current_labwc_theme (self);
	_tmp22_ = _tmp21_;
	gtk_combo_box_set_active_id (_tmp20_, _tmp22_);
	_g_free0 (_tmp22_);
	_tmp23_ = self->priv->labwc_theme_override;
	g_signal_connect_object (_tmp23_, "changed", (GCallback) ___lambda12__gtk_combo_box_changed, self, 0);
	_tmp24_ = self->priv->labwc_theme_override;
	_tmp25_ = budgie_settings_row_new ((GtkWidget*) _tmp24_, _ ("Labwc Compositor Theme"), _ ("Override the labwc compositor theme independently from the desktop the" \
"me."));
	_g_object_unref0 (self->priv->labwc_theme_row);
	self->priv->labwc_theme_row = _tmp25_;
	_g_object_unref0 (render);
	themes = (_vala_array_free (themes, themes_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (model);
}

static void
__lambda14_ (BudgieStylePage* self)
{
	{
		GtkTreeIter iter = {0};
		GtkListStore* model = NULL;
		GtkListStore* _tmp0_;
		gboolean hit = FALSE;
		ThemeScanner* _tmp1_;
		gint _tmp2_ = 0;
		gchar** _tmp3_;
		GtkComboBox* _tmp10_;
		GtkListStore* _tmp11_;
		GtkComboBox* _tmp12_;
		GtkListStore* _tmp13_;
		_tmp0_ = gtk_list_store_new (1, G_TYPE_STRING, -1);
		model = _tmp0_;
		hit = FALSE;
		_tmp1_ = self->priv->theme_scanner;
		_tmp3_ = theme_scanner_get_gtk_themes (_tmp1_, &_tmp2_);
		{
			gchar** theme_collection = NULL;
			gint theme_collection_length1 = 0;
			gint _theme_collection_size_ = 0;
			gint theme_it = 0;
			theme_collection = _tmp3_;
			theme_collection_length1 = _tmp2_;
			for (theme_it = 0; theme_it < theme_collection_length1; theme_it = theme_it + 1) {
				gchar* _tmp4_;
				gchar* theme = NULL;
				_tmp4_ = g_strdup (theme_collection[theme_it]);
				theme = _tmp4_;
				{
					GtkListStore* _tmp5_;
					GtkTreeIter _tmp6_ = {0};
					GtkListStore* _tmp7_;
					GtkTreeIter _tmp8_;
					const gchar* _tmp9_;
					_tmp5_ = model;
					gtk_list_store_append (_tmp5_, &_tmp6_);
					iter = _tmp6_;
					_tmp7_ = model;
					_tmp8_ = iter;
					_tmp9_ = theme;
					gtk_list_store_set (_tmp7_, &_tmp8_, 0, _tmp9_, -1, -1);
					hit = TRUE;
					_g_free0 (theme);
				}
			}
			theme_collection = (_vala_array_free (theme_collection, theme_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp10_ = self->priv->combobox_gtk;
		_tmp11_ = model;
		gtk_combo_box_set_model (_tmp10_, (GtkTreeModel*) _tmp11_);
		_tmp12_ = self->priv->combobox_gtk;
		gtk_combo_box_set_id_column (_tmp12_, 0);
		_tmp13_ = model;
		gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp13_, 0, GTK_SORT_ASCENDING);
		if (hit) {
			GtkComboBox* _tmp14_;
			GSettings* _tmp15_;
			GtkComboBox* _tmp16_;
			_tmp14_ = self->priv->combobox_gtk;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp14_, TRUE);
			_tmp15_ = self->priv->ui_settings;
			_tmp16_ = self->priv->combobox_gtk;
			g_settings_bind (_tmp15_, "gtk-theme", (GObject*) _tmp16_, "active-id", G_SETTINGS_BIND_DEFAULT);
		}
		_g_object_unref0 (model);
	}
	{
		GtkTreeIter iter = {0};
		GtkListStore* model = NULL;
		GtkListStore* _tmp17_;
		gboolean hit = FALSE;
		ThemeScanner* _tmp18_;
		gint _tmp19_ = 0;
		gchar** _tmp20_;
		GtkComboBox* _tmp27_;
		GtkListStore* _tmp28_;
		GtkComboBox* _tmp29_;
		GtkListStore* _tmp30_;
		_tmp17_ = gtk_list_store_new (1, G_TYPE_STRING, -1);
		model = _tmp17_;
		hit = FALSE;
		_tmp18_ = self->priv->theme_scanner;
		_tmp20_ = theme_scanner_get_icon_themes (_tmp18_, &_tmp19_);
		{
			gchar** theme_collection = NULL;
			gint theme_collection_length1 = 0;
			gint _theme_collection_size_ = 0;
			gint theme_it = 0;
			theme_collection = _tmp20_;
			theme_collection_length1 = _tmp19_;
			for (theme_it = 0; theme_it < theme_collection_length1; theme_it = theme_it + 1) {
				gchar* _tmp21_;
				gchar* theme = NULL;
				_tmp21_ = g_strdup (theme_collection[theme_it]);
				theme = _tmp21_;
				{
					GtkListStore* _tmp22_;
					GtkTreeIter _tmp23_ = {0};
					GtkListStore* _tmp24_;
					GtkTreeIter _tmp25_;
					const gchar* _tmp26_;
					_tmp22_ = model;
					gtk_list_store_append (_tmp22_, &_tmp23_);
					iter = _tmp23_;
					_tmp24_ = model;
					_tmp25_ = iter;
					_tmp26_ = theme;
					gtk_list_store_set (_tmp24_, &_tmp25_, 0, _tmp26_, -1, -1);
					hit = TRUE;
					_g_free0 (theme);
				}
			}
			theme_collection = (_vala_array_free (theme_collection, theme_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp27_ = self->priv->combobox_icon;
		_tmp28_ = model;
		gtk_combo_box_set_model (_tmp27_, (GtkTreeModel*) _tmp28_);
		_tmp29_ = self->priv->combobox_icon;
		gtk_combo_box_set_id_column (_tmp29_, 0);
		_tmp30_ = model;
		gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp30_, 0, GTK_SORT_ASCENDING);
		if (hit) {
			GtkComboBox* _tmp31_;
			GSettings* _tmp32_;
			GtkComboBox* _tmp33_;
			_tmp31_ = self->priv->combobox_icon;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp31_, TRUE);
			_tmp32_ = self->priv->ui_settings;
			_tmp33_ = self->priv->combobox_icon;
			g_settings_bind (_tmp32_, "icon-theme", (GObject*) _tmp33_, "active-id", G_SETTINGS_BIND_DEFAULT);
		}
		_g_object_unref0 (model);
	}
	{
		GtkTreeIter iter = {0};
		GtkListStore* model = NULL;
		GtkListStore* _tmp34_;
		gboolean hit = FALSE;
		ThemeScanner* _tmp35_;
		gint _tmp36_ = 0;
		gchar** _tmp37_;
		GtkComboBox* _tmp44_;
		GtkListStore* _tmp45_;
		GtkComboBox* _tmp46_;
		GtkListStore* _tmp47_;
		_tmp34_ = gtk_list_store_new (1, G_TYPE_STRING, -1);
		model = _tmp34_;
		hit = FALSE;
		_tmp35_ = self->priv->theme_scanner;
		_tmp37_ = theme_scanner_get_cursor_themes (_tmp35_, &_tmp36_);
		{
			gchar** theme_collection = NULL;
			gint theme_collection_length1 = 0;
			gint _theme_collection_size_ = 0;
			gint theme_it = 0;
			theme_collection = _tmp37_;
			theme_collection_length1 = _tmp36_;
			for (theme_it = 0; theme_it < theme_collection_length1; theme_it = theme_it + 1) {
				gchar* _tmp38_;
				gchar* theme = NULL;
				_tmp38_ = g_strdup (theme_collection[theme_it]);
				theme = _tmp38_;
				{
					GtkListStore* _tmp39_;
					GtkTreeIter _tmp40_ = {0};
					GtkListStore* _tmp41_;
					GtkTreeIter _tmp42_;
					const gchar* _tmp43_;
					_tmp39_ = model;
					gtk_list_store_append (_tmp39_, &_tmp40_);
					iter = _tmp40_;
					_tmp41_ = model;
					_tmp42_ = iter;
					_tmp43_ = theme;
					gtk_list_store_set (_tmp41_, &_tmp42_, 0, _tmp43_, -1, -1);
					hit = TRUE;
					_g_free0 (theme);
				}
			}
			theme_collection = (_vala_array_free (theme_collection, theme_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp44_ = self->priv->combobox_cursor;
		_tmp45_ = model;
		gtk_combo_box_set_model (_tmp44_, (GtkTreeModel*) _tmp45_);
		_tmp46_ = self->priv->combobox_cursor;
		gtk_combo_box_set_id_column (_tmp46_, 0);
		_tmp47_ = model;
		gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp47_, 0, GTK_SORT_ASCENDING);
		if (hit) {
			GtkComboBox* _tmp48_;
			GSettings* _tmp49_;
			GtkComboBox* _tmp50_;
			_tmp48_ = self->priv->combobox_cursor;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp48_, TRUE);
			_tmp49_ = self->priv->ui_settings;
			_tmp50_ = self->priv->combobox_cursor;
			g_settings_bind (_tmp49_, "cursor-theme", (GObject*) _tmp50_, "active-id", G_SETTINGS_BIND_DEFAULT);
		}
		_g_object_unref0 (model);
	}
	gtk_widget_queue_resize ((GtkWidget*) self);
}

static void
___lambda14__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda14_ ((BudgieStylePage*) self);
	g_object_unref (self);
}

void
budgie_style_page_load_themes (BudgieStylePage* self)
{
	ThemeScanner* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->theme_scanner;
	theme_scanner_scan_themes (_tmp0_, ___lambda14__gasync_ready_callback, g_object_ref (self));
}

/**
* Get a user-friendly name for each position.
*/
gchar*
budgie_style_page_notification_position_to_display (BudgieStylePage* self,
                                                    BudgieNotificationPosition position)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (position) {
		case BUDGIE_NOTIFICATION_POSITION_TOP_LEFT:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Top Left"));
			result = _tmp0_;
			return result;
		}
		case BUDGIE_NOTIFICATION_POSITION_BOTTOM_LEFT:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Bottom Left"));
			result = _tmp1_;
			return result;
		}
		case BUDGIE_NOTIFICATION_POSITION_BOTTOM_RIGHT:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Bottom Right"));
			result = _tmp2_;
			return result;
		}
		default:
		case BUDGIE_NOTIFICATION_POSITION_TOP_RIGHT:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("Top Right"));
			result = _tmp3_;
			return result;
		}
	}
}

static void
budgie_style_page_class_init (BudgieStylePageClass * klass,
                              gpointer klass_data)
{
	budgie_style_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieStylePage_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_style_page_finalize;
}

static void
budgie_style_page_instance_init (BudgieStylePage * self,
                                 gpointer klass)
{
	self->priv = budgie_style_page_get_instance_private (self);
	self->priv->is_labwc_running = FALSE;
}

static void
budgie_style_page_finalize (GObject * obj)
{
	BudgieStylePage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_STYLE_PAGE, BudgieStylePage);
	_g_object_unref0 (self->priv->combobox_gtk);
	_g_object_unref0 (self->priv->combobox_icon);
	_g_object_unref0 (self->priv->combobox_cursor);
	_g_object_unref0 (self->priv->combobox_notification_position);
	_g_object_unref0 (self->priv->switch_dark);
	_g_object_unref0 (self->priv->switch_builtin);
	_g_object_unref0 (self->priv->switch_animations);
	_g_object_unref0 (self->priv->labwc_theme_override);
	_g_object_unref0 (self->priv->ui_settings);
	_g_object_unref0 (self->priv->budgie_settings);
	_g_object_unref0 (self->priv->builtin_row);
	_g_object_unref0 (self->priv->labwc_theme_row);
	_g_object_unref0 (self->priv->theme_scanner);
	G_OBJECT_CLASS (budgie_style_page_parent_class)->finalize (obj);
}

/**
* StylePage simply provides a bunch of theme controls
*/
static GType
budgie_style_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieStylePageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_style_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieStylePage), 0, (GInstanceInitFunc) budgie_style_page_instance_init, NULL };
	GType budgie_style_page_type_id;
	budgie_style_page_type_id = g_type_register_static (BUDGIE_TYPE_SETTINGS_PAGE, "BudgieStylePage", &g_define_type_info, 0);
	BudgieStylePage_private_offset = g_type_add_instance_private (budgie_style_page_type_id, sizeof (BudgieStylePagePrivate));
	return budgie_style_page_type_id;
}

GType
budgie_style_page_get_type (void)
{
	static volatile gsize budgie_style_page_type_id__once = 0;
	if (g_once_init_enter (&budgie_style_page_type_id__once)) {
		GType budgie_style_page_type_id;
		budgie_style_page_type_id = budgie_style_page_get_type_once ();
		g_once_init_leave (&budgie_style_page_type_id__once, budgie_style_page_type_id);
	}
	return budgie_style_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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

