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

#include <libxfce4windowing/libxfce4windowing.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#include <gobject/gvaluecollector.h>
#include "visualspace.h"
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <plugin.h>
#include <locale.h>
#include <config.h>
#include <libpeas.h>

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

#define VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER (visual_space_applet_labwc_workspace_helper_get_type ())
#define VISUAL_SPACE_APPLET_LABWC_WORKSPACE_HELPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER, VisualSpaceAppletLabwcWorkspaceHelper))
#define VISUAL_SPACE_APPLET_LABWC_WORKSPACE_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER, VisualSpaceAppletLabwcWorkspaceHelperClass))
#define VISUAL_SPACE_APPLET_IS_LABWC_WORKSPACE_HELPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER))
#define VISUAL_SPACE_APPLET_IS_LABWC_WORKSPACE_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER))
#define VISUAL_SPACE_APPLET_LABWC_WORKSPACE_HELPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER, VisualSpaceAppletLabwcWorkspaceHelperClass))

typedef struct _VisualSpaceAppletLabwcWorkspaceHelper VisualSpaceAppletLabwcWorkspaceHelper;
typedef struct _VisualSpaceAppletLabwcWorkspaceHelperClass VisualSpaceAppletLabwcWorkspaceHelperClass;
typedef struct _VisualSpaceAppletLabwcWorkspaceHelperPrivate VisualSpaceAppletLabwcWorkspaceHelperPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _VisualSpaceAppletParamSpecLabwcWorkspaceHelper VisualSpaceAppletParamSpecLabwcWorkspaceHelper;
enum  {
	VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_0_PROPERTY,
	VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_NUM_PROPERTIES
};
static GParamSpec* visual_space_applet_visual_space_popover_properties[VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _visual_space_applet_labwc_workspace_helper_unref0(var) ((var == NULL) ? NULL : (var = (visual_space_applet_labwc_workspace_helper_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;
enum  {
	VISUAL_SPACE_APPLET_PLUGIN_0_PROPERTY,
	VISUAL_SPACE_APPLET_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* visual_space_applet_plugin_properties[VISUAL_SPACE_APPLET_PLUGIN_NUM_PROPERTIES];
enum  {
	VISUAL_SPACE_APPLET_VISUAL_SPACE_SETTINGS_0_PROPERTY,
	VISUAL_SPACE_APPLET_VISUAL_SPACE_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* visual_space_applet_visual_space_settings_properties[VISUAL_SPACE_APPLET_VISUAL_SPACE_SETTINGS_NUM_PROPERTIES];
enum  {
	VISUAL_SPACE_APPLET_APPLET_0_PROPERTY,
	VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY,
	VISUAL_SPACE_APPLET_APPLET_NUM_PROPERTIES
};
static GParamSpec* visual_space_applet_applet_properties[VISUAL_SPACE_APPLET_APPLET_NUM_PROPERTIES];

struct _VisualSpaceAppletLabwcWorkspaceHelper {
	GTypeInstance parent_instance;
	volatile int ref_count;
	VisualSpaceAppletLabwcWorkspaceHelperPrivate * priv;
};

struct _VisualSpaceAppletLabwcWorkspaceHelperClass {
	GTypeClass parent_class;
	void (*finalize) (VisualSpaceAppletLabwcWorkspaceHelper *self);
};

struct _VisualSpaceAppletLabwcWorkspaceHelperPrivate {
	gchar* config_path;
};

struct _VisualSpaceAppletParamSpecLabwcWorkspaceHelper {
	GParamSpec parent_instance;
};

struct _VisualSpaceAppletVisualSpacePopoverPrivate {
	GtkScrolledWindow* scrollwin;
	GtkEventBox* indicatorBox;
	GtkGrid* maingrid;
	GtkLabel* nspaces_show;
	GtkLabel* topspace1;
	GtkButton* nspaces_down;
	GtkButton* nspaces_up;
};

struct _Block1Data {
	int _ref_count_;
	VisualSpaceAppletVisualSpacePopover* self;
	XfwWorkspace* ws;
};

struct _Block2Data {
	int _ref_count_;
	VisualSpaceAppletVisualSpacePopover* self;
	GtkWidget* wdg;
};

struct _VisualSpaceAppletVisualSpaceSettingsPrivate {
	GtkCheckButton* reversebutton;
};

struct _VisualSpaceAppletAppletPrivate {
	GtkEventBox* indicatorBox;
	VisualSpaceAppletVisualSpacePopover* popover;
	BudgiePopoverManager* manager;
	gchar* _uuid;
	GtkLabel* label;
	gboolean usevertical;
};

VALA_EXTERN XfwScreen* visual_space_applet_xfw_screen;
XfwScreen* visual_space_applet_xfw_screen = NULL;
VALA_EXTERN XfwWorkspaceManager* visual_space_applet_ws_manager;
XfwWorkspaceManager* visual_space_applet_ws_manager = NULL;
VALA_EXTERN GSettings* visual_space_applet_visualspace_settings;
GSettings* visual_space_applet_visualspace_settings = NULL;
VALA_EXTERN GdkScreen* visual_space_applet_gdkscreen;
GdkScreen* visual_space_applet_gdkscreen = NULL;
VALA_EXTERN gchar* visual_space_applet_fontspacing_css;
gchar* visual_space_applet_fontspacing_css = NULL;
static gint VisualSpaceAppletLabwcWorkspaceHelper_private_offset;
static gpointer visual_space_applet_labwc_workspace_helper_parent_class = NULL;
static GType visual_space_applet_labwc_workspace_helper_type_id = 0;
VALA_EXTERN VisualSpaceAppletLabwcWorkspaceHelper* visual_space_applet_labwc_helper;
VisualSpaceAppletLabwcWorkspaceHelper* visual_space_applet_labwc_helper = NULL;
static gint VisualSpaceAppletVisualSpacePopover_private_offset;
static gpointer visual_space_applet_visual_space_popover_parent_class = NULL;
static GType visual_space_applet_visual_space_popover_type_id = 0;
static gpointer visual_space_applet_plugin_parent_class = NULL;
static BudgiePluginIface * visual_space_applet_plugin_budgie_plugin_parent_iface = NULL;
static GType visual_space_applet_plugin_type_id = 0;
static gint VisualSpaceAppletVisualSpaceSettings_private_offset;
static gpointer visual_space_applet_visual_space_settings_parent_class = NULL;
static GType visual_space_applet_visual_space_settings_type_id = 0;
static gint VisualSpaceAppletApplet_private_offset;
static gpointer visual_space_applet_applet_parent_class = NULL;
static GType visual_space_applet_applet_type_id = 0;

VALA_EXTERN gpointer visual_space_applet_labwc_workspace_helper_ref (gpointer instance);
VALA_EXTERN void visual_space_applet_labwc_workspace_helper_unref (gpointer instance);
VALA_EXTERN GParamSpec* visual_space_applet_param_spec_labwc_workspace_helper (const gchar* name,
                                                                   const gchar* nick,
                                                                   const gchar* blurb,
                                                                   GType object_type,
                                                                   GParamFlags flags);
VALA_EXTERN void visual_space_applet_value_set_labwc_workspace_helper (GValue* value,
                                                           gpointer v_object);
VALA_EXTERN void visual_space_applet_value_take_labwc_workspace_helper (GValue* value,
                                                            gpointer v_object);
VALA_EXTERN gpointer visual_space_applet_value_get_labwc_workspace_helper (const GValue* value);
GType visual_space_applet_labwc_workspace_helper_register_type (GTypeModule * module);
VALA_EXTERN GType visual_space_applet_labwc_workspace_helper_get_type (void) G_GNUC_CONST ;
VALA_EXTERN VisualSpaceAppletLabwcWorkspaceHelper* visual_space_applet_labwc_workspace_helper_new (void);
VALA_EXTERN VisualSpaceAppletLabwcWorkspaceHelper* visual_space_applet_labwc_workspace_helper_construct (GType object_type);
VALA_EXTERN gint visual_space_applet_labwc_workspace_helper_get_workspace_count (VisualSpaceAppletLabwcWorkspaceHelper* self,
                                                                     GError** error);
VALA_EXTERN gboolean visual_space_applet_labwc_workspace_helper_set_workspace_count (VisualSpaceAppletLabwcWorkspaceHelper* self,
                                                                         gint count,
                                                                         GError** error);
static gboolean visual_space_applet_labwc_workspace_helper_reconfigure_labwc (VisualSpaceAppletLabwcWorkspaceHelper* self);
static void visual_space_applet_labwc_workspace_helper_finalize (VisualSpaceAppletLabwcWorkspaceHelper * obj);
static void visual_space_applet_visual_space_popover_produce_content (VisualSpaceAppletVisualSpacePopover* self);
static void visual_space_applet_visual_space_popover_set_nspaces_show (VisualSpaceAppletVisualSpacePopover* self,
                                                                const gchar* subj);
static void __lambda5_ (VisualSpaceAppletVisualSpacePopover* self);
static void visual_space_applet_visual_space_popover_add_onespace (VisualSpaceAppletVisualSpacePopover* self,
                                                            const gchar* edit);
static void ___lambda5__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self);
static void __lambda6_ (VisualSpaceAppletVisualSpacePopover* self);
static void ___lambda6__gtk_button_clicked (GtkButton* _sender,
                                     gpointer self);
static void visual_space_applet_visual_space_popover_connect_workspace_signals (VisualSpaceAppletVisualSpacePopover* self);
static void __lambda9_ (VisualSpaceAppletVisualSpacePopover* self);
static void ___lambda9__gtk_popover_closed (GtkPopover* _sender,
                                     gpointer self);
static void visual_space_applet_visual_space_popover_update_interface (VisualSpaceAppletVisualSpacePopover* self);
static void _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_added (XfwWorkspaceGroup* _sender,
                                                                                                                   XfwWorkspace* workspace,
                                                                                                                   gpointer self);
static void _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_removed (XfwWorkspaceGroup* _sender,
                                                                                                                     XfwWorkspace* workspace,
                                                                                                                     gpointer self);
static void _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_active_workspace_changed (XfwWorkspaceGroup* _sender,
                                                                                                                            XfwWorkspace* previously_active_workspace,
                                                                                                                            gpointer self);
static void _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_created (XfwWorkspaceManager* _sender,
                                                                                                                       XfwWorkspace* workspace,
                                                                                                                       gpointer self);
static void _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_destroyed (XfwWorkspaceManager* _sender,
                                                                                                                         XfwWorkspace* workspace,
                                                                                                                         gpointer self);
static GtkButton* visual_space_applet_visual_space_popover_create_spacebutton (VisualSpaceAppletVisualSpacePopover* self,
                                                                        gint currsubj,
                                                                        gint n_spaces);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ______lambda4_ (Block1Data* _data1_);
static void _______lambda4__gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
static void _vala_array_add1 (GtkGrid** * array,
                       gint* length,
                       gint* size,
                       GtkGrid* value);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gboolean ____lambda7_ (Block2Data* _data2_);
static gboolean _____lambda7__gsource_func (gpointer self);
static gboolean __lambda8_ (VisualSpaceAppletVisualSpacePopover* self);
static gboolean ___lambda8__gsource_func (gpointer self);
static void visual_space_applet_visual_space_popover_finalize (GObject * obj);
static BudgieApplet* visual_space_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                                const gchar* uuid);
static void visual_space_applet_visual_space_settings_finalize (GObject * obj);
static void visual_space_applet_applet_real_panel_position_changed (BudgieApplet* base,
                                                             BudgiePanelPosition position);
static void visual_space_applet_applet_update_appearance (VisualSpaceAppletApplet* self);
static gboolean __lambda10_ (VisualSpaceAppletApplet* self,
                      GdkEventButton* e);
static gboolean ___lambda10__gtk_widget_button_press_event (GtkWidget* _sender,
                                                     GdkEventButton* event,
                                                     gpointer self);
static void visual_space_applet_applet_connect_workspace_signals (VisualSpaceAppletApplet* self);
static gboolean visual_space_applet_applet_movealong_workspaces (VisualSpaceAppletApplet* self,
                                                          GdkEventScroll* scrollevent);
static gboolean _visual_space_applet_applet_movealong_workspaces_gtk_widget_scroll_event (GtkWidget* _sender,
                                                                                   GdkEventScroll* event,
                                                                                   gpointer self);
static void _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_added (XfwWorkspaceGroup* _sender,
                                                                                                      XfwWorkspace* workspace,
                                                                                                      gpointer self);
static void _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_removed (XfwWorkspaceGroup* _sender,
                                                                                                        XfwWorkspace* workspace,
                                                                                                        gpointer self);
static void _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_active_workspace_changed (XfwWorkspaceGroup* _sender,
                                                                                                               XfwWorkspace* previously_active_workspace,
                                                                                                               gpointer self);
static void _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_created (XfwWorkspaceManager* _sender,
                                                                                                          XfwWorkspace* workspace,
                                                                                                          gpointer self);
static void _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_destroyed (XfwWorkspaceManager* _sender,
                                                                                                            XfwWorkspace* workspace,
                                                                                                            gpointer self);
static void visual_space_applet_applet_real_update_popovers (BudgieApplet* base,
                                                      BudgiePopoverManager* manager);
static gboolean visual_space_applet_applet_real_supports_settings (BudgieApplet* base);
static GtkWidget* visual_space_applet_applet_real_get_settings_ui (BudgieApplet* base);
static void visual_space_applet_applet_finalize (GObject * obj);
static void _vala_visual_space_applet_applet_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_visual_space_applet_applet_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
visual_space_applet_labwc_workspace_helper_get_instance_private (VisualSpaceAppletLabwcWorkspaceHelper* self)
{
	return G_STRUCT_MEMBER_P (self, VisualSpaceAppletLabwcWorkspaceHelper_private_offset);
}

VisualSpaceAppletLabwcWorkspaceHelper*
visual_space_applet_labwc_workspace_helper_construct (GType object_type)
{
	VisualSpaceAppletLabwcWorkspaceHelper* self = NULL;
	gchar* config_home = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	self = (VisualSpaceAppletLabwcWorkspaceHelper*) g_type_create_instance (object_type);
	_tmp0_ = g_getenv ("XDG_CONFIG_HOME");
	_tmp1_ = g_strdup (_tmp0_);
	config_home = _tmp1_;
	_tmp3_ = config_home;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		const gchar* _tmp4_;
		_tmp4_ = config_home;
		_tmp2_ = g_strcmp0 (_tmp4_, "") == 0;
	}
	if (_tmp2_) {
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = g_get_home_dir ();
		_tmp6_ = g_build_filename (_tmp5_, ".config", NULL);
		_g_free0 (config_home);
		config_home = _tmp6_;
	}
	_tmp7_ = config_home;
	_tmp8_ = g_build_filename (_tmp7_, "budgie-desktop", "labwc", "rc.xml", NULL);
	_g_free0 (self->priv->config_path);
	self->priv->config_path = _tmp8_;
	_g_free0 (config_home);
	return self;
}

VisualSpaceAppletLabwcWorkspaceHelper*
visual_space_applet_labwc_workspace_helper_new (void)
{
	return visual_space_applet_labwc_workspace_helper_construct (VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER);
}

gint
visual_space_applet_labwc_workspace_helper_get_workspace_count (VisualSpaceAppletLabwcWorkspaceHelper* self,
                                                                GError** error)
{
	const gchar* _tmp0_;
	gchar* contents = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	GRegex* regex = NULL;
	GRegex* _tmp5_;
	GMatchInfo* match_info = NULL;
	GRegex* _tmp7_;
	const gchar* _tmp8_;
	GMatchInfo* _tmp9_ = NULL;
	gboolean _tmp10_;
	GError* _inner_error0_ = NULL;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = self->priv->config_path;
	if (!g_file_test (_tmp0_, G_FILE_TEST_EXISTS)) {
		const gchar* _tmp1_;
		_tmp1_ = self->priv->config_path;
		g_warning ("visualspace_wayland.vala:44: labwc config not found at %s", _tmp1_);
		result = -1;
		return result;
	}
	_tmp2_ = self->priv->config_path;
	g_file_get_contents (_tmp2_, &_tmp3_, NULL, &_inner_error0_);
	_g_free0 (contents);
	contents = _tmp3_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (contents);
		return _tmp4_;
	}
	_tmp5_ = g_regex_new ("<desktops\\s+number=\"(\\d+)\"", 0, 0, &_inner_error0_);
	regex = _tmp5_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp6_ = -1;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (contents);
		return _tmp6_;
	}
	_tmp7_ = regex;
	_tmp8_ = contents;
	_tmp10_ = g_regex_match (_tmp7_, _tmp8_, 0, &_tmp9_);
	_g_match_info_unref0 (match_info);
	match_info = _tmp9_;
	if (_tmp10_) {
		gchar* num_str = NULL;
		GMatchInfo* _tmp11_;
		gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp11_ = match_info;
		_tmp12_ = g_match_info_fetch (_tmp11_, 1);
		num_str = _tmp12_;
		_tmp13_ = num_str;
		result = atoi (_tmp13_);
		_g_free0 (num_str);
		_g_match_info_unref0 (match_info);
		_g_regex_unref0 (regex);
		_g_free0 (contents);
		return result;
	}
	result = -1;
	_g_match_info_unref0 (match_info);
	_g_regex_unref0 (regex);
	_g_free0 (contents);
	return result;
}

gboolean
visual_space_applet_labwc_workspace_helper_set_workspace_count (VisualSpaceAppletLabwcWorkspaceHelper* self,
                                                                gint count,
                                                                GError** error)
{
	const gchar* _tmp0_;
	gchar* contents = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	GRegex* regex = NULL;
	GRegex* _tmp5_;
	gchar* new_contents = NULL;
	GRegex* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->config_path;
	if (!g_file_test (_tmp0_, G_FILE_TEST_EXISTS)) {
		const gchar* _tmp1_;
		_tmp1_ = self->priv->config_path;
		g_warning ("visualspace_wayland.vala:65: labwc config not found at %s", _tmp1_);
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->config_path;
	g_file_get_contents (_tmp2_, &_tmp3_, NULL, &_inner_error0_);
	_g_free0 (contents);
	contents = _tmp3_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp4_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (contents);
		return _tmp4_;
	}
	_tmp5_ = g_regex_new ("<desktops\\s+number=\"\\d+\"", 0, 0, &_inner_error0_);
	regex = _tmp5_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp6_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (contents);
		return _tmp6_;
	}
	_tmp7_ = regex;
	_tmp8_ = contents;
	_tmp9_ = g_strdup_printf ("%i", count);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strconcat ("<desktops number=\"", _tmp10_, "\"", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_regex_replace (_tmp7_, _tmp8_, (gssize) -1, 0, _tmp12_, 0, &_inner_error0_);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp12_);
	_g_free0 (_tmp10_);
	new_contents = _tmp14_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp15_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		_g_regex_unref0 (regex);
		_g_free0 (contents);
		return _tmp15_;
	}
	_tmp16_ = self->priv->config_path;
	_tmp17_ = new_contents;
	g_file_set_contents (_tmp16_, _tmp17_, (gssize) -1, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp18_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (new_contents);
		_g_regex_unref0 (regex);
		_g_free0 (contents);
		return _tmp18_;
	}
	result = visual_space_applet_labwc_workspace_helper_reconfigure_labwc (self);
	_g_free0 (new_contents);
	_g_regex_unref0 (regex);
	_g_free0 (contents);
	return result;
}

static gboolean
visual_space_applet_labwc_workspace_helper_reconfigure_labwc (VisualSpaceAppletLabwcWorkspaceHelper* self)
{
	gboolean _tmp6_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		gchar** spawn_args = NULL;
		gchar* _tmp0_;
		gchar* _tmp1_;
		gchar** _tmp2_;
		gint spawn_args_length1;
		gint _spawn_args_size_;
		_tmp0_ = g_strdup ("labwc");
		_tmp1_ = g_strdup ("-r");
		_tmp2_ = g_new0 (gchar*, 2 + 1);
		_tmp2_[0] = _tmp0_;
		_tmp2_[1] = _tmp1_;
		spawn_args = _tmp2_;
		spawn_args_length1 = 2;
		_spawn_args_size_ = spawn_args_length1;
		g_spawn_async (NULL, spawn_args, NULL, (G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL) | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp3_ = FALSE;
			spawn_args = (_vala_array_free (spawn_args, spawn_args_length1, (GDestroyNotify) g_free), NULL);
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp3_;
		}
		result = TRUE;
		spawn_args = (_vala_array_free (spawn_args, spawn_args_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("visualspace_wayland.vala:92: Failed to reconfigure labwc: %s", _tmp5_);
		result = FALSE;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return _tmp6_;
}

static void
visual_space_applet_value_labwc_workspace_helper_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
visual_space_applet_value_labwc_workspace_helper_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		visual_space_applet_labwc_workspace_helper_unref (value->data[0].v_pointer);
	}
}

static void
visual_space_applet_value_labwc_workspace_helper_copy_value (const GValue* src_value,
                                                             GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = visual_space_applet_labwc_workspace_helper_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
visual_space_applet_value_labwc_workspace_helper_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
visual_space_applet_value_labwc_workspace_helper_collect_value (GValue* value,
                                                                guint n_collect_values,
                                                                GTypeCValue* collect_values,
                                                                guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		VisualSpaceAppletLabwcWorkspaceHelper * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = visual_space_applet_labwc_workspace_helper_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
visual_space_applet_value_labwc_workspace_helper_lcopy_value (const GValue* value,
                                                              guint n_collect_values,
                                                              GTypeCValue* collect_values,
                                                              guint collect_flags)
{
	VisualSpaceAppletLabwcWorkspaceHelper ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = visual_space_applet_labwc_workspace_helper_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
visual_space_applet_param_spec_labwc_workspace_helper (const gchar* name,
                                                       const gchar* nick,
                                                       const gchar* blurb,
                                                       GType object_type,
                                                       GParamFlags flags)
{
	VisualSpaceAppletParamSpecLabwcWorkspaceHelper* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
visual_space_applet_value_get_labwc_workspace_helper (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER), NULL);
	return value->data[0].v_pointer;
}

void
visual_space_applet_value_set_labwc_workspace_helper (GValue* value,
                                                      gpointer v_object)
{
	VisualSpaceAppletLabwcWorkspaceHelper * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		visual_space_applet_labwc_workspace_helper_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		visual_space_applet_labwc_workspace_helper_unref (old);
	}
}

void
visual_space_applet_value_take_labwc_workspace_helper (GValue* value,
                                                       gpointer v_object)
{
	VisualSpaceAppletLabwcWorkspaceHelper * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		visual_space_applet_labwc_workspace_helper_unref (old);
	}
}

static void
visual_space_applet_labwc_workspace_helper_class_init (VisualSpaceAppletLabwcWorkspaceHelperClass * klass,
                                                       gpointer klass_data)
{
	visual_space_applet_labwc_workspace_helper_parent_class = g_type_class_peek_parent (klass);
	((VisualSpaceAppletLabwcWorkspaceHelperClass *) klass)->finalize = visual_space_applet_labwc_workspace_helper_finalize;
	g_type_class_adjust_private_offset (klass, &VisualSpaceAppletLabwcWorkspaceHelper_private_offset);
}

static void
visual_space_applet_labwc_workspace_helper_instance_init (VisualSpaceAppletLabwcWorkspaceHelper * self,
                                                          gpointer klass)
{
	self->priv = visual_space_applet_labwc_workspace_helper_get_instance_private (self);
	self->ref_count = 1;
}

static void
visual_space_applet_labwc_workspace_helper_finalize (VisualSpaceAppletLabwcWorkspaceHelper * obj)
{
	VisualSpaceAppletLabwcWorkspaceHelper * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VISUAL_SPACE_APPLET_TYPE_LABWC_WORKSPACE_HELPER, VisualSpaceAppletLabwcWorkspaceHelper);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->config_path);
}

GType
visual_space_applet_labwc_workspace_helper_get_type (void)
{
	return visual_space_applet_labwc_workspace_helper_type_id;
}

GType
visual_space_applet_labwc_workspace_helper_register_type (GTypeModule * module)
{
	static const GTypeValueTable g_define_type_value_table = { visual_space_applet_value_labwc_workspace_helper_init, visual_space_applet_value_labwc_workspace_helper_free_value, visual_space_applet_value_labwc_workspace_helper_copy_value, visual_space_applet_value_labwc_workspace_helper_peek_pointer, "p", visual_space_applet_value_labwc_workspace_helper_collect_value, "p", visual_space_applet_value_labwc_workspace_helper_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (VisualSpaceAppletLabwcWorkspaceHelperClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) visual_space_applet_labwc_workspace_helper_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VisualSpaceAppletLabwcWorkspaceHelper), 0, (GInstanceInitFunc) visual_space_applet_labwc_workspace_helper_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	visual_space_applet_labwc_workspace_helper_type_id = g_type_register_fundamental (g_type_fundamental_next (), "VisualSpaceAppletLabwcWorkspaceHelper", &g_define_type_info, &g_define_type_fundamental_info, 0);
	VisualSpaceAppletLabwcWorkspaceHelper_private_offset = sizeof (VisualSpaceAppletLabwcWorkspaceHelperPrivate);
	return visual_space_applet_labwc_workspace_helper_type_id;
}

gpointer
visual_space_applet_labwc_workspace_helper_ref (gpointer instance)
{
	VisualSpaceAppletLabwcWorkspaceHelper * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
visual_space_applet_labwc_workspace_helper_unref (gpointer instance)
{
	VisualSpaceAppletLabwcWorkspaceHelper * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VISUAL_SPACE_APPLET_LABWC_WORKSPACE_HELPER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
visual_space_applet_visual_space_popover_get_instance_private (VisualSpaceAppletVisualSpacePopover* self)
{
	return G_STRUCT_MEMBER_P (self, VisualSpaceAppletVisualSpacePopover_private_offset);
}

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

static void
__lambda5_ (VisualSpaceAppletVisualSpacePopover* self)
{
	visual_space_applet_visual_space_popover_add_onespace (self, "add");
}

static void
___lambda5__gtk_button_clicked (GtkButton* _sender,
                                gpointer self)
{
	__lambda5_ ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
__lambda6_ (VisualSpaceAppletVisualSpacePopover* self)
{
	visual_space_applet_visual_space_popover_add_onespace (self, "remove");
}

static void
___lambda6__gtk_button_clicked (GtkButton* _sender,
                                gpointer self)
{
	__lambda6_ ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
__lambda9_ (VisualSpaceAppletVisualSpacePopover* self)
{
	gint closed = 0;
	GSettings* _tmp0_;
	gboolean _tmp1_ = FALSE;
	_tmp0_ = visual_space_applet_visualspace_settings;
	closed = g_settings_get_int (_tmp0_, VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_INSTRUCTION);
	if (closed >= 2) {
		GtkLabel* _tmp2_;
		_tmp2_ = self->priv->topspace1;
		_tmp1_ = _tmp2_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkLabel* _tmp3_;
		_tmp3_ = self->priv->topspace1;
		gtk_widget_set_visible ((GtkWidget*) _tmp3_, FALSE);
	} else {
		GSettings* _tmp4_;
		gint _tmp5_;
		_tmp4_ = visual_space_applet_visualspace_settings;
		closed = closed + 1;
		_tmp5_ = closed;
		g_settings_set_int (_tmp4_, VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_INSTRUCTION, _tmp5_);
	}
}

static void
___lambda9__gtk_popover_closed (GtkPopover* _sender,
                                gpointer self)
{
	__lambda9_ ((VisualSpaceAppletVisualSpacePopover*) self);
}

VisualSpaceAppletVisualSpacePopover*
visual_space_applet_visual_space_popover_construct (GType object_type,
                                                    GtkEventBox* indicatorBox)
{
	VisualSpaceAppletVisualSpacePopover * self = NULL;
	GtkEventBox* _tmp0_;
	XfwScreen* _tmp1_;
	XfwScreen* _tmp2_;
	XfwWorkspaceManager* _tmp3_;
	XfwWorkspaceManager* _tmp4_;
	GtkGrid* _tmp5_;
	GtkGrid* _tmp6_;
	GtkGrid* supergrid = NULL;
	GtkGrid* _tmp10_;
	GtkButtonBox* ws_managebox = NULL;
	GtkButtonBox* _tmp11_;
	GtkButtonBox* _tmp12_;
	GtkCheckButton* autobutton = NULL;
	GtkCheckButton* _tmp13_;
	gboolean autospace = FALSE;
	GSettings* _tmp14_;
	GtkCheckButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_;
	GtkLabel* _tmp22_;
	GtkBox* fakespin = NULL;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkButton* _tmp26_;
	GtkBox* _tmp27_;
	GtkLabel* _tmp28_;
	GtkBox* _tmp29_;
	GtkButton* _tmp30_;
	GtkButton* _tmp31_;
	GtkButton* _tmp32_;
	GtkButtonBox* _tmp33_;
	GtkBox* _tmp34_;
	gint closednumber = 0;
	GSettings* _tmp35_;
	GtkGrid* _tmp44_;
	GtkScrolledWindow* _tmp45_;
	GtkGrid* _tmp46_;
	GtkButtonBox* _tmp47_;
	GtkScrolledWindow* _tmp48_;
	GtkGrid* _tmp49_;
	GtkGrid* _tmp50_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (indicatorBox != NULL, NULL);
	self = (VisualSpaceAppletVisualSpacePopover*) g_object_new (object_type, "relative-to", indicatorBox, NULL);
	_tmp0_ = _g_object_ref0 (indicatorBox);
	_g_object_unref0 (self->priv->indicatorBox);
	self->priv->indicatorBox = _tmp0_;
	_tmp1_ = xfw_screen_get_default ();
	_g_object_unref0 (visual_space_applet_xfw_screen);
	visual_space_applet_xfw_screen = _tmp1_;
	_tmp2_ = visual_space_applet_xfw_screen;
	_tmp3_ = xfw_screen_get_workspace_manager (_tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (visual_space_applet_ws_manager);
	visual_space_applet_ws_manager = _tmp4_;
	_tmp5_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->maingrid);
	self->priv->maingrid = _tmp5_;
	_tmp6_ = self->priv->maingrid;
	gtk_widget_show_all ((GtkWidget*) _tmp6_);
	visual_space_applet_visual_space_popover_produce_content (self);
	{
		VisualSpaceAppletLabwcWorkspaceHelper* _tmp7_;
		_tmp7_ = visual_space_applet_labwc_workspace_helper_new ();
		_visual_space_applet_labwc_workspace_helper_unref0 (visual_space_applet_labwc_helper);
		visual_space_applet_labwc_helper = _tmp7_;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp8_;
		const gchar* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		g_warning ("visualspace_wayland.vala:126: Failed to initialize labwc helper: %s", _tmp9_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	_tmp10_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp10_);
	supergrid = _tmp10_;
	_tmp11_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp11_);
	ws_managebox = _tmp11_;
	_tmp12_ = ws_managebox;
	gtk_button_box_set_layout (_tmp12_, GTK_BUTTONBOX_CENTER);
	_tmp13_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Auto"));
	g_object_ref_sink (_tmp13_);
	autobutton = _tmp13_;
	_tmp14_ = visual_space_applet_visualspace_settings;
	autospace = g_settings_get_boolean (_tmp14_, "autospaces");
	_tmp15_ = autobutton;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp15_, autospace);
	_tmp16_ = (GtkButton*) gtk_button_new_from_icon_name ("pan-down-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->nspaces_down);
	self->priv->nspaces_down = _tmp16_;
	_tmp17_ = self->priv->nspaces_down;
	gtk_button_set_relief (_tmp17_, GTK_RELIEF_NONE);
	_tmp18_ = (GtkButton*) gtk_button_new_from_icon_name ("pan-up-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->nspaces_up);
	self->priv->nspaces_up = _tmp18_;
	_tmp19_ = self->priv->nspaces_up;
	gtk_button_set_relief (_tmp19_, GTK_RELIEF_NONE);
	_tmp20_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->nspaces_show);
	self->priv->nspaces_show = _tmp20_;
	_tmp21_ = self->priv->nspaces_show;
	gtk_label_set_xalign (_tmp21_, (gfloat) 0);
	visual_space_applet_visual_space_popover_set_nspaces_show (self, NULL);
	_tmp22_ = self->priv->nspaces_show;
	gtk_label_set_width_chars (_tmp22_, 2);
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp23_);
	fakespin = _tmp23_;
	_tmp24_ = fakespin;
	gtk_box_set_baseline_position (_tmp24_, GTK_BASELINE_POSITION_BOTTOM);
	_tmp25_ = fakespin;
	_tmp26_ = self->priv->nspaces_down;
	gtk_box_pack_start (_tmp25_, (GtkWidget*) _tmp26_, FALSE, FALSE, (guint) 0);
	_tmp27_ = fakespin;
	_tmp28_ = self->priv->nspaces_show;
	gtk_box_pack_start (_tmp27_, (GtkWidget*) _tmp28_, FALSE, FALSE, (guint) 0);
	_tmp29_ = fakespin;
	_tmp30_ = self->priv->nspaces_up;
	gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, FALSE, FALSE, (guint) 0);
	_tmp31_ = self->priv->nspaces_up;
	g_signal_connect_object (_tmp31_, "clicked", (GCallback) ___lambda5__gtk_button_clicked, self, 0);
	_tmp32_ = self->priv->nspaces_down;
	g_signal_connect_object (_tmp32_, "clicked", (GCallback) ___lambda6__gtk_button_clicked, self, 0);
	_tmp33_ = ws_managebox;
	_tmp34_ = fakespin;
	gtk_box_pack_start ((GtkBox*) _tmp33_, (GtkWidget*) _tmp34_, FALSE, FALSE, (guint) 0);
	_tmp35_ = visual_space_applet_visualspace_settings;
	closednumber = g_settings_get_int (_tmp35_, VISUAL_SPACE_APPLET_VISUAL_SPACE_POPOVER_INSTRUCTION);
	if (closednumber != 2) {
		GtkLabel* _tmp36_;
		GtkLabel* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
		gchar* _tmp41_;
		GtkGrid* _tmp42_;
		GtkLabel* _tmp43_;
		_tmp36_ = (GtkLabel*) gtk_label_new (NULL);
		g_object_ref_sink (_tmp36_);
		_g_object_unref0 (self->priv->topspace1);
		self->priv->topspace1 = _tmp36_;
		_tmp37_ = self->priv->topspace1;
		_tmp38_ = g_strconcat ("<b>", _ ("Scroll over panel icon to change workspace"), NULL);
		_tmp39_ = _tmp38_;
		_tmp40_ = g_strconcat (_tmp39_, "</b>", NULL);
		_tmp41_ = _tmp40_;
		gtk_label_set_markup (_tmp37_, _tmp41_);
		_g_free0 (_tmp41_);
		_g_free0 (_tmp39_);
		_tmp42_ = supergrid;
		_tmp43_ = self->priv->topspace1;
		gtk_grid_attach (_tmp42_, (GtkWidget*) _tmp43_, 0, 0, 1, 1);
	}
	_tmp44_ = supergrid;
	_tmp45_ = self->priv->scrollwin;
	gtk_grid_attach (_tmp44_, (GtkWidget*) _tmp45_, 0, 10, 1, 1);
	_tmp46_ = supergrid;
	_tmp47_ = ws_managebox;
	gtk_grid_attach (_tmp46_, (GtkWidget*) _tmp47_, 0, 1, 1, 1);
	_tmp48_ = self->priv->scrollwin;
	_tmp49_ = self->priv->maingrid;
	gtk_container_add ((GtkContainer*) _tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = supergrid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp50_);
	visual_space_applet_visual_space_popover_connect_workspace_signals (self);
	g_signal_connect_object ((GtkPopover*) self, "closed", (GCallback) ___lambda9__gtk_popover_closed, self, 0);
	_g_object_unref0 (fakespin);
	_g_object_unref0 (autobutton);
	_g_object_unref0 (ws_managebox);
	_g_object_unref0 (supergrid);
	return self;
}

VisualSpaceAppletVisualSpacePopover*
visual_space_applet_visual_space_popover_new (GtkEventBox* indicatorBox)
{
	return visual_space_applet_visual_space_popover_construct (VISUAL_SPACE_APPLET_TYPE_VISUAL_SPACE_POPOVER, indicatorBox);
}

static void
_visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_added (XfwWorkspaceGroup* _sender,
                                                                                                              XfwWorkspace* workspace,
                                                                                                              gpointer self)
{
	visual_space_applet_visual_space_popover_update_interface ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
_visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_removed (XfwWorkspaceGroup* _sender,
                                                                                                                XfwWorkspace* workspace,
                                                                                                                gpointer self)
{
	visual_space_applet_visual_space_popover_update_interface ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
_visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_active_workspace_changed (XfwWorkspaceGroup* _sender,
                                                                                                                       XfwWorkspace* previously_active_workspace,
                                                                                                                       gpointer self)
{
	visual_space_applet_visual_space_popover_update_interface ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
_visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_created (XfwWorkspaceManager* _sender,
                                                                                                                  XfwWorkspace* workspace,
                                                                                                                  gpointer self)
{
	visual_space_applet_visual_space_popover_update_interface ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
_visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_destroyed (XfwWorkspaceManager* _sender,
                                                                                                                    XfwWorkspace* workspace,
                                                                                                                    gpointer self)
{
	visual_space_applet_visual_space_popover_update_interface ((VisualSpaceAppletVisualSpacePopover*) self);
}

static void
visual_space_applet_visual_space_popover_connect_workspace_signals (VisualSpaceAppletVisualSpacePopover* self)
{
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	XfwWorkspaceManager* _tmp8_;
	XfwWorkspaceManager* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = visual_space_applet_ws_manager;
	_tmp1_ = xfw_workspace_manager_list_workspace_groups (_tmp0_);
	workspace_groups = _tmp1_;
	_tmp2_ = workspace_groups;
	if (_tmp2_ != NULL) {
		GList* _tmp3_;
		_tmp3_ = workspace_groups;
		{
			GList* group_collection = NULL;
			GList* group_it = NULL;
			group_collection = _tmp3_;
			for (group_it = group_collection; group_it != NULL; group_it = group_it->next) {
				XfwWorkspaceGroup* _tmp4_;
				XfwWorkspaceGroup* group = NULL;
				_tmp4_ = _g_object_ref0 ((XfwWorkspaceGroup*) group_it->data);
				group = _tmp4_;
				{
					XfwWorkspaceGroup* _tmp5_;
					XfwWorkspaceGroup* _tmp6_;
					XfwWorkspaceGroup* _tmp7_;
					_tmp5_ = group;
					g_signal_connect_object (_tmp5_, "workspace-added", (GCallback) _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_added, self, 0);
					_tmp6_ = group;
					g_signal_connect_object (_tmp6_, "workspace-removed", (GCallback) _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_workspace_removed, self, 0);
					_tmp7_ = group;
					g_signal_connect_object (_tmp7_, "active-workspace-changed", (GCallback) _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_group_active_workspace_changed, self, 0);
					_g_object_unref0 (group);
				}
			}
		}
	}
	_tmp8_ = visual_space_applet_ws_manager;
	g_signal_connect_object (_tmp8_, "workspace-created", (GCallback) _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_created, self, 0);
	_tmp9_ = visual_space_applet_ws_manager;
	g_signal_connect_object (_tmp9_, "workspace-destroyed", (GCallback) _visual_space_applet_visual_space_popover_update_interface_libxfce4windowing_workspace_manager_workspace_destroyed, self, 0);
}

static void
visual_space_applet_visual_space_popover_add_onespace (VisualSpaceAppletVisualSpacePopover* self,
                                                       const gchar* edit)
{
	gint max_nspace = 0;
	gint n_currentworkspaces = 0;
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp0_;
	GList* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GList* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (edit != NULL);
	max_nspace = 8;
	n_currentworkspaces = 0;
	_tmp0_ = visual_space_applet_ws_manager;
	_tmp1_ = xfw_workspace_manager_list_workspace_groups (_tmp0_);
	workspace_groups = _tmp1_;
	_tmp3_ = workspace_groups;
	if (_tmp3_ != NULL) {
		GList* _tmp4_;
		_tmp4_ = workspace_groups;
		_tmp2_ = g_list_length (_tmp4_) > ((guint) 0);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		XfwWorkspaceGroup* group = NULL;
		GList* _tmp5_;
		gconstpointer _tmp6_;
		XfwWorkspaceGroup* _tmp7_;
		XfwWorkspaceGroup* _tmp8_;
		_tmp5_ = workspace_groups;
		_tmp6_ = g_list_nth_data (_tmp5_, (guint) 0);
		_tmp7_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp6_);
		group = _tmp7_;
		_tmp8_ = group;
		n_currentworkspaces = (gint) xfw_workspace_group_get_workspace_count (_tmp8_);
		_g_object_unref0 (group);
	} else {
		return;
	}
	{
		gboolean _tmp9_ = FALSE;
		if (g_strcmp0 (edit, "add") == 0) {
			_tmp9_ = n_currentworkspaces < max_nspace;
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			XfwWorkspaceGroup* group = NULL;
			GList* _tmp10_;
			gconstpointer _tmp11_;
			XfwWorkspaceGroup* _tmp12_;
			_tmp10_ = workspace_groups;
			_tmp11_ = g_list_nth_data (_tmp10_, (guint) 0);
			_tmp12_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp11_);
			group = _tmp12_;
			{
				XfwWorkspaceGroup* _tmp13_;
				XfwWorkspaceGroup* _tmp14_;
				gchar* _tmp15_;
				gchar* _tmp16_;
				_tmp13_ = group;
				_tmp14_ = group;
				_tmp15_ = g_strdup_printf ("Workspace %lu", (gulong) (xfw_workspace_group_get_workspace_count (_tmp14_) + 1));
				_tmp16_ = _tmp15_;
				xfw_workspace_group_create_workspace (_tmp13_, _tmp16_, &_inner_error0_);
				_g_free0 (_tmp16_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch1_g_error;
				}
			}
			goto __finally1;
			__catch1_g_error:
			{
				GError* e = NULL;
				VisualSpaceAppletLabwcWorkspaceHelper* _tmp17_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp17_ = visual_space_applet_labwc_helper;
				if (_tmp17_ != NULL) {
					VisualSpaceAppletLabwcWorkspaceHelper* _tmp18_;
					_tmp18_ = visual_space_applet_labwc_helper;
					visual_space_applet_labwc_workspace_helper_set_workspace_count (_tmp18_, n_currentworkspaces + 1, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_error_free0 (e);
						goto __finally1;
					}
				} else {
					GError* _tmp19_;
					const gchar* _tmp20_;
					_tmp19_ = e;
					_tmp20_ = _tmp19_->message;
					g_warning ("visualspace_wayland.vala:241: Cannot create workspace: %s", _tmp20_);
				}
				_g_error_free0 (e);
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (group);
				goto __catch0_g_error;
			}
			_g_object_unref0 (group);
		} else {
			gboolean _tmp21_ = FALSE;
			if (g_strcmp0 (edit, "remove") == 0) {
				_tmp21_ = n_currentworkspaces > 1;
			} else {
				_tmp21_ = FALSE;
			}
			if (_tmp21_) {
				XfwWorkspaceGroup* group = NULL;
				GList* _tmp22_;
				gconstpointer _tmp23_;
				XfwWorkspaceGroup* _tmp24_;
				GList* workspaces = NULL;
				XfwWorkspaceGroup* _tmp25_;
				GList* _tmp26_;
				XfwWorkspace* last_ws = NULL;
				GList* _tmp27_;
				gconstpointer _tmp28_;
				XfwWorkspace* _tmp29_;
				_tmp22_ = workspace_groups;
				_tmp23_ = g_list_nth_data (_tmp22_, (guint) 0);
				_tmp24_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp23_);
				group = _tmp24_;
				_tmp25_ = group;
				_tmp26_ = xfw_workspace_group_list_workspaces (_tmp25_);
				workspaces = _tmp26_;
				_tmp27_ = workspaces;
				_tmp28_ = g_list_nth_data (_tmp27_, (guint) (n_currentworkspaces - 1));
				_tmp29_ = _g_object_ref0 ((XfwWorkspace*) _tmp28_);
				last_ws = _tmp29_;
				{
					XfwWorkspace* _tmp30_;
					_tmp30_ = last_ws;
					if (_tmp30_ != NULL) {
						XfwWorkspace* _tmp31_;
						_tmp31_ = last_ws;
						xfw_workspace_remove (_tmp31_, &_inner_error0_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch2_g_error;
						}
					}
				}
				goto __finally2;
				__catch2_g_error:
				{
					GError* e = NULL;
					VisualSpaceAppletLabwcWorkspaceHelper* _tmp32_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp32_ = visual_space_applet_labwc_helper;
					if (_tmp32_ != NULL) {
						VisualSpaceAppletLabwcWorkspaceHelper* _tmp33_;
						_tmp33_ = visual_space_applet_labwc_helper;
						visual_space_applet_labwc_workspace_helper_set_workspace_count (_tmp33_, n_currentworkspaces - 1, &_inner_error0_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							_g_error_free0 (e);
							goto __finally2;
						}
					} else {
						GError* _tmp34_;
						const gchar* _tmp35_;
						_tmp34_ = e;
						_tmp35_ = _tmp34_->message;
						g_warning ("visualspace_wayland.vala:259: Cannot remove workspace: %s", _tmp35_);
					}
					_g_error_free0 (e);
				}
				__finally2:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (last_ws);
					_g_object_unref0 (group);
					goto __catch0_g_error;
				}
				_g_object_unref0 (last_ws);
				_g_object_unref0 (group);
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp36_;
		const gchar* _tmp37_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp36_ = e;
		_tmp37_ = _tmp36_->message;
		g_warning ("visualspace_wayland.vala:264: Failed to add/remove workspace: %s", _tmp37_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
visual_space_applet_visual_space_popover_set_nspaces_show (VisualSpaceAppletVisualSpacePopover* self,
                                                           const gchar* subj)
{
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp0_;
	GList* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GList* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = visual_space_applet_ws_manager;
	_tmp1_ = xfw_workspace_manager_list_workspace_groups (_tmp0_);
	workspace_groups = _tmp1_;
	_tmp3_ = workspace_groups;
	if (_tmp3_ != NULL) {
		GList* _tmp4_;
		_tmp4_ = workspace_groups;
		_tmp2_ = g_list_length (_tmp4_) > ((guint) 0);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		XfwWorkspaceGroup* group = NULL;
		GList* _tmp5_;
		gconstpointer _tmp6_;
		XfwWorkspaceGroup* _tmp7_;
		gint new_nspaces = 0;
		XfwWorkspaceGroup* _tmp8_;
		GtkLabel* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp5_ = workspace_groups;
		_tmp6_ = g_list_nth_data (_tmp5_, (guint) 0);
		_tmp7_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp6_);
		group = _tmp7_;
		_tmp8_ = group;
		new_nspaces = (gint) xfw_workspace_group_get_workspace_count (_tmp8_);
		_tmp9_ = self->priv->nspaces_show;
		_tmp10_ = g_strdup_printf ("%i", new_nspaces);
		_tmp11_ = _tmp10_;
		gtk_label_set_text (_tmp9_, _tmp11_);
		_g_free0 (_tmp11_);
		_g_object_unref0 (group);
	}
}

static GtkButton*
visual_space_applet_visual_space_popover_create_spacebutton (VisualSpaceAppletVisualSpacePopover* self,
                                                             gint currsubj,
                                                             gint n_spaces)
{
	GtkButton* spaceheader = NULL;
	GtkButton* _tmp0_;
	GtkLabel* l = NULL;
	GtkButton* _tmp1_;
	GtkWidget* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	gchar* s = NULL;
	gchar* _tmp5_;
	GtkLabel* _tmp13_;
	const gchar* _tmp14_;
	GtkButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkButton*) gtk_button_new_with_label ("");
	g_object_ref_sink (_tmp0_);
	spaceheader = _tmp0_;
	_tmp1_ = spaceheader;
	_tmp2_ = gtk_bin_get_child ((GtkBin*) _tmp1_);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_label_get_type (), GtkLabel));
	l = _tmp3_;
	_tmp4_ = l;
	gtk_label_set_xalign (_tmp4_, (gfloat) 0.5);
	_tmp5_ = g_strdup ("");
	s = _tmp5_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = TRUE;
			while (TRUE) {
				gchar* add = NULL;
				gchar* _tmp8_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				if (!_tmp6_) {
					gint _tmp7_;
					_tmp7_ = i;
					i = _tmp7_ + 1;
				}
				_tmp6_ = FALSE;
				if (!(i < n_spaces)) {
					break;
				}
				_tmp8_ = g_strdup ("○ ");
				add = _tmp8_;
				if (i == currsubj) {
					gchar* _tmp9_;
					_tmp9_ = g_strdup ("● ");
					_g_free0 (add);
					add = _tmp9_;
				}
				_tmp10_ = s;
				_tmp11_ = add;
				_tmp12_ = g_strconcat (_tmp10_, _tmp11_, NULL);
				_g_free0 (s);
				s = _tmp12_;
				_g_free0 (add);
			}
		}
	}
	_tmp13_ = l;
	_tmp14_ = s;
	gtk_label_set_text (_tmp13_, _tmp14_);
	result = spaceheader;
	_g_free0 (s);
	_g_object_unref0 (l);
	return result;
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		VisualSpaceAppletVisualSpacePopover* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->ws);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
______lambda4_ (Block1Data* _data1_)
{
	VisualSpaceAppletVisualSpacePopover* self;
	GError* _inner_error0_ = NULL;
	self = _data1_->self;
	{
		XfwWorkspace* _tmp0_;
		_tmp0_ = _data1_->ws;
		xfw_workspace_activate (_tmp0_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		gtk_widget_hide ((GtkWidget*) self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("visualspace_wayland.vala:331: Failed to activate workspace: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_______lambda4__gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	______lambda4_ (self);
}

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

static void
visual_space_applet_visual_space_popover_produce_content (VisualSpaceAppletVisualSpacePopover* self)
{
	GtkGrid* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkGrid* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp6_;
	GList* _tmp7_;
	gboolean _tmp8_ = FALSE;
	GList* _tmp9_;
	XfwWorkspaceGroup* group = NULL;
	GList* _tmp11_;
	gconstpointer _tmp12_;
	XfwWorkspaceGroup* _tmp13_;
	GList* workspaces = NULL;
	XfwWorkspaceGroup* _tmp14_;
	GList* _tmp15_;
	gint n_spaces = 0;
	GList* _tmp16_;
	GtkGrid** spacegrids = NULL;
	GtkGrid** _tmp17_;
	gint spacegrids_length1;
	gint _spacegrids_size_;
	gint blockrow = 0;
	GtkGrid** _tmp36_;
	gint _tmp36__length1;
	GtkScrolledWindow* _tmp40_;
	GtkScrolledWindow* _tmp41_;
	GtkScrolledWindow* _tmp42_;
	GtkScrolledWindow* _tmp43_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->maingrid;
	_tmp1_ = (GtkLabel*) gtk_label_new ("\t");
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	gtk_grid_attach (_tmp0_, (GtkWidget*) _tmp2_, 0, 0, 1, 1);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = self->priv->maingrid;
	_tmp4_ = (GtkLabel*) gtk_label_new ("\t");
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	gtk_grid_attach (_tmp3_, (GtkWidget*) _tmp5_, 100, 100, 1, 1);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = visual_space_applet_ws_manager;
	_tmp7_ = xfw_workspace_manager_list_workspace_groups (_tmp6_);
	workspace_groups = _tmp7_;
	_tmp9_ = workspace_groups;
	if (_tmp9_ == NULL) {
		_tmp8_ = TRUE;
	} else {
		GList* _tmp10_;
		_tmp10_ = workspace_groups;
		_tmp8_ = g_list_length (_tmp10_) == ((guint) 0);
	}
	if (_tmp8_) {
		return;
	}
	_tmp11_ = workspace_groups;
	_tmp12_ = g_list_nth_data (_tmp11_, (guint) 0);
	_tmp13_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp12_);
	group = _tmp13_;
	_tmp14_ = group;
	_tmp15_ = xfw_workspace_group_list_workspaces (_tmp14_);
	workspaces = _tmp15_;
	_tmp16_ = workspaces;
	n_spaces = (gint) g_list_length (_tmp16_);
	visual_space_applet_visual_space_popover_set_nspaces_show (self, NULL);
	_tmp17_ = g_new0 (GtkGrid*, 0 + 1);
	spacegrids = _tmp17_;
	spacegrids_length1 = 0;
	_spacegrids_size_ = spacegrids_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp18_ = FALSE;
			_tmp18_ = TRUE;
			while (TRUE) {
				Block1Data* _data1_;
				GtkGrid* spacegrid = NULL;
				GtkGrid* _tmp20_;
				GtkButton* header = NULL;
				GtkButton* _tmp21_;
				GList* _tmp22_;
				gconstpointer _tmp23_;
				XfwWorkspace* _tmp24_;
				XfwWorkspace* _tmp25_;
				GtkButton* _tmp27_;
				GtkButton* _tmp28_;
				GtkGrid* _tmp29_;
				GtkButton* _tmp30_;
				GtkGrid* _tmp31_;
				GtkLabel* _tmp32_;
				GtkLabel* _tmp33_;
				GtkGrid* _tmp34_;
				GtkGrid* _tmp35_;
				_data1_ = g_slice_new0 (Block1Data);
				_data1_->_ref_count_ = 1;
				_data1_->self = g_object_ref (self);
				if (!_tmp18_) {
					gint _tmp19_;
					_tmp19_ = i;
					i = _tmp19_ + 1;
				}
				_tmp18_ = FALSE;
				if (!(i < n_spaces)) {
					block1_data_unref (_data1_);
					_data1_ = NULL;
					break;
				}
				_tmp20_ = (GtkGrid*) gtk_grid_new ();
				g_object_ref_sink (_tmp20_);
				spacegrid = _tmp20_;
				_tmp21_ = visual_space_applet_visual_space_popover_create_spacebutton (self, i, n_spaces);
				header = _tmp21_;
				_tmp22_ = workspaces;
				_tmp23_ = g_list_nth_data (_tmp22_, (guint) i);
				_tmp24_ = _g_object_ref0 ((XfwWorkspace*) _tmp23_);
				_data1_->ws = _tmp24_;
				_tmp25_ = _data1_->ws;
				if (_tmp25_ != NULL) {
					GtkButton* _tmp26_;
					_tmp26_ = header;
					g_signal_connect_data (_tmp26_, "clicked", (GCallback) _______lambda4__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
				}
				_tmp27_ = header;
				gtk_button_set_relief (_tmp27_, GTK_RELIEF_NONE);
				_tmp28_ = header;
				gtk_widget_set_size_request ((GtkWidget*) _tmp28_, 260, 0);
				_tmp29_ = spacegrid;
				_tmp30_ = header;
				gtk_grid_attach (_tmp29_, (GtkWidget*) _tmp30_, 2, 0, 10, 1);
				_tmp31_ = spacegrid;
				_tmp32_ = (GtkLabel*) gtk_label_new ("");
				g_object_ref_sink (_tmp32_);
				_tmp33_ = _tmp32_;
				gtk_grid_attach (_tmp31_, (GtkWidget*) _tmp33_, 0, 100, 1, 1);
				_g_object_unref0 (_tmp33_);
				_tmp34_ = spacegrid;
				_tmp35_ = _g_object_ref0 (_tmp34_);
				_vala_array_add1 (&spacegrids, &spacegrids_length1, &_spacegrids_size_, _tmp35_);
				_g_object_unref0 (header);
				_g_object_unref0 (spacegrid);
				block1_data_unref (_data1_);
				_data1_ = NULL;
			}
		}
	}
	blockrow = 0;
	_tmp36_ = spacegrids;
	_tmp36__length1 = spacegrids_length1;
	{
		GtkGrid** g_collection = NULL;
		gint g_collection_length1 = 0;
		gint _g_collection_size_ = 0;
		gint g_it = 0;
		g_collection = _tmp36_;
		g_collection_length1 = _tmp36__length1;
		for (g_it = 0; g_it < g_collection_length1; g_it = g_it + 1) {
			GtkGrid* _tmp37_;
			GtkGrid* g = NULL;
			_tmp37_ = _g_object_ref0 (g_collection[g_it]);
			g = _tmp37_;
			{
				GtkGrid* _tmp38_;
				GtkGrid* _tmp39_;
				_tmp38_ = self->priv->maingrid;
				_tmp39_ = g;
				gtk_grid_attach (_tmp38_, (GtkWidget*) _tmp39_, 1, blockrow, 1, 1);
				blockrow += 1;
				_g_object_unref0 (g);
			}
		}
	}
	_tmp40_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp40_);
	_g_object_unref0 (self->priv->scrollwin);
	self->priv->scrollwin = _tmp40_;
	_tmp41_ = self->priv->scrollwin;
	gtk_scrolled_window_set_propagate_natural_height (_tmp41_, TRUE);
	_tmp42_ = self->priv->scrollwin;
	gtk_scrolled_window_set_max_content_height (_tmp42_, 350);
	_tmp43_ = self->priv->scrollwin;
	gtk_scrolled_window_set_min_content_width (_tmp43_, 365);
	spacegrids = (_vala_array_free (spacegrids, spacegrids_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (group);
}

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

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

static gboolean
____lambda7_ (Block2Data* _data2_)
{
	VisualSpaceAppletVisualSpacePopover* self;
	GtkWidget* _tmp0_;
	gboolean result;
	self = _data2_->self;
	_tmp0_ = _data2_->wdg;
	gtk_widget_destroy (_tmp0_);
	result = FALSE;
	return result;
}

static gboolean
_____lambda7__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda7_ (self);
	return result;
}

static gboolean
__lambda8_ (VisualSpaceAppletVisualSpacePopover* self)
{
	GtkGrid* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	gboolean result;
	visual_space_applet_visual_space_popover_produce_content (self);
	_tmp0_ = self->priv->maingrid;
	gtk_widget_show_all ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->scrollwin;
	gtk_widget_show_all ((GtkWidget*) _tmp1_);
	result = FALSE;
	return result;
}

static gboolean
___lambda8__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda8_ ((VisualSpaceAppletVisualSpacePopover*) self);
	return result;
}

static void
visual_space_applet_visual_space_popover_update_interface (VisualSpaceAppletVisualSpacePopover* self)
{
	GList* widgets = NULL;
	GtkGrid* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->maingrid;
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
	widgets = _tmp1_;
	_tmp2_ = widgets;
	{
		GList* wdg_collection = NULL;
		GList* wdg_it = NULL;
		wdg_collection = _tmp2_;
		for (wdg_it = wdg_collection; wdg_it != NULL; wdg_it = wdg_it->next) {
			GtkWidget* _tmp3_;
			GtkWidget* wdg = NULL;
			_tmp3_ = _g_object_ref0 ((GtkWidget*) wdg_it->data);
			wdg = _tmp3_;
			{
				Block2Data* _data2_;
				_data2_ = g_slice_new0 (Block2Data);
				_data2_->_ref_count_ = 1;
				_data2_->self = g_object_ref (self);
				_data2_->wdg = wdg;
				g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _____lambda7__gsource_func, block2_data_ref (_data2_), block2_data_unref);
				block2_data_unref (_data2_);
				_data2_ = NULL;
			}
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda8__gsource_func, g_object_ref (self), g_object_unref);
	(widgets == NULL) ? NULL : (widgets = (g_list_free (widgets), NULL));
}

static void
visual_space_applet_visual_space_popover_class_init (VisualSpaceAppletVisualSpacePopoverClass * klass,
                                                     gpointer klass_data)
{
	visual_space_applet_visual_space_popover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &VisualSpaceAppletVisualSpacePopover_private_offset);
	G_OBJECT_CLASS (klass)->finalize = visual_space_applet_visual_space_popover_finalize;
}

static void
visual_space_applet_visual_space_popover_instance_init (VisualSpaceAppletVisualSpacePopover * self,
                                                        gpointer klass)
{
	self->priv = visual_space_applet_visual_space_popover_get_instance_private (self);
	self->priv->topspace1 = NULL;
}

static void
visual_space_applet_visual_space_popover_finalize (GObject * obj)
{
	VisualSpaceAppletVisualSpacePopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VISUAL_SPACE_APPLET_TYPE_VISUAL_SPACE_POPOVER, VisualSpaceAppletVisualSpacePopover);
	_g_object_unref0 (self->priv->scrollwin);
	_g_object_unref0 (self->priv->indicatorBox);
	_g_object_unref0 (self->priv->maingrid);
	_g_object_unref0 (self->priv->nspaces_show);
	_g_object_unref0 (self->priv->topspace1);
	_g_object_unref0 (self->priv->nspaces_down);
	_g_object_unref0 (self->priv->nspaces_up);
	G_OBJECT_CLASS (visual_space_applet_visual_space_popover_parent_class)->finalize (obj);
}

GType
visual_space_applet_visual_space_popover_get_type (void)
{
	return visual_space_applet_visual_space_popover_type_id;
}

GType
visual_space_applet_visual_space_popover_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (VisualSpaceAppletVisualSpacePopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) visual_space_applet_visual_space_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VisualSpaceAppletVisualSpacePopover), 0, (GInstanceInitFunc) visual_space_applet_visual_space_popover_instance_init, NULL };
	visual_space_applet_visual_space_popover_type_id = g_type_module_register_type (module, budgie_popover_get_type (), "VisualSpaceAppletVisualSpacePopover", &g_define_type_info, 0);
	VisualSpaceAppletVisualSpacePopover_private_offset = sizeof (VisualSpaceAppletVisualSpacePopoverPrivate);
	return visual_space_applet_visual_space_popover_type_id;
}

static BudgieApplet*
visual_space_applet_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                  const gchar* uuid)
{
	VisualSpaceAppletPlugin * self;
	VisualSpaceAppletApplet* _tmp0_;
	BudgieApplet* result;
	self = (VisualSpaceAppletPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = visual_space_applet_applet_new ();
	g_object_ref_sink (_tmp0_);
	result = (BudgieApplet*) _tmp0_;
	return result;
}

VisualSpaceAppletPlugin*
visual_space_applet_plugin_construct (GType object_type)
{
	VisualSpaceAppletPlugin * self = NULL;
	self = (VisualSpaceAppletPlugin*) g_object_new (object_type, NULL);
	return self;
}

VisualSpaceAppletPlugin*
visual_space_applet_plugin_new (void)
{
	return visual_space_applet_plugin_construct (VISUAL_SPACE_APPLET_TYPE_PLUGIN);
}

static void
visual_space_applet_plugin_class_init (VisualSpaceAppletPluginClass * klass,
                                       gpointer klass_data)
{
	visual_space_applet_plugin_parent_class = g_type_class_peek_parent (klass);
}

static void
visual_space_applet_plugin_budgie_plugin_interface_init (BudgiePluginIface * iface,
                                                         gpointer iface_data)
{
	visual_space_applet_plugin_budgie_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_panel_widget = (BudgieApplet* (*) (BudgiePlugin*, const gchar*)) visual_space_applet_plugin_real_get_panel_widget;
}

static void
visual_space_applet_plugin_instance_init (VisualSpaceAppletPlugin * self,
                                          gpointer klass)
{
}

GType
visual_space_applet_plugin_get_type (void)
{
	return visual_space_applet_plugin_type_id;
}

GType
visual_space_applet_plugin_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (VisualSpaceAppletPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) visual_space_applet_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VisualSpaceAppletPlugin), 0, (GInstanceInitFunc) visual_space_applet_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_plugin_info = { (GInterfaceInitFunc) visual_space_applet_plugin_budgie_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	visual_space_applet_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "VisualSpaceAppletPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, visual_space_applet_plugin_type_id, budgie_plugin_get_type (), &budgie_plugin_info);
	return visual_space_applet_plugin_type_id;
}

static inline gpointer
visual_space_applet_visual_space_settings_get_instance_private (VisualSpaceAppletVisualSpaceSettings* self)
{
	return G_STRUCT_MEMBER_P (self, VisualSpaceAppletVisualSpaceSettings_private_offset);
}

VisualSpaceAppletVisualSpaceSettings*
visual_space_applet_visual_space_settings_construct (GType object_type)
{
	VisualSpaceAppletVisualSpaceSettings * self = NULL;
	GtkLabel* widthlabel = NULL;
	GtkLabel* _tmp0_;
	GtkCheckButton* _tmp1_;
	GtkCheckButton* _tmp2_;
	GSettings* _tmp3_;
	GtkCheckButton* _tmp4_;
	self = (VisualSpaceAppletVisualSpaceSettings*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Reverse Scroll Direction"));
	g_object_ref_sink (_tmp0_);
	widthlabel = _tmp0_;
	gtk_label_set_xalign (widthlabel, (gfloat) 0);
	_tmp1_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->reversebutton);
	self->priv->reversebutton = _tmp1_;
	_tmp2_ = self->priv->reversebutton;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp2_, 0, 1, 1, 1);
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) widthlabel, 1, 1, 1, 1);
	gtk_widget_show_all ((GtkWidget*) self);
	_tmp3_ = visual_space_applet_visualspace_settings;
	_tmp4_ = self->priv->reversebutton;
	g_settings_bind (_tmp3_, "reverse-scroll", (GObject*) _tmp4_, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
	_g_object_unref0 (widthlabel);
	return self;
}

VisualSpaceAppletVisualSpaceSettings*
visual_space_applet_visual_space_settings_new (void)
{
	return visual_space_applet_visual_space_settings_construct (VISUAL_SPACE_APPLET_TYPE_VISUAL_SPACE_SETTINGS);
}

static void
visual_space_applet_visual_space_settings_class_init (VisualSpaceAppletVisualSpaceSettingsClass * klass,
                                                      gpointer klass_data)
{
	visual_space_applet_visual_space_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &VisualSpaceAppletVisualSpaceSettings_private_offset);
	G_OBJECT_CLASS (klass)->finalize = visual_space_applet_visual_space_settings_finalize;
}

static void
visual_space_applet_visual_space_settings_instance_init (VisualSpaceAppletVisualSpaceSettings * self,
                                                         gpointer klass)
{
	self->priv = visual_space_applet_visual_space_settings_get_instance_private (self);
}

static void
visual_space_applet_visual_space_settings_finalize (GObject * obj)
{
	VisualSpaceAppletVisualSpaceSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VISUAL_SPACE_APPLET_TYPE_VISUAL_SPACE_SETTINGS, VisualSpaceAppletVisualSpaceSettings);
	_g_object_unref0 (self->priv->reversebutton);
	G_OBJECT_CLASS (visual_space_applet_visual_space_settings_parent_class)->finalize (obj);
}

GType
visual_space_applet_visual_space_settings_get_type (void)
{
	return visual_space_applet_visual_space_settings_type_id;
}

GType
visual_space_applet_visual_space_settings_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (VisualSpaceAppletVisualSpaceSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) visual_space_applet_visual_space_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VisualSpaceAppletVisualSpaceSettings), 0, (GInstanceInitFunc) visual_space_applet_visual_space_settings_instance_init, NULL };
	visual_space_applet_visual_space_settings_type_id = g_type_module_register_type (module, gtk_grid_get_type (), "VisualSpaceAppletVisualSpaceSettings", &g_define_type_info, 0);
	VisualSpaceAppletVisualSpaceSettings_private_offset = sizeof (VisualSpaceAppletVisualSpaceSettingsPrivate);
	return visual_space_applet_visual_space_settings_type_id;
}

static inline gpointer
visual_space_applet_applet_get_instance_private (VisualSpaceAppletApplet* self)
{
	return G_STRUCT_MEMBER_P (self, VisualSpaceAppletApplet_private_offset);
}

static void
visual_space_applet_applet_real_panel_position_changed (BudgieApplet* base,
                                                        BudgiePanelPosition position)
{
	VisualSpaceAppletApplet * self;
	gboolean _tmp0_ = FALSE;
	self = (VisualSpaceAppletApplet*) base;
	if (position == BUDGIE_PANEL_POSITION_LEFT) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = position == BUDGIE_PANEL_POSITION_RIGHT;
	}
	if (_tmp0_) {
		self->priv->usevertical = TRUE;
	} else {
		self->priv->usevertical = FALSE;
	}
	visual_space_applet_applet_update_appearance (self);
}

static void
visual_space_applet_applet_update_appearance (VisualSpaceAppletApplet* self)
{
	gchar* s = NULL;
	gchar* _tmp0_;
	gchar* charc = NULL;
	gchar* _tmp1_;
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp2_;
	GList* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GList* _tmp5_;
	XfwWorkspaceGroup* group = NULL;
	GList* _tmp8_;
	gconstpointer _tmp9_;
	XfwWorkspaceGroup* _tmp10_;
	GList* workspaces = NULL;
	XfwWorkspaceGroup* _tmp11_;
	GList* _tmp12_;
	XfwWorkspace* active_ws = NULL;
	XfwWorkspaceGroup* _tmp13_;
	XfwWorkspace* _tmp14_;
	XfwWorkspace* _tmp15_;
	GList* _tmp16_;
	GtkLabel* _tmp27_;
	const gchar* _tmp28_;
	GdkScreen* _tmp29_;
	GtkLabel* _tmp30_;
	GtkEventBox* _tmp31_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("");
	s = _tmp0_;
	_tmp1_ = g_strdup ("");
	charc = _tmp1_;
	_tmp2_ = visual_space_applet_ws_manager;
	_tmp3_ = xfw_workspace_manager_list_workspace_groups (_tmp2_);
	workspace_groups = _tmp3_;
	_tmp5_ = workspace_groups;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		GList* _tmp6_;
		_tmp6_ = workspace_groups;
		_tmp4_ = g_list_length (_tmp6_) == ((guint) 0);
	}
	if (_tmp4_) {
		GtkLabel* _tmp7_;
		_tmp7_ = self->priv->label;
		gtk_label_set_text (_tmp7_, "");
		_g_free0 (charc);
		_g_free0 (s);
		return;
	}
	_tmp8_ = workspace_groups;
	_tmp9_ = g_list_nth_data (_tmp8_, (guint) 0);
	_tmp10_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp9_);
	group = _tmp10_;
	_tmp11_ = group;
	_tmp12_ = xfw_workspace_group_list_workspaces (_tmp11_);
	workspaces = _tmp12_;
	_tmp13_ = group;
	_tmp14_ = xfw_workspace_group_get_active_workspace (_tmp13_);
	_tmp15_ = _g_object_ref0 (_tmp14_);
	active_ws = _tmp15_;
	_tmp16_ = workspaces;
	{
		GList* ws_collection = NULL;
		GList* ws_it = NULL;
		ws_collection = _tmp16_;
		for (ws_it = ws_collection; ws_it != NULL; ws_it = ws_it->next) {
			XfwWorkspace* _tmp17_;
			XfwWorkspace* ws = NULL;
			_tmp17_ = _g_object_ref0 ((XfwWorkspace*) ws_it->data);
			ws = _tmp17_;
			{
				XfwWorkspace* _tmp18_;
				XfwWorkspace* _tmp19_;
				const gchar* _tmp22_;
				const gchar* _tmp23_;
				gchar* _tmp24_;
				_tmp18_ = ws;
				_tmp19_ = active_ws;
				if (_tmp18_ == _tmp19_) {
					gchar* _tmp20_;
					_tmp20_ = g_strdup ("●");
					_g_free0 (charc);
					charc = _tmp20_;
				} else {
					gchar* _tmp21_;
					_tmp21_ = g_strdup ("○");
					_g_free0 (charc);
					charc = _tmp21_;
				}
				_tmp22_ = s;
				_tmp23_ = charc;
				_tmp24_ = g_strconcat (_tmp22_, _tmp23_, NULL);
				_g_free0 (s);
				s = _tmp24_;
				if (self->priv->usevertical) {
					const gchar* _tmp25_;
					gchar* _tmp26_;
					_tmp25_ = s;
					_tmp26_ = g_strconcat (_tmp25_, "\n", NULL);
					_g_free0 (s);
					s = _tmp26_;
				}
				_g_object_unref0 (ws);
			}
		}
	}
	_tmp27_ = self->priv->label;
	_tmp28_ = s;
	gtk_label_set_text (_tmp27_, _tmp28_);
	_tmp29_ = visual_space_applet_gdkscreen;
	_tmp30_ = self->priv->label;
	visual_space_applet_set_spacing (_tmp29_, _tmp30_, "fontspacing");
	_tmp31_ = self->priv->indicatorBox;
	gtk_widget_show_all ((GtkWidget*) _tmp31_);
	_g_object_unref0 (active_ws);
	_g_object_unref0 (group);
	_g_free0 (charc);
	_g_free0 (s);
}

static gboolean
__lambda10_ (VisualSpaceAppletApplet* self,
             GdkEventButton* e)
{
	VisualSpaceAppletVisualSpacePopover* _tmp0_;
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	if (e->button != ((guint) 1)) {
		result = GDK_EVENT_PROPAGATE;
		return result;
	}
	_tmp0_ = self->priv->popover;
	if (gtk_widget_get_visible ((GtkWidget*) _tmp0_)) {
		VisualSpaceAppletVisualSpacePopover* _tmp1_;
		_tmp1_ = self->priv->popover;
		gtk_widget_hide ((GtkWidget*) _tmp1_);
	} else {
		BudgiePopoverManager* _tmp2_;
		GtkEventBox* _tmp3_;
		_tmp2_ = self->priv->manager;
		_tmp3_ = self->priv->indicatorBox;
		budgie_popover_manager_show_popover (_tmp2_, (GtkWidget*) _tmp3_);
	}
	result = GDK_EVENT_STOP;
	return result;
}

static gboolean
___lambda10__gtk_widget_button_press_event (GtkWidget* _sender,
                                            GdkEventButton* event,
                                            gpointer self)
{
	gboolean result;
	result = __lambda10_ ((VisualSpaceAppletApplet*) self, event);
	return result;
}

static gboolean
_visual_space_applet_applet_movealong_workspaces_gtk_widget_scroll_event (GtkWidget* _sender,
                                                                          GdkEventScroll* event,
                                                                          gpointer self)
{
	gboolean result;
	result = visual_space_applet_applet_movealong_workspaces ((VisualSpaceAppletApplet*) self, event);
	return result;
}

VisualSpaceAppletApplet*
visual_space_applet_applet_construct (GType object_type)
{
	VisualSpaceAppletApplet * self = NULL;
	gchar* _tmp0_;
	GdkScreen* _tmp1_;
	GdkScreen* _tmp2_;
	XfwScreen* _tmp3_;
	XfwScreen* _tmp4_;
	XfwWorkspaceManager* _tmp5_;
	XfwWorkspaceManager* _tmp6_;
	GSettings* _tmp7_;
	GtkEventBox* _tmp8_;
	GtkEventBox* _tmp9_;
	VisualSpaceAppletVisualSpacePopover* _tmp10_;
	GtkEventBox* _tmp11_;
	VisualSpaceAppletVisualSpacePopover* _tmp12_;
	GtkWidget* _tmp13_;
	GtkEventBox* _tmp14_;
	GtkEventBox* _tmp15_;
	GtkLabel* _tmp16_;
	GtkEventBox* _tmp17_;
	GtkEventBox* _tmp18_;
	self = (VisualSpaceAppletApplet*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup ("\n" \
"            .fontspacing {letter-spacing: 3px; font-size: 12px;}\n" \
"            .linespacing_top {margin-top: 10px;}\n" \
"            ");
	_g_free0 (visual_space_applet_fontspacing_css);
	visual_space_applet_fontspacing_css = _tmp0_;
	_tmp1_ = gtk_widget_get_screen ((GtkWidget*) self);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (visual_space_applet_gdkscreen);
	visual_space_applet_gdkscreen = _tmp2_;
	_tmp3_ = xfw_screen_get_default ();
	_g_object_unref0 (visual_space_applet_xfw_screen);
	visual_space_applet_xfw_screen = _tmp3_;
	_tmp4_ = visual_space_applet_xfw_screen;
	_tmp5_ = xfw_screen_get_workspace_manager (_tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (visual_space_applet_ws_manager);
	visual_space_applet_ws_manager = _tmp6_;
	_tmp7_ = g_settings_new ("org.ubuntubudgie.plugins.budgie-visualspace");
	_g_object_unref0 (visual_space_applet_visualspace_settings);
	visual_space_applet_visualspace_settings = _tmp7_;
	visual_space_applet_applet_initialiseLocaleLanguageSupport (self);
	_tmp8_ = (GtkEventBox*) gtk_event_box_new ();
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->indicatorBox);
	self->priv->indicatorBox = _tmp8_;
	_tmp9_ = self->priv->indicatorBox;
	_tmp10_ = visual_space_applet_visual_space_popover_new (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->popover);
	self->priv->popover = _tmp10_;
	_tmp11_ = self->priv->indicatorBox;
	g_signal_connect_object ((GtkWidget*) _tmp11_, "button-press-event", (GCallback) ___lambda10__gtk_widget_button_press_event, self, 0);
	_tmp12_ = self->priv->popover;
	_tmp13_ = gtk_bin_get_child ((GtkBin*) _tmp12_);
	gtk_widget_show_all (_tmp13_);
	_tmp14_ = self->priv->indicatorBox;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->indicatorBox;
	_tmp16_ = self->priv->label;
	gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) _tmp16_);
	visual_space_applet_applet_update_appearance (self);
	visual_space_applet_applet_connect_workspace_signals (self);
	_tmp17_ = self->priv->indicatorBox;
	gtk_widget_add_events ((GtkWidget*) _tmp17_, (gint) GDK_SCROLL_MASK);
	_tmp18_ = self->priv->indicatorBox;
	g_signal_connect_object ((GtkWidget*) _tmp18_, "scroll-event", (GCallback) _visual_space_applet_applet_movealong_workspaces_gtk_widget_scroll_event, self, 0);
	gtk_widget_show_all ((GtkWidget*) self);
	return self;
}

VisualSpaceAppletApplet*
visual_space_applet_applet_new (void)
{
	return visual_space_applet_applet_construct (VISUAL_SPACE_APPLET_TYPE_APPLET);
}

static void
_visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_added (XfwWorkspaceGroup* _sender,
                                                                                                 XfwWorkspace* workspace,
                                                                                                 gpointer self)
{
	visual_space_applet_applet_update_appearance ((VisualSpaceAppletApplet*) self);
}

static void
_visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_removed (XfwWorkspaceGroup* _sender,
                                                                                                   XfwWorkspace* workspace,
                                                                                                   gpointer self)
{
	visual_space_applet_applet_update_appearance ((VisualSpaceAppletApplet*) self);
}

static void
_visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_active_workspace_changed (XfwWorkspaceGroup* _sender,
                                                                                                          XfwWorkspace* previously_active_workspace,
                                                                                                          gpointer self)
{
	visual_space_applet_applet_update_appearance ((VisualSpaceAppletApplet*) self);
}

static void
_visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_created (XfwWorkspaceManager* _sender,
                                                                                                     XfwWorkspace* workspace,
                                                                                                     gpointer self)
{
	visual_space_applet_applet_update_appearance ((VisualSpaceAppletApplet*) self);
}

static void
_visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_destroyed (XfwWorkspaceManager* _sender,
                                                                                                       XfwWorkspace* workspace,
                                                                                                       gpointer self)
{
	visual_space_applet_applet_update_appearance ((VisualSpaceAppletApplet*) self);
}

static void
visual_space_applet_applet_connect_workspace_signals (VisualSpaceAppletApplet* self)
{
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	XfwWorkspaceManager* _tmp8_;
	XfwWorkspaceManager* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = visual_space_applet_ws_manager;
	_tmp1_ = xfw_workspace_manager_list_workspace_groups (_tmp0_);
	workspace_groups = _tmp1_;
	_tmp2_ = workspace_groups;
	if (_tmp2_ != NULL) {
		GList* _tmp3_;
		_tmp3_ = workspace_groups;
		{
			GList* group_collection = NULL;
			GList* group_it = NULL;
			group_collection = _tmp3_;
			for (group_it = group_collection; group_it != NULL; group_it = group_it->next) {
				XfwWorkspaceGroup* _tmp4_;
				XfwWorkspaceGroup* group = NULL;
				_tmp4_ = _g_object_ref0 ((XfwWorkspaceGroup*) group_it->data);
				group = _tmp4_;
				{
					XfwWorkspaceGroup* _tmp5_;
					XfwWorkspaceGroup* _tmp6_;
					XfwWorkspaceGroup* _tmp7_;
					_tmp5_ = group;
					g_signal_connect_object (_tmp5_, "workspace-added", (GCallback) _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_added, self, 0);
					_tmp6_ = group;
					g_signal_connect_object (_tmp6_, "workspace-removed", (GCallback) _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_workspace_removed, self, 0);
					_tmp7_ = group;
					g_signal_connect_object (_tmp7_, "active-workspace-changed", (GCallback) _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_group_active_workspace_changed, self, 0);
					_g_object_unref0 (group);
				}
			}
		}
	}
	_tmp8_ = visual_space_applet_ws_manager;
	g_signal_connect_object (_tmp8_, "workspace-created", (GCallback) _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_created, self, 0);
	_tmp9_ = visual_space_applet_ws_manager;
	g_signal_connect_object (_tmp9_, "workspace-destroyed", (GCallback) _visual_space_applet_applet_update_appearance_libxfce4windowing_workspace_manager_workspace_destroyed, self, 0);
}

static gboolean
visual_space_applet_applet_movealong_workspaces (VisualSpaceAppletApplet* self,
                                                 GdkEventScroll* scrollevent)
{
	GList* workspace_groups = NULL;
	XfwWorkspaceManager* _tmp0_;
	GList* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GList* _tmp3_;
	XfwWorkspaceGroup* group = NULL;
	GList* _tmp5_;
	gconstpointer _tmp6_;
	XfwWorkspaceGroup* _tmp7_;
	XfwWorkspace* active_ws = NULL;
	XfwWorkspaceGroup* _tmp8_;
	XfwWorkspace* _tmp9_;
	XfwWorkspace* _tmp10_;
	XfwWorkspace* _tmp11_;
	XfwWorkspace* new_ws = NULL;
	GdkScrollDirection upordown = 0;
	gboolean reverse_scroll = FALSE;
	GSettings* _tmp12_;
	gboolean _tmp13_ = FALSE;
	XfwWorkspace* _tmp21_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (scrollevent != NULL, FALSE);
	_tmp0_ = visual_space_applet_ws_manager;
	_tmp1_ = xfw_workspace_manager_list_workspace_groups (_tmp0_);
	workspace_groups = _tmp1_;
	_tmp3_ = workspace_groups;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		GList* _tmp4_;
		_tmp4_ = workspace_groups;
		_tmp2_ = g_list_length (_tmp4_) == ((guint) 0);
	}
	if (_tmp2_) {
		result = FALSE;
		return result;
	}
	_tmp5_ = workspace_groups;
	_tmp6_ = g_list_nth_data (_tmp5_, (guint) 0);
	_tmp7_ = _g_object_ref0 ((XfwWorkspaceGroup*) _tmp6_);
	group = _tmp7_;
	_tmp8_ = group;
	_tmp9_ = xfw_workspace_group_get_active_workspace (_tmp8_);
	_tmp10_ = _g_object_ref0 (_tmp9_);
	active_ws = _tmp10_;
	_tmp11_ = active_ws;
	if (_tmp11_ == NULL) {
		result = FALSE;
		_g_object_unref0 (active_ws);
		_g_object_unref0 (group);
		return result;
	}
	new_ws = NULL;
	upordown = scrollevent->direction;
	_tmp12_ = visual_space_applet_visualspace_settings;
	reverse_scroll = g_settings_get_boolean (_tmp12_, "reverse-scroll");
	if (reverse_scroll) {
		_tmp13_ = upordown == GDK_SCROLL_UP;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		upordown = GDK_SCROLL_DOWN;
	} else {
		gboolean _tmp14_ = FALSE;
		if (reverse_scroll) {
			_tmp14_ = upordown == GDK_SCROLL_DOWN;
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			upordown = GDK_SCROLL_UP;
		}
	}
	if (upordown == GDK_SCROLL_UP) {
		XfwWorkspace* _tmp15_;
		XfwWorkspace* _tmp16_;
		XfwWorkspace* _tmp17_;
		_tmp15_ = active_ws;
		_tmp16_ = xfw_workspace_get_neighbor (_tmp15_, XFW_DIRECTION_RIGHT);
		_tmp17_ = _g_object_ref0 (_tmp16_);
		_g_object_unref0 (new_ws);
		new_ws = _tmp17_;
	} else {
		if (upordown == GDK_SCROLL_DOWN) {
			XfwWorkspace* _tmp18_;
			XfwWorkspace* _tmp19_;
			XfwWorkspace* _tmp20_;
			_tmp18_ = active_ws;
			_tmp19_ = xfw_workspace_get_neighbor (_tmp18_, XFW_DIRECTION_LEFT);
			_tmp20_ = _g_object_ref0 (_tmp19_);
			_g_object_unref0 (new_ws);
			new_ws = _tmp20_;
		}
	}
	_tmp21_ = new_ws;
	if (_tmp21_ != NULL) {
		{
			XfwWorkspace* _tmp22_;
			_tmp22_ = new_ws;
			xfw_workspace_activate (_tmp22_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp23_;
			const gchar* _tmp24_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp23_ = e;
			_tmp24_ = _tmp23_->message;
			g_warning ("visualspace_wayland.vala:553: Failed to activate workspace: %s", _tmp24_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp25_ = FALSE;
			_g_object_unref0 (new_ws);
			_g_object_unref0 (active_ws);
			_g_object_unref0 (group);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp25_;
		}
	}
	result = FALSE;
	_g_object_unref0 (new_ws);
	_g_object_unref0 (active_ws);
	_g_object_unref0 (group);
	return result;
}

static void
visual_space_applet_applet_real_update_popovers (BudgieApplet* base,
                                                 BudgiePopoverManager* manager)
{
	VisualSpaceAppletApplet * self;
	GtkEventBox* _tmp0_;
	VisualSpaceAppletVisualSpacePopover* _tmp1_;
	self = (VisualSpaceAppletApplet*) base;
	self->priv->manager = manager;
	_tmp0_ = self->priv->indicatorBox;
	_tmp1_ = self->priv->popover;
	budgie_popover_manager_register_popover (manager, (GtkWidget*) _tmp0_, (GtkPopover*) _tmp1_);
}

void
visual_space_applet_applet_initialiseLocaleLanguageSupport (VisualSpaceAppletApplet* self)
{
	g_return_if_fail (self != NULL);
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
}

static gboolean
visual_space_applet_applet_real_supports_settings (BudgieApplet* base)
{
	VisualSpaceAppletApplet * self;
	gboolean result;
	self = (VisualSpaceAppletApplet*) base;
	result = TRUE;
	return result;
}

static GtkWidget*
visual_space_applet_applet_real_get_settings_ui (BudgieApplet* base)
{
	VisualSpaceAppletApplet * self;
	VisualSpaceAppletVisualSpaceSettings* _tmp0_;
	GtkWidget* result;
	self = (VisualSpaceAppletApplet*) base;
	_tmp0_ = visual_space_applet_visual_space_settings_new ();
	g_object_ref_sink (_tmp0_);
	result = (GtkWidget*) _tmp0_;
	return result;
}

const gchar*
visual_space_applet_applet_get_uuid (VisualSpaceAppletApplet* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uuid;
	result = _tmp0_;
	return result;
}

void
visual_space_applet_applet_set_uuid (VisualSpaceAppletApplet* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = visual_space_applet_applet_get_uuid (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_uuid);
		self->priv->_uuid = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, visual_space_applet_applet_properties[VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY]);
	}
}

static void
visual_space_applet_applet_class_init (VisualSpaceAppletAppletClass * klass,
                                       gpointer klass_data)
{
	visual_space_applet_applet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &VisualSpaceAppletApplet_private_offset);
	((BudgieAppletClass *) klass)->panel_position_changed = (void (*) (BudgieApplet*, BudgiePanelPosition)) visual_space_applet_applet_real_panel_position_changed;
	((BudgieAppletClass *) klass)->update_popovers = (void (*) (BudgieApplet*, BudgiePopoverManager*)) visual_space_applet_applet_real_update_popovers;
	((BudgieAppletClass *) klass)->supports_settings = (gboolean (*) (BudgieApplet*)) visual_space_applet_applet_real_supports_settings;
	((BudgieAppletClass *) klass)->get_settings_ui = (GtkWidget* (*) (BudgieApplet*)) visual_space_applet_applet_real_get_settings_ui;
	G_OBJECT_CLASS (klass)->get_property = _vala_visual_space_applet_applet_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_visual_space_applet_applet_set_property;
	G_OBJECT_CLASS (klass)->finalize = visual_space_applet_applet_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY, visual_space_applet_applet_properties[VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY] = g_param_spec_string ("uuid", "uuid", "uuid", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
visual_space_applet_applet_instance_init (VisualSpaceAppletApplet * self,
                                          gpointer klass)
{
	GtkLabel* _tmp0_;
	self->priv = visual_space_applet_applet_get_instance_private (self);
	self->priv->popover = NULL;
	self->priv->manager = NULL;
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp0_);
	self->priv->label = _tmp0_;
}

static void
visual_space_applet_applet_finalize (GObject * obj)
{
	VisualSpaceAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VISUAL_SPACE_APPLET_TYPE_APPLET, VisualSpaceAppletApplet);
	_g_object_unref0 (self->priv->indicatorBox);
	_g_object_unref0 (self->priv->popover);
	_g_free0 (self->priv->_uuid);
	_g_object_unref0 (self->priv->label);
	G_OBJECT_CLASS (visual_space_applet_applet_parent_class)->finalize (obj);
}

GType
visual_space_applet_applet_get_type (void)
{
	return visual_space_applet_applet_type_id;
}

GType
visual_space_applet_applet_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (VisualSpaceAppletAppletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) visual_space_applet_applet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VisualSpaceAppletApplet), 0, (GInstanceInitFunc) visual_space_applet_applet_instance_init, NULL };
	visual_space_applet_applet_type_id = g_type_module_register_type (module, budgie_applet_get_type (), "VisualSpaceAppletApplet", &g_define_type_info, 0);
	VisualSpaceAppletApplet_private_offset = sizeof (VisualSpaceAppletAppletPrivate);
	return visual_space_applet_applet_type_id;
}

static void
_vala_visual_space_applet_applet_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	VisualSpaceAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VISUAL_SPACE_APPLET_TYPE_APPLET, VisualSpaceAppletApplet);
	switch (property_id) {
		case VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY:
		g_value_set_string (value, visual_space_applet_applet_get_uuid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_visual_space_applet_applet_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	VisualSpaceAppletApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VISUAL_SPACE_APPLET_TYPE_APPLET, VisualSpaceAppletApplet);
	switch (property_id) {
		case VISUAL_SPACE_APPLET_APPLET_UUID_PROPERTY:
		visual_space_applet_applet_set_uuid (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
visual_space_applet_set_spacing (GdkScreen* screen,
                                 GtkLabel* label,
                                 const gchar* st)
{
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (screen != NULL);
	g_return_if_fail (label != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = gtk_css_provider_new ();
	css_provider = _tmp0_;
	{
		const gchar* _tmp1_;
		GdkScreen* _tmp2_;
		GtkStyleContext* _tmp3_;
		_tmp1_ = visual_space_applet_fontspacing_css;
		gtk_css_provider_load_from_data (css_provider, _tmp1_, (gssize) -1, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = visual_space_applet_gdkscreen;
		gtk_style_context_add_provider_for_screen (_tmp2_, (GtkStyleProvider*) css_provider, (guint) GTK_STYLE_PROVIDER_PRIORITY_USER);
		_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) label);
		gtk_style_context_add_class (_tmp3_, st);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_print ("Error loading css data\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (css_provider);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (css_provider);
}

void
peas_register_types (GTypeModule* module)
{
	PeasObjectModule* objmodule = NULL;
	PeasObjectModule* _tmp0_;
	g_return_if_fail (module != NULL);
	visual_space_applet_labwc_workspace_helper_register_type (module);
	visual_space_applet_visual_space_popover_register_type (module);
	visual_space_applet_plugin_register_type (module);
	visual_space_applet_visual_space_settings_register_type (module);
	visual_space_applet_applet_register_type (module);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (module, peas_object_module_get_type ()) ? ((PeasObjectModule*) module) : NULL);
	objmodule = _tmp0_;
	peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), VISUAL_SPACE_APPLET_TYPE_PLUGIN);
	_g_object_unref0 (objmodule);
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

