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

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

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

#define WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW (wall_street_controls_controls_window_get_type ())
#define WALL_STREET_CONTROLS_CONTROLS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW, WallStreetControlsControlsWindow))
#define WALL_STREET_CONTROLS_CONTROLS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW, WallStreetControlsControlsWindowClass))
#define WALL_STREET_CONTROLS_IS_CONTROLS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW))
#define WALL_STREET_CONTROLS_IS_CONTROLS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW))
#define WALL_STREET_CONTROLS_CONTROLS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW, WallStreetControlsControlsWindowClass))

typedef struct _WallStreetControlsControlsWindow WallStreetControlsControlsWindow;
typedef struct _WallStreetControlsControlsWindowClass WallStreetControlsControlsWindowClass;
typedef struct _WallStreetControlsControlsWindowPrivate WallStreetControlsControlsWindowPrivate;
enum  {
	WALL_STREET_CONTROLS_CONTROLS_WINDOW_0_PROPERTY,
	WALL_STREET_CONTROLS_CONTROLS_WINDOW_NUM_PROPERTIES
};
static GParamSpec* wall_street_controls_controls_window_properties[WALL_STREET_CONTROLS_CONTROLS_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _WallStreetControlsControlsWindow {
	GtkWindow parent_instance;
	WallStreetControlsControlsWindowPrivate * priv;
};

struct _WallStreetControlsControlsWindowClass {
	GtkWindowClass parent_class;
};

struct _WallStreetControlsControlsWindowPrivate {
	GtkSpinButton* hours_spin;
	GtkSpinButton* minutes_spin;
	GtkSpinButton* seconds_spin;
	GtkEntry* dir_entry;
	gchar* default_folder;
	GtkButton* set_customtwalls;
	GtkToggleButton* toggle_random;
	GtkToggleButton* toggle_synclockscreen;
	GtkToggleButton* toggle_wprunner;
	gchar* runinstruction;
};

VALA_EXTERN GSettings* wall_street_controls_wallstreet_settings;
GSettings* wall_street_controls_wallstreet_settings = NULL;
static gint WallStreetControlsControlsWindow_private_offset;
static gpointer wall_street_controls_controls_window_parent_class = NULL;

VALA_EXTERN GType wall_street_controls_controls_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WallStreetControlsControlsWindow, g_object_unref)
VALA_EXTERN WallStreetControlsControlsWindow* wall_street_controls_controls_window_new (void);
VALA_EXTERN WallStreetControlsControlsWindow* wall_street_controls_controls_window_construct (GType object_type);
VALA_EXTERN void wall_street_controls_controls_window_initialiseLocaleLanguageSupport (WallStreetControlsControlsWindow* self);
static void wall_street_controls_controls_window_set_margins (WallStreetControlsControlsWindow* self,
                                                       GtkGrid* maingrid);
static void wall_street_controls_controls_window_get_directory (WallStreetControlsControlsWindow* self,
                                                         GtkButton* button);
static void _wall_street_controls_controls_window_get_directory_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void _gtk_main_quit_gtk_button_clicked (GtkButton* _sender,
                                        gpointer self);
static void _gtk_main_quit_gtk_widget_destroy (GtkWidget* _sender,
                                        gpointer self);
static void wall_street_controls_controls_window_divide_time (WallStreetControlsControlsWindow* self);
static void wall_street_controls_controls_window_get_time (WallStreetControlsControlsWindow* self);
static void _wall_street_controls_controls_window_get_time_gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                                                   gpointer self);
static void wall_street_controls_controls_window_toggle_customwall_widgets (WallStreetControlsControlsWindow* self,
                                                                     gboolean newstate);
static void wall_street_controls_controls_window_manage_direntry (WallStreetControlsControlsWindow* self,
                                                           GtkToggleButton* button);
static void _wall_street_controls_controls_window_manage_direntry_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                      gpointer self);
static void wall_street_controls_controls_window_manage_boolean (WallStreetControlsControlsWindow* self,
                                                          GtkToggleButton* button);
static void _wall_street_controls_controls_window_manage_boolean_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                     gpointer self);
static void wall_street_controls_controls_window_check_firstrunwarning (WallStreetControlsControlsWindow* self);
static gboolean __lambda4_ (WallStreetControlsControlsWindow* self);
static gboolean wall_street_controls_controls_window_processruns (WallStreetControlsControlsWindow* self,
                                                           const gchar* application);
static gboolean ___lambda4__gsource_func (gpointer self);
static void wall_street_controls_controls_window_finalize (GObject * obj);
static GType wall_street_controls_controls_window_get_type_once (void);
static gint wall_street_controls_main (gchar** args,
                                gint args_length1);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
wall_street_controls_controls_window_get_instance_private (WallStreetControlsControlsWindow* self)
{
	return G_STRUCT_MEMBER_P (self, WallStreetControlsControlsWindow_private_offset);
}

static void
_wall_street_controls_controls_window_get_directory_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	wall_street_controls_controls_window_get_directory ((WallStreetControlsControlsWindow*) self, _sender);
}

static void
_gtk_main_quit_gtk_button_clicked (GtkButton* _sender,
                                   gpointer self)
{
	gtk_main_quit ();
}

static void
_gtk_main_quit_gtk_widget_destroy (GtkWidget* _sender,
                                   gpointer self)
{
	gtk_main_quit ();
}

static void
_wall_street_controls_controls_window_get_time_gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                                              gpointer self)
{
	wall_street_controls_controls_window_get_time ((WallStreetControlsControlsWindow*) self);
}

static void
_wall_street_controls_controls_window_manage_direntry_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                 gpointer self)
{
	wall_street_controls_controls_window_manage_direntry ((WallStreetControlsControlsWindow*) self, _sender);
}

static void
_wall_street_controls_controls_window_manage_boolean_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                gpointer self)
{
	wall_street_controls_controls_window_manage_boolean ((WallStreetControlsControlsWindow*) self, _sender);
}

WallStreetControlsControlsWindow*
wall_street_controls_controls_window_construct (GType object_type)
{
	WallStreetControlsControlsWindow * self = NULL;
	GtkGrid* maingrid = NULL;
	GtkGrid* _tmp0_;
	GtkGrid* _tmp1_;
	GtkGrid* _tmp2_;
	GSettings* _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	GtkCheckButton* _tmp10_;
	GtkGrid* _tmp11_;
	GtkToggleButton* _tmp12_;
	GtkCheckButton* _tmp13_;
	GtkGrid* _tmp14_;
	GtkToggleButton* _tmp15_;
	GtkCheckButton* _tmp16_;
	GtkGrid* _tmp17_;
	GtkToggleButton* _tmp18_;
	GtkCheckButton* toggle_defaultwalls = NULL;
	GtkCheckButton* _tmp19_;
	GtkGrid* _tmp20_;
	GtkCheckButton* _tmp21_;
	GtkLabel* givemesomespace = NULL;
	GtkLabel* _tmp22_;
	GtkGrid* _tmp23_;
	GtkLabel* _tmp24_;
	GtkBox* box = NULL;
	GtkBox* _tmp25_;
	GtkGrid* _tmp26_;
	GtkBox* _tmp27_;
	GtkButton* _tmp28_;
	GtkButton* _tmp29_;
	GtkBox* _tmp30_;
	GtkButton* _tmp31_;
	GtkEntry* _tmp32_;
	GtkEntry* _tmp33_;
	GtkEntry* _tmp34_;
	GtkBox* _tmp35_;
	GtkEntry* _tmp36_;
	GtkBox* _tmp37_;
	GtkLabel* _tmp38_;
	GtkLabel* _tmp39_;
	GtkLabel* empty = NULL;
	GtkLabel* _tmp40_;
	GtkGrid* _tmp41_;
	GtkLabel* _tmp42_;
	GtkLabel* time_label = NULL;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	GtkLabel* _tmp47_;
	GtkLabel* _tmp48_;
	GtkLabel* _tmp49_;
	GtkGrid* _tmp50_;
	GtkLabel* _tmp51_;
	GtkGrid* timegrid = NULL;
	GtkGrid* _tmp52_;
	GtkGrid* _tmp53_;
	GtkGrid* _tmp54_;
	GtkLabel* hours_label = NULL;
	gchar* _tmp55_;
	gchar* _tmp56_;
	GtkLabel* _tmp57_;
	GtkLabel* _tmp58_;
	GtkLabel* _tmp59_;
	GtkGrid* _tmp60_;
	GtkLabel* _tmp61_;
	GtkSpinButton* _tmp62_;
	GtkGrid* _tmp63_;
	GtkSpinButton* _tmp64_;
	GtkLabel* minutes_label = NULL;
	gchar* _tmp65_;
	gchar* _tmp66_;
	GtkLabel* _tmp67_;
	GtkLabel* _tmp68_;
	GtkLabel* _tmp69_;
	GtkGrid* _tmp70_;
	GtkLabel* _tmp71_;
	GtkSpinButton* _tmp72_;
	GtkGrid* _tmp73_;
	GtkSpinButton* _tmp74_;
	GtkLabel* seconds_label = NULL;
	gchar* _tmp75_;
	gchar* _tmp76_;
	GtkLabel* _tmp77_;
	GtkLabel* _tmp78_;
	GtkLabel* _tmp79_;
	GtkGrid* _tmp80_;
	GtkLabel* _tmp81_;
	GtkSpinButton* _tmp82_;
	GtkGrid* _tmp83_;
	GtkSpinButton* _tmp84_;
	GtkButton* ok_button = NULL;
	GtkButton* _tmp85_;
	GtkGrid* _tmp86_;
	GtkButton* _tmp87_;
	GtkButton* _tmp88_;
	GtkSpinButton* _tmp89_;
	GtkSpinButton* _tmp90_;
	GtkSpinButton* _tmp91_;
	gchar* initialwalls = NULL;
	GSettings* _tmp92_;
	gchar* _tmp93_;
	gboolean testwallfolder = FALSE;
	const gchar* _tmp94_;
	const gchar* _tmp95_;
	GtkCheckButton* _tmp98_;
	GtkCheckButton* _tmp99_;
	GtkToggleButton* _tmp100_;
	GSettings* _tmp101_;
	GtkToggleButton* _tmp102_;
	GtkToggleButton* _tmp103_;
	GSettings* _tmp104_;
	GtkToggleButton* _tmp105_;
	GtkToggleButton* _tmp106_;
	GSettings* _tmp107_;
	GtkToggleButton* _tmp108_;
	self = (WallStreetControlsControlsWindow*) g_object_new (object_type, NULL);
	wall_street_controls_controls_window_initialiseLocaleLanguageSupport (self);
	gtk_window_set_position ((GtkWindow*) self, GTK_WIN_POS_CENTER);
	gtk_window_set_title ((GtkWindow*) self, _ ("WallStreet Control"));
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	maingrid = _tmp0_;
	_tmp1_ = maingrid;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp1_);
	_tmp2_ = maingrid;
	wall_street_controls_controls_window_set_margins (self, _tmp2_);
	_tmp3_ = wall_street_controls_wallstreet_settings;
	_tmp4_ = g_settings_get_default_value (_tmp3_, "wallpaperfolder");
	_tmp5_ = _tmp4_;
	_tmp6_ = g_variant_get_string (_tmp5_, NULL);
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (self->priv->default_folder);
	self->priv->default_folder = _tmp7_;
	_g_variant_unref0 (_tmp5_);
	_tmp8_ = g_strdup (_ ("Run WallStreet"));
	_g_free0 (self->priv->runinstruction);
	self->priv->runinstruction = _tmp8_;
	_tmp9_ = self->priv->runinstruction;
	_tmp10_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->toggle_wprunner);
	self->priv->toggle_wprunner = (GtkToggleButton*) _tmp10_;
	_tmp11_ = maingrid;
	_tmp12_ = self->priv->toggle_wprunner;
	gtk_grid_attach (_tmp11_, (GtkWidget*) _tmp12_, 1, 1, 100, 1);
	_tmp13_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Use random wallpaper"));
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->toggle_random);
	self->priv->toggle_random = (GtkToggleButton*) _tmp13_;
	_tmp14_ = maingrid;
	_tmp15_ = self->priv->toggle_random;
	gtk_grid_attach (_tmp14_, (GtkWidget*) _tmp15_, 1, 2, 1, 1);
	_tmp16_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Sync to lock-screen"));
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->toggle_synclockscreen);
	self->priv->toggle_synclockscreen = (GtkToggleButton*) _tmp16_;
	_tmp17_ = maingrid;
	_tmp18_ = self->priv->toggle_synclockscreen;
	gtk_grid_attach (_tmp17_, (GtkWidget*) _tmp18_, 1, 3, 1, 1);
	_tmp19_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Use default wallpapers"));
	g_object_ref_sink (_tmp19_);
	toggle_defaultwalls = _tmp19_;
	_tmp20_ = maingrid;
	_tmp21_ = toggle_defaultwalls;
	gtk_grid_attach (_tmp20_, (GtkWidget*) _tmp21_, 1, 4, 1, 1);
	_tmp22_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp22_);
	givemesomespace = _tmp22_;
	_tmp23_ = maingrid;
	_tmp24_ = givemesomespace;
	gtk_grid_attach (_tmp23_, (GtkWidget*) _tmp24_, 1, 10, 1, 1);
	_tmp25_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp25_);
	box = _tmp25_;
	_tmp26_ = maingrid;
	_tmp27_ = box;
	gtk_grid_attach (_tmp26_, (GtkWidget*) _tmp27_, 1, 11, 99, 1);
	_tmp28_ = (GtkButton*) gtk_button_new_with_label (_ ("Browse"));
	g_object_ref_sink (_tmp28_);
	_g_object_unref0 (self->priv->set_customtwalls);
	self->priv->set_customtwalls = _tmp28_;
	_tmp29_ = self->priv->set_customtwalls;
	g_signal_connect_object (_tmp29_, "clicked", (GCallback) _wall_street_controls_controls_window_get_directory_gtk_button_clicked, self, 0);
	_tmp30_ = box;
	_tmp31_ = self->priv->set_customtwalls;
	gtk_box_pack_start (_tmp30_, (GtkWidget*) _tmp31_, FALSE, FALSE, (guint) 10);
	_tmp32_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp32_);
	_g_object_unref0 (self->priv->dir_entry);
	self->priv->dir_entry = _tmp32_;
	_tmp33_ = self->priv->dir_entry;
	gtk_entry_set_width_chars (_tmp33_, 35);
	_tmp34_ = self->priv->dir_entry;
	gtk_editable_set_editable ((GtkEditable*) _tmp34_, FALSE);
	_tmp35_ = box;
	_tmp36_ = self->priv->dir_entry;
	gtk_box_pack_start (_tmp35_, (GtkWidget*) _tmp36_, FALSE, FALSE, (guint) 0);
	_tmp37_ = box;
	_tmp38_ = (GtkLabel*) gtk_label_new ("\t");
	g_object_ref_sink (_tmp38_);
	_tmp39_ = _tmp38_;
	gtk_box_pack_start (_tmp37_, (GtkWidget*) _tmp39_, FALSE, FALSE, (guint) 0);
	_g_object_unref0 (_tmp39_);
	_tmp40_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp40_);
	empty = _tmp40_;
	_tmp41_ = maingrid;
	_tmp42_ = empty;
	gtk_grid_attach (_tmp41_, (GtkWidget*) _tmp42_, 1, 12, 1, 1);
	_tmp43_ = g_strconcat ("\n", _ ("Change interval"), NULL);
	_tmp44_ = _tmp43_;
	_tmp45_ = g_strconcat (_tmp44_, "\n", NULL);
	_tmp46_ = _tmp45_;
	_tmp47_ = (GtkLabel*) gtk_label_new (_tmp46_);
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	_g_free0 (_tmp46_);
	_g_free0 (_tmp44_);
	time_label = _tmp48_;
	_tmp49_ = time_label;
	gtk_label_set_xalign (_tmp49_, (gfloat) 0);
	_tmp50_ = maingrid;
	_tmp51_ = time_label;
	gtk_grid_attach (_tmp50_, (GtkWidget*) _tmp51_, 1, 13, 1, 1);
	_tmp52_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp52_);
	timegrid = _tmp52_;
	_tmp53_ = maingrid;
	_tmp54_ = timegrid;
	gtk_grid_attach (_tmp53_, (GtkWidget*) _tmp54_, 1, 14, 2, 3);
	_tmp55_ = g_strconcat (_ ("Hours"), "\t", NULL);
	_tmp56_ = _tmp55_;
	_tmp57_ = (GtkLabel*) gtk_label_new (_tmp56_);
	g_object_ref_sink (_tmp57_);
	_tmp58_ = _tmp57_;
	_g_free0 (_tmp56_);
	hours_label = _tmp58_;
	_tmp59_ = hours_label;
	gtk_label_set_xalign (_tmp59_, (gfloat) 0);
	_tmp60_ = timegrid;
	_tmp61_ = hours_label;
	gtk_grid_attach (_tmp60_, (GtkWidget*) _tmp61_, 0, 0, 1, 1);
	_tmp62_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 24, (gdouble) 1);
	g_object_ref_sink (_tmp62_);
	_g_object_unref0 (self->priv->hours_spin);
	self->priv->hours_spin = _tmp62_;
	_tmp63_ = timegrid;
	_tmp64_ = self->priv->hours_spin;
	gtk_grid_attach (_tmp63_, (GtkWidget*) _tmp64_, 1, 0, 1, 1);
	_tmp65_ = g_strconcat (_ ("Minutes"), "\t", NULL);
	_tmp66_ = _tmp65_;
	_tmp67_ = (GtkLabel*) gtk_label_new (_tmp66_);
	g_object_ref_sink (_tmp67_);
	_tmp68_ = _tmp67_;
	_g_free0 (_tmp66_);
	minutes_label = _tmp68_;
	_tmp69_ = minutes_label;
	gtk_label_set_xalign (_tmp69_, (gfloat) 0);
	_tmp70_ = timegrid;
	_tmp71_ = minutes_label;
	gtk_grid_attach (_tmp70_, (GtkWidget*) _tmp71_, 0, 1, 1, 1);
	_tmp72_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 59, (gdouble) 1);
	g_object_ref_sink (_tmp72_);
	_g_object_unref0 (self->priv->minutes_spin);
	self->priv->minutes_spin = _tmp72_;
	_tmp73_ = timegrid;
	_tmp74_ = self->priv->minutes_spin;
	gtk_grid_attach (_tmp73_, (GtkWidget*) _tmp74_, 1, 1, 1, 1);
	_tmp75_ = g_strconcat (_ ("Seconds"), "\t", NULL);
	_tmp76_ = _tmp75_;
	_tmp77_ = (GtkLabel*) gtk_label_new (_tmp76_);
	g_object_ref_sink (_tmp77_);
	_tmp78_ = _tmp77_;
	_g_free0 (_tmp76_);
	seconds_label = _tmp78_;
	_tmp79_ = seconds_label;
	gtk_label_set_xalign (_tmp79_, (gfloat) 0);
	_tmp80_ = timegrid;
	_tmp81_ = seconds_label;
	gtk_grid_attach (_tmp80_, (GtkWidget*) _tmp81_, 0, 2, 1, 1);
	_tmp82_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 59, (gdouble) 1);
	g_object_ref_sink (_tmp82_);
	_g_object_unref0 (self->priv->seconds_spin);
	self->priv->seconds_spin = _tmp82_;
	_tmp83_ = timegrid;
	_tmp84_ = self->priv->seconds_spin;
	gtk_grid_attach (_tmp83_, (GtkWidget*) _tmp84_, 1, 2, 1, 1);
	_tmp85_ = (GtkButton*) gtk_button_new_with_label (_ ("Close"));
	g_object_ref_sink (_tmp85_);
	ok_button = _tmp85_;
	_tmp86_ = maingrid;
	_tmp87_ = ok_button;
	gtk_grid_attach (_tmp86_, (GtkWidget*) _tmp87_, 99, 99, 1, 1);
	_tmp88_ = ok_button;
	g_signal_connect (_tmp88_, "clicked", (GCallback) _gtk_main_quit_gtk_button_clicked, NULL);
	g_signal_connect ((GtkWidget*) self, "destroy", (GCallback) _gtk_main_quit_gtk_widget_destroy, NULL);
	wall_street_controls_controls_window_divide_time (self);
	_tmp89_ = self->priv->hours_spin;
	g_signal_connect_object (_tmp89_, "value-changed", (GCallback) _wall_street_controls_controls_window_get_time_gtk_spin_button_value_changed, self, 0);
	_tmp90_ = self->priv->minutes_spin;
	g_signal_connect_object (_tmp90_, "value-changed", (GCallback) _wall_street_controls_controls_window_get_time_gtk_spin_button_value_changed, self, 0);
	_tmp91_ = self->priv->seconds_spin;
	g_signal_connect_object (_tmp91_, "value-changed", (GCallback) _wall_street_controls_controls_window_get_time_gtk_spin_button_value_changed, self, 0);
	_tmp92_ = wall_street_controls_wallstreet_settings;
	_tmp93_ = g_settings_get_string (_tmp92_, "wallpaperfolder");
	initialwalls = _tmp93_;
	_tmp94_ = initialwalls;
	_tmp95_ = self->priv->default_folder;
	testwallfolder = g_strcmp0 (_tmp94_, _tmp95_) == 0;
	if (!testwallfolder) {
		GtkEntry* _tmp96_;
		const gchar* _tmp97_;
		_tmp96_ = self->priv->dir_entry;
		_tmp97_ = initialwalls;
		gtk_entry_set_text (_tmp96_, _tmp97_);
	}
	_tmp98_ = toggle_defaultwalls;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp98_, testwallfolder);
	wall_street_controls_controls_window_toggle_customwall_widgets (self, testwallfolder);
	_tmp99_ = toggle_defaultwalls;
	g_signal_connect_object ((GtkToggleButton*) _tmp99_, "toggled", (GCallback) _wall_street_controls_controls_window_manage_direntry_gtk_toggle_button_toggled, self, 0);
	_tmp100_ = self->priv->toggle_wprunner;
	_tmp101_ = wall_street_controls_wallstreet_settings;
	gtk_toggle_button_set_active (_tmp100_, g_settings_get_boolean (_tmp101_, "runwallstreet"));
	_tmp102_ = self->priv->toggle_wprunner;
	g_signal_connect_object (_tmp102_, "toggled", (GCallback) _wall_street_controls_controls_window_manage_boolean_gtk_toggle_button_toggled, self, 0);
	_tmp103_ = self->priv->toggle_random;
	_tmp104_ = wall_street_controls_wallstreet_settings;
	gtk_toggle_button_set_active (_tmp103_, g_settings_get_boolean (_tmp104_, "random"));
	_tmp105_ = self->priv->toggle_random;
	g_signal_connect_object (_tmp105_, "toggled", (GCallback) _wall_street_controls_controls_window_manage_boolean_gtk_toggle_button_toggled, self, 0);
	_tmp106_ = self->priv->toggle_synclockscreen;
	_tmp107_ = wall_street_controls_wallstreet_settings;
	gtk_toggle_button_set_active (_tmp106_, g_settings_get_boolean (_tmp107_, "lockscreensync"));
	_tmp108_ = self->priv->toggle_synclockscreen;
	g_signal_connect_object (_tmp108_, "toggled", (GCallback) _wall_street_controls_controls_window_manage_boolean_gtk_toggle_button_toggled, self, 0);
	_g_free0 (initialwalls);
	_g_object_unref0 (ok_button);
	_g_object_unref0 (seconds_label);
	_g_object_unref0 (minutes_label);
	_g_object_unref0 (hours_label);
	_g_object_unref0 (timegrid);
	_g_object_unref0 (time_label);
	_g_object_unref0 (empty);
	_g_object_unref0 (box);
	_g_object_unref0 (givemesomespace);
	_g_object_unref0 (toggle_defaultwalls);
	_g_object_unref0 (maingrid);
	return self;
}

WallStreetControlsControlsWindow*
wall_street_controls_controls_window_new (void)
{
	return wall_street_controls_controls_window_construct (WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW);
}

/**
         * Ensure translations are displayed correctly
         * according to the locale
         */
void
wall_street_controls_controls_window_initialiseLocaleLanguageSupport (WallStreetControlsControlsWindow* 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 void
wall_street_controls_controls_window_manage_boolean (WallStreetControlsControlsWindow* self,
                                                     GtkToggleButton* button)
{
	GtkToggleButton* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->toggle_random;
	if (button == _tmp0_) {
		GSettings* _tmp1_;
		_tmp1_ = wall_street_controls_wallstreet_settings;
		g_settings_set_boolean (_tmp1_, "random", gtk_toggle_button_get_active (button));
	} else {
		GtkToggleButton* _tmp2_;
		_tmp2_ = self->priv->toggle_synclockscreen;
		if (button == _tmp2_) {
			GSettings* _tmp3_;
			_tmp3_ = wall_street_controls_wallstreet_settings;
			g_settings_set_boolean (_tmp3_, "lockscreensync", gtk_toggle_button_get_active (button));
		} else {
			GtkToggleButton* _tmp4_;
			_tmp4_ = self->priv->toggle_wprunner;
			if (button == _tmp4_) {
				gboolean newsetting = FALSE;
				GSettings* _tmp5_;
				newsetting = gtk_toggle_button_get_active (button);
				_tmp5_ = wall_street_controls_wallstreet_settings;
				g_settings_set_boolean (_tmp5_, "runwallstreet", newsetting);
				if (newsetting) {
					wall_street_controls_controls_window_check_firstrunwarning (self);
				} else {
					GtkToggleButton* _tmp6_;
					const gchar* _tmp7_;
					_tmp6_ = self->priv->toggle_wprunner;
					_tmp7_ = self->priv->runinstruction;
					gtk_button_set_label ((GtkButton*) _tmp6_, _tmp7_);
				}
			}
		}
	}
}

static gboolean
__lambda4_ (WallStreetControlsControlsWindow* self)
{
	gboolean runs = FALSE;
	gboolean result;
	runs = wall_street_controls_controls_window_processruns (self, "/budgie-wallstreet/wallstreet");
	if (!runs) {
		GtkToggleButton* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp0_ = self->priv->toggle_wprunner;
		_tmp1_ = self->priv->runinstruction;
		_tmp2_ = g_strconcat (_tmp1_, "\t", NULL);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_strconcat (_tmp3_, _ ("Please log out/in to initialize"), NULL);
		_tmp5_ = _tmp4_;
		gtk_button_set_label ((GtkButton*) _tmp0_, _tmp5_);
		_g_free0 (_tmp5_);
		_g_free0 (_tmp3_);
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda4_ ((WallStreetControlsControlsWindow*) self);
	return result;
}

static void
wall_street_controls_controls_window_check_firstrunwarning (WallStreetControlsControlsWindow* self)
{
	g_return_if_fail (self != NULL);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda4__gsource_func, g_object_ref (self), g_object_unref);
}

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

static gboolean
wall_street_controls_controls_window_processruns (WallStreetControlsControlsWindow* self,
                                                  const gchar* application)
{
	gchar* cmd = NULL;
	gchar* _tmp0_;
	gchar* output = NULL;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (application != NULL, FALSE);
	_tmp0_ = g_strconcat (PACKAGE_BINDIR "/pgrep -f ", application, NULL);
	cmd = _tmp0_;
	{
		const gchar* _tmp1_;
		gchar* _tmp2_ = NULL;
		const gchar* _tmp4_;
		_tmp1_ = cmd;
		g_spawn_command_line_sync (_tmp1_, &_tmp2_, NULL, NULL, &_inner_error0_);
		_g_free0 (output);
		output = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp3_ = FALSE;
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			_g_free0 (output);
			_g_free0 (cmd);
			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_;
		}
		_tmp4_ = output;
		if (g_strcmp0 (_tmp4_, "") != 0) {
			gchar** pids = NULL;
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar** _tmp11_;
			gchar** _tmp12_;
			gchar** _tmp13_;
			gint _tmp13__length1;
			gint pids_length1;
			gint _pids_size_;
			gint n_pids = 0;
			gchar** _tmp14_;
			gint _tmp14__length1;
			_tmp5_ = output;
			_tmp6_ = output;
			_tmp7_ = strlen (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = string_slice (_tmp5_, (glong) 0, (glong) (_tmp8_ - 1));
			_tmp10_ = _tmp9_;
			_tmp12_ = _tmp11_ = g_strsplit (_tmp10_, "\n", 0);
			_tmp13_ = _tmp12_;
			_tmp13__length1 = _vala_array_length (_tmp11_);
			_g_free0 (_tmp10_);
			pids = _tmp13_;
			pids_length1 = _tmp13__length1;
			_pids_size_ = pids_length1;
			_tmp14_ = pids;
			_tmp14__length1 = pids_length1;
			n_pids = _tmp14__length1;
			if (n_pids >= 2) {
				result = TRUE;
				pids = (_vala_array_free (pids, pids_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (output);
				_g_free0 (cmd);
				return result;
			} else {
				result = FALSE;
				pids = (_vala_array_free (pids, pids_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (output);
				_g_free0 (cmd);
				return result;
			}
			pids = (_vala_array_free (pids, pids_length1, (GDestroyNotify) g_free), NULL);
		}
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		g_clear_error (&_inner_error0_);
		result = FALSE;
		_g_free0 (output);
		_g_free0 (cmd);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp15_ = FALSE;
		_g_free0 (output);
		_g_free0 (cmd);
		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 _tmp15_;
	}
	result = FALSE;
	_g_free0 (output);
	_g_free0 (cmd);
	return result;
}

static void
wall_street_controls_controls_window_manage_direntry (WallStreetControlsControlsWindow* self,
                                                      GtkToggleButton* button)
{
	gboolean active = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	active = gtk_toggle_button_get_active (button);
	wall_street_controls_controls_window_toggle_customwall_widgets (self, active);
	if (active) {
		GtkEntry* _tmp0_;
		GSettings* _tmp1_;
		const gchar* _tmp2_;
		_tmp0_ = self->priv->dir_entry;
		gtk_entry_set_text (_tmp0_, "");
		_tmp1_ = wall_street_controls_wallstreet_settings;
		_tmp2_ = self->priv->default_folder;
		g_settings_set_string (_tmp1_, "wallpaperfolder", _tmp2_);
	}
}

static void
wall_street_controls_controls_window_toggle_customwall_widgets (WallStreetControlsControlsWindow* self,
                                                                gboolean newstate)
{
	GtkEntry* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->dir_entry;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, !newstate);
	_tmp1_ = self->priv->set_customtwalls;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, !newstate);
}

static void
wall_street_controls_controls_window_get_time (WallStreetControlsControlsWindow* self)
{
	gint hrs = 0;
	GtkSpinButton* _tmp0_;
	gint mins = 0;
	GtkSpinButton* _tmp1_;
	gint secs = 0;
	GtkSpinButton* _tmp2_;
	gint time_in_seconds = 0;
	GSettings* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->hours_spin;
	hrs = (gint) gtk_spin_button_get_value (_tmp0_);
	_tmp1_ = self->priv->minutes_spin;
	mins = (gint) gtk_spin_button_get_value (_tmp1_);
	_tmp2_ = self->priv->seconds_spin;
	secs = (gint) gtk_spin_button_get_value (_tmp2_);
	time_in_seconds = ((hrs * 3600) + (mins * 60)) + secs;
	if (time_in_seconds <= 5) {
		time_in_seconds = 5;
	}
	_tmp3_ = wall_street_controls_wallstreet_settings;
	g_settings_set_int (_tmp3_, "switchinterval", time_in_seconds);
}

static void
wall_street_controls_controls_window_divide_time (WallStreetControlsControlsWindow* self)
{
	gint seconds = 0;
	GSettings* _tmp0_;
	gint n_hrs = 0;
	gint rem_minutes = 0;
	gint n_mins = 0;
	gint n_secs = 0;
	GtkSpinButton* _tmp1_;
	GtkSpinButton* _tmp2_;
	GtkSpinButton* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = wall_street_controls_wallstreet_settings;
	seconds = g_settings_get_int (_tmp0_, "switchinterval");
	n_hrs = seconds / 3600;
	rem_minutes = (gint) remainder ((gdouble) seconds, (gdouble) 3600);
	if (rem_minutes < 0) {
		rem_minutes = 3600 + rem_minutes;
	}
	n_mins = rem_minutes / 60;
	n_secs = (gint) remainder ((gdouble) seconds, (gdouble) 60);
	if (n_secs < 0) {
		n_secs = 60 + n_secs;
	}
	_tmp1_ = self->priv->hours_spin;
	gtk_spin_button_set_value (_tmp1_, (gdouble) n_hrs);
	_tmp2_ = self->priv->minutes_spin;
	gtk_spin_button_set_value (_tmp2_, (gdouble) n_mins);
	_tmp3_ = self->priv->seconds_spin;
	gtk_spin_button_set_value (_tmp3_, (gdouble) n_secs);
}

static void
wall_street_controls_controls_window_set_margins (WallStreetControlsControlsWindow* self,
                                                  GtkGrid* maingrid)
{
	gint* corners = NULL;
	gint* _tmp0_;
	gint corners_length1;
	gint corners_length2;
	gint lencorners = 0;
	gint* _tmp1_;
	gint _tmp1__length1;
	gint _tmp1__length2;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (maingrid != NULL);
	_tmp0_ = g_new0 (gint, 5 * 2);
	_tmp0_[0] = 0;
	_tmp0_[1] = 0;
	_tmp0_[2] = 100;
	_tmp0_[3] = 0;
	_tmp0_[4] = 2;
	_tmp0_[5] = 0;
	_tmp0_[6] = 0;
	_tmp0_[7] = 100;
	_tmp0_[8] = 100;
	_tmp0_[9] = 100;
	corners = _tmp0_;
	corners_length1 = 5;
	corners_length2 = 2;
	_tmp1_ = corners;
	_tmp1__length1 = corners_length1;
	_tmp1__length2 = corners_length2;
	_tmp2_ = _tmp1__length1;
	lencorners = _tmp2_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				GtkLabel* spacelabel = NULL;
				GtkLabel* _tmp5_;
				GtkLabel* _tmp6_;
				gint* _tmp7_;
				gint _tmp7__length1;
				gint _tmp7__length2;
				gint _tmp8_;
				gint* _tmp9_;
				gint _tmp9__length1;
				gint _tmp9__length2;
				gint _tmp10_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(i < lencorners)) {
					break;
				}
				_tmp5_ = (GtkLabel*) gtk_label_new ("\t");
				g_object_ref_sink (_tmp5_);
				spacelabel = _tmp5_;
				_tmp6_ = spacelabel;
				_tmp7_ = corners;
				_tmp7__length1 = corners_length1;
				_tmp7__length2 = corners_length2;
				_tmp8_ = _tmp7_[(i * _tmp7__length2) + 0];
				_tmp9_ = corners;
				_tmp9__length1 = corners_length1;
				_tmp9__length2 = corners_length2;
				_tmp10_ = _tmp9_[(i * _tmp9__length2) + 1];
				gtk_grid_attach (maingrid, (GtkWidget*) _tmp6_, _tmp8_, _tmp10_, 1, 1);
				_g_object_unref0 (spacelabel);
			}
		}
	}
	corners = (g_free (corners), NULL);
}

static void
wall_street_controls_controls_window_get_directory (WallStreetControlsControlsWindow* self,
                                                    GtkButton* button)
{
	GtkFileChooserDialog* chooser = NULL;
	GtkFileChooserDialog* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	_tmp0_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_ ("Select a directory"), NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _ ("Cancel"), GTK_RESPONSE_CANCEL, _ ("Use"), GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp0_);
	chooser = _tmp0_;
	_tmp1_ = chooser;
	if (gtk_dialog_run ((GtkDialog*) _tmp1_) == ((gint) GTK_RESPONSE_ACCEPT)) {
		gchar* newpath = NULL;
		GtkFileChooserDialog* _tmp2_;
		GFile* _tmp3_;
		GFile* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		GSettings* _tmp7_;
		const gchar* _tmp8_;
		GtkEntry* _tmp9_;
		const gchar* _tmp10_;
		_tmp2_ = chooser;
		_tmp3_ = gtk_file_chooser_get_file ((GtkFileChooser*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_file_get_path (_tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		newpath = _tmp6_;
		_tmp7_ = wall_street_controls_wallstreet_settings;
		_tmp8_ = newpath;
		g_settings_set_string (_tmp7_, "wallpaperfolder", _tmp8_);
		_tmp9_ = self->priv->dir_entry;
		_tmp10_ = newpath;
		gtk_entry_set_text (_tmp9_, _tmp10_);
		_g_free0 (newpath);
	}
	_tmp11_ = chooser;
	g_signal_emit_by_name ((GtkDialog*) _tmp11_, "close");
	_g_object_unref0 (chooser);
}

static void
wall_street_controls_controls_window_class_init (WallStreetControlsControlsWindowClass * klass,
                                                 gpointer klass_data)
{
	wall_street_controls_controls_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WallStreetControlsControlsWindow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = wall_street_controls_controls_window_finalize;
}

static void
wall_street_controls_controls_window_instance_init (WallStreetControlsControlsWindow * self,
                                                    gpointer klass)
{
	self->priv = wall_street_controls_controls_window_get_instance_private (self);
}

static void
wall_street_controls_controls_window_finalize (GObject * obj)
{
	WallStreetControlsControlsWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WALL_STREET_CONTROLS_TYPE_CONTROLS_WINDOW, WallStreetControlsControlsWindow);
	_g_object_unref0 (self->priv->hours_spin);
	_g_object_unref0 (self->priv->minutes_spin);
	_g_object_unref0 (self->priv->seconds_spin);
	_g_object_unref0 (self->priv->dir_entry);
	_g_free0 (self->priv->default_folder);
	_g_object_unref0 (self->priv->set_customtwalls);
	_g_object_unref0 (self->priv->toggle_random);
	_g_object_unref0 (self->priv->toggle_synclockscreen);
	_g_object_unref0 (self->priv->toggle_wprunner);
	_g_free0 (self->priv->runinstruction);
	G_OBJECT_CLASS (wall_street_controls_controls_window_parent_class)->finalize (obj);
}

static GType
wall_street_controls_controls_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WallStreetControlsControlsWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wall_street_controls_controls_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WallStreetControlsControlsWindow), 0, (GInstanceInitFunc) wall_street_controls_controls_window_instance_init, NULL };
	GType wall_street_controls_controls_window_type_id;
	wall_street_controls_controls_window_type_id = g_type_register_static (gtk_window_get_type (), "WallStreetControlsControlsWindow", &g_define_type_info, 0);
	WallStreetControlsControlsWindow_private_offset = g_type_add_instance_private (wall_street_controls_controls_window_type_id, sizeof (WallStreetControlsControlsWindowPrivate));
	return wall_street_controls_controls_window_type_id;
}

GType
wall_street_controls_controls_window_get_type (void)
{
	static volatile gsize wall_street_controls_controls_window_type_id__once = 0;
	if (g_once_init_enter (&wall_street_controls_controls_window_type_id__once)) {
		GType wall_street_controls_controls_window_type_id;
		wall_street_controls_controls_window_type_id = wall_street_controls_controls_window_get_type_once ();
		g_once_init_leave (&wall_street_controls_controls_window_type_id__once, wall_street_controls_controls_window_type_id);
	}
	return wall_street_controls_controls_window_type_id__once;
}

static gint
wall_street_controls_main (gchar** args,
                           gint args_length1)
{
	GSettings* _tmp0_;
	WallStreetControlsControlsWindow* controls = NULL;
	WallStreetControlsControlsWindow* _tmp1_;
	gint result;
	gtk_init ((gint*) (&args_length1), &args);
	_tmp0_ = g_settings_new ("org.ubuntubudgie.budgie-wallstreet");
	_g_object_unref0 (wall_street_controls_wallstreet_settings);
	wall_street_controls_wallstreet_settings = _tmp0_;
	_tmp1_ = wall_street_controls_controls_window_new ();
	g_object_ref_sink (_tmp1_);
	controls = _tmp1_;
	gtk_widget_show_all ((GtkWidget*) controls);
	gtk_main ();
	result = 0;
	_g_object_unref0 (controls);
	return result;
}

int
main (int argc,
      char ** argv)
{
	return wall_street_controls_main (argv, argc);
}

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

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

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

