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

/*
 * This file is part of budgie-desktop
 *
 * Copyright (C) 2015-2016 Ikey Doherty <ikey@solus-project.com>
 *
 * 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 <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <plugin.h>
#include <libpeas/peas.h>
#include <BudgieToplevel.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>


#define BUDGIE_TYPE_PANEL_COLUMN (budgie_panel_column_get_type ())

#define BUDGIE_TYPE_APPLET_SETTINGS (budgie_applet_settings_get_type ())
#define BUDGIE_APPLET_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_APPLET_SETTINGS, BudgieAppletSettings))
#define BUDGIE_APPLET_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_APPLET_SETTINGS, BudgieAppletSettingsClass))
#define BUDGIE_IS_APPLET_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_APPLET_SETTINGS))
#define BUDGIE_IS_APPLET_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_APPLET_SETTINGS))
#define BUDGIE_APPLET_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_APPLET_SETTINGS, BudgieAppletSettingsClass))

typedef struct _BudgieAppletSettings BudgieAppletSettings;
typedef struct _BudgieAppletSettingsClass BudgieAppletSettingsClass;
typedef struct _BudgieAppletSettingsPrivate BudgieAppletSettingsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BUDGIE_TYPE_APPLET_PICKER (budgie_applet_picker_get_type ())
#define BUDGIE_APPLET_PICKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_APPLET_PICKER, BudgieAppletPicker))
#define BUDGIE_APPLET_PICKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_APPLET_PICKER, BudgieAppletPickerClass))
#define BUDGIE_IS_APPLET_PICKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_APPLET_PICKER))
#define BUDGIE_IS_APPLET_PICKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_APPLET_PICKER))
#define BUDGIE_APPLET_PICKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_APPLET_PICKER, BudgieAppletPickerClass))

typedef struct _BudgieAppletPicker BudgieAppletPicker;
typedef struct _BudgieAppletPickerClass BudgieAppletPickerClass;
typedef struct _BudgieAppletPickerPrivate BudgieAppletPickerPrivate;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define __vala_PeasPluginInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_PeasPluginInfo_free (var), NULL)))

#define BUDGIE_TYPE_PANEL_EDITOR (budgie_panel_editor_get_type ())
#define BUDGIE_PANEL_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditor))
#define BUDGIE_PANEL_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditorClass))
#define BUDGIE_IS_PANEL_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_PANEL_EDITOR))
#define BUDGIE_IS_PANEL_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_PANEL_EDITOR))
#define BUDGIE_PANEL_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditorClass))

typedef struct _BudgiePanelEditor BudgiePanelEditor;
typedef struct _BudgiePanelEditorClass BudgiePanelEditorClass;
typedef struct _BudgiePanelEditorPrivate BudgiePanelEditorPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _Block3Data Block3Data;
#define __g_list_free___vala_PeasPluginInfo_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free___vala_PeasPluginInfo_free0_ (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define BUDGIE_TYPE_SETTINGS_HEADER (budgie_settings_header_get_type ())
#define BUDGIE_SETTINGS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SETTINGS_HEADER, BudgieSettingsHeader))
#define BUDGIE_SETTINGS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SETTINGS_HEADER, BudgieSettingsHeaderClass))
#define BUDGIE_IS_SETTINGS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SETTINGS_HEADER))
#define BUDGIE_IS_SETTINGS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SETTINGS_HEADER))
#define BUDGIE_SETTINGS_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SETTINGS_HEADER, BudgieSettingsHeaderClass))

typedef struct _BudgieSettingsHeader BudgieSettingsHeader;
typedef struct _BudgieSettingsHeaderClass BudgieSettingsHeaderClass;
typedef struct _BudgieSettingsHeaderPrivate BudgieSettingsHeaderPrivate;

#define BUDGIE_TYPE_SETTINGS_VIEW (budgie_settings_view_get_type ())
#define BUDGIE_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsView))
#define BUDGIE_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsViewClass))
#define BUDGIE_IS_SETTINGS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SETTINGS_VIEW))
#define BUDGIE_IS_SETTINGS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SETTINGS_VIEW))
#define BUDGIE_SETTINGS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsViewClass))

typedef struct _BudgieSettingsView BudgieSettingsView;
typedef struct _BudgieSettingsViewClass BudgieSettingsViewClass;

#define BUDGIE_TYPE_FONT_SETTINGS (budgie_font_settings_get_type ())
#define BUDGIE_FONT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettings))
#define BUDGIE_FONT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettingsClass))
#define BUDGIE_IS_FONT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_FONT_SETTINGS))
#define BUDGIE_IS_FONT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_FONT_SETTINGS))
#define BUDGIE_FONT_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettingsClass))

typedef struct _BudgieFontSettings BudgieFontSettings;
typedef struct _BudgieFontSettingsClass BudgieFontSettingsClass;
typedef struct _BudgieFontSettingsPrivate BudgieFontSettingsPrivate;

#define BUDGIE_TYPE_BACKGROUND_SETTINGS (budgie_background_settings_get_type ())
#define BUDGIE_BACKGROUND_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettings))
#define BUDGIE_BACKGROUND_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettingsClass))
#define BUDGIE_IS_BACKGROUND_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_BACKGROUND_SETTINGS))
#define BUDGIE_IS_BACKGROUND_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_BACKGROUND_SETTINGS))
#define BUDGIE_BACKGROUND_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettingsClass))

typedef struct _BudgieBackgroundSettings BudgieBackgroundSettings;
typedef struct _BudgieBackgroundSettingsClass BudgieBackgroundSettingsClass;
typedef struct _BudgieBackgroundSettingsPrivate BudgieBackgroundSettingsPrivate;

#define BUDGIE_TYPE_WM_SETTINGS (budgie_wm_settings_get_type ())
#define BUDGIE_WM_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettings))
#define BUDGIE_WM_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettingsClass))
#define BUDGIE_IS_WM_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_WM_SETTINGS))
#define BUDGIE_IS_WM_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_WM_SETTINGS))
#define BUDGIE_WM_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettingsClass))

typedef struct _BudgieWmSettings BudgieWmSettings;
typedef struct _BudgieWmSettingsClass BudgieWmSettingsClass;
typedef struct _BudgieWmSettingsPrivate BudgieWmSettingsPrivate;

#define BUDGIE_TYPE_APPEARANCE_SETTINGS (budgie_appearance_settings_get_type ())
#define BUDGIE_APPEARANCE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettings))
#define BUDGIE_APPEARANCE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettingsClass))
#define BUDGIE_IS_APPEARANCE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_APPEARANCE_SETTINGS))
#define BUDGIE_IS_APPEARANCE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_APPEARANCE_SETTINGS))
#define BUDGIE_APPEARANCE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettingsClass))

typedef struct _BudgieAppearanceSettings BudgieAppearanceSettings;
typedef struct _BudgieAppearanceSettingsClass BudgieAppearanceSettingsClass;
typedef struct _BudgieAppearanceSettingsPrivate BudgieAppearanceSettingsPrivate;

#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;
typedef struct _BudgieSettingsViewPrivate BudgieSettingsViewPrivate;

#define BUDGIE_TYPE_RAVEN_EXPANDER (budgie_raven_expander_get_type ())
#define BUDGIE_RAVEN_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_RAVEN_EXPANDER, BudgieRavenExpander))
#define BUDGIE_RAVEN_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_RAVEN_EXPANDER, BudgieRavenExpanderClass))
#define BUDGIE_IS_RAVEN_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_RAVEN_EXPANDER))
#define BUDGIE_IS_RAVEN_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_RAVEN_EXPANDER))
#define BUDGIE_RAVEN_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_RAVEN_EXPANDER, BudgieRavenExpanderClass))

typedef struct _BudgieRavenExpander BudgieRavenExpander;
typedef struct _BudgieRavenExpanderClass BudgieRavenExpanderClass;

#define BUDGIE_TYPE_HEADER_WIDGET (budgie_header_widget_get_type ())
#define BUDGIE_HEADER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_HEADER_WIDGET, BudgieHeaderWidget))
#define BUDGIE_HEADER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_HEADER_WIDGET, BudgieHeaderWidgetClass))
#define BUDGIE_IS_HEADER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_HEADER_WIDGET))
#define BUDGIE_IS_HEADER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_HEADER_WIDGET))
#define BUDGIE_HEADER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_HEADER_WIDGET, BudgieHeaderWidgetClass))

typedef struct _BudgieHeaderWidget BudgieHeaderWidget;
typedef struct _BudgieHeaderWidgetClass BudgieHeaderWidgetClass;

typedef enum  {
	BUDGIE_PANEL_COLUMN_UUID = 0,
	BUDGIE_PANEL_COLUMN_DESCRIPTION = 1,
	BUDGIE_PANEL_COLUMN_N_COLUMNS = 2
} BudgiePanelColumn;

struct _BudgieAppletSettings {
	GtkBox parent_instance;
	BudgieAppletSettingsPrivate * priv;
};

struct _BudgieAppletSettingsClass {
	GtkBoxClass parent_class;
};

struct _BudgieAppletSettingsPrivate {
	GtkLabel* label_title;
	GtkScrolledWindow* scrolledwindow;
};

struct _BudgieAppletPicker {
	GtkBox parent_instance;
	BudgieAppletPickerPrivate * priv;
};

struct _BudgieAppletPickerClass {
	GtkBoxClass parent_class;
};

struct _BudgieAppletPickerPrivate {
	GtkButton* button_add;
	GtkButton* button_back;
	GtkScrolledWindow* scrolledwindow;
	GtkListBox* listbox;
	PeasPluginInfo* current_info;
};

struct _BudgiePanelEditor {
	GtkBox parent_instance;
	BudgiePanelEditorPrivate * priv;
};

struct _BudgiePanelEditorClass {
	GtkBoxClass parent_class;
};

struct _BudgiePanelEditorPrivate {
	BudgieDesktopManager* _manager;
	GtkComboBox* combobox_panels;
	gulong panels_id;
	GtkButton* button_add_panel;
	GtkButton* button_remove_panel;
	GtkComboBox* combobox_position;
	gulong position_id;
	GtkSpinButton* spinbutton_size;
	gulong spin_id;
	GtkComboBox* combobox_policy;
	GtkSwitch* switch_shadow;
	gulong shadow_id;
	GtkSwitch* switch_regions;
	gulong region_id;
	GHashTable* panels;
	BudgieToplevel* current_panel;
	gulong notify_id;
	GtkScrolledWindow* scrolledwindow_applets;
	GtkListBox* listbox_applets;
	GtkButton* button_add_applet;
	GtkButton* button_remove_applet;
	GtkButton* button_move_applet_left;
	GtkButton* button_move_applet_right;
	GtkButton* button_settings;
	GtkPopover* removal_popover;
	GtkButton* removal_ok;
	GtkButton* removal_cancel;
	BudgieAppletInfo* current_applet;
	gulong applets_changed_id;
	gulong applet_added_id;
	gulong applet_removed_id;
	BudgieAppletPicker* picker;
	BudgieAppletSettings* appsettings;
	GHashTable* applets;
	GtkStack* panel_stack;
};

struct _Block3Data {
	int _ref_count_;
	BudgiePanelEditor* self;
	BudgieDesktopManager* manager;
};

struct _BudgieSettingsHeader {
	GtkBox parent_instance;
	BudgieSettingsHeaderPrivate * priv;
};

struct _BudgieSettingsHeaderClass {
	GtkBoxClass parent_class;
};

struct _BudgieSettingsHeaderPrivate {
	BudgieSettingsView* view;
};

struct _BudgieFontSettings {
	GtkBox parent_instance;
	BudgieFontSettingsPrivate * priv;
};

struct _BudgieFontSettingsClass {
	GtkBoxClass parent_class;
};

struct _BudgieFontSettingsPrivate {
	GtkFontButton* fontbutton_title;
	GtkFontButton* fontbutton_document;
	GtkFontButton* fontbutton_interface;
	GtkFontButton* fontbutton_monospace;
	GSettings* ui_settings;
	GSettings* wm_settings;
};

struct _BudgieBackgroundSettings {
	GtkBox parent_instance;
	BudgieBackgroundSettingsPrivate * priv;
};

struct _BudgieBackgroundSettingsClass {
	GtkBoxClass parent_class;
};

struct _BudgieBackgroundSettingsPrivate {
	GtkSwitch* switch_icons;
	GSettings* background_settings;
};

struct _BudgieWmSettings {
	GtkBox parent_instance;
	BudgieWmSettingsPrivate * priv;
};

struct _BudgieWmSettingsClass {
	GtkBoxClass parent_class;
};

struct _BudgieWmSettingsPrivate {
	GtkSwitch* switch_unredirect;
	GSettings* wm_settings;
};

struct _BudgieAppearanceSettings {
	GtkBox parent_instance;
	BudgieAppearanceSettingsPrivate * priv;
};

struct _BudgieAppearanceSettingsClass {
	GtkBoxClass parent_class;
};

struct _BudgieAppearanceSettingsPrivate {
	GtkComboBox* combobox_gtk;
	GtkComboBox* combobox_icon;
	GtkComboBox* combobox_cursor;
	GtkSwitch* switch_dark;
	GtkSwitch* switch_builtin;
	GSettings* ui_settings;
	GSettings* budgie_settings;
	ThemeScanner* theme_scanner;
};

struct _BudgieSettingsView {
	GtkBox parent_instance;
	BudgieSettingsViewPrivate * priv;
};

struct _BudgieSettingsViewClass {
	GtkBoxClass parent_class;
};

struct _BudgieSettingsViewPrivate {
	GtkStack* stack;
	GtkStackSwitcher* switcher;
	BudgieDesktopManager* _manager;
	GtkStack* panel_stack;
};


static gpointer budgie_applet_settings_parent_class = NULL;
static gpointer budgie_applet_picker_parent_class = NULL;
static gpointer budgie_panel_editor_parent_class = NULL;
static gpointer budgie_settings_header_parent_class = NULL;
static gpointer budgie_font_settings_parent_class = NULL;
static gpointer budgie_background_settings_parent_class = NULL;
static gpointer budgie_wm_settings_parent_class = NULL;
static gpointer budgie_appearance_settings_parent_class = NULL;
static gpointer budgie_settings_view_parent_class = NULL;

GType budgie_panel_column_get_type (void) G_GNUC_CONST;
GType budgie_applet_settings_get_type (void) G_GNUC_CONST;
#define BUDGIE_APPLET_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_APPLET_SETTINGS, BudgieAppletSettingsPrivate))
enum  {
	BUDGIE_APPLET_SETTINGS_DUMMY_PROPERTY
};
static void budgie_applet_settings_back_clicked (BudgieAppletSettings* self);
static void _budgie_applet_settings_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
void budgie_applet_settings_set_applet (BudgieAppletSettings* self, BudgieAppletInfo* info);
BudgieAppletSettings* budgie_applet_settings_new (void);
BudgieAppletSettings* budgie_applet_settings_construct (GType object_type);
static void budgie_applet_settings_finalize (GObject* obj);
GType budgie_applet_picker_get_type (void) G_GNUC_CONST;
#define BUDGIE_APPLET_PICKER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_APPLET_PICKER, BudgieAppletPickerPrivate))
enum  {
	BUDGIE_APPLET_PICKER_DUMMY_PROPERTY
};
BudgieAppletPicker* budgie_applet_picker_new (void);
BudgieAppletPicker* budgie_applet_picker_construct (GType object_type);
static gint budgie_applet_picker_lb_sort (BudgieAppletPicker* self, GtkListBoxRow* before, GtkListBoxRow* after);
static gint _budgie_applet_picker_lb_sort_gtk_list_box_sort_func (GtkListBoxRow* row1, GtkListBoxRow* row2, gpointer self);
static void budgie_applet_picker_on_row_selected (BudgieAppletPicker* self, GtkListBoxRow* row);
static void _budgie_applet_picker_on_row_selected_gtk_list_box_row_selected (GtkListBox* _sender, GtkListBoxRow* row, gpointer self);
static void budgie_applet_picker_on_row_activate (BudgieAppletPicker* self, GtkListBoxRow* row);
static void _budgie_applet_picker_on_row_activate_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self);
static void budgie_applet_picker_back_clicked (BudgieAppletPicker* self);
static void _budgie_applet_picker_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void budgie_applet_picker_add_clicked (BudgieAppletPicker* self);
static void _budgie_applet_picker_add_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
void budgie_applet_picker_set_plugin_list (BudgieAppletPicker* self, GList* plugins);
static PeasPluginInfo* _vala_PeasPluginInfo_copy (PeasPluginInfo* self);
static void _vala_PeasPluginInfo_free (PeasPluginInfo* self);
static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void budgie_applet_picker_finalize (GObject* obj);
GType budgie_panel_editor_get_type (void) G_GNUC_CONST;
#define BUDGIE_PANEL_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditorPrivate))
enum  {
	BUDGIE_PANEL_EDITOR_DUMMY_PROPERTY,
	BUDGIE_PANEL_EDITOR_MANAGER
};
static void budgie_panel_editor_settings_clicked (BudgiePanelEditor* self);
static void _budgie_panel_editor_settings_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
BudgiePanelEditor* budgie_panel_editor_new (BudgieDesktopManager* manager, GtkStack* panel_stack);
BudgiePanelEditor* budgie_panel_editor_construct (GType object_type, BudgieDesktopManager* manager, GtkStack* panel_stack);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
void budgie_panel_editor_on_panels_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_panels_changed_budgie_desktop_manager_panels_changed (BudgieDesktopManager* _sender, gpointer self);
static void __lambda31_ (BudgiePanelEditor* self);
BudgieDesktopManager* budgie_panel_editor_get_manager (BudgiePanelEditor* self);
static void ___lambda31__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda32_ (BudgiePanelEditor* self);
static void ___lambda32__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda33_ (BudgiePanelEditor* self);
static void ___lambda33__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda34_ (BudgiePanelEditor* self);
static void ___lambda34__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
static void budgie_panel_editor_on_position_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_position_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
static void budgie_panel_editor_on_size_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_size_changed_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
static void budgie_panel_editor_on_shadow_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_shadow_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void budgie_panel_editor_on_region_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_region_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void budgie_panel_editor_on_panel_changed (BudgiePanelEditor* self);
static void _budgie_panel_editor_on_panel_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
static gint budgie_panel_editor_lb_sort (BudgiePanelEditor* self, GtkListBoxRow* before, GtkListBoxRow* after);
static gint _budgie_panel_editor_lb_sort_gtk_list_box_sort_func (GtkListBoxRow* row1, GtkListBoxRow* row2, gpointer self);
static void budgie_panel_editor_lb_headers (BudgiePanelEditor* self, GtkListBoxRow* before, GtkListBoxRow* after);
static void _budgie_panel_editor_lb_headers_gtk_list_box_update_header_func (GtkListBoxRow* row, GtkListBoxRow* before, gpointer self);
static void budgie_panel_editor_on_row_activate (BudgiePanelEditor* self, GtkListBoxRow* row);
static void _budgie_panel_editor_on_row_activate_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self);
static void __lambda35_ (BudgiePanelEditor* self);
static void ___lambda35__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda36_ (BudgiePanelEditor* self);
static void ___lambda36__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda37_ (BudgiePanelEditor* self);
static void ___lambda37__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda38_ (Block3Data* _data3_);
static void __vala_PeasPluginInfo_free0_ (gpointer var);
static void _g_list_free___vala_PeasPluginInfo_free0_ (GList* self);
static void ___lambda38__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda39_ (BudgiePanelEditor* self);
static void ___lambda39__budgie_applet_picker_view_switch (BudgieAppletPicker* _sender, gpointer self);
static void budgie_panel_editor_do_applet_add (BudgiePanelEditor* self, PeasPluginInfo* info);
static void _budgie_panel_editor_do_applet_add_budgie_applet_picker_applet_add (BudgieAppletPicker* _sender, PeasPluginInfo* info, gpointer self);
static void __lambda40_ (BudgiePanelEditor* self);
static void ___lambda40__budgie_applet_settings_view_switch (BudgieAppletSettings* _sender, gpointer self);
static void budgie_panel_editor_init_applets (BudgiePanelEditor* self);
static void budgie_panel_editor_set_active_panel (BudgiePanelEditor* self, const gchar* uuid);
static gchar* budgie_panel_editor_get_panel_id (BudgiePanelEditor* self, BudgieToplevel* panel);
static gchar* budgie_panel_editor_positition_to_id (BudgiePanelEditor* self, BudgiePanelPosition pos);
static void _g_list_free__g_object_unref0_ (GList* self);
static void budgie_panel_editor_on_panel_update (BudgiePanelEditor* self, GObject* o, GParamSpec* p);
static void _budgie_panel_editor_on_panel_update_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void budgie_panel_editor_refresh_applets (BudgiePanelEditor* self);
static void _budgie_panel_editor_refresh_applets_budgie_toplevel_applets_changed (BudgieToplevel* _sender, gpointer self);
static void budgie_panel_editor_applet_added (BudgiePanelEditor* self, BudgieAppletInfo* info);
static void _budgie_panel_editor_applet_added_budgie_toplevel_applet_added (BudgieToplevel* _sender, BudgieAppletInfo* info, gpointer self);
static void budgie_panel_editor_applet_removed (BudgiePanelEditor* self, const gchar* uuid);
static void _budgie_panel_editor_applet_removed_budgie_toplevel_applet_removed (BudgieToplevel* _sender, const gchar* uuid, gpointer self);
static void budgie_panel_editor_update_applets (BudgiePanelEditor* self);
static void budgie_panel_editor_insert_applet (BudgiePanelEditor* self, BudgieAppletInfo* applet);
static gint budgie_panel_editor_align_to_int (BudgiePanelEditor* self, const gchar* al);
void budgie_panel_editor_set_manager (BudgiePanelEditor* self, BudgieDesktopManager* value);
static void budgie_panel_editor_finalize (GObject* obj);
static void _vala_budgie_panel_editor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_budgie_panel_editor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType budgie_settings_header_get_type (void) G_GNUC_CONST;
GType budgie_settings_view_get_type (void) G_GNUC_CONST;
#define BUDGIE_SETTINGS_HEADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_SETTINGS_HEADER, BudgieSettingsHeaderPrivate))
enum  {
	BUDGIE_SETTINGS_HEADER_DUMMY_PROPERTY
};
static void budgie_settings_header_exit_clicked (BudgieSettingsHeader* self);
static void _budgie_settings_header_exit_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
BudgieSettingsHeader* budgie_settings_header_new (BudgieSettingsView* view);
BudgieSettingsHeader* budgie_settings_header_construct (GType object_type, BudgieSettingsView* view);
static void budgie_settings_header_finalize (GObject* obj);
GType budgie_font_settings_get_type (void) G_GNUC_CONST;
#define BUDGIE_FONT_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettingsPrivate))
enum  {
	BUDGIE_FONT_SETTINGS_DUMMY_PROPERTY
};
BudgieFontSettings* budgie_font_settings_new (void);
BudgieFontSettings* budgie_font_settings_construct (GType object_type);
static GObject * budgie_font_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void budgie_font_settings_finalize (GObject* obj);
GType budgie_background_settings_get_type (void) G_GNUC_CONST;
#define BUDGIE_BACKGROUND_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettingsPrivate))
enum  {
	BUDGIE_BACKGROUND_SETTINGS_DUMMY_PROPERTY
};
BudgieBackgroundSettings* budgie_background_settings_new (void);
BudgieBackgroundSettings* budgie_background_settings_construct (GType object_type);
static GObject * budgie_background_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void budgie_background_settings_finalize (GObject* obj);
GType budgie_wm_settings_get_type (void) G_GNUC_CONST;
#define BUDGIE_WM_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettingsPrivate))
enum  {
	BUDGIE_WM_SETTINGS_DUMMY_PROPERTY
};
BudgieWmSettings* budgie_wm_settings_new (void);
BudgieWmSettings* budgie_wm_settings_construct (GType object_type);
static GObject * budgie_wm_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void budgie_wm_settings_finalize (GObject* obj);
GType budgie_appearance_settings_get_type (void) G_GNUC_CONST;
GType theme_scanner_get_type (void) G_GNUC_CONST;
#define BUDGIE_APPEARANCE_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettingsPrivate))
enum  {
	BUDGIE_APPEARANCE_SETTINGS_DUMMY_PROPERTY
};
void budgie_appearance_settings_load_themes (BudgieAppearanceSettings* self);
void theme_scanner_scan_themes (ThemeScanner* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void theme_scanner_scan_themes_finish (ThemeScanner* self, GAsyncResult* _res_);
static void __lambda30_ (BudgieAppearanceSettings* self);
gchar** theme_scanner_get_gtk_themes (ThemeScanner* self, int* result_length1);
gchar** theme_scanner_get_icon_themes (ThemeScanner* self, int* result_length1);
gchar** theme_scanner_get_cursor_themes (ThemeScanner* self, int* result_length1);
static void ___lambda30__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
BudgieAppearanceSettings* budgie_appearance_settings_new (void);
BudgieAppearanceSettings* budgie_appearance_settings_construct (GType object_type);
static GObject * budgie_appearance_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
ThemeScanner* theme_scanner_new (void);
ThemeScanner* theme_scanner_construct (GType object_type);
static void budgie_appearance_settings_finalize (GObject* obj);
#define BUDGIE_SETTINGS_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsViewPrivate))
enum  {
	BUDGIE_SETTINGS_VIEW_DUMMY_PROPERTY,
	BUDGIE_SETTINGS_VIEW_MANAGER
};
BudgieSettingsView* budgie_settings_view_new (BudgieDesktopManager* manager);
BudgieSettingsView* budgie_settings_view_construct (GType object_type, BudgieDesktopManager* manager);
GType budgie_raven_expander_get_type (void) G_GNUC_CONST;
BudgieHeaderWidget* budgie_header_widget_new (const gchar* text, const gchar* icon_name, gboolean can_close, GtkWidget* custom_widget, GtkWidget* end_widget);
BudgieHeaderWidget* budgie_header_widget_construct (GType object_type, const gchar* text, const gchar* icon_name, gboolean can_close, GtkWidget* custom_widget, GtkWidget* end_widget);
GType budgie_header_widget_get_type (void) G_GNUC_CONST;
BudgieRavenExpander* budgie_raven_expander_new (BudgieHeaderWidget* header);
BudgieRavenExpander* budgie_raven_expander_construct (GType object_type, BudgieHeaderWidget* header);
void budgie_settings_view_set_clean (BudgieSettingsView* self);
BudgieDesktopManager* budgie_settings_view_get_manager (BudgieSettingsView* self);
void budgie_settings_view_set_manager (BudgieSettingsView* self, BudgieDesktopManager* value);
static void budgie_settings_view_finalize (GObject* obj);
static void _vala_budgie_settings_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_budgie_settings_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


GType budgie_panel_column_get_type (void) {
	static volatile gsize budgie_panel_column_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_panel_column_type_id__volatile)) {
		static const GEnumValue values[] = {{BUDGIE_PANEL_COLUMN_UUID, "BUDGIE_PANEL_COLUMN_UUID", "uuid"}, {BUDGIE_PANEL_COLUMN_DESCRIPTION, "BUDGIE_PANEL_COLUMN_DESCRIPTION", "description"}, {BUDGIE_PANEL_COLUMN_N_COLUMNS, "BUDGIE_PANEL_COLUMN_N_COLUMNS", "n-columns"}, {0, NULL, NULL}};
		GType budgie_panel_column_type_id;
		budgie_panel_column_type_id = g_enum_register_static ("BudgiePanelColumn", values);
		g_once_init_leave (&budgie_panel_column_type_id__volatile, budgie_panel_column_type_id);
	}
	return budgie_panel_column_type_id__volatile;
}


static void budgie_applet_settings_back_clicked (BudgieAppletSettings* self) {
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name (self, "view-switch");
}


static void _budgie_applet_settings_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	budgie_applet_settings_back_clicked ((BudgieAppletSettings*) self);
}


void budgie_applet_settings_set_applet (BudgieAppletSettings* self, BudgieAppletInfo* info) {
	GtkScrolledWindow* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	GtkLabel* _tmp5_ = NULL;
	BudgieAppletInfo* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	GtkScrolledWindow* _tmp10_ = NULL;
	BudgieAppletInfo* _tmp11_ = NULL;
	BudgieApplet* _tmp12_ = NULL;
	BudgieApplet* _tmp13_ = NULL;
	BudgieApplet* _tmp14_ = NULL;
	GtkWidget* _tmp15_ = NULL;
	GtkWidget* _tmp16_ = NULL;
	GtkScrolledWindow* _tmp17_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->scrolledwindow;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	if (_tmp1_ != NULL) {
		GtkScrolledWindow* _tmp2_ = NULL;
		GtkScrolledWindow* _tmp3_ = NULL;
		GtkWidget* _tmp4_ = NULL;
		_tmp2_ = self->priv->scrolledwindow;
		_tmp3_ = self->priv->scrolledwindow;
		_tmp4_ = gtk_bin_get_child ((GtkBin*) _tmp3_);
		gtk_container_remove ((GtkContainer*) _tmp2_, _tmp4_);
	}
	_tmp5_ = self->priv->label_title;
	_tmp6_ = info;
	g_object_get (_tmp6_, "name", &_tmp7_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	gtk_label_set_text (_tmp5_, _tmp9_);
	_g_free0 (_tmp9_);
	_tmp10_ = self->priv->scrolledwindow;
	_tmp11_ = info;
	g_object_get (_tmp11_, "applet", &_tmp12_, NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = budgie_applet_get_settings_ui (_tmp14_);
	_tmp16_ = _tmp15_;
	gtk_container_add ((GtkContainer*) _tmp10_, _tmp16_);
	_g_object_unref0 (_tmp16_);
	_g_object_unref0 (_tmp14_);
	_tmp17_ = self->priv->scrolledwindow;
	gtk_widget_show_all ((GtkWidget*) _tmp17_);
}


BudgieAppletSettings* budgie_applet_settings_construct (GType object_type) {
	BudgieAppletSettings * self = NULL;
	self = (BudgieAppletSettings*) g_object_new (object_type, NULL);
	return self;
}


BudgieAppletSettings* budgie_applet_settings_new (void) {
	return budgie_applet_settings_construct (BUDGIE_TYPE_APPLET_SETTINGS);
}


static void budgie_applet_settings_class_init (BudgieAppletSettingsClass * klass) {
	gint BudgieAppletSettings_private_offset;
	budgie_applet_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieAppletSettingsPrivate));
	G_OBJECT_CLASS (klass)->finalize = budgie_applet_settings_finalize;
	BudgieAppletSettings_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/applet_settings.ui");
	g_signal_new ("view_switch", BUDGIE_TYPE_APPLET_SETTINGS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_title", FALSE, BudgieAppletSettings_private_offset + G_STRUCT_OFFSET (BudgieAppletSettingsPrivate, label_title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scrolledwindow", FALSE, BudgieAppletSettings_private_offset + G_STRUCT_OFFSET (BudgieAppletSettingsPrivate, scrolledwindow));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "back_clicked", G_CALLBACK(_budgie_applet_settings_back_clicked_gtk_button_clicked));
}


static void budgie_applet_settings_instance_init (BudgieAppletSettings * self) {
	self->priv = BUDGIE_APPLET_SETTINGS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_applet_settings_finalize (GObject* obj) {
	BudgieAppletSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_APPLET_SETTINGS, BudgieAppletSettings);
	_g_object_unref0 (self->priv->label_title);
	_g_object_unref0 (self->priv->scrolledwindow);
	G_OBJECT_CLASS (budgie_applet_settings_parent_class)->finalize (obj);
}


GType budgie_applet_settings_get_type (void) {
	static volatile gsize budgie_applet_settings_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_applet_settings_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieAppletSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_applet_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieAppletSettings), 0, (GInstanceInitFunc) budgie_applet_settings_instance_init, NULL };
		GType budgie_applet_settings_type_id;
		budgie_applet_settings_type_id = g_type_register_static (gtk_box_get_type (), "BudgieAppletSettings", &g_define_type_info, 0);
		g_once_init_leave (&budgie_applet_settings_type_id__volatile, budgie_applet_settings_type_id);
	}
	return budgie_applet_settings_type_id__volatile;
}


static gint _budgie_applet_picker_lb_sort_gtk_list_box_sort_func (GtkListBoxRow* row1, GtkListBoxRow* row2, gpointer self) {
	gint result;
	result = budgie_applet_picker_lb_sort ((BudgieAppletPicker*) self, row1, row2);
	return result;
}


static void _budgie_applet_picker_on_row_selected_gtk_list_box_row_selected (GtkListBox* _sender, GtkListBoxRow* row, gpointer self) {
	budgie_applet_picker_on_row_selected ((BudgieAppletPicker*) self, row);
}


static void _budgie_applet_picker_on_row_activate_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self) {
	budgie_applet_picker_on_row_activate ((BudgieAppletPicker*) self, row);
}


BudgieAppletPicker* budgie_applet_picker_construct (GType object_type) {
	BudgieAppletPicker * self = NULL;
	GtkListBox* _tmp0_ = NULL;
	GtkListBox* _tmp1_ = NULL;
	GtkListBox* _tmp2_ = NULL;
	GtkScrolledWindow* _tmp3_ = NULL;
	GtkListBox* _tmp4_ = NULL;
	GtkListBox* _tmp5_ = NULL;
	GtkListBox* _tmp6_ = NULL;
	GtkListBox* _tmp7_ = NULL;
	self = (BudgieAppletPicker*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp0_;
	_tmp1_ = self->priv->listbox;
	gtk_list_box_set_selection_mode (_tmp1_, GTK_SELECTION_SINGLE);
	_tmp2_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp2_, _budgie_applet_picker_lb_sort_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp3_ = self->priv->scrolledwindow;
	_tmp4_ = self->priv->listbox;
	gtk_container_add ((GtkContainer*) _tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->listbox;
	g_signal_connect_object (_tmp5_, "row-selected", (GCallback) _budgie_applet_picker_on_row_selected_gtk_list_box_row_selected, self, 0);
	_tmp6_ = self->priv->listbox;
	gtk_list_box_set_activate_on_single_click (_tmp6_, FALSE);
	_tmp7_ = self->priv->listbox;
	g_signal_connect_object (_tmp7_, "row-activated", (GCallback) _budgie_applet_picker_on_row_activate_gtk_list_box_row_activated, self, 0);
	return self;
}


BudgieAppletPicker* budgie_applet_picker_new (void) {
	return budgie_applet_picker_construct (BUDGIE_TYPE_APPLET_PICKER);
}


static void budgie_applet_picker_back_clicked (BudgieAppletPicker* self) {
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name (self, "view-switch");
}


static void _budgie_applet_picker_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	budgie_applet_picker_back_clicked ((BudgieAppletPicker*) self);
}


static void budgie_applet_picker_add_clicked (BudgieAppletPicker* self) {
	PeasPluginInfo* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name (self, "view-switch");
	_tmp0_ = self->priv->current_info;
	g_signal_emit_by_name (self, "applet-add", _tmp0_);
}


static void _budgie_applet_picker_add_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	budgie_applet_picker_add_clicked ((BudgieAppletPicker*) self);
}


static gint budgie_applet_picker_lb_sort (BudgieAppletPicker* self, GtkListBoxRow* before, GtkListBoxRow* after) {
	gint result = 0;
	PeasPluginInfo* before_info = NULL;
	GtkListBoxRow* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	PeasPluginInfo* after_info = NULL;
	GtkListBoxRow* _tmp3_ = NULL;
	GtkWidget* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	PeasPluginInfo* _tmp7_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = before;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = g_object_get_data ((GObject*) _tmp1_, "info");
	before_info = (PeasPluginInfo*) _tmp2_;
	_tmp3_ = after;
	_tmp4_ = gtk_bin_get_child ((GtkBin*) _tmp3_);
	_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "info");
	after_info = (PeasPluginInfo*) _tmp5_;
	_tmp7_ = before_info;
	if (_tmp7_ != NULL) {
		PeasPluginInfo* _tmp8_ = NULL;
		_tmp8_ = after_info;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		GCompareFunc _tmp9_ = NULL;
		PeasPluginInfo* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		PeasPluginInfo* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gint _tmp14_ = 0;
		_tmp9_ = g_strcmp0;
		_tmp10_ = before_info;
		_tmp11_ = peas_plugin_info_get_description (_tmp10_);
		_tmp12_ = after_info;
		_tmp13_ = peas_plugin_info_get_description (_tmp12_);
		_tmp14_ = _tmp9_ (_tmp11_, _tmp13_);
		result = _tmp14_;
		return result;
	}
	result = 0;
	return result;
}


static PeasPluginInfo* _vala_PeasPluginInfo_copy (PeasPluginInfo* self) {
	return g_boxed_copy (peas_plugin_info_get_type (), self);
}


static gpointer __vala_PeasPluginInfo_copy0 (gpointer self) {
	return self ? _vala_PeasPluginInfo_copy (self) : NULL;
}


static void _vala_PeasPluginInfo_free (PeasPluginInfo* self) {
	g_boxed_free (peas_plugin_info_get_type (), self);
}


void budgie_applet_picker_set_plugin_list (BudgieAppletPicker* self, GList* plugins) {
	GtkListBox* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GtkButton* _tmp3_ = NULL;
	GList* _tmp4_ = NULL;
	GtkListBox* _tmp30_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp1_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp2_ = NULL;
				_tmp2_ = child;
				gtk_widget_destroy (_tmp2_);
			}
		}
		_g_list_free0 (child_collection);
	}
	_tmp3_ = self->priv->button_add;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = plugins;
	{
		GList* info_collection = NULL;
		GList* info_it = NULL;
		info_collection = _tmp4_;
		for (info_it = info_collection; info_it != NULL; info_it = info_it->next) {
			PeasPluginInfo* _tmp5_ = NULL;
			PeasPluginInfo* info = NULL;
			_tmp5_ = __vala_PeasPluginInfo_copy0 ((PeasPluginInfo*) info_it->data);
			info = _tmp5_;
			{
				GtkBox* widgem = NULL;
				GtkBox* _tmp6_ = NULL;
				GtkImage* img = NULL;
				PeasPluginInfo* _tmp7_ = NULL;
				const gchar* _tmp8_ = NULL;
				GtkImage* _tmp9_ = NULL;
				GtkImage* _tmp10_ = NULL;
				GtkImage* _tmp11_ = NULL;
				GtkImage* _tmp12_ = NULL;
				GtkImage* _tmp13_ = NULL;
				GtkBox* _tmp14_ = NULL;
				GtkImage* _tmp15_ = NULL;
				GtkBox* _tmp16_ = NULL;
				PeasPluginInfo* _tmp17_ = NULL;
				PeasPluginInfo* _tmp18_ = NULL;
				GtkLabel* label = NULL;
				PeasPluginInfo* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				GtkLabel* _tmp21_ = NULL;
				GtkBox* _tmp22_ = NULL;
				GtkLabel* _tmp23_ = NULL;
				GtkLabel* _tmp24_ = NULL;
				GtkBox* _tmp25_ = NULL;
				GtkListBox* _tmp26_ = NULL;
				GtkBox* _tmp27_ = NULL;
				GtkListBox* _tmp28_ = NULL;
				GtkScrolledWindow* _tmp29_ = NULL;
				_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
				g_object_ref_sink (_tmp6_);
				widgem = _tmp6_;
				_tmp7_ = info;
				_tmp8_ = peas_plugin_info_get_icon_name (_tmp7_);
				_tmp9_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp8_, GTK_ICON_SIZE_MENU);
				g_object_ref_sink (_tmp9_);
				img = _tmp9_;
				_tmp10_ = img;
				gtk_widget_set_margin_start ((GtkWidget*) _tmp10_, 10);
				_tmp11_ = img;
				gtk_widget_set_margin_end ((GtkWidget*) _tmp11_, 8);
				_tmp12_ = img;
				gtk_widget_set_margin_top ((GtkWidget*) _tmp12_, 4);
				_tmp13_ = img;
				gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 4);
				_tmp14_ = widgem;
				_tmp15_ = img;
				gtk_box_pack_start (_tmp14_, (GtkWidget*) _tmp15_, FALSE, FALSE, (guint) 0);
				_tmp16_ = widgem;
				_tmp17_ = info;
				_tmp18_ = __vala_PeasPluginInfo_copy0 (_tmp17_);
				g_object_set_data_full ((GObject*) _tmp16_, "info", _tmp18_, _vala_PeasPluginInfo_free);
				_tmp19_ = info;
				_tmp20_ = peas_plugin_info_get_description (_tmp19_);
				_tmp21_ = (GtkLabel*) gtk_label_new (_tmp20_);
				g_object_ref_sink (_tmp21_);
				label = _tmp21_;
				_tmp22_ = widgem;
				_tmp23_ = label;
				gtk_box_pack_start (_tmp22_, (GtkWidget*) _tmp23_, TRUE, TRUE, (guint) 0);
				_tmp24_ = label;
				gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_START);
				_tmp25_ = widgem;
				gtk_widget_show_all ((GtkWidget*) _tmp25_);
				_tmp26_ = self->priv->listbox;
				_tmp27_ = widgem;
				gtk_container_add ((GtkContainer*) _tmp26_, (GtkWidget*) _tmp27_);
				_tmp28_ = self->priv->listbox;
				gtk_widget_show_all ((GtkWidget*) _tmp28_);
				_tmp29_ = self->priv->scrolledwindow;
				gtk_widget_show_all ((GtkWidget*) _tmp29_);
				_g_object_unref0 (label);
				_g_object_unref0 (img);
				_g_object_unref0 (widgem);
				__vala_PeasPluginInfo_free0 (info);
			}
		}
	}
	_tmp30_ = self->priv->listbox;
	gtk_list_box_invalidate_sort (_tmp30_);
}


/**
     * Handle double click/enter usage
     */
static void budgie_applet_picker_on_row_activate (BudgieAppletPicker* self, GtkListBoxRow* row) {
	PeasPluginInfo* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_info;
	if (_tmp0_ == NULL) {
		return;
	}
	budgie_applet_picker_add_clicked (self);
}


/**
     * Handle row selection for setting the current applet info
     */
static void budgie_applet_picker_on_row_selected (BudgieAppletPicker* self, GtkListBoxRow* row) {
	PeasPluginInfo* info = NULL;
	GtkListBoxRow* _tmp0_ = NULL;
	GtkListBoxRow* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
	gconstpointer _tmp4_ = NULL;
	GtkButton* _tmp5_ = NULL;
	PeasPluginInfo* _tmp6_ = NULL;
	g_return_if_fail (self != NULL);
	info = NULL;
	_tmp0_ = row;
	if (_tmp0_ == NULL) {
		GtkButton* _tmp1_ = NULL;
		_tmp1_ = self->priv->button_add;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, FALSE);
		self->priv->current_info = NULL;
		return;
	}
	_tmp2_ = row;
	_tmp3_ = gtk_bin_get_child ((GtkBin*) _tmp2_);
	_tmp4_ = g_object_get_data ((GObject*) _tmp3_, "info");
	info = (PeasPluginInfo*) _tmp4_;
	_tmp5_ = self->priv->button_add;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = info;
	self->priv->current_info = _tmp6_;
}


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


static void budgie_applet_picker_class_init (BudgieAppletPickerClass * klass) {
	gint BudgieAppletPicker_private_offset;
	budgie_applet_picker_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieAppletPickerPrivate));
	G_OBJECT_CLASS (klass)->finalize = budgie_applet_picker_finalize;
	BudgieAppletPicker_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/applets.ui");
	g_signal_new ("view_switch", BUDGIE_TYPE_APPLET_PICKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	g_signal_new ("applet_add", BUDGIE_TYPE_APPLET_PICKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED, G_TYPE_NONE, 1, peas_plugin_info_get_type ());
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_add", FALSE, BudgieAppletPicker_private_offset + G_STRUCT_OFFSET (BudgieAppletPickerPrivate, button_add));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_back", FALSE, BudgieAppletPicker_private_offset + G_STRUCT_OFFSET (BudgieAppletPickerPrivate, button_back));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scrolledwindow", FALSE, BudgieAppletPicker_private_offset + G_STRUCT_OFFSET (BudgieAppletPickerPrivate, scrolledwindow));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "back_clicked", G_CALLBACK(_budgie_applet_picker_back_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "add_clicked", G_CALLBACK(_budgie_applet_picker_add_clicked_gtk_button_clicked));
}


static void budgie_applet_picker_instance_init (BudgieAppletPicker * self) {
	self->priv = BUDGIE_APPLET_PICKER_GET_PRIVATE (self);
	self->priv->current_info = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_applet_picker_finalize (GObject* obj) {
	BudgieAppletPicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_APPLET_PICKER, BudgieAppletPicker);
	_g_object_unref0 (self->priv->button_add);
	_g_object_unref0 (self->priv->button_back);
	_g_object_unref0 (self->priv->scrolledwindow);
	_g_object_unref0 (self->priv->listbox);
	G_OBJECT_CLASS (budgie_applet_picker_parent_class)->finalize (obj);
}


GType budgie_applet_picker_get_type (void) {
	static volatile gsize budgie_applet_picker_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_applet_picker_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieAppletPickerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_applet_picker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieAppletPicker), 0, (GInstanceInitFunc) budgie_applet_picker_instance_init, NULL };
		GType budgie_applet_picker_type_id;
		budgie_applet_picker_type_id = g_type_register_static (gtk_box_get_type (), "BudgieAppletPicker", &g_define_type_info, 0);
		g_once_init_leave (&budgie_applet_picker_type_id__volatile, budgie_applet_picker_type_id);
	}
	return budgie_applet_picker_type_id__volatile;
}


static void budgie_panel_editor_settings_clicked (BudgiePanelEditor* self) {
	BudgieAppletSettings* _tmp0_ = NULL;
	BudgieAppletInfo* _tmp1_ = NULL;
	GtkStack* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->appsettings;
	_tmp1_ = self->priv->current_applet;
	budgie_applet_settings_set_applet (_tmp0_, _tmp1_);
	_tmp2_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp2_, "settings");
}


static void _budgie_panel_editor_settings_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	budgie_panel_editor_settings_clicked ((BudgiePanelEditor*) self);
}


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


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		BudgiePanelEditor* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->manager);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void _budgie_panel_editor_on_panels_changed_budgie_desktop_manager_panels_changed (BudgieDesktopManager* _sender, gpointer self) {
	budgie_panel_editor_on_panels_changed ((BudgiePanelEditor*) self);
}


static void __lambda31_ (BudgiePanelEditor* self) {
	BudgieDesktopManager* _tmp0_ = NULL;
	_tmp0_ = self->priv->_manager;
	budgie_desktop_manager_create_new_panel (_tmp0_);
}


static void ___lambda31__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda31_ ((BudgiePanelEditor*) self);
}


static void __lambda32_ (BudgiePanelEditor* self) {
	GtkPopover* _tmp0_ = NULL;
	_tmp0_ = self->priv->removal_popover;
	gtk_widget_show ((GtkWidget*) _tmp0_);
}


static void ___lambda32__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda32_ ((BudgiePanelEditor*) self);
}


static void __lambda33_ (BudgiePanelEditor* self) {
	GtkPopover* _tmp0_ = NULL;
	BudgieToplevel* _tmp1_ = NULL;
	_tmp0_ = self->priv->removal_popover;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->current_panel;
	if (_tmp1_ != NULL) {
		BudgieDesktopManager* _tmp2_ = NULL;
		BudgieToplevel* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		_tmp2_ = self->priv->_manager;
		_tmp3_ = self->priv->current_panel;
		_tmp4_ = budgie_toplevel_get_uuid (_tmp3_);
		_tmp5_ = _tmp4_;
		budgie_desktop_manager_delete_panel (_tmp2_, _tmp5_);
	}
}


static void ___lambda33__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda33_ ((BudgiePanelEditor*) self);
}


static void __lambda34_ (BudgiePanelEditor* self) {
	GtkPopover* _tmp0_ = NULL;
	_tmp0_ = self->priv->removal_popover;
	gtk_widget_hide ((GtkWidget*) _tmp0_);
}


static void ___lambda34__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda34_ ((BudgiePanelEditor*) self);
}


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


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _budgie_panel_editor_on_position_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
	budgie_panel_editor_on_position_changed ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_on_size_changed_gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self) {
	budgie_panel_editor_on_size_changed ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_on_shadow_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	budgie_panel_editor_on_shadow_changed ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_on_region_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	budgie_panel_editor_on_region_changed ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_on_panel_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
	budgie_panel_editor_on_panel_changed ((BudgiePanelEditor*) self);
}


static gint _budgie_panel_editor_lb_sort_gtk_list_box_sort_func (GtkListBoxRow* row1, GtkListBoxRow* row2, gpointer self) {
	gint result;
	result = budgie_panel_editor_lb_sort ((BudgiePanelEditor*) self, row1, row2);
	return result;
}


static void _budgie_panel_editor_lb_headers_gtk_list_box_update_header_func (GtkListBoxRow* row, GtkListBoxRow* before, gpointer self) {
	budgie_panel_editor_lb_headers ((BudgiePanelEditor*) self, row, before);
}


static void _budgie_panel_editor_on_row_activate_gtk_list_box_row_activated (GtkListBox* _sender, GtkListBoxRow* row, gpointer self) {
	budgie_panel_editor_on_row_activate ((BudgiePanelEditor*) self, row);
}


static void __lambda35_ (BudgiePanelEditor* self) {
	gboolean _tmp0_ = FALSE;
	BudgieAppletInfo* _tmp1_ = NULL;
	_tmp1_ = self->priv->current_applet;
	if (_tmp1_ != NULL) {
		BudgieToplevel* _tmp2_ = NULL;
		_tmp2_ = self->priv->current_panel;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		BudgieToplevel* _tmp3_ = NULL;
		BudgieAppletInfo* _tmp4_ = NULL;
		_tmp3_ = self->priv->current_panel;
		_tmp4_ = self->priv->current_applet;
		budgie_toplevel_remove_applet (_tmp3_, _tmp4_);
	}
}


static void ___lambda35__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda35_ ((BudgiePanelEditor*) self);
}


static void __lambda36_ (BudgiePanelEditor* self) {
	gboolean _tmp0_ = FALSE;
	BudgieAppletInfo* _tmp1_ = NULL;
	_tmp1_ = self->priv->current_applet;
	if (_tmp1_ != NULL) {
		BudgieToplevel* _tmp2_ = NULL;
		_tmp2_ = self->priv->current_panel;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		BudgieToplevel* _tmp3_ = NULL;
		BudgieAppletInfo* _tmp4_ = NULL;
		_tmp3_ = self->priv->current_panel;
		_tmp4_ = self->priv->current_applet;
		budgie_toplevel_move_applet_left (_tmp3_, _tmp4_);
	}
}


static void ___lambda36__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda36_ ((BudgiePanelEditor*) self);
}


static void __lambda37_ (BudgiePanelEditor* self) {
	gboolean _tmp0_ = FALSE;
	BudgieAppletInfo* _tmp1_ = NULL;
	_tmp1_ = self->priv->current_applet;
	if (_tmp1_ != NULL) {
		BudgieToplevel* _tmp2_ = NULL;
		_tmp2_ = self->priv->current_panel;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		BudgieToplevel* _tmp3_ = NULL;
		BudgieAppletInfo* _tmp4_ = NULL;
		_tmp3_ = self->priv->current_panel;
		_tmp4_ = self->priv->current_applet;
		budgie_toplevel_move_applet_right (_tmp3_, _tmp4_);
	}
}


static void ___lambda37__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda37_ ((BudgiePanelEditor*) self);
}


static void __vala_PeasPluginInfo_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (_vala_PeasPluginInfo_free (var), NULL));
}


static void _g_list_free___vala_PeasPluginInfo_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) __vala_PeasPluginInfo_free0_, NULL);
	g_list_free (self);
}


static void __lambda38_ (Block3Data* _data3_) {
	BudgiePanelEditor* self;
	BudgieAppletPicker* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	GtkStack* _tmp4_ = NULL;
	self = _data3_->self;
	_tmp0_ = self->priv->picker;
	_tmp1_ = _data3_->manager;
	_tmp2_ = budgie_desktop_manager_get_panel_plugins (_tmp1_);
	_tmp3_ = _tmp2_;
	budgie_applet_picker_set_plugin_list (_tmp0_, _tmp3_);
	__g_list_free___vala_PeasPluginInfo_free0_0 (_tmp3_);
	_tmp4_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp4_, "applets");
}


static void ___lambda38__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda38_ (self);
}


static void __lambda39_ (BudgiePanelEditor* self) {
	GtkStack* _tmp0_ = NULL;
	_tmp0_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "panel");
}


static void ___lambda39__budgie_applet_picker_view_switch (BudgieAppletPicker* _sender, gpointer self) {
	__lambda39_ ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_do_applet_add_budgie_applet_picker_applet_add (BudgieAppletPicker* _sender, PeasPluginInfo* info, gpointer self) {
	budgie_panel_editor_do_applet_add ((BudgiePanelEditor*) self, info);
}


static void __lambda40_ (BudgiePanelEditor* self) {
	GtkStack* _tmp0_ = NULL;
	_tmp0_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "panel");
}


static void ___lambda40__budgie_applet_settings_view_switch (BudgieAppletSettings* _sender, gpointer self) {
	__lambda40_ ((BudgiePanelEditor*) self);
}


BudgiePanelEditor* budgie_panel_editor_construct (GType object_type, BudgieDesktopManager* manager, GtkStack* panel_stack) {
	BudgiePanelEditor * self = NULL;
	Block3Data* _data3_;
	BudgieDesktopManager* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	BudgieDesktopManager* _tmp2_ = NULL;
	GtkStack* _tmp3_ = NULL;
	BudgieDesktopManager* _tmp4_ = NULL;
	GtkButton* _tmp5_ = NULL;
	GtkButton* _tmp6_ = NULL;
	GtkPopover* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	GtkButton* _tmp9_ = NULL;
	GtkButton* _tmp10_ = NULL;
	GtkStyleContext* _tmp11_ = NULL;
	GtkButton* _tmp12_ = NULL;
	GValue _tmp13_ = {0};
	const gchar* _tmp14_ = NULL;
	GtkButton* _tmp15_ = NULL;
	GtkButton* _tmp16_ = NULL;
	GtkStyleContext* _tmp17_ = NULL;
	GtkButton* _tmp18_ = NULL;
	GValue _tmp19_ = {0};
	GtkSizeGroup* size_group = NULL;
	GtkSizeGroup* _tmp20_ = NULL;
	GtkButton* _tmp21_ = NULL;
	GtkButton* _tmp22_ = NULL;
	GtkLabel* removal_label = NULL;
	const gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	GtkLabel* _tmp26_ = NULL;
	GtkLabel* _tmp27_ = NULL;
	GValue _tmp28_ = {0};
	GValue _tmp29_ = {0};
	GtkBox* removal_box = NULL;
	GtkBox* _tmp30_ = NULL;
	GtkBox* removal_box2 = NULL;
	GtkBox* _tmp31_ = NULL;
	GtkButton* _tmp32_ = NULL;
	GtkButton* _tmp33_ = NULL;
	GtkPopover* _tmp34_ = NULL;
	GtkButton* _tmp35_ = NULL;
	GtkButton* _tmp36_ = NULL;
	GtkButton* _tmp37_ = NULL;
	GHashFunc _tmp38_ = NULL;
	GEqualFunc _tmp39_ = NULL;
	GHashTable* _tmp40_ = NULL;
	GtkListStore* model = NULL;
	GtkListStore* _tmp41_ = NULL;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp42_ = NULL;
	GtkTreeIter _tmp43_ = {0};
	GtkListStore* _tmp44_ = NULL;
	GtkTreeIter _tmp45_ = {0};
	const gchar* _tmp46_ = NULL;
	GtkListStore* _tmp47_ = NULL;
	GtkTreeIter _tmp48_ = {0};
	GtkListStore* _tmp49_ = NULL;
	GtkTreeIter _tmp50_ = {0};
	const gchar* _tmp51_ = NULL;
	GtkComboBox* _tmp52_ = NULL;
	GtkListStore* _tmp53_ = NULL;
	GtkComboBox* _tmp54_ = NULL;
	GtkCellRendererText* render = NULL;
	GtkCellRendererText* _tmp55_ = NULL;
	GtkComboBox* _tmp56_ = NULL;
	GtkCellRendererText* _tmp57_ = NULL;
	GtkComboBox* _tmp58_ = NULL;
	GtkCellRendererText* _tmp59_ = NULL;
	GtkComboBox* _tmp60_ = NULL;
	GtkListStore* _tmp61_ = NULL;
	GtkCellRendererText* _tmp62_ = NULL;
	GtkComboBox* _tmp63_ = NULL;
	GtkListStore* _tmp64_ = NULL;
	GtkComboBox* _tmp65_ = NULL;
	GtkCellRendererText* _tmp66_ = NULL;
	GtkComboBox* _tmp67_ = NULL;
	GtkCellRendererText* _tmp68_ = NULL;
	GtkComboBox* _tmp69_ = NULL;
	GtkComboBox* _tmp70_ = NULL;
	gulong _tmp71_ = 0UL;
	GtkSpinButton* _tmp72_ = NULL;
	gulong _tmp73_ = 0UL;
	GtkSpinButton* _tmp74_ = NULL;
	GtkSpinButton* _tmp75_ = NULL;
	GtkSwitch* _tmp76_ = NULL;
	gulong _tmp77_ = 0UL;
	GtkSwitch* _tmp78_ = NULL;
	gulong _tmp79_ = 0UL;
	GtkComboBox* _tmp80_ = NULL;
	gulong _tmp81_ = 0UL;
	GtkListBox* _tmp82_ = NULL;
	GtkListBox* _tmp83_ = NULL;
	GtkStyleContext* _tmp84_ = NULL;
	GtkScrolledWindow* _tmp85_ = NULL;
	GtkListBox* _tmp86_ = NULL;
	GtkListBox* _tmp87_ = NULL;
	GtkListBox* _tmp88_ = NULL;
	GtkListBox* _tmp89_ = NULL;
	GtkButton* _tmp90_ = NULL;
	GtkButton* _tmp91_ = NULL;
	GtkButton* _tmp92_ = NULL;
	GtkButton* _tmp93_ = NULL;
	BudgieAppletPicker* _tmp94_ = NULL;
	BudgieAppletPicker* _tmp95_ = NULL;
	BudgieAppletPicker* _tmp96_ = NULL;
	GtkStack* _tmp97_ = NULL;
	BudgieAppletPicker* _tmp98_ = NULL;
	BudgieAppletSettings* _tmp99_ = NULL;
	BudgieAppletSettings* _tmp100_ = NULL;
	GtkStack* _tmp101_ = NULL;
	BudgieAppletSettings* _tmp102_ = NULL;
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_tmp0_ = manager;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data3_->manager);
	_data3_->manager = _tmp1_;
	_tmp2_ = _data3_->manager;
	self = (BudgiePanelEditor*) g_object_new (object_type, "manager", _tmp2_, NULL);
	_data3_->self = g_object_ref (self);
	_tmp3_ = panel_stack;
	self->priv->panel_stack = _tmp3_;
	_tmp4_ = _data3_->manager;
	g_signal_connect_object (_tmp4_, "panels-changed", (GCallback) _budgie_panel_editor_on_panels_changed_budgie_desktop_manager_panels_changed, self, 0);
	_tmp5_ = self->priv->button_add_panel;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) ___lambda31__gtk_button_clicked, self, 0);
	_tmp6_ = self->priv->button_remove_panel;
	_tmp7_ = (GtkPopover*) gtk_popover_new ((GtkWidget*) _tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->removal_popover);
	self->priv->removal_popover = _tmp7_;
	_tmp8_ = _ ("Remove panel");
	_tmp9_ = (GtkButton*) gtk_button_new_with_label (_tmp8_);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->removal_ok);
	self->priv->removal_ok = _tmp9_;
	_tmp10_ = self->priv->removal_ok;
	_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
	gtk_style_context_add_class (_tmp11_, "destructive-action");
	_tmp12_ = self->priv->removal_ok;
	g_value_init (&_tmp13_, G_TYPE_INT);
	g_value_set_int (&_tmp13_, 3);
	g_object_set_property ((GObject*) _tmp12_, "margin", &_tmp13_);
	G_IS_VALUE (&_tmp13_) ? (g_value_unset (&_tmp13_), NULL) : NULL;
	_tmp14_ = _ ("Cancel");
	_tmp15_ = (GtkButton*) gtk_button_new_with_label (_tmp14_);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->removal_cancel);
	self->priv->removal_cancel = _tmp15_;
	_tmp16_ = self->priv->removal_cancel;
	_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
	gtk_style_context_add_class (_tmp17_, "suggested-action");
	_tmp18_ = self->priv->removal_cancel;
	g_value_init (&_tmp19_, G_TYPE_INT);
	g_value_set_int (&_tmp19_, 3);
	g_object_set_property ((GObject*) _tmp18_, "margin", &_tmp19_);
	G_IS_VALUE (&_tmp19_) ? (g_value_unset (&_tmp19_), NULL) : NULL;
	_tmp20_ = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
	size_group = _tmp20_;
	_tmp21_ = self->priv->removal_ok;
	gtk_size_group_add_widget (size_group, (GtkWidget*) _tmp21_);
	_tmp22_ = self->priv->removal_cancel;
	gtk_size_group_add_widget (size_group, (GtkWidget*) _tmp22_);
	_tmp23_ = _ ("Really remove this panel?");
	_tmp24_ = g_strdup_printf ("<b>%s</b>", _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = (GtkLabel*) gtk_label_new (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_tmp27_ = _tmp26_;
	_g_free0 (_tmp25_);
	removal_label = _tmp27_;
	gtk_widget_set_halign ((GtkWidget*) removal_label, GTK_ALIGN_START);
	g_value_init (&_tmp28_, G_TYPE_DOUBLE);
	g_value_set_double (&_tmp28_, 0.0);
	g_object_set_property ((GObject*) removal_label, "xalign", &_tmp28_);
	G_IS_VALUE (&_tmp28_) ? (g_value_unset (&_tmp28_), NULL) : NULL;
	gtk_label_set_use_markup (removal_label, TRUE);
	g_value_init (&_tmp29_, G_TYPE_INT);
	g_value_set_int (&_tmp29_, 5);
	g_object_set_property ((GObject*) removal_label, "margin", &_tmp29_);
	G_IS_VALUE (&_tmp29_) ? (g_value_unset (&_tmp29_), NULL) : NULL;
	_tmp30_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp30_);
	removal_box = _tmp30_;
	_tmp31_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp31_);
	removal_box2 = _tmp31_;
	gtk_box_pack_start (removal_box, (GtkWidget*) removal_label, FALSE, FALSE, (guint) 2);
	gtk_box_pack_start (removal_box, (GtkWidget*) removal_box2, FALSE, FALSE, (guint) 2);
	_tmp32_ = self->priv->removal_cancel;
	gtk_box_pack_start (removal_box2, (GtkWidget*) _tmp32_, FALSE, FALSE, (guint) 2);
	_tmp33_ = self->priv->removal_ok;
	gtk_box_pack_start (removal_box2, (GtkWidget*) _tmp33_, FALSE, FALSE, (guint) 2);
	gtk_widget_show_all ((GtkWidget*) removal_box);
	_tmp34_ = self->priv->removal_popover;
	gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) removal_box);
	_tmp35_ = self->priv->button_remove_panel;
	g_signal_connect_object (_tmp35_, "clicked", (GCallback) ___lambda32__gtk_button_clicked, self, 0);
	_tmp36_ = self->priv->removal_ok;
	g_signal_connect_object (_tmp36_, "clicked", (GCallback) ___lambda33__gtk_button_clicked, self, 0);
	_tmp37_ = self->priv->removal_cancel;
	g_signal_connect_object (_tmp37_, "clicked", (GCallback) ___lambda34__gtk_button_clicked, self, 0);
	_tmp38_ = g_str_hash;
	_tmp39_ = g_str_equal;
	_tmp40_ = g_hash_table_new_full (_tmp38_, _tmp39_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->applets);
	self->priv->applets = _tmp40_;
	_tmp41_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	model = _tmp41_;
	_tmp42_ = model;
	gtk_list_store_append (_tmp42_, &_tmp43_);
	iter = _tmp43_;
	_tmp44_ = model;
	_tmp45_ = iter;
	_tmp46_ = _ ("Top");
	gtk_list_store_set (_tmp44_, &_tmp45_, 0, "top", 1, _tmp46_, -1, -1);
	_tmp47_ = model;
	gtk_list_store_append (_tmp47_, &_tmp48_);
	iter = _tmp48_;
	_tmp49_ = model;
	_tmp50_ = iter;
	_tmp51_ = _ ("Bottom");
	gtk_list_store_set (_tmp49_, &_tmp50_, 0, "bottom", 1, _tmp51_, -1, -1);
	_tmp52_ = self->priv->combobox_position;
	_tmp53_ = model;
	gtk_combo_box_set_model (_tmp52_, (GtkTreeModel*) _tmp53_);
	_tmp54_ = self->priv->combobox_position;
	gtk_combo_box_set_id_column (_tmp54_, 0);
	_tmp55_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp55_);
	render = _tmp55_;
	_tmp56_ = self->priv->combobox_position;
	_tmp57_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp56_, (GtkCellRenderer*) _tmp57_, TRUE);
	_tmp58_ = self->priv->combobox_position;
	_tmp59_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp58_, (GtkCellRenderer*) _tmp59_, "text", 1);
	_tmp60_ = self->priv->combobox_position;
	gtk_combo_box_set_id_column (_tmp60_, 0);
	_tmp61_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	_g_object_unref0 (model);
	model = _tmp61_;
	_tmp62_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp62_);
	_g_object_unref0 (render);
	render = _tmp62_;
	_tmp63_ = self->priv->combobox_panels;
	_tmp64_ = model;
	gtk_combo_box_set_model (_tmp63_, (GtkTreeModel*) _tmp64_);
	_tmp65_ = self->priv->combobox_panels;
	_tmp66_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp65_, (GtkCellRenderer*) _tmp66_, TRUE);
	_tmp67_ = self->priv->combobox_panels;
	_tmp68_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp67_, (GtkCellRenderer*) _tmp68_, "text", (gint) BUDGIE_PANEL_COLUMN_DESCRIPTION);
	_tmp69_ = self->priv->combobox_panels;
	gtk_combo_box_set_id_column (_tmp69_, (gint) BUDGIE_PANEL_COLUMN_UUID);
	_tmp70_ = self->priv->combobox_position;
	_tmp71_ = g_signal_connect_object (_tmp70_, "changed", (GCallback) _budgie_panel_editor_on_position_changed_gtk_combo_box_changed, self, 0);
	self->priv->position_id = _tmp71_;
	_tmp72_ = self->priv->spinbutton_size;
	_tmp73_ = g_signal_connect_object (_tmp72_, "value-changed", (GCallback) _budgie_panel_editor_on_size_changed_gtk_spin_button_value_changed, self, 0);
	self->priv->spin_id = _tmp73_;
	_tmp74_ = self->priv->spinbutton_size;
	gtk_spin_button_set_range (_tmp74_, (gdouble) 16, (gdouble) 200);
	_tmp75_ = self->priv->spinbutton_size;
	gtk_spin_button_set_numeric (_tmp75_, TRUE);
	_tmp76_ = self->priv->switch_shadow;
	_tmp77_ = g_signal_connect_object ((GObject*) _tmp76_, "notify::active", (GCallback) _budgie_panel_editor_on_shadow_changed_g_object_notify, self, 0);
	self->priv->shadow_id = _tmp77_;
	_tmp78_ = self->priv->switch_regions;
	_tmp79_ = g_signal_connect_object ((GObject*) _tmp78_, "notify::active", (GCallback) _budgie_panel_editor_on_region_changed_g_object_notify, self, 0);
	self->priv->region_id = _tmp79_;
	_tmp80_ = self->priv->combobox_panels;
	_tmp81_ = g_signal_connect_object (_tmp80_, "changed", (GCallback) _budgie_panel_editor_on_panel_changed_gtk_combo_box_changed, self, 0);
	self->priv->panels_id = _tmp81_;
	_tmp82_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp82_);
	_g_object_unref0 (self->priv->listbox_applets);
	self->priv->listbox_applets = _tmp82_;
	_tmp83_ = self->priv->listbox_applets;
	_tmp84_ = gtk_widget_get_style_context ((GtkWidget*) _tmp83_);
	gtk_style_context_remove_class (_tmp84_, "background");
	_tmp85_ = self->priv->scrolledwindow_applets;
	_tmp86_ = self->priv->listbox_applets;
	gtk_container_add ((GtkContainer*) _tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->listbox_applets;
	gtk_list_box_set_sort_func (_tmp87_, _budgie_panel_editor_lb_sort_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp88_ = self->priv->listbox_applets;
	gtk_list_box_set_header_func (_tmp88_, _budgie_panel_editor_lb_headers_gtk_list_box_update_header_func, g_object_ref (self), g_object_unref);
	_tmp89_ = self->priv->listbox_applets;
	g_signal_connect_object (_tmp89_, "row-activated", (GCallback) _budgie_panel_editor_on_row_activate_gtk_list_box_row_activated, self, 0);
	_tmp90_ = self->priv->button_remove_applet;
	g_signal_connect_object (_tmp90_, "clicked", (GCallback) ___lambda35__gtk_button_clicked, self, 0);
	_tmp91_ = self->priv->button_move_applet_left;
	g_signal_connect_object (_tmp91_, "clicked", (GCallback) ___lambda36__gtk_button_clicked, self, 0);
	_tmp92_ = self->priv->button_move_applet_right;
	g_signal_connect_object (_tmp92_, "clicked", (GCallback) ___lambda37__gtk_button_clicked, self, 0);
	_tmp93_ = self->priv->button_add_applet;
	g_signal_connect_data (_tmp93_, "clicked", (GCallback) ___lambda38__gtk_button_clicked, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	_tmp94_ = budgie_applet_picker_new ();
	g_object_ref_sink (_tmp94_);
	_g_object_unref0 (self->priv->picker);
	self->priv->picker = _tmp94_;
	_tmp95_ = self->priv->picker;
	g_signal_connect_object (_tmp95_, "view-switch", (GCallback) ___lambda39__budgie_applet_picker_view_switch, self, 0);
	_tmp96_ = self->priv->picker;
	g_signal_connect_object (_tmp96_, "applet-add", (GCallback) _budgie_panel_editor_do_applet_add_budgie_applet_picker_applet_add, self, 0);
	_tmp97_ = self->priv->panel_stack;
	_tmp98_ = self->priv->picker;
	gtk_stack_add_titled (_tmp97_, (GtkWidget*) _tmp98_, "applets", "Applets");
	_tmp99_ = budgie_applet_settings_new ();
	g_object_ref_sink (_tmp99_);
	_g_object_unref0 (self->priv->appsettings);
	self->priv->appsettings = _tmp99_;
	_tmp100_ = self->priv->appsettings;
	g_signal_connect_object (_tmp100_, "view-switch", (GCallback) ___lambda40__budgie_applet_settings_view_switch, self, 0);
	_tmp101_ = self->priv->panel_stack;
	_tmp102_ = self->priv->appsettings;
	gtk_stack_add_titled (_tmp101_, (GtkWidget*) _tmp102_, "settings", "Settings");
	_g_object_unref0 (render);
	_g_object_unref0 (model);
	_g_object_unref0 (removal_box2);
	_g_object_unref0 (removal_box);
	_g_object_unref0 (removal_label);
	_g_object_unref0 (size_group);
	block3_data_unref (_data3_);
	_data3_ = NULL;
	return self;
}


BudgiePanelEditor* budgie_panel_editor_new (BudgieDesktopManager* manager, GtkStack* panel_stack) {
	return budgie_panel_editor_construct (BUDGIE_TYPE_PANEL_EDITOR, manager, panel_stack);
}


static void budgie_panel_editor_do_applet_add (BudgiePanelEditor* self, PeasPluginInfo* info) {
	gboolean _tmp0_ = FALSE;
	PeasPluginInfo* _tmp1_ = NULL;
	BudgieToplevel* _tmp3_ = NULL;
	PeasPluginInfo* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp1_ = info;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		BudgieToplevel* _tmp2_ = NULL;
		_tmp2_ = self->priv->current_panel;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->current_panel;
	_tmp4_ = info;
	_tmp5_ = peas_plugin_info_get_name (_tmp4_);
	budgie_toplevel_add_new_applet (_tmp3_, _tmp5_);
}


static void budgie_panel_editor_init_applets (BudgiePanelEditor* self) {
	BudgieAppletPicker* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->picker;
	_tmp1_ = self->priv->_manager;
	_tmp2_ = budgie_desktop_manager_get_panel_plugins (_tmp1_);
	_tmp3_ = _tmp2_;
	budgie_applet_picker_set_plugin_list (_tmp0_, _tmp3_);
	__g_list_free___vala_PeasPluginInfo_free0_0 (_tmp3_);
}


static void budgie_panel_editor_on_panel_changed (BudgiePanelEditor* self) {
	gchar* id = NULL;
	GtkComboBox* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->combobox_panels;
	_tmp1_ = gtk_combo_box_get_active_id (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	id = _tmp2_;
	budgie_panel_editor_set_active_panel (self, id);
	_g_free0 (id);
}


static void budgie_panel_editor_on_shadow_changed (BudgiePanelEditor* self) {
	BudgieToplevel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_panel;
	_tmp1_ = self->priv->switch_shadow;
	_tmp2_ = gtk_switch_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	budgie_toplevel_set_shadow_visible (_tmp0_, _tmp3_);
}


static void budgie_panel_editor_on_region_changed (BudgiePanelEditor* self) {
	BudgieToplevel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current_panel;
	_tmp1_ = self->priv->switch_regions;
	_tmp2_ = gtk_switch_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	budgie_toplevel_set_theme_regions (_tmp0_, _tmp3_);
}


static void budgie_panel_editor_on_size_changed (BudgiePanelEditor* self) {
	BudgieDesktopManager* _tmp0_ = NULL;
	BudgieToplevel* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkSpinButton* _tmp4_ = NULL;
	gdouble _tmp5_ = 0.0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_manager;
	_tmp1_ = self->priv->current_panel;
	_tmp2_ = budgie_toplevel_get_uuid (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->spinbutton_size;
	_tmp5_ = gtk_spin_button_get_value (_tmp4_);
	budgie_desktop_manager_set_size (_tmp0_, _tmp3_, (gint) _tmp5_);
}


static gchar* budgie_panel_editor_get_panel_id (BudgiePanelEditor* self, BudgieToplevel* panel) {
	gchar* result = NULL;
	BudgieToplevel* _tmp0_ = NULL;
	BudgiePanelPosition _tmp1_ = 0;
	BudgiePanelPosition _tmp2_ = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = panel;
	_tmp1_ = budgie_toplevel_get_position (_tmp0_);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case BUDGIE_PANEL_POSITION_TOP:
		{
			const gchar* _tmp3_ = NULL;
			gchar* _tmp4_ = NULL;
			_tmp3_ = _ ("Top Panel");
			_tmp4_ = g_strdup (_tmp3_);
			result = _tmp4_;
			return result;
		}
		case BUDGIE_PANEL_POSITION_RIGHT:
		{
			const gchar* _tmp5_ = NULL;
			gchar* _tmp6_ = NULL;
			_tmp5_ = _ ("Right Panel");
			_tmp6_ = g_strdup (_tmp5_);
			result = _tmp6_;
			return result;
		}
		case BUDGIE_PANEL_POSITION_LEFT:
		{
			const gchar* _tmp7_ = NULL;
			gchar* _tmp8_ = NULL;
			_tmp7_ = _ ("Left Panel");
			_tmp8_ = g_strdup (_tmp7_);
			result = _tmp8_;
			return result;
		}
		default:
		{
			const gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			_tmp9_ = _ ("Bottom Panel");
			_tmp10_ = g_strdup (_tmp9_);
			result = _tmp10_;
			return result;
		}
	}
}


static gchar* budgie_panel_editor_positition_to_id (BudgiePanelEditor* self, BudgiePanelPosition pos) {
	gchar* result = NULL;
	BudgiePanelPosition _tmp0_ = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = pos;
	switch (_tmp0_) {
		case BUDGIE_PANEL_POSITION_TOP:
		{
			gchar* _tmp1_ = NULL;
			_tmp1_ = g_strdup ("top");
			result = _tmp1_;
			return result;
		}
		case BUDGIE_PANEL_POSITION_LEFT:
		{
			gchar* _tmp2_ = NULL;
			_tmp2_ = g_strdup ("left");
			result = _tmp2_;
			return result;
		}
		case BUDGIE_PANEL_POSITION_RIGHT:
		{
			gchar* _tmp3_ = NULL;
			_tmp3_ = g_strdup ("right");
			result = _tmp3_;
			return result;
		}
		default:
		{
			gchar* _tmp4_ = NULL;
			_tmp4_ = g_strdup ("bottom");
			result = _tmp4_;
			return result;
		}
	}
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


void budgie_panel_editor_on_panels_changed (BudgiePanelEditor* self) {
	GtkButton* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	GtkButton* _tmp3_ = NULL;
	BudgieDesktopManager* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	gchar* uuid = NULL;
	gchar* old_uuid = NULL;
	BudgieToplevel* _tmp6_ = NULL;
	GHashFunc _tmp11_ = NULL;
	GEqualFunc _tmp12_ = NULL;
	GHashTable* _tmp13_ = NULL;
	GList* panels = NULL;
	BudgieDesktopManager* _tmp14_ = NULL;
	GList* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	GList* _tmp17_ = NULL;
	GtkListStore* model = NULL;
	GtkListStore* _tmp20_ = NULL;
	GtkTreeIter iter = {0};
	GList* _tmp21_ = NULL;
	GtkListStore* _tmp45_ = NULL;
	GtkComboBox* _tmp46_ = NULL;
	GtkListStore* _tmp47_ = NULL;
	GtkComboBox* _tmp48_ = NULL;
	gboolean _tmp49_ = FALSE;
	const gchar* _tmp50_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->button_add_panel;
	_tmp1_ = self->priv->_manager;
	_tmp2_ = budgie_desktop_manager_slots_available (_tmp1_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp2_ >= ((guint) 1));
	_tmp3_ = self->priv->button_remove_panel;
	_tmp4_ = self->priv->_manager;
	_tmp5_ = budgie_desktop_manager_slots_used (_tmp4_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp5_ > ((guint) 1));
	uuid = NULL;
	old_uuid = NULL;
	_tmp6_ = self->priv->current_panel;
	if (_tmp6_ != NULL) {
		BudgieToplevel* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		_tmp7_ = self->priv->current_panel;
		_tmp8_ = budgie_toplevel_get_uuid (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strdup (_tmp9_);
		_g_free0 (old_uuid);
		old_uuid = _tmp10_;
	}
	_tmp11_ = g_str_hash;
	_tmp12_ = g_str_equal;
	_tmp13_ = g_hash_table_new_full (_tmp11_, _tmp12_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->panels);
	self->priv->panels = _tmp13_;
	_tmp14_ = self->priv->_manager;
	_tmp15_ = budgie_desktop_manager_get_panels (_tmp14_);
	panels = _tmp15_;
	_tmp17_ = panels;
	if (_tmp17_ == NULL) {
		_tmp16_ = TRUE;
	} else {
		GList* _tmp18_ = NULL;
		guint _tmp19_ = 0U;
		_tmp18_ = panels;
		_tmp19_ = g_list_length (_tmp18_);
		_tmp16_ = _tmp19_ < ((guint) 1);
	}
	if (_tmp16_) {
		__g_list_free__g_object_unref0_0 (panels);
		_g_free0 (old_uuid);
		_g_free0 (uuid);
		return;
	}
	_tmp20_ = gtk_list_store_new ((gint) BUDGIE_PANEL_COLUMN_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, -1);
	model = _tmp20_;
	_tmp21_ = panels;
	{
		GList* panel_collection = NULL;
		GList* panel_it = NULL;
		panel_collection = _tmp21_;
		for (panel_it = panel_collection; panel_it != NULL; panel_it = panel_it->next) {
			BudgieToplevel* _tmp22_ = NULL;
			BudgieToplevel* panel = NULL;
			_tmp22_ = _g_object_ref0 ((BudgieToplevel*) panel_it->data);
			panel = _tmp22_;
			{
				gchar* pos = NULL;
				BudgieToplevel* _tmp23_ = NULL;
				gchar* _tmp24_ = NULL;
				GtkListStore* _tmp25_ = NULL;
				GtkTreeIter _tmp26_ = {0};
				const gchar* _tmp27_ = NULL;
				GHashTable* _tmp32_ = NULL;
				BudgieToplevel* _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				const gchar* _tmp35_ = NULL;
				gchar* _tmp36_ = NULL;
				BudgieToplevel* _tmp37_ = NULL;
				BudgieToplevel* _tmp38_ = NULL;
				GtkListStore* _tmp39_ = NULL;
				GtkTreeIter _tmp40_ = {0};
				BudgieToplevel* _tmp41_ = NULL;
				const gchar* _tmp42_ = NULL;
				const gchar* _tmp43_ = NULL;
				const gchar* _tmp44_ = NULL;
				_tmp23_ = panel;
				_tmp24_ = budgie_panel_editor_get_panel_id (self, _tmp23_);
				pos = _tmp24_;
				_tmp25_ = model;
				gtk_list_store_append (_tmp25_, &_tmp26_);
				iter = _tmp26_;
				_tmp27_ = uuid;
				if (_tmp27_ == NULL) {
					BudgieToplevel* _tmp28_ = NULL;
					const gchar* _tmp29_ = NULL;
					const gchar* _tmp30_ = NULL;
					gchar* _tmp31_ = NULL;
					_tmp28_ = panel;
					_tmp29_ = budgie_toplevel_get_uuid (_tmp28_);
					_tmp30_ = _tmp29_;
					_tmp31_ = g_strdup (_tmp30_);
					_g_free0 (uuid);
					uuid = _tmp31_;
				}
				_tmp32_ = self->priv->panels;
				_tmp33_ = panel;
				_tmp34_ = budgie_toplevel_get_uuid (_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp36_ = g_strdup (_tmp35_);
				_tmp37_ = panel;
				_tmp38_ = _g_object_ref0 (_tmp37_);
				g_hash_table_insert (_tmp32_, _tmp36_, _tmp38_);
				_tmp39_ = model;
				_tmp40_ = iter;
				_tmp41_ = panel;
				_tmp42_ = budgie_toplevel_get_uuid (_tmp41_);
				_tmp43_ = _tmp42_;
				_tmp44_ = pos;
				gtk_list_store_set (_tmp39_, &_tmp40_, BUDGIE_PANEL_COLUMN_UUID, _tmp43_, BUDGIE_PANEL_COLUMN_DESCRIPTION, _tmp44_, -1, -1);
				_g_free0 (pos);
				_g_object_unref0 (panel);
			}
		}
	}
	_tmp45_ = model;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp45_, (gint) BUDGIE_PANEL_COLUMN_DESCRIPTION, GTK_SORT_DESCENDING);
	_tmp46_ = self->priv->combobox_panels;
	_tmp47_ = model;
	gtk_combo_box_set_model (_tmp46_, (GtkTreeModel*) _tmp47_);
	_tmp48_ = self->priv->combobox_panels;
	gtk_combo_box_set_id_column (_tmp48_, (gint) BUDGIE_PANEL_COLUMN_UUID);
	_tmp50_ = old_uuid;
	if (_tmp50_ != NULL) {
		GHashTable* _tmp51_ = NULL;
		const gchar* _tmp52_ = NULL;
		gboolean _tmp53_ = FALSE;
		_tmp51_ = self->priv->panels;
		_tmp52_ = old_uuid;
		_tmp53_ = g_hash_table_contains (_tmp51_, _tmp52_);
		_tmp49_ = _tmp53_;
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		const gchar* _tmp54_ = NULL;
		_tmp54_ = old_uuid;
		budgie_panel_editor_set_active_panel (self, _tmp54_);
	} else {
		const gchar* _tmp55_ = NULL;
		_tmp55_ = uuid;
		budgie_panel_editor_set_active_panel (self, _tmp55_);
	}
	_g_object_unref0 (model);
	__g_list_free__g_object_unref0_0 (panels);
	_g_free0 (old_uuid);
	_g_free0 (uuid);
}


static void _budgie_panel_editor_on_panel_update_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	budgie_panel_editor_on_panel_update ((BudgiePanelEditor*) self, _sender, pspec);
}


static void _budgie_panel_editor_refresh_applets_budgie_toplevel_applets_changed (BudgieToplevel* _sender, gpointer self) {
	budgie_panel_editor_refresh_applets ((BudgiePanelEditor*) self);
}


static void _budgie_panel_editor_applet_added_budgie_toplevel_applet_added (BudgieToplevel* _sender, BudgieAppletInfo* info, gpointer self) {
	budgie_panel_editor_applet_added ((BudgiePanelEditor*) self, info);
}


static void _budgie_panel_editor_applet_removed_budgie_toplevel_applet_removed (BudgieToplevel* _sender, const gchar* uuid, gpointer self) {
	budgie_panel_editor_applet_removed ((BudgiePanelEditor*) self, uuid);
}


static void budgie_panel_editor_set_active_panel (BudgiePanelEditor* self, const gchar* uuid) {
	BudgieToplevel* panel = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	GtkComboBox* _tmp3_ = NULL;
	gulong _tmp4_ = 0UL;
	GtkComboBox* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GtkComboBox* _tmp7_ = NULL;
	gulong _tmp8_ = 0UL;
	gboolean _tmp9_ = FALSE;
	BudgieToplevel* _tmp10_ = NULL;
	BudgieToplevel* _tmp13_ = NULL;
	BudgieToplevel* _tmp22_ = NULL;
	BudgieToplevel* _tmp23_ = NULL;
	gulong _tmp24_ = 0UL;
	BudgieToplevel* _tmp25_ = NULL;
	gulong _tmp26_ = 0UL;
	BudgieToplevel* _tmp27_ = NULL;
	gulong _tmp28_ = 0UL;
	BudgieToplevel* _tmp29_ = NULL;
	gulong _tmp30_ = 0UL;
	GtkComboBox* _tmp31_ = NULL;
	gulong _tmp32_ = 0UL;
	GtkComboBox* _tmp33_ = NULL;
	BudgieToplevel* _tmp34_ = NULL;
	BudgiePanelPosition _tmp35_ = 0;
	BudgiePanelPosition _tmp36_ = 0;
	gchar* _tmp37_ = NULL;
	gchar* _tmp38_ = NULL;
	GtkComboBox* _tmp39_ = NULL;
	gulong _tmp40_ = 0UL;
	GtkSpinButton* _tmp41_ = NULL;
	gulong _tmp42_ = 0UL;
	GtkSpinButton* _tmp43_ = NULL;
	BudgieToplevel* _tmp44_ = NULL;
	gint _tmp45_ = 0;
	gint _tmp46_ = 0;
	GtkSpinButton* _tmp47_ = NULL;
	gulong _tmp48_ = 0UL;
	GtkSwitch* _tmp49_ = NULL;
	BudgieToplevel* _tmp50_ = NULL;
	gboolean _tmp51_ = FALSE;
	gboolean _tmp52_ = FALSE;
	GtkSwitch* _tmp53_ = NULL;
	BudgieToplevel* _tmp54_ = NULL;
	gboolean _tmp55_ = FALSE;
	gboolean _tmp56_ = FALSE;
	GtkStack* _tmp57_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	_tmp0_ = self->priv->panels;
	_tmp1_ = uuid;
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
	panel = (BudgieToplevel*) _tmp2_;
	_tmp3_ = self->priv->combobox_panels;
	_tmp4_ = self->priv->panels_id;
	g_signal_handler_block (_tmp3_, _tmp4_);
	_tmp5_ = self->priv->combobox_panels;
	_tmp6_ = uuid;
	gtk_combo_box_set_active_id (_tmp5_, _tmp6_);
	_tmp7_ = self->priv->combobox_panels;
	_tmp8_ = self->priv->panels_id;
	g_signal_handler_unblock (_tmp7_, _tmp8_);
	_tmp10_ = panel;
	if (_tmp10_ == NULL) {
		_tmp9_ = TRUE;
	} else {
		BudgieToplevel* _tmp11_ = NULL;
		BudgieToplevel* _tmp12_ = NULL;
		_tmp11_ = panel;
		_tmp12_ = self->priv->current_panel;
		_tmp9_ = _tmp11_ == _tmp12_;
	}
	if (_tmp9_) {
		return;
	}
	_tmp13_ = self->priv->current_panel;
	if (_tmp13_ != NULL) {
		BudgieToplevel* _tmp14_ = NULL;
		gulong _tmp15_ = 0UL;
		BudgieToplevel* _tmp16_ = NULL;
		gulong _tmp17_ = 0UL;
		BudgieToplevel* _tmp18_ = NULL;
		gulong _tmp19_ = 0UL;
		BudgieToplevel* _tmp20_ = NULL;
		gulong _tmp21_ = 0UL;
		_tmp14_ = self->priv->current_panel;
		_tmp15_ = self->priv->notify_id;
		g_signal_handler_disconnect (_tmp14_, _tmp15_);
		_tmp16_ = self->priv->current_panel;
		_tmp17_ = self->priv->applets_changed_id;
		g_signal_handler_disconnect (_tmp16_, _tmp17_);
		_tmp18_ = self->priv->current_panel;
		_tmp19_ = self->priv->applet_added_id;
		g_signal_handler_disconnect (_tmp18_, _tmp19_);
		_tmp20_ = self->priv->current_panel;
		_tmp21_ = self->priv->applet_removed_id;
		g_signal_handler_disconnect (_tmp20_, _tmp21_);
	}
	_tmp22_ = panel;
	self->priv->current_panel = _tmp22_;
	_tmp23_ = panel;
	_tmp24_ = g_signal_connect_object ((GObject*) _tmp23_, "notify", (GCallback) _budgie_panel_editor_on_panel_update_g_object_notify, self, 0);
	self->priv->notify_id = _tmp24_;
	_tmp25_ = panel;
	_tmp26_ = g_signal_connect_object (_tmp25_, "applets-changed", (GCallback) _budgie_panel_editor_refresh_applets_budgie_toplevel_applets_changed, self, 0);
	self->priv->applets_changed_id = _tmp26_;
	_tmp27_ = panel;
	_tmp28_ = g_signal_connect_object (_tmp27_, "applet-added", (GCallback) _budgie_panel_editor_applet_added_budgie_toplevel_applet_added, self, 0);
	self->priv->applet_added_id = _tmp28_;
	_tmp29_ = panel;
	_tmp30_ = g_signal_connect_object (_tmp29_, "applet-removed", (GCallback) _budgie_panel_editor_applet_removed_budgie_toplevel_applet_removed, self, 0);
	self->priv->applet_removed_id = _tmp30_;
	_tmp31_ = self->priv->combobox_position;
	_tmp32_ = self->priv->position_id;
	g_signal_handler_block (_tmp31_, _tmp32_);
	_tmp33_ = self->priv->combobox_position;
	_tmp34_ = panel;
	_tmp35_ = budgie_toplevel_get_position (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = budgie_panel_editor_positition_to_id (self, _tmp36_);
	_tmp38_ = _tmp37_;
	gtk_combo_box_set_active_id (_tmp33_, _tmp38_);
	_g_free0 (_tmp38_);
	_tmp39_ = self->priv->combobox_position;
	_tmp40_ = self->priv->position_id;
	g_signal_handler_unblock (_tmp39_, _tmp40_);
	_tmp41_ = self->priv->spinbutton_size;
	_tmp42_ = self->priv->spin_id;
	g_signal_handler_block (_tmp41_, _tmp42_);
	_tmp43_ = self->priv->spinbutton_size;
	_tmp44_ = panel;
	_tmp45_ = budgie_toplevel_get_intended_size (_tmp44_);
	_tmp46_ = _tmp45_;
	gtk_spin_button_set_value (_tmp43_, (gdouble) _tmp46_);
	_tmp47_ = self->priv->spinbutton_size;
	_tmp48_ = self->priv->spin_id;
	g_signal_handler_unblock (_tmp47_, _tmp48_);
	_tmp49_ = self->priv->switch_shadow;
	_tmp50_ = panel;
	_tmp51_ = budgie_toplevel_get_shadow_visible (_tmp50_);
	_tmp52_ = _tmp51_;
	gtk_switch_set_active (_tmp49_, _tmp52_);
	_tmp53_ = self->priv->switch_regions;
	_tmp54_ = panel;
	_tmp55_ = budgie_toplevel_get_theme_regions (_tmp54_);
	_tmp56_ = _tmp55_;
	gtk_switch_set_active (_tmp53_, _tmp56_);
	budgie_panel_editor_update_applets (self);
	budgie_panel_editor_init_applets (self);
	_tmp57_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp57_, "panel");
}


static void budgie_panel_editor_applet_added (BudgiePanelEditor* self, BudgieAppletInfo* info) {
	BudgieAppletInfo* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = info;
	budgie_panel_editor_insert_applet (self, _tmp0_);
	budgie_panel_editor_refresh_applets (self);
}


static void budgie_panel_editor_applet_removed (BudgiePanelEditor* self, const gchar* uuid) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	budgie_panel_editor_update_applets (self);
}


static void budgie_panel_editor_insert_applet (BudgiePanelEditor* self, BudgieAppletInfo* applet) {
	GtkBox* widgem = NULL;
	GtkBox* _tmp0_ = NULL;
	GtkImage* img = NULL;
	BudgieAppletInfo* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GtkImage* _tmp5_ = NULL;
	GtkImage* _tmp6_ = NULL;
	BudgieAppletInfo* _tmp7_ = NULL;
	BudgieAppletInfo* _tmp8_ = NULL;
	GtkLabel* label = NULL;
	BudgieAppletInfo* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	GtkLabel* _tmp13_ = NULL;
	GtkLabel* _tmp14_ = NULL;
	GtkListBox* _tmp15_ = NULL;
	GHashTable* _tmp16_ = NULL;
	BudgieAppletInfo* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	GtkWidget* _tmp20_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp0_);
	widgem = _tmp0_;
	_tmp1_ = applet;
	g_object_get (_tmp1_, "icon", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp4_, GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	img = _tmp6_;
	gtk_widget_set_margin_start ((GtkWidget*) img, 6);
	gtk_widget_set_margin_end ((GtkWidget*) img, 8);
	gtk_widget_set_margin_top ((GtkWidget*) img, 4);
	gtk_widget_set_margin_bottom ((GtkWidget*) img, 4);
	gtk_box_pack_start (widgem, (GtkWidget*) img, FALSE, FALSE, (guint) 0);
	_tmp7_ = applet;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	g_object_set_data_full ((GObject*) widgem, "ainfo", _tmp8_, g_object_unref);
	_tmp9_ = applet;
	g_object_get (_tmp9_, "description", &_tmp10_, NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkLabel*) gtk_label_new (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp12_);
	label = _tmp14_;
	gtk_box_pack_start (widgem, (GtkWidget*) label, TRUE, TRUE, (guint) 0);
	gtk_widget_set_halign ((GtkWidget*) label, GTK_ALIGN_START);
	gtk_widget_show_all ((GtkWidget*) widgem);
	_tmp15_ = self->priv->listbox_applets;
	gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) widgem);
	_tmp16_ = self->priv->applets;
	_tmp17_ = applet;
	g_object_get (_tmp17_, "uuid", &_tmp18_, NULL);
	_tmp19_ = _tmp18_;
	_tmp20_ = _g_object_ref0 ((GtkWidget*) widgem);
	g_hash_table_insert (_tmp16_, _tmp19_, _tmp20_);
	_g_object_unref0 (label);
	_g_object_unref0 (img);
	_g_object_unref0 (widgem);
}


static void budgie_panel_editor_refresh_applets (BudgiePanelEditor* self) {
	GtkListBox* _tmp0_ = NULL;
	GtkListBox* _tmp1_ = NULL;
	GtkListBoxRow* row = NULL;
	GtkListBox* _tmp2_ = NULL;
	GtkListBoxRow* _tmp3_ = NULL;
	GtkListBoxRow* _tmp4_ = NULL;
	GtkListBoxRow* _tmp5_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox_applets;
	gtk_list_box_invalidate_sort (_tmp0_);
	_tmp1_ = self->priv->listbox_applets;
	gtk_list_box_invalidate_headers (_tmp1_);
	_tmp2_ = self->priv->listbox_applets;
	_tmp3_ = gtk_list_box_get_selected_row (_tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	row = _tmp4_;
	_tmp5_ = row;
	if (_tmp5_ != NULL) {
		GtkListBoxRow* _tmp6_ = NULL;
		_tmp6_ = row;
		budgie_panel_editor_on_row_activate (self, _tmp6_);
	}
	_g_object_unref0 (row);
}


static void budgie_panel_editor_update_applets (BudgiePanelEditor* self) {
	GtkListBox* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GHashTable* _tmp3_ = NULL;
	BudgieToplevel* _tmp4_ = NULL;
	GtkButton* _tmp5_ = NULL;
	GtkButton* _tmp6_ = NULL;
	GtkButton* _tmp7_ = NULL;
	GtkButton* _tmp8_ = NULL;
	BudgieToplevel* _tmp9_ = NULL;
	GList* _tmp10_ = NULL;
	GtkListBox* _tmp13_ = NULL;
	GtkListBox* _tmp14_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox_applets;
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp1_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp2_ = NULL;
				_tmp2_ = child;
				gtk_widget_destroy (_tmp2_);
			}
		}
		_g_list_free0 (child_collection);
	}
	_tmp3_ = self->priv->applets;
	g_hash_table_remove_all (_tmp3_);
	_tmp4_ = self->priv->current_panel;
	if (_tmp4_ == NULL) {
		return;
	}
	_tmp5_ = self->priv->button_remove_applet;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE);
	_tmp6_ = self->priv->button_move_applet_left;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE);
	_tmp7_ = self->priv->button_move_applet_right;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp7_, FALSE);
	_tmp8_ = self->priv->button_settings;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, FALSE);
	self->priv->current_applet = NULL;
	_tmp9_ = self->priv->current_panel;
	_tmp10_ = budgie_toplevel_get_applets (_tmp9_);
	{
		GList* applet_collection = NULL;
		GList* applet_it = NULL;
		applet_collection = _tmp10_;
		for (applet_it = applet_collection; applet_it != NULL; applet_it = applet_it->next) {
			BudgieAppletInfo* _tmp11_ = NULL;
			BudgieAppletInfo* applet = NULL;
			_tmp11_ = _g_object_ref0 ((BudgieAppletInfo*) applet_it->data);
			applet = _tmp11_;
			{
				BudgieAppletInfo* _tmp12_ = NULL;
				_tmp12_ = applet;
				budgie_panel_editor_insert_applet (self, _tmp12_);
				_g_object_unref0 (applet);
			}
		}
		__g_list_free__g_object_unref0_0 (applet_collection);
	}
	_tmp13_ = self->priv->listbox_applets;
	gtk_list_box_invalidate_sort (_tmp13_);
	_tmp14_ = self->priv->listbox_applets;
	gtk_list_box_invalidate_headers (_tmp14_);
}


static gint budgie_panel_editor_align_to_int (BudgiePanelEditor* self, const gchar* al) {
	gint result = 0;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (al != NULL, 0);
	_tmp0_ = al;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("start")))) {
		switch (0) {
			default:
			{
				result = 0;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("center")))) {
		switch (0) {
			default:
			{
				result = 1;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = 2;
				return result;
			}
		}
	}
}


static gint budgie_panel_editor_lb_sort (BudgiePanelEditor* self, GtkListBoxRow* before, GtkListBoxRow* after) {
	gint result = 0;
	BudgieAppletInfo* before_info = NULL;
	GtkListBoxRow* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	BudgieAppletInfo* after_info = NULL;
	GtkListBoxRow* _tmp3_ = NULL;
	GtkWidget* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	BudgieAppletInfo* _tmp8_ = NULL;
	BudgieAppletInfo* _tmp32_ = NULL;
	BudgieAppletInfo* _tmp33_ = NULL;
	gint _tmp34_ = 0;
	gint _tmp35_ = 0;
	BudgieAppletInfo* _tmp36_ = NULL;
	gint _tmp37_ = 0;
	gint _tmp38_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = before;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = g_object_get_data ((GObject*) _tmp1_, "ainfo");
	before_info = (BudgieAppletInfo*) _tmp2_;
	_tmp3_ = after;
	_tmp4_ = gtk_bin_get_child ((GtkBin*) _tmp3_);
	_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "ainfo");
	after_info = (BudgieAppletInfo*) _tmp5_;
	_tmp8_ = before_info;
	if (_tmp8_ != NULL) {
		BudgieAppletInfo* _tmp9_ = NULL;
		_tmp9_ = after_info;
		_tmp7_ = _tmp9_ != NULL;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		BudgieAppletInfo* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		BudgieAppletInfo* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		_tmp10_ = before_info;
		g_object_get (_tmp10_, "alignment", &_tmp11_, NULL);
		_tmp12_ = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp14_ = after_info;
		g_object_get (_tmp14_, "alignment", &_tmp15_, NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = _tmp16_;
		_tmp6_ = g_strcmp0 (_tmp13_, _tmp17_) != 0;
		_g_free0 (_tmp17_);
		_g_free0 (_tmp13_);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		gint bi = 0;
		BudgieAppletInfo* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gint _tmp22_ = 0;
		gint _tmp23_ = 0;
		gint ai = 0;
		BudgieAppletInfo* _tmp24_ = NULL;
		gchar* _tmp25_ = NULL;
		gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		gint _tmp28_ = 0;
		gint _tmp29_ = 0;
		gint _tmp30_ = 0;
		gint _tmp31_ = 0;
		_tmp18_ = before_info;
		g_object_get (_tmp18_, "alignment", &_tmp19_, NULL);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_;
		_tmp22_ = budgie_panel_editor_align_to_int (self, _tmp21_);
		_tmp23_ = _tmp22_;
		_g_free0 (_tmp21_);
		bi = _tmp23_;
		_tmp24_ = after_info;
		g_object_get (_tmp24_, "alignment", &_tmp25_, NULL);
		_tmp26_ = _tmp25_;
		_tmp27_ = _tmp26_;
		_tmp28_ = budgie_panel_editor_align_to_int (self, _tmp27_);
		_tmp29_ = _tmp28_;
		_g_free0 (_tmp27_);
		ai = _tmp29_;
		_tmp30_ = ai;
		_tmp31_ = bi;
		if (_tmp30_ > _tmp31_) {
			result = -1;
			return result;
		} else {
			result = 1;
			return result;
		}
	}
	_tmp32_ = after_info;
	if (_tmp32_ == NULL) {
		result = 0;
		return result;
	}
	_tmp33_ = before_info;
	g_object_get (_tmp33_, "position", &_tmp34_, NULL);
	_tmp35_ = _tmp34_;
	_tmp36_ = after_info;
	g_object_get (_tmp36_, "position", &_tmp37_, NULL);
	_tmp38_ = _tmp37_;
	if (_tmp35_ < _tmp38_) {
		result = -1;
		return result;
	} else {
		BudgieAppletInfo* _tmp39_ = NULL;
		gint _tmp40_ = 0;
		gint _tmp41_ = 0;
		BudgieAppletInfo* _tmp42_ = NULL;
		gint _tmp43_ = 0;
		gint _tmp44_ = 0;
		_tmp39_ = before_info;
		g_object_get (_tmp39_, "position", &_tmp40_, NULL);
		_tmp41_ = _tmp40_;
		_tmp42_ = after_info;
		g_object_get (_tmp42_, "position", &_tmp43_, NULL);
		_tmp44_ = _tmp43_;
		if (_tmp41_ > _tmp44_) {
			result = 1;
			return result;
		}
	}
	result = 0;
	return result;
}


static void budgie_panel_editor_lb_headers (BudgiePanelEditor* self, GtkListBoxRow* before, GtkListBoxRow* after) {
	GtkWidget* child = NULL;
	gchar* prev = NULL;
	gchar* next = NULL;
	BudgieAppletInfo* before_info = NULL;
	BudgieAppletInfo* after_info = NULL;
	GtkListBoxRow* _tmp0_ = NULL;
	GtkListBoxRow* _tmp7_ = NULL;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	GtkListBoxRow* _tmp16_ = NULL;
	g_return_if_fail (self != NULL);
	child = NULL;
	prev = NULL;
	next = NULL;
	before_info = NULL;
	after_info = NULL;
	_tmp0_ = before;
	if (_tmp0_ != NULL) {
		GtkListBoxRow* _tmp1_ = NULL;
		GtkWidget* _tmp2_ = NULL;
		gconstpointer _tmp3_ = NULL;
		BudgieAppletInfo* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		_tmp1_ = before;
		_tmp2_ = gtk_bin_get_child ((GtkBin*) _tmp1_);
		_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "ainfo");
		before_info = (BudgieAppletInfo*) _tmp3_;
		_tmp4_ = before_info;
		g_object_get (_tmp4_, "alignment", &_tmp5_, NULL);
		_tmp6_ = _tmp5_;
		_g_free0 (prev);
		prev = _tmp6_;
	}
	_tmp7_ = after;
	if (_tmp7_ != NULL) {
		GtkListBoxRow* _tmp8_ = NULL;
		GtkWidget* _tmp9_ = NULL;
		gconstpointer _tmp10_ = NULL;
		BudgieAppletInfo* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		_tmp8_ = after;
		_tmp9_ = gtk_bin_get_child ((GtkBin*) _tmp8_);
		_tmp10_ = g_object_get_data ((GObject*) _tmp9_, "ainfo");
		after_info = (BudgieAppletInfo*) _tmp10_;
		_tmp11_ = after_info;
		g_object_get (_tmp11_, "alignment", &_tmp12_, NULL);
		_tmp13_ = _tmp12_;
		_g_free0 (next);
		next = _tmp13_;
	}
	_tmp16_ = before;
	if (_tmp16_ == NULL) {
		_tmp15_ = TRUE;
	} else {
		GtkListBoxRow* _tmp17_ = NULL;
		_tmp17_ = after;
		_tmp15_ = _tmp17_ == NULL;
	}
	if (_tmp15_) {
		_tmp14_ = TRUE;
	} else {
		const gchar* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
		_tmp18_ = prev;
		_tmp19_ = next;
		_tmp14_ = g_strcmp0 (_tmp18_, _tmp19_) != 0;
	}
	if (_tmp14_) {
		GtkLabel* label = NULL;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		GQuark _tmp23_ = 0U;
		static GQuark _tmp22_label0 = 0;
		static GQuark _tmp22_label1 = 0;
		GtkLabel* _tmp30_ = NULL;
		GtkStyleContext* _tmp31_ = NULL;
		GtkLabel* _tmp32_ = NULL;
		GtkSeparator* sep = NULL;
		GtkSeparator* _tmp33_ = NULL;
		GtkSeparator* _tmp34_ = NULL;
		GtkLabel* _tmp35_ = NULL;
		GtkLabel* _tmp36_ = NULL;
		GtkLabel* _tmp37_ = NULL;
		GtkLabel* _tmp38_ = NULL;
		GtkBox* box = NULL;
		GtkBox* _tmp39_ = NULL;
		GtkBox* _tmp40_ = NULL;
		GtkLabel* _tmp41_ = NULL;
		GtkBox* _tmp42_ = NULL;
		GtkSeparator* _tmp43_ = NULL;
		GtkLabel* _tmp44_ = NULL;
		GtkBox* _tmp45_ = NULL;
		GtkListBoxRow* _tmp46_ = NULL;
		GtkBox* _tmp47_ = NULL;
		label = NULL;
		_tmp20_ = prev;
		_tmp21_ = _tmp20_;
		_tmp23_ = (NULL == _tmp21_) ? 0 : g_quark_from_string (_tmp21_);
		if (_tmp23_ == ((0 != _tmp22_label0) ? _tmp22_label0 : (_tmp22_label0 = g_quark_from_static_string ("start")))) {
			switch (0) {
				default:
				{
					const gchar* _tmp24_ = NULL;
					GtkLabel* _tmp25_ = NULL;
					_tmp24_ = _ ("Start");
					_tmp25_ = (GtkLabel*) gtk_label_new (_tmp24_);
					g_object_ref_sink (_tmp25_);
					_g_object_unref0 (label);
					label = _tmp25_;
					break;
				}
			}
		} else if (_tmp23_ == ((0 != _tmp22_label1) ? _tmp22_label1 : (_tmp22_label1 = g_quark_from_static_string ("center")))) {
			switch (0) {
				default:
				{
					const gchar* _tmp26_ = NULL;
					GtkLabel* _tmp27_ = NULL;
					_tmp26_ = _ ("Center");
					_tmp27_ = (GtkLabel*) gtk_label_new (_tmp26_);
					g_object_ref_sink (_tmp27_);
					_g_object_unref0 (label);
					label = _tmp27_;
					break;
				}
			}
		} else {
			switch (0) {
				default:
				{
					const gchar* _tmp28_ = NULL;
					GtkLabel* _tmp29_ = NULL;
					_tmp28_ = _ ("End");
					_tmp29_ = (GtkLabel*) gtk_label_new (_tmp28_);
					g_object_ref_sink (_tmp29_);
					_g_object_unref0 (label);
					label = _tmp29_;
					break;
				}
			}
		}
		_tmp30_ = label;
		_tmp31_ = gtk_widget_get_style_context ((GtkWidget*) _tmp30_);
		gtk_style_context_add_class (_tmp31_, "dim-label");
		_tmp32_ = label;
		gtk_widget_set_halign ((GtkWidget*) _tmp32_, GTK_ALIGN_START);
		_tmp33_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp33_);
		sep = _tmp33_;
		_tmp34_ = sep;
		gtk_widget_set_valign ((GtkWidget*) _tmp34_, GTK_ALIGN_CENTER);
		_tmp35_ = label;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp35_, 8);
		_tmp36_ = label;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp36_, 6);
		_tmp37_ = label;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp37_, 3);
		_tmp38_ = label;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp38_, 3);
		_tmp39_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp39_);
		box = _tmp39_;
		_tmp40_ = box;
		_tmp41_ = label;
		gtk_box_pack_start (_tmp40_, (GtkWidget*) _tmp41_, FALSE, FALSE, (guint) 0);
		_tmp42_ = box;
		_tmp43_ = sep;
		gtk_box_pack_start (_tmp42_, (GtkWidget*) _tmp43_, TRUE, TRUE, (guint) 0);
		_tmp44_ = label;
		gtk_label_set_use_markup (_tmp44_, TRUE);
		_tmp45_ = box;
		gtk_widget_show_all ((GtkWidget*) _tmp45_);
		_tmp46_ = before;
		_tmp47_ = box;
		gtk_list_box_row_set_header (_tmp46_, (GtkWidget*) _tmp47_);
		_g_object_unref0 (box);
		_g_object_unref0 (sep);
		_g_object_unref0 (label);
	} else {
		GtkListBoxRow* _tmp48_ = NULL;
		_tmp48_ = before;
		gtk_list_box_row_set_header (_tmp48_, NULL);
	}
	_g_free0 (next);
	_g_free0 (prev);
	_g_object_unref0 (child);
}


static void budgie_panel_editor_on_row_activate (BudgiePanelEditor* self, GtkListBoxRow* row) {
	BudgieAppletInfo* info = NULL;
	gboolean _tmp0_ = FALSE;
	BudgieToplevel* _tmp1_ = NULL;
	GtkListBoxRow* _tmp7_ = NULL;
	GtkWidget* _tmp8_ = NULL;
	gconstpointer _tmp9_ = NULL;
	GtkButton* _tmp10_ = NULL;
	BudgieToplevel* _tmp11_ = NULL;
	BudgieAppletInfo* _tmp12_ = NULL;
	gboolean _tmp13_ = FALSE;
	GtkButton* _tmp14_ = NULL;
	BudgieToplevel* _tmp15_ = NULL;
	BudgieAppletInfo* _tmp16_ = NULL;
	gboolean _tmp17_ = FALSE;
	GtkButton* _tmp18_ = NULL;
	GtkButton* _tmp19_ = NULL;
	BudgieAppletInfo* _tmp20_ = NULL;
	BudgieApplet* _tmp21_ = NULL;
	BudgieApplet* _tmp22_ = NULL;
	BudgieApplet* _tmp23_ = NULL;
	gboolean _tmp24_ = FALSE;
	BudgieAppletInfo* _tmp25_ = NULL;
	g_return_if_fail (self != NULL);
	info = NULL;
	_tmp1_ = self->priv->current_panel;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GtkListBoxRow* _tmp2_ = NULL;
		_tmp2_ = row;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		GtkButton* _tmp3_ = NULL;
		GtkButton* _tmp4_ = NULL;
		GtkButton* _tmp5_ = NULL;
		GtkButton* _tmp6_ = NULL;
		_tmp3_ = self->priv->button_move_applet_left;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, FALSE);
		_tmp4_ = self->priv->button_move_applet_right;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, FALSE);
		_tmp5_ = self->priv->button_remove_applet;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE);
		_tmp6_ = self->priv->button_settings;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE);
		return;
	}
	_tmp7_ = row;
	_tmp8_ = gtk_bin_get_child ((GtkBin*) _tmp7_);
	_tmp9_ = g_object_get_data ((GObject*) _tmp8_, "ainfo");
	info = (BudgieAppletInfo*) _tmp9_;
	_tmp10_ = self->priv->button_move_applet_left;
	_tmp11_ = self->priv->current_panel;
	_tmp12_ = info;
	_tmp13_ = budgie_toplevel_can_move_applet_left (_tmp11_, _tmp12_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, _tmp13_);
	_tmp14_ = self->priv->button_move_applet_right;
	_tmp15_ = self->priv->current_panel;
	_tmp16_ = info;
	_tmp17_ = budgie_toplevel_can_move_applet_right (_tmp15_, _tmp16_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp14_, _tmp17_);
	_tmp18_ = self->priv->button_remove_applet;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, TRUE);
	_tmp19_ = self->priv->button_settings;
	_tmp20_ = info;
	g_object_get (_tmp20_, "applet", &_tmp21_, NULL);
	_tmp22_ = _tmp21_;
	_tmp23_ = _tmp22_;
	_tmp24_ = budgie_applet_supports_settings (_tmp23_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp19_, _tmp24_);
	_g_object_unref0 (_tmp23_);
	_tmp25_ = info;
	self->priv->current_applet = _tmp25_;
}


static void budgie_panel_editor_on_panel_update (BudgiePanelEditor* self, GObject* o, GParamSpec* p) {
	BudgieToplevel* panel = NULL;
	GObject* _tmp0_ = NULL;
	BudgieToplevel* _tmp1_ = NULL;
	GParamSpec* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (o != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = o;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BUDGIE_TYPE_TOPLEVEL) ? ((BudgieToplevel*) _tmp0_) : NULL);
	panel = _tmp1_;
	_tmp2_ = p;
	_tmp3_ = _tmp2_->name;
	if (g_strcmp0 (_tmp3_, "position") == 0) {
		gchar* pos = NULL;
		BudgieToplevel* _tmp4_ = NULL;
		BudgiePanelPosition _tmp5_ = 0;
		BudgiePanelPosition _tmp6_ = 0;
		gchar* _tmp7_ = NULL;
		GtkComboBox* _tmp8_ = NULL;
		gulong _tmp9_ = 0UL;
		GtkComboBox* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		GtkComboBox* _tmp12_ = NULL;
		gulong _tmp13_ = 0UL;
		_tmp4_ = panel;
		_tmp5_ = budgie_toplevel_get_position (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = budgie_panel_editor_positition_to_id (self, _tmp6_);
		pos = _tmp7_;
		_tmp8_ = self->priv->combobox_position;
		_tmp9_ = self->priv->position_id;
		g_signal_handler_block (_tmp8_, _tmp9_);
		_tmp10_ = self->priv->combobox_position;
		_tmp11_ = pos;
		gtk_combo_box_set_active_id (_tmp10_, _tmp11_);
		_tmp12_ = self->priv->combobox_position;
		_tmp13_ = self->priv->position_id;
		g_signal_handler_unblock (_tmp12_, _tmp13_);
		_g_free0 (pos);
	} else {
		GParamSpec* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		_tmp14_ = p;
		_tmp15_ = _tmp14_->name;
		if (g_strcmp0 (_tmp15_, "intended-size") == 0) {
			GtkSpinButton* _tmp16_ = NULL;
			gulong _tmp17_ = 0UL;
			GtkSpinButton* _tmp18_ = NULL;
			BudgieToplevel* _tmp19_ = NULL;
			gint _tmp20_ = 0;
			gint _tmp21_ = 0;
			GtkSpinButton* _tmp22_ = NULL;
			gulong _tmp23_ = 0UL;
			_tmp16_ = self->priv->spinbutton_size;
			_tmp17_ = self->priv->spin_id;
			g_signal_handler_block (_tmp16_, _tmp17_);
			_tmp18_ = self->priv->spinbutton_size;
			_tmp19_ = panel;
			_tmp20_ = budgie_toplevel_get_intended_size (_tmp19_);
			_tmp21_ = _tmp20_;
			gtk_spin_button_set_value (_tmp18_, (gdouble) _tmp21_);
			_tmp22_ = self->priv->spinbutton_size;
			_tmp23_ = self->priv->spin_id;
			g_signal_handler_unblock (_tmp22_, _tmp23_);
		} else {
			GParamSpec* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
			_tmp24_ = p;
			_tmp25_ = _tmp24_->name;
			if (g_strcmp0 (_tmp25_, "shadow-visible") == 0) {
				GtkSwitch* _tmp26_ = NULL;
				gulong _tmp27_ = 0UL;
				GtkSwitch* _tmp28_ = NULL;
				BudgieToplevel* _tmp29_ = NULL;
				gboolean _tmp30_ = FALSE;
				gboolean _tmp31_ = FALSE;
				GtkSwitch* _tmp32_ = NULL;
				gulong _tmp33_ = 0UL;
				_tmp26_ = self->priv->switch_shadow;
				_tmp27_ = self->priv->shadow_id;
				g_signal_handler_block (_tmp26_, _tmp27_);
				_tmp28_ = self->priv->switch_shadow;
				_tmp29_ = panel;
				_tmp30_ = budgie_toplevel_get_shadow_visible (_tmp29_);
				_tmp31_ = _tmp30_;
				gtk_switch_set_active (_tmp28_, _tmp31_);
				_tmp32_ = self->priv->switch_shadow;
				_tmp33_ = self->priv->shadow_id;
				g_signal_handler_unblock (_tmp32_, _tmp33_);
			} else {
				GParamSpec* _tmp34_ = NULL;
				const gchar* _tmp35_ = NULL;
				_tmp34_ = p;
				_tmp35_ = _tmp34_->name;
				if (g_strcmp0 (_tmp35_, "theme-regions") == 0) {
					GtkSwitch* _tmp36_ = NULL;
					gulong _tmp37_ = 0UL;
					GtkSwitch* _tmp38_ = NULL;
					BudgieToplevel* _tmp39_ = NULL;
					gboolean _tmp40_ = FALSE;
					gboolean _tmp41_ = FALSE;
					GtkSwitch* _tmp42_ = NULL;
					gulong _tmp43_ = 0UL;
					_tmp36_ = self->priv->switch_regions;
					_tmp37_ = self->priv->region_id;
					g_signal_handler_block (_tmp36_, _tmp37_);
					_tmp38_ = self->priv->switch_regions;
					_tmp39_ = panel;
					_tmp40_ = budgie_toplevel_get_theme_regions (_tmp39_);
					_tmp41_ = _tmp40_;
					gtk_switch_set_active (_tmp38_, _tmp41_);
					_tmp42_ = self->priv->switch_regions;
					_tmp43_ = self->priv->region_id;
					g_signal_handler_unblock (_tmp42_, _tmp43_);
				}
			}
		}
	}
	_g_object_unref0 (panel);
}


static void budgie_panel_editor_on_position_changed (BudgiePanelEditor* self) {
	gchar* id = NULL;
	GtkComboBox* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	BudgiePanelPosition pos = 0;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GQuark _tmp7_ = 0U;
	static GQuark _tmp6_label0 = 0;
	static GQuark _tmp6_label1 = 0;
	static GQuark _tmp6_label2 = 0;
	BudgieDesktopManager* _tmp8_ = NULL;
	BudgieToplevel* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	BudgiePanelPosition _tmp12_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->combobox_position;
	_tmp1_ = gtk_combo_box_get_active_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	id = _tmp3_;
	_tmp4_ = id;
	_tmp5_ = _tmp4_;
	_tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_);
	if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("top")))) {
		switch (0) {
			default:
			{
				pos = BUDGIE_PANEL_POSITION_TOP;
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("left")))) {
		switch (0) {
			default:
			{
				pos = BUDGIE_PANEL_POSITION_LEFT;
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label2) ? _tmp6_label2 : (_tmp6_label2 = g_quark_from_static_string ("right")))) {
		switch (0) {
			default:
			{
				pos = BUDGIE_PANEL_POSITION_RIGHT;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				pos = BUDGIE_PANEL_POSITION_BOTTOM;
				break;
			}
		}
	}
	_tmp8_ = self->priv->_manager;
	_tmp9_ = self->priv->current_panel;
	_tmp10_ = budgie_toplevel_get_uuid (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = pos;
	budgie_desktop_manager_set_placement (_tmp8_, _tmp11_, _tmp12_);
	_g_free0 (id);
}


BudgieDesktopManager* budgie_panel_editor_get_manager (BudgiePanelEditor* self) {
	BudgieDesktopManager* result;
	BudgieDesktopManager* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_manager;
	result = _tmp0_;
	return result;
}


void budgie_panel_editor_set_manager (BudgiePanelEditor* self, BudgieDesktopManager* value) {
	BudgieDesktopManager* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_manager);
	self->priv->_manager = _tmp1_;
	g_object_notify ((GObject *) self, "manager");
}


static void budgie_panel_editor_class_init (BudgiePanelEditorClass * klass) {
	gint BudgiePanelEditor_private_offset;
	budgie_panel_editor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgiePanelEditorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_budgie_panel_editor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_budgie_panel_editor_set_property;
	G_OBJECT_CLASS (klass)->finalize = budgie_panel_editor_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_PANEL_EDITOR_MANAGER, g_param_spec_object ("manager", "manager", "manager", BUDGIE_TYPE_DESKTOP_MANAGER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	BudgiePanelEditor_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/panel.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_panels", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, combobox_panels));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_add_panel", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_add_panel));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_remove_panel", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_remove_panel));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_position", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, combobox_position));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "spinbutton_size", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, spinbutton_size));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_policy", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, combobox_policy));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_shadow", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, switch_shadow));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_regions", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, switch_regions));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scrolledwindow_applets", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, scrolledwindow_applets));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_add_applet", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_add_applet));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_remove_applet", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_remove_applet));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_move_applet_left", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_move_applet_left));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_move_applet_right", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_move_applet_right));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_settings", FALSE, BudgiePanelEditor_private_offset + G_STRUCT_OFFSET (BudgiePanelEditorPrivate, button_settings));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "settings_clicked", G_CALLBACK(_budgie_panel_editor_settings_clicked_gtk_button_clicked));
}


static void budgie_panel_editor_instance_init (BudgiePanelEditor * self) {
	self->priv = BUDGIE_PANEL_EDITOR_GET_PRIVATE (self);
	self->priv->current_panel = NULL;
	self->priv->listbox_applets = NULL;
	self->priv->current_applet = NULL;
	self->priv->applets = NULL;
	self->priv->panel_stack = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_panel_editor_finalize (GObject* obj) {
	BudgiePanelEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditor);
	_g_object_unref0 (self->priv->_manager);
	_g_object_unref0 (self->priv->combobox_panels);
	_g_object_unref0 (self->priv->button_add_panel);
	_g_object_unref0 (self->priv->button_remove_panel);
	_g_object_unref0 (self->priv->combobox_position);
	_g_object_unref0 (self->priv->spinbutton_size);
	_g_object_unref0 (self->priv->combobox_policy);
	_g_object_unref0 (self->priv->switch_shadow);
	_g_object_unref0 (self->priv->switch_regions);
	_g_hash_table_unref0 (self->priv->panels);
	_g_object_unref0 (self->priv->scrolledwindow_applets);
	_g_object_unref0 (self->priv->listbox_applets);
	_g_object_unref0 (self->priv->button_add_applet);
	_g_object_unref0 (self->priv->button_remove_applet);
	_g_object_unref0 (self->priv->button_move_applet_left);
	_g_object_unref0 (self->priv->button_move_applet_right);
	_g_object_unref0 (self->priv->button_settings);
	_g_object_unref0 (self->priv->removal_popover);
	_g_object_unref0 (self->priv->removal_ok);
	_g_object_unref0 (self->priv->removal_cancel);
	_g_object_unref0 (self->priv->picker);
	_g_object_unref0 (self->priv->appsettings);
	_g_hash_table_unref0 (self->priv->applets);
	G_OBJECT_CLASS (budgie_panel_editor_parent_class)->finalize (obj);
}


GType budgie_panel_editor_get_type (void) {
	static volatile gsize budgie_panel_editor_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_panel_editor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgiePanelEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_panel_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgiePanelEditor), 0, (GInstanceInitFunc) budgie_panel_editor_instance_init, NULL };
		GType budgie_panel_editor_type_id;
		budgie_panel_editor_type_id = g_type_register_static (gtk_box_get_type (), "BudgiePanelEditor", &g_define_type_info, 0);
		g_once_init_leave (&budgie_panel_editor_type_id__volatile, budgie_panel_editor_type_id);
	}
	return budgie_panel_editor_type_id__volatile;
}


static void _vala_budgie_panel_editor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BudgiePanelEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditor);
	switch (property_id) {
		case BUDGIE_PANEL_EDITOR_MANAGER:
		g_value_set_object (value, budgie_panel_editor_get_manager (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_budgie_panel_editor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BudgiePanelEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_TYPE_PANEL_EDITOR, BudgiePanelEditor);
	switch (property_id) {
		case BUDGIE_PANEL_EDITOR_MANAGER:
		budgie_panel_editor_set_manager (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void budgie_settings_header_exit_clicked (BudgieSettingsHeader* self) {
	BudgieSettingsView* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->view;
	g_signal_emit_by_name (_tmp0_, "view-switch");
}


static void _budgie_settings_header_exit_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	budgie_settings_header_exit_clicked ((BudgieSettingsHeader*) self);
}


BudgieSettingsHeader* budgie_settings_header_construct (GType object_type, BudgieSettingsView* view) {
	BudgieSettingsHeader * self = NULL;
	BudgieSettingsView* _tmp0_ = NULL;
	BudgieSettingsView* _tmp1_ = NULL;
	self = (BudgieSettingsHeader*) g_object_new (object_type, NULL);
	_tmp0_ = view;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp1_;
	return self;
}


BudgieSettingsHeader* budgie_settings_header_new (BudgieSettingsView* view) {
	return budgie_settings_header_construct (BUDGIE_TYPE_SETTINGS_HEADER, view);
}


static void budgie_settings_header_class_init (BudgieSettingsHeaderClass * klass) {
	gint BudgieSettingsHeader_private_offset;
	budgie_settings_header_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieSettingsHeaderPrivate));
	G_OBJECT_CLASS (klass)->finalize = budgie_settings_header_finalize;
	BudgieSettingsHeader_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/settings.ui");
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "exit_clicked", G_CALLBACK(_budgie_settings_header_exit_clicked_gtk_button_clicked));
}


static void budgie_settings_header_instance_init (BudgieSettingsHeader * self) {
	self->priv = BUDGIE_SETTINGS_HEADER_GET_PRIVATE (self);
	self->priv->view = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_settings_header_finalize (GObject* obj) {
	BudgieSettingsHeader * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_SETTINGS_HEADER, BudgieSettingsHeader);
	_g_object_unref0 (self->priv->view);
	G_OBJECT_CLASS (budgie_settings_header_parent_class)->finalize (obj);
}


GType budgie_settings_header_get_type (void) {
	static volatile gsize budgie_settings_header_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_settings_header_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieSettingsHeaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_settings_header_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieSettingsHeader), 0, (GInstanceInitFunc) budgie_settings_header_instance_init, NULL };
		GType budgie_settings_header_type_id;
		budgie_settings_header_type_id = g_type_register_static (gtk_box_get_type (), "BudgieSettingsHeader", &g_define_type_info, 0);
		g_once_init_leave (&budgie_settings_header_type_id__volatile, budgie_settings_header_type_id);
	}
	return budgie_settings_header_type_id__volatile;
}


BudgieFontSettings* budgie_font_settings_construct (GType object_type) {
	BudgieFontSettings * self = NULL;
	self = (BudgieFontSettings*) g_object_new (object_type, NULL);
	return self;
}


BudgieFontSettings* budgie_font_settings_new (void) {
	return budgie_font_settings_construct (BUDGIE_TYPE_FONT_SETTINGS);
}


static GObject * budgie_font_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BudgieFontSettings * self;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GSettings* _tmp2_ = NULL;
	GtkFontButton* _tmp3_ = NULL;
	GSettings* _tmp4_ = NULL;
	GtkFontButton* _tmp5_ = NULL;
	GSettings* _tmp6_ = NULL;
	GtkFontButton* _tmp7_ = NULL;
	GSettings* _tmp8_ = NULL;
	GtkFontButton* _tmp9_ = NULL;
	parent_class = G_OBJECT_CLASS (budgie_font_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettings);
	_tmp0_ = g_settings_new ("org.gnome.desktop.interface");
	_g_object_unref0 (self->priv->ui_settings);
	self->priv->ui_settings = _tmp0_;
	_tmp1_ = g_settings_new ("org.gnome.desktop.wm.preferences");
	_g_object_unref0 (self->priv->wm_settings);
	self->priv->wm_settings = _tmp1_;
	_tmp2_ = self->priv->ui_settings;
	_tmp3_ = self->priv->fontbutton_document;
	g_settings_bind (_tmp2_, "document-font-name", (GObject*) _tmp3_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp4_ = self->priv->ui_settings;
	_tmp5_ = self->priv->fontbutton_interface;
	g_settings_bind (_tmp4_, "font-name", (GObject*) _tmp5_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp6_ = self->priv->ui_settings;
	_tmp7_ = self->priv->fontbutton_monospace;
	g_settings_bind (_tmp6_, "monospace-font-name", (GObject*) _tmp7_, "font-name", G_SETTINGS_BIND_DEFAULT);
	_tmp8_ = self->priv->wm_settings;
	_tmp9_ = self->priv->fontbutton_title;
	g_settings_bind (_tmp8_, "titlebar-font", (GObject*) _tmp9_, "font-name", G_SETTINGS_BIND_DEFAULT);
	return obj;
}


static void budgie_font_settings_class_init (BudgieFontSettingsClass * klass) {
	gint BudgieFontSettings_private_offset;
	budgie_font_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieFontSettingsPrivate));
	G_OBJECT_CLASS (klass)->constructor = budgie_font_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = budgie_font_settings_finalize;
	BudgieFontSettings_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/fonts.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fontbutton_title", FALSE, BudgieFontSettings_private_offset + G_STRUCT_OFFSET (BudgieFontSettingsPrivate, fontbutton_title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fontbutton_document", FALSE, BudgieFontSettings_private_offset + G_STRUCT_OFFSET (BudgieFontSettingsPrivate, fontbutton_document));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fontbutton_interface", FALSE, BudgieFontSettings_private_offset + G_STRUCT_OFFSET (BudgieFontSettingsPrivate, fontbutton_interface));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fontbutton_monospace", FALSE, BudgieFontSettings_private_offset + G_STRUCT_OFFSET (BudgieFontSettingsPrivate, fontbutton_monospace));
}


static void budgie_font_settings_instance_init (BudgieFontSettings * self) {
	self->priv = BUDGIE_FONT_SETTINGS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_font_settings_finalize (GObject* obj) {
	BudgieFontSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_FONT_SETTINGS, BudgieFontSettings);
	_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->ui_settings);
	_g_object_unref0 (self->priv->wm_settings);
	G_OBJECT_CLASS (budgie_font_settings_parent_class)->finalize (obj);
}


GType budgie_font_settings_get_type (void) {
	static volatile gsize budgie_font_settings_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_font_settings_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieFontSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_font_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieFontSettings), 0, (GInstanceInitFunc) budgie_font_settings_instance_init, NULL };
		GType budgie_font_settings_type_id;
		budgie_font_settings_type_id = g_type_register_static (gtk_box_get_type (), "BudgieFontSettings", &g_define_type_info, 0);
		g_once_init_leave (&budgie_font_settings_type_id__volatile, budgie_font_settings_type_id);
	}
	return budgie_font_settings_type_id__volatile;
}


BudgieBackgroundSettings* budgie_background_settings_construct (GType object_type) {
	BudgieBackgroundSettings * self = NULL;
	self = (BudgieBackgroundSettings*) g_object_new (object_type, NULL);
	return self;
}


BudgieBackgroundSettings* budgie_background_settings_new (void) {
	return budgie_background_settings_construct (BUDGIE_TYPE_BACKGROUND_SETTINGS);
}


static GObject * budgie_background_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BudgieBackgroundSettings * self;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GtkSwitch* _tmp2_ = NULL;
	parent_class = G_OBJECT_CLASS (budgie_background_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettings);
	_tmp0_ = g_settings_new ("org.gnome.desktop.background");
	_g_object_unref0 (self->priv->background_settings);
	self->priv->background_settings = _tmp0_;
	_tmp1_ = self->priv->background_settings;
	_tmp2_ = self->priv->switch_icons;
	g_settings_bind (_tmp1_, "show-desktop-icons", (GObject*) _tmp2_, "active", G_SETTINGS_BIND_DEFAULT);
	return obj;
}


static void budgie_background_settings_class_init (BudgieBackgroundSettingsClass * klass) {
	gint BudgieBackgroundSettings_private_offset;
	budgie_background_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieBackgroundSettingsPrivate));
	G_OBJECT_CLASS (klass)->constructor = budgie_background_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = budgie_background_settings_finalize;
	BudgieBackgroundSettings_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/background.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_icons", FALSE, BudgieBackgroundSettings_private_offset + G_STRUCT_OFFSET (BudgieBackgroundSettingsPrivate, switch_icons));
}


static void budgie_background_settings_instance_init (BudgieBackgroundSettings * self) {
	self->priv = BUDGIE_BACKGROUND_SETTINGS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_background_settings_finalize (GObject* obj) {
	BudgieBackgroundSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_BACKGROUND_SETTINGS, BudgieBackgroundSettings);
	_g_object_unref0 (self->priv->switch_icons);
	_g_object_unref0 (self->priv->background_settings);
	G_OBJECT_CLASS (budgie_background_settings_parent_class)->finalize (obj);
}


GType budgie_background_settings_get_type (void) {
	static volatile gsize budgie_background_settings_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_background_settings_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieBackgroundSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_background_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieBackgroundSettings), 0, (GInstanceInitFunc) budgie_background_settings_instance_init, NULL };
		GType budgie_background_settings_type_id;
		budgie_background_settings_type_id = g_type_register_static (gtk_box_get_type (), "BudgieBackgroundSettings", &g_define_type_info, 0);
		g_once_init_leave (&budgie_background_settings_type_id__volatile, budgie_background_settings_type_id);
	}
	return budgie_background_settings_type_id__volatile;
}


BudgieWmSettings* budgie_wm_settings_construct (GType object_type) {
	BudgieWmSettings * self = NULL;
	self = (BudgieWmSettings*) g_object_new (object_type, NULL);
	return self;
}


BudgieWmSettings* budgie_wm_settings_new (void) {
	return budgie_wm_settings_construct (BUDGIE_TYPE_WM_SETTINGS);
}


static GObject * budgie_wm_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BudgieWmSettings * self;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	GtkSwitch* _tmp2_ = NULL;
	parent_class = G_OBJECT_CLASS (budgie_wm_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettings);
	_tmp0_ = g_settings_new ("com.solus-project.budgie-wm");
	_g_object_unref0 (self->priv->wm_settings);
	self->priv->wm_settings = _tmp0_;
	_tmp1_ = self->priv->wm_settings;
	_tmp2_ = self->priv->switch_unredirect;
	g_settings_bind (_tmp1_, "force-unredirect", (GObject*) _tmp2_, "active", G_SETTINGS_BIND_DEFAULT);
	return obj;
}


static void budgie_wm_settings_class_init (BudgieWmSettingsClass * klass) {
	gint BudgieWmSettings_private_offset;
	budgie_wm_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieWmSettingsPrivate));
	G_OBJECT_CLASS (klass)->constructor = budgie_wm_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = budgie_wm_settings_finalize;
	BudgieWmSettings_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/wm.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_unredirect", FALSE, BudgieWmSettings_private_offset + G_STRUCT_OFFSET (BudgieWmSettingsPrivate, switch_unredirect));
}


static void budgie_wm_settings_instance_init (BudgieWmSettings * self) {
	self->priv = BUDGIE_WM_SETTINGS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_wm_settings_finalize (GObject* obj) {
	BudgieWmSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_WM_SETTINGS, BudgieWmSettings);
	_g_object_unref0 (self->priv->switch_unredirect);
	_g_object_unref0 (self->priv->wm_settings);
	G_OBJECT_CLASS (budgie_wm_settings_parent_class)->finalize (obj);
}


/**
 * Window manager settings pane
 */
GType budgie_wm_settings_get_type (void) {
	static volatile gsize budgie_wm_settings_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_wm_settings_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieWmSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_wm_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieWmSettings), 0, (GInstanceInitFunc) budgie_wm_settings_instance_init, NULL };
		GType budgie_wm_settings_type_id;
		budgie_wm_settings_type_id = g_type_register_static (gtk_box_get_type (), "BudgieWmSettings", &g_define_type_info, 0);
		g_once_init_leave (&budgie_wm_settings_type_id__volatile, budgie_wm_settings_type_id);
	}
	return budgie_wm_settings_type_id__volatile;
}


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


static void ___lambda30__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda30_ ((BudgieAppearanceSettings*) self);
	g_object_unref (self);
}


void budgie_appearance_settings_load_themes (BudgieAppearanceSettings* self) {
	ThemeScanner* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->theme_scanner;
	theme_scanner_scan_themes (_tmp0_, ___lambda30__gasync_ready_callback, g_object_ref (self));
}


BudgieAppearanceSettings* budgie_appearance_settings_construct (GType object_type) {
	BudgieAppearanceSettings * self = NULL;
	self = (BudgieAppearanceSettings*) g_object_new (object_type, NULL);
	return self;
}


BudgieAppearanceSettings* budgie_appearance_settings_new (void) {
	return budgie_appearance_settings_construct (BUDGIE_TYPE_APPEARANCE_SETTINGS);
}


static GObject * budgie_appearance_settings_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BudgieAppearanceSettings * self;
	GtkCellRendererText* render = NULL;
	GtkCellRendererText* _tmp0_ = NULL;
	GtkComboBox* _tmp1_ = NULL;
	GtkCellRendererText* _tmp2_ = NULL;
	GtkComboBox* _tmp3_ = NULL;
	GtkCellRendererText* _tmp4_ = NULL;
	GtkComboBox* _tmp5_ = NULL;
	GtkCellRendererText* _tmp6_ = NULL;
	GtkComboBox* _tmp7_ = NULL;
	GtkCellRendererText* _tmp8_ = NULL;
	GtkComboBox* _tmp9_ = NULL;
	GtkCellRendererText* _tmp10_ = NULL;
	GtkComboBox* _tmp11_ = NULL;
	GtkCellRendererText* _tmp12_ = NULL;
	GSettings* _tmp13_ = NULL;
	GSettings* _tmp14_ = NULL;
	GSettings* _tmp15_ = NULL;
	GtkSwitch* _tmp16_ = NULL;
	GSettings* _tmp17_ = NULL;
	GtkSwitch* _tmp18_ = NULL;
	ThemeScanner* _tmp19_ = NULL;
	parent_class = G_OBJECT_CLASS (budgie_appearance_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettings);
	_tmp0_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp0_);
	render = _tmp0_;
	_tmp1_ = self->priv->combobox_gtk;
	_tmp2_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp1_, (GtkCellRenderer*) _tmp2_, TRUE);
	_tmp3_ = self->priv->combobox_gtk;
	_tmp4_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp3_, (GtkCellRenderer*) _tmp4_, "text", 0);
	_tmp5_ = self->priv->combobox_icon;
	_tmp6_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp5_, (GtkCellRenderer*) _tmp6_, TRUE);
	_tmp7_ = self->priv->combobox_icon;
	_tmp8_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp7_, (GtkCellRenderer*) _tmp8_, "text", 0);
	_tmp9_ = self->priv->combobox_cursor;
	_tmp10_ = render;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp9_, (GtkCellRenderer*) _tmp10_, TRUE);
	_tmp11_ = self->priv->combobox_cursor;
	_tmp12_ = render;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp11_, (GtkCellRenderer*) _tmp12_, "text", 0);
	_tmp13_ = g_settings_new ("org.gnome.desktop.interface");
	_g_object_unref0 (self->priv->ui_settings);
	self->priv->ui_settings = _tmp13_;
	_tmp14_ = g_settings_new ("com.solus-project.budgie-panel");
	_g_object_unref0 (self->priv->budgie_settings);
	self->priv->budgie_settings = _tmp14_;
	_tmp15_ = self->priv->budgie_settings;
	_tmp16_ = self->priv->switch_dark;
	g_settings_bind (_tmp15_, "dark-theme", (GObject*) _tmp16_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp17_ = self->priv->budgie_settings;
	_tmp18_ = self->priv->switch_builtin;
	g_settings_bind (_tmp17_, "builtin-theme", (GObject*) _tmp18_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp19_ = theme_scanner_new ();
	_g_object_unref0 (self->priv->theme_scanner);
	self->priv->theme_scanner = _tmp19_;
	_g_object_unref0 (render);
	return obj;
}


static void budgie_appearance_settings_class_init (BudgieAppearanceSettingsClass * klass) {
	gint BudgieAppearanceSettings_private_offset;
	budgie_appearance_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieAppearanceSettingsPrivate));
	G_OBJECT_CLASS (klass)->constructor = budgie_appearance_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = budgie_appearance_settings_finalize;
	BudgieAppearanceSettings_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/solus-project/budgie/raven/appearance.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_gtk", FALSE, BudgieAppearanceSettings_private_offset + G_STRUCT_OFFSET (BudgieAppearanceSettingsPrivate, combobox_gtk));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_icon", FALSE, BudgieAppearanceSettings_private_offset + G_STRUCT_OFFSET (BudgieAppearanceSettingsPrivate, combobox_icon));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combobox_cursor", FALSE, BudgieAppearanceSettings_private_offset + G_STRUCT_OFFSET (BudgieAppearanceSettingsPrivate, combobox_cursor));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_dark", FALSE, BudgieAppearanceSettings_private_offset + G_STRUCT_OFFSET (BudgieAppearanceSettingsPrivate, switch_dark));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "switch_builtin", FALSE, BudgieAppearanceSettings_private_offset + G_STRUCT_OFFSET (BudgieAppearanceSettingsPrivate, switch_builtin));
}


static void budgie_appearance_settings_instance_init (BudgieAppearanceSettings * self) {
	self->priv = BUDGIE_APPEARANCE_SETTINGS_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void budgie_appearance_settings_finalize (GObject* obj) {
	BudgieAppearanceSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_APPEARANCE_SETTINGS, BudgieAppearanceSettings);
	_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->switch_dark);
	_g_object_unref0 (self->priv->switch_builtin);
	_g_object_unref0 (self->priv->ui_settings);
	_g_object_unref0 (self->priv->budgie_settings);
	_g_object_unref0 (self->priv->theme_scanner);
	G_OBJECT_CLASS (budgie_appearance_settings_parent_class)->finalize (obj);
}


GType budgie_appearance_settings_get_type (void) {
	static volatile gsize budgie_appearance_settings_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_appearance_settings_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieAppearanceSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_appearance_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieAppearanceSettings), 0, (GInstanceInitFunc) budgie_appearance_settings_instance_init, NULL };
		GType budgie_appearance_settings_type_id;
		budgie_appearance_settings_type_id = g_type_register_static (gtk_box_get_type (), "BudgieAppearanceSettings", &g_define_type_info, 0);
		g_once_init_leave (&budgie_appearance_settings_type_id__volatile, budgie_appearance_settings_type_id);
	}
	return budgie_appearance_settings_type_id__volatile;
}


BudgieSettingsView* budgie_settings_view_construct (GType object_type, BudgieDesktopManager* manager) {
	BudgieSettingsView * self = NULL;
	BudgieDesktopManager* _tmp0_ = NULL;
	BudgieSettingsHeader* header = NULL;
	BudgieSettingsHeader* _tmp1_ = NULL;
	BudgieSettingsHeader* _tmp2_ = NULL;
	GtkStack* _tmp3_ = NULL;
	GtkStack* _tmp4_ = NULL;
	GtkStackSwitcher* _tmp5_ = NULL;
	GtkStackSwitcher* _tmp6_ = NULL;
	GtkStackSwitcher* _tmp7_ = NULL;
	GtkStackSwitcher* _tmp8_ = NULL;
	GtkStackSwitcher* _tmp9_ = NULL;
	GtkStackSwitcher* _tmp10_ = NULL;
	GtkStack* _tmp11_ = NULL;
	GtkEventBox* sbox = NULL;
	GtkEventBox* _tmp12_ = NULL;
	GtkEventBox* _tmp13_ = NULL;
	GtkStackSwitcher* _tmp14_ = NULL;
	GtkEventBox* _tmp15_ = NULL;
	GtkEventBox* _tmp16_ = NULL;
	GtkStyleContext* _tmp17_ = NULL;
	GtkStack* _tmp18_ = NULL;
	GtkStack* _tmp19_ = NULL;
	GtkBox* appearance_box = NULL;
	GtkBox* _tmp20_ = NULL;
	BudgieAppearanceSettings* appearance = NULL;
	BudgieAppearanceSettings* _tmp21_ = NULL;
	BudgieRavenExpander* app_exp = NULL;
	const gchar* _tmp22_ = NULL;
	BudgieHeaderWidget* _tmp23_ = NULL;
	BudgieHeaderWidget* _tmp24_ = NULL;
	BudgieRavenExpander* _tmp25_ = NULL;
	BudgieRavenExpander* _tmp26_ = NULL;
	BudgieRavenExpander* _tmp27_ = NULL;
	BudgieAppearanceSettings* _tmp28_ = NULL;
	GtkBox* _tmp29_ = NULL;
	BudgieRavenExpander* _tmp30_ = NULL;
	gchar* _tmp31_ = NULL;
	gchar* _tmp32_ = NULL;
	gboolean _tmp33_ = FALSE;
	BudgieFontSettings* fonts = NULL;
	BudgieFontSettings* _tmp44_ = NULL;
	BudgieRavenExpander* fonts_exp = NULL;
	const gchar* _tmp45_ = NULL;
	BudgieHeaderWidget* _tmp46_ = NULL;
	BudgieHeaderWidget* _tmp47_ = NULL;
	BudgieRavenExpander* _tmp48_ = NULL;
	BudgieRavenExpander* _tmp49_ = NULL;
	GtkBox* _tmp50_ = NULL;
	BudgieWmSettings* wm = NULL;
	BudgieWmSettings* _tmp51_ = NULL;
	BudgieRavenExpander* wm_exp = NULL;
	const gchar* _tmp52_ = NULL;
	BudgieHeaderWidget* _tmp53_ = NULL;
	BudgieHeaderWidget* _tmp54_ = NULL;
	BudgieRavenExpander* _tmp55_ = NULL;
	BudgieRavenExpander* _tmp56_ = NULL;
	GtkBox* _tmp57_ = NULL;
	GtkStack* _tmp58_ = NULL;
	GtkBox* _tmp59_ = NULL;
	const gchar* _tmp60_ = NULL;
	GtkStack* _tmp61_ = NULL;
	GtkStack* _tmp62_ = NULL;
	BudgiePanelEditor* panel = NULL;
	BudgieDesktopManager* _tmp63_ = NULL;
	GtkStack* _tmp64_ = NULL;
	BudgiePanelEditor* _tmp65_ = NULL;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp66_ = NULL;
	GtkStack* _tmp67_ = NULL;
	const gchar* _tmp68_ = NULL;
	GtkStack* _tmp69_ = NULL;
	GtkStack* _tmp70_ = NULL;
	const gchar* _tmp71_ = NULL;
	BudgieAppearanceSettings* _tmp72_ = NULL;
	_tmp0_ = manager;
	self = (BudgieSettingsView*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 0, "manager", _tmp0_, NULL);
	_tmp1_ = budgie_settings_header_new (self);
	g_object_ref_sink (_tmp1_);
	header = _tmp1_;
	_tmp2_ = header;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp2_, FALSE, FALSE, (guint) 0);
	_tmp3_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp3_;
	_tmp4_ = self->priv->stack;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 6);
	_tmp5_ = (GtkStackSwitcher*) gtk_stack_switcher_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->switcher);
	self->priv->switcher = _tmp5_;
	_tmp6_ = self->priv->switcher;
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	_tmp7_ = self->priv->switcher;
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	_tmp8_ = self->priv->switcher;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 4);
	_tmp9_ = self->priv->switcher;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp9_, 4);
	_tmp10_ = self->priv->switcher;
	_tmp11_ = self->priv->stack;
	gtk_stack_switcher_set_stack (_tmp10_, _tmp11_);
	_tmp12_ = (GtkEventBox*) gtk_event_box_new ();
	g_object_ref_sink (_tmp12_);
	sbox = _tmp12_;
	_tmp13_ = sbox;
	_tmp14_ = self->priv->switcher;
	gtk_container_add ((GtkContainer*) _tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = sbox;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp15_, FALSE, FALSE, (guint) 0);
	_tmp16_ = sbox;
	_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
	gtk_style_context_add_class (_tmp17_, "raven-background");
	_tmp18_ = self->priv->stack;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp18_, TRUE, TRUE, (guint) 0);
	_tmp19_ = self->priv->stack;
	gtk_stack_set_transition_type (_tmp19_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	_tmp20_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp20_);
	appearance_box = _tmp20_;
	_tmp21_ = budgie_appearance_settings_new ();
	g_object_ref_sink (_tmp21_);
	appearance = _tmp21_;
	_tmp22_ = _ ("Appearance");
	_tmp23_ = budgie_header_widget_new (_tmp22_, NULL, FALSE, NULL, NULL);
	g_object_ref_sink (_tmp23_);
	_tmp24_ = _tmp23_;
	_tmp25_ = budgie_raven_expander_new (_tmp24_);
	g_object_ref_sink (_tmp25_);
	_tmp26_ = _tmp25_;
	_g_object_unref0 (_tmp24_);
	app_exp = _tmp26_;
	_tmp27_ = app_exp;
	_tmp28_ = appearance;
	gtk_container_add ((GtkContainer*) _tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = appearance_box;
	_tmp30_ = app_exp;
	gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, FALSE, FALSE, (guint) 0);
	_tmp31_ = g_find_program_in_path ("nautilus");
	_tmp32_ = _tmp31_;
	_tmp33_ = _tmp32_ != NULL;
	_g_free0 (_tmp32_);
	if (_tmp33_) {
		BudgieBackgroundSettings* background_settings = NULL;
		BudgieBackgroundSettings* _tmp34_ = NULL;
		BudgieRavenExpander* back_exp = NULL;
		const gchar* _tmp35_ = NULL;
		BudgieHeaderWidget* _tmp36_ = NULL;
		BudgieHeaderWidget* _tmp37_ = NULL;
		BudgieRavenExpander* _tmp38_ = NULL;
		BudgieRavenExpander* _tmp39_ = NULL;
		BudgieRavenExpander* _tmp40_ = NULL;
		BudgieBackgroundSettings* _tmp41_ = NULL;
		GtkBox* _tmp42_ = NULL;
		BudgieRavenExpander* _tmp43_ = NULL;
		_tmp34_ = budgie_background_settings_new ();
		g_object_ref_sink (_tmp34_);
		background_settings = _tmp34_;
		_tmp35_ = _ ("Background");
		_tmp36_ = budgie_header_widget_new (_tmp35_, NULL, FALSE, NULL, NULL);
		g_object_ref_sink (_tmp36_);
		_tmp37_ = _tmp36_;
		_tmp38_ = budgie_raven_expander_new (_tmp37_);
		g_object_ref_sink (_tmp38_);
		_tmp39_ = _tmp38_;
		_g_object_unref0 (_tmp37_);
		back_exp = _tmp39_;
		_tmp40_ = back_exp;
		_tmp41_ = background_settings;
		gtk_container_add ((GtkContainer*) _tmp40_, (GtkWidget*) _tmp41_);
		_tmp42_ = appearance_box;
		_tmp43_ = back_exp;
		gtk_box_pack_start (_tmp42_, (GtkWidget*) _tmp43_, FALSE, FALSE, (guint) 0);
		_g_object_unref0 (back_exp);
		_g_object_unref0 (background_settings);
	}
	_tmp44_ = budgie_font_settings_new ();
	g_object_ref_sink (_tmp44_);
	fonts = _tmp44_;
	_tmp45_ = _ ("Fonts");
	_tmp46_ = budgie_header_widget_new (_tmp45_, NULL, FALSE, NULL, NULL);
	g_object_ref_sink (_tmp46_);
	_tmp47_ = _tmp46_;
	_tmp48_ = budgie_raven_expander_new (_tmp47_);
	g_object_ref_sink (_tmp48_);
	_tmp49_ = _tmp48_;
	_g_object_unref0 (_tmp47_);
	fonts_exp = _tmp49_;
	gtk_container_add ((GtkContainer*) fonts_exp, (GtkWidget*) fonts);
	_tmp50_ = appearance_box;
	gtk_box_pack_start (_tmp50_, (GtkWidget*) fonts_exp, FALSE, FALSE, (guint) 0);
	_tmp51_ = budgie_wm_settings_new ();
	g_object_ref_sink (_tmp51_);
	wm = _tmp51_;
	_tmp52_ = _ ("Windows");
	_tmp53_ = budgie_header_widget_new (_tmp52_, NULL, FALSE, NULL, NULL);
	g_object_ref_sink (_tmp53_);
	_tmp54_ = _tmp53_;
	_tmp55_ = budgie_raven_expander_new (_tmp54_);
	g_object_ref_sink (_tmp55_);
	_tmp56_ = _tmp55_;
	_g_object_unref0 (_tmp54_);
	wm_exp = _tmp56_;
	gtk_container_add ((GtkContainer*) wm_exp, (GtkWidget*) wm);
	_tmp57_ = appearance_box;
	gtk_box_pack_start (_tmp57_, (GtkWidget*) wm_exp, FALSE, FALSE, (guint) 0);
	_tmp58_ = self->priv->stack;
	_tmp59_ = appearance_box;
	_tmp60_ = _ ("General");
	gtk_stack_add_titled (_tmp58_, (GtkWidget*) _tmp59_, "appearance", _tmp60_);
	_tmp61_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp61_);
	_g_object_unref0 (self->priv->panel_stack);
	self->priv->panel_stack = _tmp61_;
	_tmp62_ = self->priv->panel_stack;
	gtk_stack_set_transition_type (_tmp62_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	_tmp63_ = manager;
	_tmp64_ = self->priv->panel_stack;
	_tmp65_ = budgie_panel_editor_new (_tmp63_, _tmp64_);
	g_object_ref_sink (_tmp65_);
	panel = _tmp65_;
	_tmp66_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp66_);
	scroll = _tmp66_;
	gtk_scrolled_window_set_policy (scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	gtk_container_add ((GtkContainer*) scroll, (GtkWidget*) panel);
	_tmp67_ = self->priv->panel_stack;
	_tmp68_ = _ ("Panel");
	gtk_stack_add_titled (_tmp67_, (GtkWidget*) scroll, "panel", _tmp68_);
	_tmp69_ = self->priv->stack;
	_tmp70_ = self->priv->panel_stack;
	_tmp71_ = _ ("Panel");
	gtk_stack_add_titled (_tmp69_, (GtkWidget*) _tmp70_, "panel", _tmp71_);
	_tmp72_ = appearance;
	budgie_appearance_settings_load_themes (_tmp72_);
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (scroll);
	_g_object_unref0 (panel);
	_g_object_unref0 (wm_exp);
	_g_object_unref0 (wm);
	_g_object_unref0 (fonts_exp);
	_g_object_unref0 (fonts);
	_g_object_unref0 (app_exp);
	_g_object_unref0 (appearance);
	_g_object_unref0 (appearance_box);
	_g_object_unref0 (sbox);
	_g_object_unref0 (header);
	return self;
}


BudgieSettingsView* budgie_settings_view_new (BudgieDesktopManager* manager) {
	return budgie_settings_view_construct (BUDGIE_TYPE_SETTINGS_VIEW, manager);
}


void budgie_settings_view_set_clean (BudgieSettingsView* self) {
	GtkStack* _tmp0_ = NULL;
	GtkStack* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp0_, "appearance");
	_tmp1_ = self->priv->panel_stack;
	gtk_stack_set_visible_child_name (_tmp1_, "panel");
}


BudgieDesktopManager* budgie_settings_view_get_manager (BudgieSettingsView* self) {
	BudgieDesktopManager* result;
	BudgieDesktopManager* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_manager;
	result = _tmp0_;
	return result;
}


void budgie_settings_view_set_manager (BudgieSettingsView* self, BudgieDesktopManager* value) {
	BudgieDesktopManager* _tmp0_ = NULL;
	BudgieDesktopManager* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_manager);
	self->priv->_manager = _tmp1_;
	g_object_notify ((GObject *) self, "manager");
}


static void budgie_settings_view_class_init (BudgieSettingsViewClass * klass) {
	budgie_settings_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BudgieSettingsViewPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_budgie_settings_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_budgie_settings_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = budgie_settings_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_SETTINGS_VIEW_MANAGER, g_param_spec_object ("manager", "manager", "manager", BUDGIE_TYPE_DESKTOP_MANAGER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_signal_new ("view_switch", BUDGIE_TYPE_SETTINGS_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void budgie_settings_view_instance_init (BudgieSettingsView * self) {
	self->priv = BUDGIE_SETTINGS_VIEW_GET_PRIVATE (self);
	self->priv->stack = NULL;
	self->priv->switcher = NULL;
	self->priv->panel_stack = NULL;
}


static void budgie_settings_view_finalize (GObject* obj) {
	BudgieSettingsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsView);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->switcher);
	_g_object_unref0 (self->priv->_manager);
	_g_object_unref0 (self->priv->panel_stack);
	G_OBJECT_CLASS (budgie_settings_view_parent_class)->finalize (obj);
}


GType budgie_settings_view_get_type (void) {
	static volatile gsize budgie_settings_view_type_id__volatile = 0;
	if (g_once_init_enter (&budgie_settings_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BudgieSettingsViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_settings_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieSettingsView), 0, (GInstanceInitFunc) budgie_settings_view_instance_init, NULL };
		GType budgie_settings_view_type_id;
		budgie_settings_view_type_id = g_type_register_static (gtk_box_get_type (), "BudgieSettingsView", &g_define_type_info, 0);
		g_once_init_leave (&budgie_settings_view_type_id__volatile, budgie_settings_view_type_id);
	}
	return budgie_settings_view_type_id__volatile;
}


static void _vala_budgie_settings_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BudgieSettingsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsView);
	switch (property_id) {
		case BUDGIE_SETTINGS_VIEW_MANAGER:
		g_value_set_object (value, budgie_settings_view_get_manager (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_budgie_settings_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BudgieSettingsView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_TYPE_SETTINGS_VIEW, BudgieSettingsView);
	switch (property_id) {
		case BUDGIE_SETTINGS_VIEW_MANAGER:
		budgie_settings_view_set_manager (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



