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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <libxfce4windowing/libxfce4windowing.h>
#include <gdk/gdk.h>
#include <cairo-gobject.h>
#include "org.ubuntubudgie.raven.widget.budgie-showtime.h"
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <raven-plugin.h>
#include <libpeas.h>
#include <locale.h>
#include <config.h>

#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_R 0.3
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_G 0.3
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_B 0.3
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_R 0.3
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_G 0.6
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_B 0.9
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_R 0.5
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_G 0.7
#define BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_B 1.0
#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	BUDGIE_SHOW_TIME_WIDGET_BUDGIE_SHOW_TIME_SETTINGS_0_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_BUDGIE_SHOW_TIME_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* budgie_show_time_widget_budgie_show_time_settings_properties[BUDGIE_SHOW_TIME_WIDGET_BUDGIE_SHOW_TIME_SETTINGS_NUM_PROPERTIES];
typedef struct _Block1Data Block1Data;
enum  {
	BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_0_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_NUM_PROPERTIES
};
static GParamSpec* budgie_show_time_widget_position_picker_dialog_properties[BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_NUM_PROPERTIES];
typedef struct _Block2Data Block2Data;
enum  {
	BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_POSITION_SELECTED_SIGNAL,
	BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_NUM_SIGNALS
};
static guint budgie_show_time_widget_position_picker_dialog_signals[BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_NUM_SIGNALS] = {0};
enum  {
	BUDGIE_SHOW_TIME_WIDGET_SHOWTIME_RAVEN_PLUGIN_0_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_SHOWTIME_RAVEN_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* budgie_show_time_widget_showtime_raven_plugin_properties[BUDGIE_SHOW_TIME_WIDGET_SHOWTIME_RAVEN_PLUGIN_NUM_PROPERTIES];
enum  {
	BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_0_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_NUM_PROPERTIES
};
static GParamSpec* budgie_show_time_widget_show_time_raven_widget_properties[BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_NUM_PROPERTIES];
enum  {
	BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_MAIN_0_PROPERTY,
	BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_MAIN_NUM_PROPERTIES
};
static GParamSpec* budgie_show_time_widget_show_time_main_properties[BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_MAIN_NUM_PROPERTIES];

struct _BudgieShowTimeWidgetBudgieShowTimeSettingsPrivate {
	GSettings* settings;
	GtkButton* dragbutton;
	GtkRadioButton** anchorbuttons;
	gint anchorbuttons_length1;
	gint _anchorbuttons_size_;
	gchar** anchors;
	gint anchors_length1;
	gint _anchors_size_;
	gchar* curr_anchor;
	GtkCheckButton* leftalign;
	GtkCheckButton* twelve_hrs;
	GtkFontButton* timefontbutton;
	GtkFontButton* datefontbutton;
	GtkColorButton* timecolor;
	GtkColorButton* datecolor;
	GtkSpinButton* linespacing;
	GtkLabel* draghint;
	gchar* dragposition;
	gchar* fixposition;
	GtkGrid* anchorgrid;
	GtkCheckButton* autopos;
	GtkCheckButton* allmonitors;
	GtkLabel* spinlabel;
	GdkScreen* gdkscreen;
};

struct _Block1Data {
	int _ref_count_;
	BudgieShowTimeWidgetBudgieShowTimeSettings* self;
	GtkRadioButton* b;
};

struct _BudgieShowTimeWidgetPositionPickerDialogPrivate {
	GtkDrawingArea* canvas;
	GSettings* settings;
	gint selected_x;
	gint selected_y;
	gint preview_width;
	gint preview_height;
	gboolean mouse_over;
	gint hover_x;
	gint hover_y;
	gchar* current_anchor;
	gint screen_width;
	gint screen_height;
	gint canvas_width;
	gint canvas_height;
	gdouble scale_factor;
};

struct _Block2Data {
	int _ref_count_;
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkRadioButton* nw_radio;
	GtkRadioButton* ne_radio;
	GtkRadioButton* sw_radio;
	GtkRadioButton* se_radio;
	GtkSpinButton* x_spin;
	GtkSpinButton* y_spin;
};

struct _BudgieShowTimeWidgetShowTimeRavenWidgetPrivate {
	gchar* _uuid;
};

struct _BudgieShowTimeWidgetShowTimeMainPrivate {
	gchar* uuid;
};

VALA_EXTERN gchar* budgie_show_time_widget_moduledir;
gchar* budgie_show_time_widget_moduledir = NULL;
VALA_EXTERN gint budgie_show_time_widget_n_monitors;
gint budgie_show_time_widget_n_monitors = 0;
VALA_EXTERN GSettings* budgie_show_time_widget_showtime_settings;
GSettings* budgie_show_time_widget_showtime_settings = NULL;
VALA_EXTERN gchar* budgie_show_time_widget_winpath;
gchar* budgie_show_time_widget_winpath = NULL;
VALA_EXTERN XfwScreen* budgie_show_time_widget_xfw_screen;
XfwScreen* budgie_show_time_widget_xfw_screen = NULL;
VALA_EXTERN gboolean budgie_show_time_widget_surpass_primary;
gboolean budgie_show_time_widget_surpass_primary = FALSE;
static gint BudgieShowTimeWidgetBudgieShowTimeSettings_private_offset;
static gpointer budgie_show_time_widget_budgie_show_time_settings_parent_class = NULL;
static GType budgie_show_time_widget_budgie_show_time_settings_type_id = 0;
static gint BudgieShowTimeWidgetPositionPickerDialog_private_offset;
static gpointer budgie_show_time_widget_position_picker_dialog_parent_class = NULL;
static GType budgie_show_time_widget_position_picker_dialog_type_id = 0;
static gpointer budgie_show_time_widget_showtime_raven_plugin_parent_class = NULL;
static BudgieRavenPluginIface * budgie_show_time_widget_showtime_raven_plugin_budgie_raven_plugin_parent_iface = NULL;
static GType budgie_show_time_widget_showtime_raven_plugin_type_id = 0;
static gint BudgieShowTimeWidgetShowTimeRavenWidget_private_offset;
static gpointer budgie_show_time_widget_show_time_raven_widget_parent_class = NULL;
static GType budgie_show_time_widget_show_time_raven_widget_type_id = 0;
static gint BudgieShowTimeWidgetShowTimeMain_private_offset;
static gpointer budgie_show_time_widget_show_time_main_parent_class = NULL;
static GType budgie_show_time_widget_show_time_main_type_id = 0;

VALA_EXTERN gboolean budgie_show_time_widget_onprimary_exists (void);
VALA_EXTERN gint* budgie_show_time_widget_getwindata (gint* result_length1);
VALA_EXTERN void budgie_show_time_widget_create_windows (XfwScreen* screen,
                                             gboolean* surpass_primary);
static gboolean _bool_equal (const gboolean * s1,
                      const gboolean * s2);
VALA_EXTERN void budgie_show_time_widget_open_window (const gchar* wname,
                                          const gchar* xpos,
                                          const gchar* ypos);
static void __lambda4_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void ___lambda4__libxfce4windowing_screen_monitors_changed (XfwScreen* _sender,
                                                            gpointer self);
static gint budgie_show_time_widget_budgie_show_time_settings_get_stringindex (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                        gchar** arr,
                                                                        gint arr_length1,
                                                                        const gchar* lookfor);
static void budgie_show_time_widget_budgie_show_time_settings_set_initialvals (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_connect_widgets (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_show_position_picker (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void __lambda15_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                  gint x,
                  gint y,
                  const gchar* anchor);
static void ___lambda15__budgie_show_time_widget_position_picker_dialog_position_selected (BudgieShowTimeWidgetPositionPickerDialog* _sender,
                                                                                    gint x,
                                                                                    gint y,
                                                                                    const gchar* anchor,
                                                                                    gpointer self);
static void budgie_show_time_widget_budgie_show_time_settings_set_anchor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                   GtkToggleButton* button);
static void budgie_show_time_widget_budgie_show_time_settings_set_newlinespacing (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                           GtkSpinButton* button,
                                                                           const gchar* setting);
static void budgie_show_time_widget_budgie_show_time_settings_set_initiallinespacing (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                               GtkSpinButton* button,
                                                                               const gchar* setting);
static void budgie_show_time_widget_budgie_show_time_settings_set_initialdrag (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_set_initialcolor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                         GtkColorButton* button,
                                                                         const gchar* setting);
static void budgie_show_time_widget_budgie_show_time_settings_set_initialcheck (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                         GtkCheckButton* button,
                                                                         const gchar* setting);
static void budgie_show_time_widget_budgie_show_time_settings_set_initialfont (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                        GtkFontButton* button,
                                                                        const gchar* setting);
static void budgie_show_time_widget_budgie_show_time_settings_toggle_autopos (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                       GtkToggleButton* button);
static void _budgie_show_time_widget_budgie_show_time_settings_toggle_autopos_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                                  gpointer self);
static void budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                           GtkToggleButton* button);
static void _budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                                      gpointer self);
static void __lambda5_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void ___lambda5__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                gpointer self);
static void budgie_show_time_widget_budgie_show_time_settings_toggle_drag (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void _budgie_show_time_widget_budgie_show_time_settings_toggle_drag_gtk_button_clicked (GtkButton* _sender,
                                                                                        gpointer self);
static void __lambda16_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_set_hexcolor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                     GtkColorButton* button,
                                                                     const gchar* setting);
static void ___lambda16__gtk_color_button_color_set (GtkColorButton* _sender,
                                              gpointer self);
static void __lambda17_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void ___lambda17__gtk_color_button_color_set (GtkColorButton* _sender,
                                              gpointer self);
static void __lambda18_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_set_newfont (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                    GtkFontButton* button,
                                                                    const gchar* newfont);
static void ___lambda18__gtk_font_button_font_set (GtkFontButton* _sender,
                                            gpointer self);
static void __lambda19_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void ___lambda19__gtk_font_button_font_set (GtkFontButton* _sender,
                                            gpointer self);
static void __lambda20_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void budgie_show_time_widget_budgie_show_time_settings_toggle_value (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                     GtkCheckButton* button,
                                                                     const gchar* setting);
static void ___lambda20__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda21_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self);
static void ___lambda21__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ____lambda22_ (Block1Data* _data1_);
static void budgie_show_time_widget_budgie_show_time_settings_filter_active (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                      GtkToggleButton* button);
static void _____lambda22__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                               gpointer self);
static void budgie_show_time_widget_budgie_show_time_settings_toggle_sensitive (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                         gboolean active);
static void budgie_show_time_widget_budgie_show_time_settings_finalize (GObject * obj);
static void budgie_show_time_widget_position_picker_dialog_get_screen_dimensions (BudgieShowTimeWidgetPositionPickerDialog* self);
static void budgie_show_time_widget_position_picker_dialog_setup_ui (BudgieShowTimeWidgetPositionPickerDialog* self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gboolean budgie_show_time_widget_position_picker_dialog_on_draw (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                 GtkWidget* widget,
                                                                 cairo_t* ctx);
static gboolean _budgie_show_time_widget_position_picker_dialog_on_draw_gtk_widget_draw (GtkWidget* _sender,
                                                                                  cairo_t* cr,
                                                                                  gpointer self);
static gboolean budgie_show_time_widget_position_picker_dialog_on_button_press (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                         GdkEventButton* event);
static gboolean _budgie_show_time_widget_position_picker_dialog_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                                        GdkEventButton* event,
                                                                                                        gpointer self);
static gboolean budgie_show_time_widget_position_picker_dialog_on_motion (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                   GdkEventMotion* event);
static gboolean _budgie_show_time_widget_position_picker_dialog_on_motion_gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                                                                   GdkEventMotion* event,
                                                                                                   gpointer self);
static gboolean budgie_show_time_widget_position_picker_dialog_on_leave (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                  GdkEventCrossing* event);
static gboolean _budgie_show_time_widget_position_picker_dialog_on_leave_gtk_widget_leave_notify_event (GtkWidget* _sender,
                                                                                                 GdkEventCrossing* event,
                                                                                                 gpointer self);
static void __lambda6_ (Block2Data* _data2_);
static void ___lambda6__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self);
static void __lambda7_ (Block2Data* _data2_);
static void ___lambda7__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self);
static void __lambda8_ (Block2Data* _data2_);
static void ___lambda8__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self);
static void __lambda9_ (Block2Data* _data2_);
static void ___lambda9__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                            gpointer self);
static void __lambda10_ (Block2Data* _data2_);
static void ___lambda10__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda11_ (Block2Data* _data2_);
static void ___lambda11__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda12_ (BudgieShowTimeWidgetPositionPickerDialog* self);
static void ___lambda12__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda13_ (BudgieShowTimeWidgetPositionPickerDialog* self);
static void ___lambda13__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static gboolean __lambda14_ (BudgieShowTimeWidgetPositionPickerDialog* self,
                      GdkEventKey* event);
static gboolean ___lambda14__gtk_widget_key_press_event (GtkWidget* _sender,
                                                  GdkEventKey* event,
                                                  gpointer self);
static void budgie_show_time_widget_position_picker_dialog_draw_showtime_preview (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                           cairo_t* ctx,
                                                                           gint rect_x,
                                                                           gint rect_y,
                                                                           gint pos_x,
                                                                           gint pos_y,
                                                                           gdouble r,
                                                                           gdouble g,
                                                                           gdouble b,
                                                                           gdouble alpha);
static void g_cclosure_user_marshal_VOID__INT_INT_STRING (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void budgie_show_time_widget_position_picker_dialog_finalize (GObject * obj);
static BudgieRavenWidget* budgie_show_time_widget_showtime_raven_plugin_real_new_widget_instance (BudgieRavenPlugin* base,
                                                                                           const gchar* uuid,
                                                                                           GSettings* settings);
static gboolean budgie_show_time_widget_showtime_raven_plugin_real_supports_settings (BudgieRavenPlugin* base);
static GtkWidget* budgie_show_time_widget_show_time_raven_widget_real_build_settings_ui (BudgieRavenWidget* base);
static void budgie_show_time_widget_show_time_raven_widget_finalize (GObject * obj);
static void _vala_budgie_show_time_widget_show_time_raven_widget_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec);
static void _vala_budgie_show_time_widget_show_time_raven_widget_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec);
static gboolean __lambda23_ (BudgieShowTimeWidgetShowTimeMain* self);
static gboolean ___lambda23__gsource_func (gpointer self);
static void budgie_show_time_widget_show_time_main_finalize (GObject * obj);
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 gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

gboolean
budgie_show_time_widget_onprimary_exists (void)
{
	XfwScreen* xfw_screen = NULL;
	XfwScreen* _tmp0_;
	GList* windows = NULL;
	XfwScreen* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	gboolean result;
	_tmp0_ = xfw_screen_get_default ();
	xfw_screen = _tmp0_;
	_tmp1_ = xfw_screen;
	_tmp2_ = xfw_screen_get_windows (_tmp1_);
	windows = _tmp2_;
	_tmp3_ = windows;
	{
		GList* w_collection = NULL;
		GList* w_it = NULL;
		w_collection = _tmp3_;
		for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
			XfwWindow* _tmp4_;
			XfwWindow* w = NULL;
			_tmp4_ = _g_object_ref0 ((XfwWindow*) w_it->data);
			w = _tmp4_;
			{
				XfwWindow* _tmp5_;
				const gchar* _tmp6_;
				_tmp5_ = w;
				_tmp6_ = xfw_window_get_name (_tmp5_);
				if (g_strcmp0 (_tmp6_, "Showtime") == 0) {
					result = TRUE;
					_g_object_unref0 (w);
					_g_object_unref0 (xfw_screen);
					return result;
				}
				_g_object_unref0 (w);
			}
		}
	}
	result = FALSE;
	_g_object_unref0 (xfw_screen);
	return result;
}

gint*
budgie_show_time_widget_getwindata (gint* result_length1)
{
	gint x = 0;
	GSettings* _tmp0_;
	gint y = 0;
	GSettings* _tmp1_;
	gint w = 0;
	gint h = 0;
	gint* _tmp2_;
	gint* _tmp3_;
	gint _tmp3__length1;
	gint* result;
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	x = g_settings_get_int (_tmp0_, "xposition");
	_tmp1_ = budgie_show_time_widget_showtime_settings;
	y = g_settings_get_int (_tmp1_, "yposition");
	w = 150;
	h = 80;
	_tmp2_ = g_new0 (gint, 4);
	_tmp2_[0] = x;
	_tmp2_[1] = y;
	_tmp2_[2] = w;
	_tmp2_[3] = h;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 4;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

static gboolean
_bool_equal (const gboolean * s1,
             const gboolean * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}

void
budgie_show_time_widget_create_windows (XfwScreen* screen,
                                        gboolean* surpass_primary)
{
	GList* monitors = NULL;
	GList* _tmp1_;
	XfwMonitor* primary_monitor = NULL;
	XfwScreen* _tmp2_;
	XfwMonitor* _tmp3_;
	XfwMonitor* _tmp4_;
	GList* _tmp5_;
	gboolean allmonitors = FALSE;
	GSettings* _tmp7_;
	GList* _tmp8_;
	gboolean _tmp29_;
	if (screen == NULL) {
		XfwScreen* _tmp0_;
		_tmp0_ = budgie_show_time_widget_xfw_screen;
		screen = _tmp0_;
	}
	_tmp1_ = xfw_screen_get_monitors (screen);
	monitors = _tmp1_;
	budgie_show_time_widget_n_monitors = 0;
	_tmp2_ = budgie_show_time_widget_xfw_screen;
	_tmp3_ = xfw_screen_get_primary_monitor (_tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	primary_monitor = _tmp4_;
	_tmp5_ = monitors;
	if (_tmp5_ != NULL) {
		GList* _tmp6_;
		_tmp6_ = monitors;
		budgie_show_time_widget_n_monitors = (gint) g_list_length (_tmp6_);
	}
	_tmp7_ = budgie_show_time_widget_showtime_settings;
	allmonitors = g_settings_get_boolean (_tmp7_, "allmonitors");
	_tmp8_ = monitors;
	{
		GList* m_collection = NULL;
		GList* m_it = NULL;
		m_collection = _tmp8_;
		for (m_it = m_collection; m_it != NULL; m_it = m_it->next) {
			XfwMonitor* _tmp9_;
			XfwMonitor* m = NULL;
			_tmp9_ = _g_object_ref0 ((XfwMonitor*) m_it->data);
			m = _tmp9_;
			{
				gboolean _tmp10_ = FALSE;
				XfwMonitor* _tmp11_;
				_tmp11_ = primary_monitor;
				if (_tmp11_ != NULL) {
					XfwMonitor* _tmp12_;
					XfwMonitor* _tmp13_;
					_tmp12_ = m;
					_tmp13_ = primary_monitor;
					_tmp10_ = _tmp12_ == _tmp13_;
				} else {
					_tmp10_ = FALSE;
				}
				if (_tmp10_) {
					gboolean _tmp14_ = FALSE;
					gboolean _tmp15_;
					_tmp15_ = TRUE;
					if (_bool_equal (surpass_primary, &_tmp15_) != TRUE) {
						_tmp14_ = !budgie_show_time_widget_onprimary_exists ();
					} else {
						_tmp14_ = FALSE;
					}
					if (_tmp14_) {
						budgie_show_time_widget_open_window (NULL, NULL, NULL);
					}
				} else {
					if (allmonitors) {
						GdkRectangle workarea = {0};
						XfwMonitor* _tmp16_;
						GdkRectangle _tmp17_ = {0};
						gint xpos = 0;
						GdkRectangle _tmp18_;
						GdkRectangle _tmp19_;
						gint ypos = 0;
						GdkRectangle _tmp20_;
						GdkRectangle _tmp21_;
						const gchar* _tmp22_ = NULL;
						XfwMonitor* _tmp23_;
						const gchar* _tmp24_;
						gchar* _tmp25_;
						gchar* _tmp26_;
						gchar* _tmp27_;
						gchar* _tmp28_;
						_tmp16_ = m;
						xfw_monitor_get_workarea (_tmp16_, &_tmp17_);
						workarea = _tmp17_;
						_tmp18_ = workarea;
						_tmp19_ = workarea;
						xpos = (_tmp18_.x + _tmp19_.width) - 150;
						_tmp20_ = workarea;
						_tmp21_ = workarea;
						ypos = (_tmp20_.y + _tmp21_.height) - 150;
						_tmp23_ = m;
						_tmp24_ = xfw_monitor_get_description (_tmp23_);
						_tmp22_ = _tmp24_;
						if (_tmp22_ == NULL) {
							_tmp22_ = "monitor";
						}
						_tmp25_ = g_strdup_printf ("%i", xpos);
						_tmp26_ = _tmp25_;
						_tmp27_ = g_strdup_printf ("%i", ypos);
						_tmp28_ = _tmp27_;
						budgie_show_time_widget_open_window (_tmp22_, _tmp26_, _tmp28_);
						_g_free0 (_tmp28_);
						_g_free0 (_tmp26_);
					}
				}
				_g_object_unref0 (m);
			}
		}
	}
	_tmp29_ = FALSE;
	surpass_primary = &_tmp29_;
	_g_object_unref0 (primary_monitor);
}

void
budgie_show_time_widget_open_window (const gchar* wname,
                                     const gchar* xpos,
                                     const gchar* ypos)
{
	gchar* cmd = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GError* _inner_error0_ = NULL;
	_tmp0_ = budgie_show_time_widget_winpath;
	_tmp1_ = g_strdup (_tmp0_);
	cmd = _tmp1_;
	if (wname != NULL) {
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = budgie_show_time_widget_winpath;
		_tmp3_ = g_strconcat (_tmp2_, " ", wname, " ", xpos, " ", ypos, NULL);
		_g_free0 (cmd);
		cmd = _tmp3_;
	}
	{
		const gchar* _tmp4_;
		_tmp4_ = cmd;
		g_spawn_command_line_async (_tmp4_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			_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;
		}
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_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;
	}
	_g_free0 (cmd);
}

static inline gpointer
budgie_show_time_widget_budgie_show_time_settings_get_instance_private (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieShowTimeWidgetBudgieShowTimeSettings_private_offset);
}

static void
__lambda4_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GList* monitors = NULL;
	XfwScreen* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	gboolean newsensitive = FALSE;
	GtkCheckButton* _tmp6_;
	XfwScreen* _tmp7_;
	_tmp0_ = budgie_show_time_widget_xfw_screen;
	_tmp1_ = xfw_screen_get_monitors (_tmp0_);
	monitors = _tmp1_;
	budgie_show_time_widget_n_monitors = 0;
	_tmp2_ = monitors;
	{
		GList* m_collection = NULL;
		GList* m_it = NULL;
		m_collection = _tmp2_;
		for (m_it = m_collection; m_it != NULL; m_it = m_it->next) {
			XfwMonitor* _tmp3_;
			XfwMonitor* m = NULL;
			_tmp3_ = _g_object_ref0 ((XfwMonitor*) m_it->data);
			m = _tmp3_;
			{
				gint _tmp4_;
				_tmp4_ = budgie_show_time_widget_n_monitors;
				budgie_show_time_widget_n_monitors = _tmp4_ + 1;
				_g_object_unref0 (m);
			}
		}
	}
	newsensitive = budgie_show_time_widget_n_monitors > 1;
	if (budgie_show_time_widget_n_monitors == 1) {
		GtkCheckButton* _tmp5_;
		_tmp5_ = self->priv->allmonitors;
		gtk_toggle_button_set_active ((GtkToggleButton*) _tmp5_, FALSE);
	}
	_tmp6_ = self->priv->allmonitors;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, newsensitive);
	_tmp7_ = budgie_show_time_widget_xfw_screen;
	budgie_show_time_widget_create_windows (_tmp7_, NULL);
}

static void
___lambda4__libxfce4windowing_screen_monitors_changed (XfwScreen* _sender,
                                                       gpointer self)
{
	__lambda4_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

BudgieShowTimeWidgetBudgieShowTimeSettings*
budgie_show_time_widget_budgie_show_time_settings_construct (GType object_type,
                                                             GSettings* settings)
{
	BudgieShowTimeWidgetBudgieShowTimeSettings * self = NULL;
	GSettings* _tmp0_;
	XfwScreen* _tmp1_;
	XfwScreen* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* stsettings_css = NULL;
	gchar* _tmp5_;
	gchar* dragtext = NULL;
	gchar* _tmp6_;
	GdkScreen* screen = NULL;
	GdkScreen* _tmp7_;
	GdkScreen* _tmp8_;
	GtkLabel* position_header = NULL;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	GtkBox* positionbox = NULL;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkCheckButton* _tmp14_;
	GtkCheckButton* _tmp15_;
	GtkBox* _tmp16_;
	GtkCheckButton* _tmp17_;
	GtkBox* _tmp18_;
	GtkCheckButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	const gchar* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkLabel* _tmp25_;
	GtkLabel* _tmp26_;
	GtkGrid* _tmp27_;
	GtkLabel* leftspace = NULL;
	GtkLabel* _tmp28_;
	GtkLabel* centerlabel = NULL;
	GtkLabel* _tmp29_;
	GtkGrid* _tmp30_;
	GtkLabel* _tmp31_;
	GtkGrid* _tmp32_;
	GtkLabel* _tmp33_;
	GtkRadioButton* nw = NULL;
	GtkRadioButton* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar** _tmp39_;
	GtkRadioButton* ne = NULL;
	GtkRadioButton* _tmp40_;
	GSList* _tmp41_;
	GtkRadioButton* _tmp42_;
	GtkRadioButton* se = NULL;
	GtkRadioButton* _tmp43_;
	GSList* _tmp44_;
	GtkRadioButton* _tmp45_;
	GtkRadioButton* sw = NULL;
	GtkRadioButton* _tmp46_;
	GSList* _tmp47_;
	GtkRadioButton* _tmp48_;
	GtkGrid* _tmp49_;
	GtkRadioButton* _tmp50_;
	GtkGrid* _tmp51_;
	GtkRadioButton* _tmp52_;
	GtkGrid* _tmp53_;
	GtkRadioButton* _tmp54_;
	GtkGrid* _tmp55_;
	GtkRadioButton* _tmp56_;
	GtkGrid* _tmp57_;
	GtkButton* _tmp58_;
	GtkGrid* _tmp59_;
	GtkLabel* _tmp60_;
	GtkGrid* _tmp61_;
	GtkRadioButton* _tmp62_;
	GtkRadioButton* _tmp63_;
	GtkRadioButton* _tmp64_;
	GtkRadioButton* _tmp65_;
	GtkRadioButton* _tmp66_;
	GtkRadioButton* _tmp67_;
	GtkRadioButton* _tmp68_;
	GtkRadioButton* _tmp69_;
	GtkRadioButton** _tmp70_;
	GtkRadioButton** _tmp71_;
	gint _tmp71__length1;
	gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	gchar** _tmp78_;
	GSettings* _tmp79_;
	gchar* _tmp80_;
	GtkRadioButton** _tmp81_;
	gint _tmp81__length1;
	gchar** _tmp82_;
	gint _tmp82__length1;
	const gchar* _tmp83_;
	GtkRadioButton* _tmp84_;
	GtkLabel* time_header = NULL;
	GtkLabel* _tmp85_;
	GtkBox* timebox = NULL;
	GtkBox* _tmp86_;
	GtkFontButton* _tmp87_;
	GtkFontButton* _tmp88_;
	GtkColorButton* _tmp89_;
	GtkColorButton* _tmp90_;
	GtkLabel* spacelabel3 = NULL;
	GtkLabel* _tmp91_;
	GtkLabel* date_header = NULL;
	GtkLabel* _tmp92_;
	GtkBox* datebox = NULL;
	GtkBox* _tmp93_;
	GtkFontButton* _tmp94_;
	GtkFontButton* _tmp95_;
	GtkColorButton* _tmp96_;
	GtkColorButton* _tmp97_;
	GtkLabel* spacelabel5 = NULL;
	GtkLabel* _tmp98_;
	GtkLabel* general_header = NULL;
	GtkLabel* _tmp99_;
	GtkCheckButton* _tmp100_;
	GtkCheckButton* _tmp101_;
	GtkCheckButton* _tmp102_;
	GtkCheckButton* _tmp103_;
	GtkLabel* spacelabel6 = NULL;
	GtkLabel* _tmp104_;
	GtkBox* linespacebox = NULL;
	GtkBox* _tmp105_;
	GtkSpinButton* _tmp106_;
	GtkSpinButton* _tmp107_;
	GtkLabel* _tmp108_;
	GtkLabel* _tmp109_;
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp110_;
	GtkLabel** boldones = NULL;
	GtkLabel* _tmp113_;
	GtkLabel* _tmp114_;
	GtkLabel* _tmp115_;
	GtkLabel* _tmp116_;
	GtkLabel* _tmp117_;
	GtkLabel** _tmp118_;
	gint boldones_length1;
	gint _boldones_size_;
	GtkLabel** _tmp119_;
	gint _tmp119__length1;
	GError* _inner_error0_ = NULL;
	self = (BudgieShowTimeWidgetBudgieShowTimeSettings*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (settings);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp0_;
	_tmp1_ = xfw_screen_get_default ();
	_g_object_unref0 (budgie_show_time_widget_xfw_screen);
	budgie_show_time_widget_xfw_screen = _tmp1_;
	_tmp2_ = budgie_show_time_widget_xfw_screen;
	g_signal_connect_object (_tmp2_, "monitors-changed", (GCallback) ___lambda4__libxfce4windowing_screen_monitors_changed, self, 0);
	_tmp3_ = g_strdup (_ ("Drag position"));
	_g_free0 (self->priv->dragposition);
	self->priv->dragposition = _tmp3_;
	_tmp4_ = g_strdup (_ ("Save position"));
	_g_free0 (self->priv->fixposition);
	self->priv->fixposition = _tmp4_;
	_tmp5_ = g_strdup (".st_header {font-weight: bold;}");
	stsettings_css = _tmp5_;
	_tmp6_ = g_strdup (_ ("Enable Super + drag to set time position. Click ´Save position´ to sav" \
"e."));
	dragtext = _tmp6_;
	_tmp7_ = gtk_widget_get_screen ((GtkWidget*) self);
	_tmp8_ = _g_object_ref0 (_tmp7_);
	screen = _tmp8_;
	gtk_grid_set_row_spacing ((GtkGrid*) self, (guint) 10);
	_tmp9_ = (GtkLabel*) gtk_label_new (_ ("Position & anchor"));
	g_object_ref_sink (_tmp9_);
	position_header = _tmp9_;
	_tmp10_ = position_header;
	gtk_label_set_xalign (_tmp10_, (gfloat) 0);
	_tmp11_ = position_header;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp11_, 0, 0, 10, 1);
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp12_);
	positionbox = _tmp12_;
	_tmp13_ = positionbox;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp13_, 0, 1, 10, 1);
	_tmp14_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Automatic"));
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->autopos);
	self->priv->autopos = _tmp14_;
	_tmp15_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("On all monitors"));
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->allmonitors);
	self->priv->allmonitors = _tmp15_;
	_tmp16_ = positionbox;
	_tmp17_ = self->priv->autopos;
	gtk_box_pack_start (_tmp16_, (GtkWidget*) _tmp17_, FALSE, FALSE, (guint) 0);
	_tmp18_ = positionbox;
	_tmp19_ = self->priv->allmonitors;
	gtk_box_pack_start (_tmp18_, (GtkWidget*) _tmp19_, FALSE, FALSE, (guint) 0);
	_tmp20_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->dragbutton);
	self->priv->dragbutton = _tmp20_;
	_tmp21_ = self->priv->dragbutton;
	_tmp22_ = dragtext;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp21_, _tmp22_);
	_tmp23_ = self->priv->dragbutton;
	gtk_button_set_label (_tmp23_, _ ("Drag position"));
	_tmp24_ = self->priv->dragbutton;
	gtk_widget_set_size_request ((GtkWidget*) _tmp24_, 150, 10);
	_tmp25_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->draghint);
	self->priv->draghint = _tmp25_;
	_tmp26_ = self->priv->draghint;
	gtk_label_set_xalign (_tmp26_, (gfloat) 0.5);
	_tmp27_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->priv->anchorgrid);
	self->priv->anchorgrid = _tmp27_;
	_tmp28_ = (GtkLabel*) gtk_label_new ("\t");
	g_object_ref_sink (_tmp28_);
	leftspace = _tmp28_;
	_tmp29_ = (GtkLabel*) gtk_label_new ("\t");
	g_object_ref_sink (_tmp29_);
	centerlabel = _tmp29_;
	_tmp30_ = self->priv->anchorgrid;
	_tmp31_ = leftspace;
	gtk_grid_attach (_tmp30_, (GtkWidget*) _tmp31_, 1, 0, 1, 1);
	_tmp32_ = self->priv->anchorgrid;
	_tmp33_ = centerlabel;
	gtk_grid_attach (_tmp32_, (GtkWidget*) _tmp33_, 3, 1, 1, 1);
	_tmp34_ = (GtkRadioButton*) gtk_radio_button_new (NULL);
	g_object_ref_sink (_tmp34_);
	nw = _tmp34_;
	_tmp35_ = g_strdup ("nw");
	_tmp36_ = g_strdup ("ne");
	_tmp37_ = g_strdup ("se");
	_tmp38_ = g_strdup ("sw");
	_tmp39_ = g_new0 (gchar*, 4 + 1);
	_tmp39_[0] = _tmp35_;
	_tmp39_[1] = _tmp36_;
	_tmp39_[2] = _tmp37_;
	_tmp39_[3] = _tmp38_;
	self->priv->anchors = (_vala_array_free (self->priv->anchors, self->priv->anchors_length1, (GDestroyNotify) g_free), NULL);
	self->priv->anchors = _tmp39_;
	self->priv->anchors_length1 = 4;
	self->priv->_anchors_size_ = self->priv->anchors_length1;
	_tmp40_ = nw;
	_tmp41_ = gtk_radio_button_get_group (_tmp40_);
	_tmp42_ = (GtkRadioButton*) gtk_radio_button_new (_tmp41_);
	g_object_ref_sink (_tmp42_);
	ne = _tmp42_;
	_tmp43_ = nw;
	_tmp44_ = gtk_radio_button_get_group (_tmp43_);
	_tmp45_ = (GtkRadioButton*) gtk_radio_button_new (_tmp44_);
	g_object_ref_sink (_tmp45_);
	se = _tmp45_;
	_tmp46_ = nw;
	_tmp47_ = gtk_radio_button_get_group (_tmp46_);
	_tmp48_ = (GtkRadioButton*) gtk_radio_button_new (_tmp47_);
	g_object_ref_sink (_tmp48_);
	sw = _tmp48_;
	_tmp49_ = self->priv->anchorgrid;
	_tmp50_ = nw;
	gtk_grid_attach (_tmp49_, (GtkWidget*) _tmp50_, 2, 0, 1, 1);
	_tmp51_ = self->priv->anchorgrid;
	_tmp52_ = ne;
	gtk_grid_attach (_tmp51_, (GtkWidget*) _tmp52_, 4, 0, 1, 1);
	_tmp53_ = self->priv->anchorgrid;
	_tmp54_ = se;
	gtk_grid_attach (_tmp53_, (GtkWidget*) _tmp54_, 4, 2, 1, 1);
	_tmp55_ = self->priv->anchorgrid;
	_tmp56_ = sw;
	gtk_grid_attach (_tmp55_, (GtkWidget*) _tmp56_, 2, 2, 1, 1);
	_tmp57_ = self->priv->anchorgrid;
	_tmp58_ = self->priv->dragbutton;
	gtk_grid_attach (_tmp57_, (GtkWidget*) _tmp58_, 0, 1, 1, 1);
	_tmp59_ = self->priv->anchorgrid;
	_tmp60_ = self->priv->draghint;
	gtk_grid_attach (_tmp59_, (GtkWidget*) _tmp60_, 0, 0, 1, 1);
	_tmp61_ = self->priv->anchorgrid;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp61_, 0, 2, 2, 1);
	_tmp62_ = nw;
	_tmp63_ = _g_object_ref0 (_tmp62_);
	_tmp64_ = ne;
	_tmp65_ = _g_object_ref0 (_tmp64_);
	_tmp66_ = se;
	_tmp67_ = _g_object_ref0 (_tmp66_);
	_tmp68_ = sw;
	_tmp69_ = _g_object_ref0 (_tmp68_);
	_tmp70_ = g_new0 (GtkRadioButton*, 4 + 1);
	_tmp70_[0] = _tmp63_;
	_tmp70_[1] = _tmp65_;
	_tmp70_[2] = _tmp67_;
	_tmp70_[3] = _tmp69_;
	self->priv->anchorbuttons = (_vala_array_free (self->priv->anchorbuttons, self->priv->anchorbuttons_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->anchorbuttons = _tmp70_;
	self->priv->anchorbuttons_length1 = 4;
	self->priv->_anchorbuttons_size_ = self->priv->anchorbuttons_length1;
	_tmp71_ = self->priv->anchorbuttons;
	_tmp71__length1 = self->priv->anchorbuttons_length1;
	{
		GtkRadioButton** b_collection = NULL;
		gint b_collection_length1 = 0;
		gint _b_collection_size_ = 0;
		gint b_it = 0;
		b_collection = _tmp71_;
		b_collection_length1 = _tmp71__length1;
		for (b_it = 0; b_it < b_collection_length1; b_it = b_it + 1) {
			GtkRadioButton* _tmp72_;
			GtkRadioButton* b = NULL;
			_tmp72_ = _g_object_ref0 (b_collection[b_it]);
			b = _tmp72_;
			{
				GtkRadioButton* _tmp73_;
				_tmp73_ = b;
				gtk_widget_set_tooltip_text ((GtkWidget*) _tmp73_, _ ("Anchor, time will expand/shrink in/from opposite direction."));
				_g_object_unref0 (b);
			}
		}
	}
	_tmp74_ = g_strdup ("nw");
	_tmp75_ = g_strdup ("ne");
	_tmp76_ = g_strdup ("se");
	_tmp77_ = g_strdup ("sw");
	_tmp78_ = g_new0 (gchar*, 4 + 1);
	_tmp78_[0] = _tmp74_;
	_tmp78_[1] = _tmp75_;
	_tmp78_[2] = _tmp76_;
	_tmp78_[3] = _tmp77_;
	self->priv->anchors = (_vala_array_free (self->priv->anchors, self->priv->anchors_length1, (GDestroyNotify) g_free), NULL);
	self->priv->anchors = _tmp78_;
	self->priv->anchors_length1 = 4;
	self->priv->_anchors_size_ = self->priv->anchors_length1;
	_tmp79_ = budgie_show_time_widget_showtime_settings;
	_tmp80_ = g_settings_get_string (_tmp79_, "anchor");
	_g_free0 (self->priv->curr_anchor);
	self->priv->curr_anchor = _tmp80_;
	_tmp81_ = self->priv->anchorbuttons;
	_tmp81__length1 = self->priv->anchorbuttons_length1;
	_tmp82_ = self->priv->anchors;
	_tmp82__length1 = self->priv->anchors_length1;
	_tmp83_ = self->priv->curr_anchor;
	_tmp84_ = _tmp81_[budgie_show_time_widget_budgie_show_time_settings_get_stringindex (self, _tmp82_, (gint) _tmp82__length1, _tmp83_)];
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp84_, TRUE);
	_tmp85_ = (GtkLabel*) gtk_label_new (_ ("Time font, size & color"));
	g_object_ref_sink (_tmp85_);
	time_header = _tmp85_;
	gtk_label_set_xalign (time_header, (gfloat) 0);
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) time_header, 0, 6, 10, 1);
	_tmp86_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp86_);
	timebox = _tmp86_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) timebox, 0, 7, 10, 1);
	_tmp87_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp87_);
	_g_object_unref0 (self->priv->timefontbutton);
	self->priv->timefontbutton = _tmp87_;
	_tmp88_ = self->priv->timefontbutton;
	gtk_box_pack_start (timebox, (GtkWidget*) _tmp88_, FALSE, FALSE, (guint) 0);
	_tmp89_ = (GtkColorButton*) gtk_color_button_new ();
	g_object_ref_sink (_tmp89_);
	_g_object_unref0 (self->priv->timecolor);
	self->priv->timecolor = _tmp89_;
	_tmp90_ = self->priv->timecolor;
	gtk_box_pack_start (timebox, (GtkWidget*) _tmp90_, FALSE, FALSE, (guint) 0);
	_tmp91_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp91_);
	spacelabel3 = _tmp91_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) spacelabel3, 1, 8, 1, 1);
	_tmp92_ = (GtkLabel*) gtk_label_new (_ ("Date font, size & color"));
	g_object_ref_sink (_tmp92_);
	date_header = _tmp92_;
	gtk_label_set_xalign (date_header, (gfloat) 0);
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) date_header, 0, 10, 10, 1);
	_tmp93_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp93_);
	datebox = _tmp93_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) datebox, 0, 11, 10, 1);
	_tmp94_ = (GtkFontButton*) gtk_font_button_new ();
	g_object_ref_sink (_tmp94_);
	_g_object_unref0 (self->priv->datefontbutton);
	self->priv->datefontbutton = _tmp94_;
	_tmp95_ = self->priv->datefontbutton;
	gtk_box_pack_start (datebox, (GtkWidget*) _tmp95_, FALSE, FALSE, (guint) 0);
	_tmp96_ = (GtkColorButton*) gtk_color_button_new ();
	g_object_ref_sink (_tmp96_);
	_g_object_unref0 (self->priv->datecolor);
	self->priv->datecolor = _tmp96_;
	_tmp97_ = self->priv->datecolor;
	gtk_box_pack_start (datebox, (GtkWidget*) _tmp97_, FALSE, FALSE, (guint) 0);
	_tmp98_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp98_);
	spacelabel5 = _tmp98_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) spacelabel5, 1, 12, 1, 1);
	_tmp99_ = (GtkLabel*) gtk_label_new (_ ("Miscellaneous"));
	g_object_ref_sink (_tmp99_);
	general_header = _tmp99_;
	gtk_label_set_xalign (general_header, (gfloat) 0);
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) general_header, 0, 20, 10, 1);
	_tmp100_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Left align text"));
	g_object_ref_sink (_tmp100_);
	_g_object_unref0 (self->priv->leftalign);
	self->priv->leftalign = _tmp100_;
	_tmp101_ = self->priv->leftalign;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp101_, 0, 21, 10, 1);
	_tmp102_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Use 12hr time format"));
	g_object_ref_sink (_tmp102_);
	_g_object_unref0 (self->priv->twelve_hrs);
	self->priv->twelve_hrs = _tmp102_;
	_tmp103_ = self->priv->twelve_hrs;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp103_, 0, 22, 10, 1);
	_tmp104_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp104_);
	spacelabel6 = _tmp104_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) spacelabel6, 1, 23, 1, 1);
	_tmp105_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp105_);
	linespacebox = _tmp105_;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) linespacebox, 0, 30, 3, 1);
	_tmp106_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) -50, (gdouble) 50, (gdouble) 1);
	g_object_ref_sink (_tmp106_);
	_g_object_unref0 (self->priv->linespacing);
	self->priv->linespacing = _tmp106_;
	_tmp107_ = self->priv->linespacing;
	gtk_box_pack_start (linespacebox, (GtkWidget*) _tmp107_, FALSE, FALSE, (guint) 0);
	_tmp108_ = (GtkLabel*) gtk_label_new (_ ("Linespacing"));
	g_object_ref_sink (_tmp108_);
	_g_object_unref0 (self->priv->spinlabel);
	self->priv->spinlabel = _tmp108_;
	_tmp109_ = self->priv->spinlabel;
	gtk_box_pack_start (linespacebox, (GtkWidget*) _tmp109_, FALSE, FALSE, (guint) 0);
	_tmp110_ = gtk_css_provider_new ();
	css_provider = _tmp110_;
	{
		const gchar* _tmp111_;
		GdkScreen* _tmp112_;
		_tmp111_ = stsettings_css;
		gtk_css_provider_load_from_data (css_provider, _tmp111_, (gssize) -1, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp112_ = screen;
		gtk_style_context_add_provider_for_screen (_tmp112_, (GtkStyleProvider*) css_provider, (guint) GTK_STYLE_PROVIDER_PRIORITY_USER);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (css_provider);
		_g_object_unref0 (linespacebox);
		_g_object_unref0 (spacelabel6);
		_g_object_unref0 (general_header);
		_g_object_unref0 (spacelabel5);
		_g_object_unref0 (datebox);
		_g_object_unref0 (date_header);
		_g_object_unref0 (spacelabel3);
		_g_object_unref0 (timebox);
		_g_object_unref0 (time_header);
		_g_object_unref0 (sw);
		_g_object_unref0 (se);
		_g_object_unref0 (ne);
		_g_object_unref0 (nw);
		_g_object_unref0 (centerlabel);
		_g_object_unref0 (leftspace);
		_g_object_unref0 (positionbox);
		_g_object_unref0 (position_header);
		_g_object_unref0 (screen);
		_g_free0 (dragtext);
		_g_free0 (stsettings_css);
		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;
	}
	_tmp113_ = _g_object_ref0 (time_header);
	_tmp114_ = _g_object_ref0 (date_header);
	_tmp115_ = _g_object_ref0 (general_header);
	_tmp116_ = position_header;
	_tmp117_ = _g_object_ref0 (_tmp116_);
	_tmp118_ = g_new0 (GtkLabel*, 4 + 1);
	_tmp118_[0] = _tmp113_;
	_tmp118_[1] = _tmp114_;
	_tmp118_[2] = _tmp115_;
	_tmp118_[3] = _tmp117_;
	boldones = _tmp118_;
	boldones_length1 = 4;
	_boldones_size_ = boldones_length1;
	_tmp119_ = boldones;
	_tmp119__length1 = boldones_length1;
	{
		GtkLabel** l_collection = NULL;
		gint l_collection_length1 = 0;
		gint _l_collection_size_ = 0;
		gint l_it = 0;
		l_collection = _tmp119_;
		l_collection_length1 = _tmp119__length1;
		for (l_it = 0; l_it < l_collection_length1; l_it = l_it + 1) {
			GtkLabel* _tmp120_;
			GtkLabel* l = NULL;
			_tmp120_ = _g_object_ref0 (l_collection[l_it]);
			l = _tmp120_;
			{
				GtkLabel* _tmp121_;
				GtkStyleContext* _tmp122_;
				_tmp121_ = l;
				_tmp122_ = gtk_widget_get_style_context ((GtkWidget*) _tmp121_);
				gtk_style_context_add_class (_tmp122_, "st_header");
				_g_object_unref0 (l);
			}
		}
	}
	budgie_show_time_widget_budgie_show_time_settings_set_initialvals (self);
	budgie_show_time_widget_budgie_show_time_settings_connect_widgets (self);
	gtk_widget_show_all ((GtkWidget*) self);
	boldones = (_vala_array_free (boldones, boldones_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (css_provider);
	_g_object_unref0 (linespacebox);
	_g_object_unref0 (spacelabel6);
	_g_object_unref0 (general_header);
	_g_object_unref0 (spacelabel5);
	_g_object_unref0 (datebox);
	_g_object_unref0 (date_header);
	_g_object_unref0 (spacelabel3);
	_g_object_unref0 (timebox);
	_g_object_unref0 (time_header);
	_g_object_unref0 (sw);
	_g_object_unref0 (se);
	_g_object_unref0 (ne);
	_g_object_unref0 (nw);
	_g_object_unref0 (centerlabel);
	_g_object_unref0 (leftspace);
	_g_object_unref0 (positionbox);
	_g_object_unref0 (position_header);
	_g_object_unref0 (screen);
	_g_free0 (dragtext);
	_g_free0 (stsettings_css);
	return self;
}

BudgieShowTimeWidgetBudgieShowTimeSettings*
budgie_show_time_widget_budgie_show_time_settings_new (GSettings* settings)
{
	return budgie_show_time_widget_budgie_show_time_settings_construct (BUDGIE_SHOW_TIME_WIDGET_TYPE_BUDGIE_SHOW_TIME_SETTINGS, settings);
}

static void
__lambda15_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
             gint x,
             gint y,
             const gchar* anchor)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	gint anchor_index = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	XfwScreen* _tmp6_;
	g_return_if_fail (anchor != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_int (_tmp0_, "xposition", x);
	_tmp1_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_int (_tmp1_, "yposition", y);
	_tmp2_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_string (_tmp2_, "anchor", anchor);
	_tmp3_ = self->priv->anchors;
	_tmp3__length1 = self->priv->anchors_length1;
	anchor_index = budgie_show_time_widget_budgie_show_time_settings_get_stringindex (self, _tmp3_, (gint) _tmp3__length1, anchor);
	if (anchor_index >= 0) {
		GtkRadioButton** _tmp4_;
		gint _tmp4__length1;
		GtkRadioButton* _tmp5_;
		_tmp4_ = self->priv->anchorbuttons;
		_tmp4__length1 = self->priv->anchorbuttons_length1;
		_tmp5_ = _tmp4_[anchor_index];
		gtk_toggle_button_set_active ((GtkToggleButton*) _tmp5_, TRUE);
	}
	_tmp6_ = budgie_show_time_widget_xfw_screen;
	budgie_show_time_widget_create_windows (_tmp6_, NULL);
}

static void
___lambda15__budgie_show_time_widget_position_picker_dialog_position_selected (BudgieShowTimeWidgetPositionPickerDialog* _sender,
                                                                               gint x,
                                                                               gint y,
                                                                               const gchar* anchor,
                                                                               gpointer self)
{
	__lambda15_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self, x, y, anchor);
}

static void
budgie_show_time_widget_budgie_show_time_settings_show_position_picker (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	BudgieShowTimeWidgetPositionPickerDialog* picker = NULL;
	GSettings* _tmp0_;
	BudgieShowTimeWidgetPositionPickerDialog* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	_tmp1_ = budgie_show_time_widget_position_picker_dialog_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	picker = _tmp1_;
	_tmp2_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	gtk_window_set_transient_for ((GtkWindow*) picker, G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp2_) : NULL);
	g_signal_connect_object (picker, "position-selected", (GCallback) ___lambda15__budgie_show_time_widget_position_picker_dialog_position_selected, self, 0);
	gtk_widget_show ((GtkWidget*) picker);
	_g_object_unref0 (picker);
}

static gint
budgie_show_time_widget_budgie_show_time_settings_get_stringindex (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                   gchar** arr,
                                                                   gint arr_length1,
                                                                   const gchar* lookfor)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (lookfor != NULL, -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < arr_length1)) {
					break;
				}
				_tmp2_ = arr[i];
				if (g_strcmp0 (lookfor, _tmp2_) == 0) {
					result = i;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_anchor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                              GtkToggleButton* button)
{
	gint n = 0;
	gchar* newanchor = NULL;
	gchar* _tmp0_;
	GtkRadioButton** _tmp1_;
	gint _tmp1__length1;
	GSettings* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	n = 0;
	_tmp0_ = g_strdup ("se");
	newanchor = _tmp0_;
	_tmp1_ = self->priv->anchorbuttons;
	_tmp1__length1 = self->priv->anchorbuttons_length1;
	{
		GtkRadioButton** b_collection = NULL;
		gint b_collection_length1 = 0;
		gint _b_collection_size_ = 0;
		gint b_it = 0;
		b_collection = _tmp1_;
		b_collection_length1 = _tmp1__length1;
		for (b_it = 0; b_it < b_collection_length1; b_it = b_it + 1) {
			GtkToggleButton* _tmp2_;
			GtkToggleButton* b = NULL;
			_tmp2_ = _g_object_ref0 ((GtkToggleButton*) b_collection[b_it]);
			b = _tmp2_;
			{
				GtkToggleButton* _tmp3_;
				_tmp3_ = b;
				if (_tmp3_ == button) {
					gchar** _tmp4_;
					gint _tmp4__length1;
					const gchar* _tmp5_;
					gchar* _tmp6_;
					_tmp4_ = self->priv->anchors;
					_tmp4__length1 = self->priv->anchors_length1;
					_tmp5_ = _tmp4_[n];
					_tmp6_ = g_strdup (_tmp5_);
					_g_free0 (newanchor);
					newanchor = _tmp6_;
				}
				n += 1;
				_g_object_unref0 (b);
			}
		}
	}
	_tmp7_ = budgie_show_time_widget_showtime_settings;
	_tmp8_ = newanchor;
	g_settings_set_string (_tmp7_, "anchor", _tmp8_);
	_g_free0 (newanchor);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_newlinespacing (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                      GtkSpinButton* button,
                                                                      const gchar* setting)
{
	gint newval = 0;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	newval = (gint) gtk_spin_button_get_value (button);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_int (_tmp0_, setting, newval);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initialvals (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkSpinButton* _tmp0_;
	GtkColorButton* _tmp1_;
	GtkColorButton* _tmp2_;
	GtkCheckButton* _tmp3_;
	GtkCheckButton* _tmp4_;
	GtkFontButton* _tmp5_;
	GtkFontButton* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->linespacing;
	budgie_show_time_widget_budgie_show_time_settings_set_initiallinespacing (self, _tmp0_, "linespacing");
	budgie_show_time_widget_budgie_show_time_settings_set_initialdrag (self);
	_tmp1_ = self->priv->timecolor;
	budgie_show_time_widget_budgie_show_time_settings_set_initialcolor (self, _tmp1_, "timefontcolor");
	_tmp2_ = self->priv->datecolor;
	budgie_show_time_widget_budgie_show_time_settings_set_initialcolor (self, _tmp2_, "datefontcolor");
	_tmp3_ = self->priv->leftalign;
	budgie_show_time_widget_budgie_show_time_settings_set_initialcheck (self, _tmp3_, "leftalign");
	_tmp4_ = self->priv->twelve_hrs;
	budgie_show_time_widget_budgie_show_time_settings_set_initialcheck (self, _tmp4_, "twelvehrs");
	_tmp5_ = self->priv->timefontbutton;
	budgie_show_time_widget_budgie_show_time_settings_set_initialfont (self, _tmp5_, "timefont");
	_tmp6_ = self->priv->datefontbutton;
	budgie_show_time_widget_budgie_show_time_settings_set_initialfont (self, _tmp6_, "datefont");
	budgie_show_time_widget_budgie_show_time_settings_set_initialautopos (self);
	budgie_show_time_widget_budgie_show_time_settings_set_initialallmonitors (self);
}

void
budgie_show_time_widget_budgie_show_time_settings_set_initialallmonitors (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	gboolean newval = FALSE;
	GSettings* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean newautopos = FALSE;
	GSettings* _tmp2_;
	GtkCheckButton* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	newval = g_settings_get_boolean (_tmp0_, "allmonitors");
	_tmp1_ = self->priv->allmonitors;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp1_, newval);
	_tmp2_ = budgie_show_time_widget_showtime_settings;
	newautopos = g_settings_get_boolean (_tmp2_, "autoposition");
	_tmp3_ = self->priv->allmonitors;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, newautopos);
}

void
budgie_show_time_widget_budgie_show_time_settings_set_initialautopos (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	gboolean newval = FALSE;
	GSettings* _tmp0_;
	GtkCheckButton* _tmp1_;
	GtkGrid* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	newval = g_settings_get_boolean (_tmp0_, "autoposition");
	_tmp1_ = self->priv->autopos;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp1_, newval);
	_tmp2_ = self->priv->anchorgrid;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, !newval);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initialfont (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                   GtkFontButton* button,
                                                                   const gchar* setting)
{
	gchar* currval = NULL;
	GSettings* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, setting);
	currval = _tmp1_;
	gtk_font_chooser_set_font ((GtkFontChooser*) button, currval);
	_g_free0 (currval);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initiallinespacing (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                          GtkSpinButton* button,
                                                                          const gchar* setting)
{
	gint currval = 0;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	currval = g_settings_get_int (_tmp0_, setting);
	gtk_spin_button_set_value (button, (gdouble) currval);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initialcheck (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                    GtkCheckButton* button,
                                                                    const gchar* setting)
{
	gboolean currval = FALSE;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	currval = g_settings_get_boolean (_tmp0_, setting);
	gtk_toggle_button_set_active ((GtkToggleButton*) button, currval);
}

static void
_budgie_show_time_widget_budgie_show_time_settings_toggle_autopos_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                             gpointer self)
{
	budgie_show_time_widget_budgie_show_time_settings_toggle_autopos ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self, _sender);
}

static void
_budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                                 gpointer self)
{
	budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self, _sender);
}

static void
__lambda5_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkSpinButton* _tmp0_;
	_tmp0_ = self->priv->linespacing;
	budgie_show_time_widget_budgie_show_time_settings_set_newlinespacing (self, _tmp0_, "linespacing");
}

static void
___lambda5__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                           gpointer self)
{
	__lambda5_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
_budgie_show_time_widget_budgie_show_time_settings_toggle_drag_gtk_button_clicked (GtkButton* _sender,
                                                                                   gpointer self)
{
	budgie_show_time_widget_budgie_show_time_settings_toggle_drag ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda16_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkColorButton* _tmp0_;
	_tmp0_ = self->priv->timecolor;
	budgie_show_time_widget_budgie_show_time_settings_set_hexcolor (self, _tmp0_, "timefontcolor");
}

static void
___lambda16__gtk_color_button_color_set (GtkColorButton* _sender,
                                         gpointer self)
{
	__lambda16_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda17_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkColorButton* _tmp0_;
	_tmp0_ = self->priv->datecolor;
	budgie_show_time_widget_budgie_show_time_settings_set_hexcolor (self, _tmp0_, "datefontcolor");
}

static void
___lambda17__gtk_color_button_color_set (GtkColorButton* _sender,
                                         gpointer self)
{
	__lambda17_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda18_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkFontButton* _tmp0_;
	_tmp0_ = self->priv->timefontbutton;
	budgie_show_time_widget_budgie_show_time_settings_set_newfont (self, _tmp0_, "timefont");
}

static void
___lambda18__gtk_font_button_font_set (GtkFontButton* _sender,
                                       gpointer self)
{
	__lambda18_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda19_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkFontButton* _tmp0_;
	_tmp0_ = self->priv->datefontbutton;
	budgie_show_time_widget_budgie_show_time_settings_set_newfont (self, _tmp0_, "datefont");
}

static void
___lambda19__gtk_font_button_font_set (GtkFontButton* _sender,
                                       gpointer self)
{
	__lambda19_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda20_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkCheckButton* _tmp0_;
	_tmp0_ = self->priv->leftalign;
	budgie_show_time_widget_budgie_show_time_settings_toggle_value (self, _tmp0_, "leftalign");
}

static void
___lambda20__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda20_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

static void
__lambda21_ (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkCheckButton* _tmp0_;
	_tmp0_ = self->priv->twelve_hrs;
	budgie_show_time_widget_budgie_show_time_settings_toggle_value (self, _tmp0_, "twelvehrs");
}

static void
___lambda21__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda21_ ((BudgieShowTimeWidgetBudgieShowTimeSettings*) self);
}

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_)) {
		BudgieShowTimeWidgetBudgieShowTimeSettings* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->b);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
____lambda22_ (Block1Data* _data1_)
{
	BudgieShowTimeWidgetBudgieShowTimeSettings* self;
	GtkRadioButton* _tmp0_;
	self = _data1_->self;
	_tmp0_ = _data1_->b;
	budgie_show_time_widget_budgie_show_time_settings_filter_active (self, (GtkToggleButton*) _tmp0_);
}

static void
_____lambda22__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                          gpointer self)
{
	____lambda22_ (self);
}

static void
budgie_show_time_widget_budgie_show_time_settings_connect_widgets (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	GtkSpinButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkColorButton* _tmp4_;
	GtkColorButton* _tmp5_;
	GtkFontButton* _tmp6_;
	GtkFontButton* _tmp7_;
	GtkCheckButton* _tmp8_;
	GtkCheckButton* _tmp9_;
	GtkRadioButton** _tmp10_;
	gint _tmp10__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->autopos;
	g_signal_connect_object ((GtkToggleButton*) _tmp0_, "toggled", (GCallback) _budgie_show_time_widget_budgie_show_time_settings_toggle_autopos_gtk_toggle_button_toggled, self, 0);
	_tmp1_ = self->priv->allmonitors;
	g_signal_connect_object ((GtkToggleButton*) _tmp1_, "toggled", (GCallback) _budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors_gtk_toggle_button_toggled, self, 0);
	_tmp2_ = self->priv->linespacing;
	g_signal_connect_object (_tmp2_, "value-changed", (GCallback) ___lambda5__gtk_spin_button_value_changed, self, 0);
	_tmp3_ = self->priv->dragbutton;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) _budgie_show_time_widget_budgie_show_time_settings_toggle_drag_gtk_button_clicked, self, 0);
	_tmp4_ = self->priv->timecolor;
	g_signal_connect_object (_tmp4_, "color-set", (GCallback) ___lambda16__gtk_color_button_color_set, self, 0);
	_tmp5_ = self->priv->datecolor;
	g_signal_connect_object (_tmp5_, "color-set", (GCallback) ___lambda17__gtk_color_button_color_set, self, 0);
	_tmp6_ = self->priv->timefontbutton;
	g_signal_connect_object (_tmp6_, "font-set", (GCallback) ___lambda18__gtk_font_button_font_set, self, 0);
	_tmp7_ = self->priv->datefontbutton;
	g_signal_connect_object (_tmp7_, "font-set", (GCallback) ___lambda19__gtk_font_button_font_set, self, 0);
	_tmp8_ = self->priv->leftalign;
	g_signal_connect_object ((GtkToggleButton*) _tmp8_, "toggled", (GCallback) ___lambda20__gtk_toggle_button_toggled, self, 0);
	_tmp9_ = self->priv->twelve_hrs;
	g_signal_connect_object ((GtkToggleButton*) _tmp9_, "toggled", (GCallback) ___lambda21__gtk_toggle_button_toggled, self, 0);
	_tmp10_ = self->priv->anchorbuttons;
	_tmp10__length1 = self->priv->anchorbuttons_length1;
	{
		GtkRadioButton** b_collection = NULL;
		gint b_collection_length1 = 0;
		gint _b_collection_size_ = 0;
		gint b_it = 0;
		b_collection = _tmp10_;
		b_collection_length1 = _tmp10__length1;
		for (b_it = 0; b_it < b_collection_length1; b_it = b_it + 1) {
			GtkRadioButton* _tmp11_;
			GtkRadioButton* b = NULL;
			_tmp11_ = _g_object_ref0 (b_collection[b_it]);
			b = _tmp11_;
			{
				Block1Data* _data1_;
				GtkRadioButton* _tmp12_;
				_data1_ = g_slice_new0 (Block1Data);
				_data1_->_ref_count_ = 1;
				_data1_->self = g_object_ref (self);
				_data1_->b = b;
				_tmp12_ = _data1_->b;
				g_signal_connect_data ((GtkToggleButton*) _tmp12_, "toggled", (GCallback) _____lambda22__gtk_toggle_button_toggled, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
				block1_data_unref (_data1_);
				_data1_ = NULL;
			}
		}
	}
}

static void
budgie_show_time_widget_budgie_show_time_settings_filter_active (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                 GtkToggleButton* button)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	if (gtk_toggle_button_get_active (button)) {
		budgie_show_time_widget_budgie_show_time_settings_set_anchor (self, button);
	}
}

static void
budgie_show_time_widget_budgie_show_time_settings_toggle_allmonitors (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                      GtkToggleButton* button)
{
	gboolean val = FALSE;
	GSettings* _tmp0_;
	XfwScreen* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	val = gtk_toggle_button_get_active (button);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_boolean (_tmp0_, "allmonitors", val);
	_tmp1_ = budgie_show_time_widget_xfw_screen;
	budgie_show_time_widget_surpass_primary = TRUE;
	budgie_show_time_widget_create_windows (_tmp1_, &budgie_show_time_widget_surpass_primary);
}

static void
budgie_show_time_widget_budgie_show_time_settings_toggle_autopos (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                  GtkToggleButton* button)
{
	gboolean val = FALSE;
	gboolean curr_allmons = FALSE;
	GtkCheckButton* _tmp0_;
	GtkRadioButton** _tmp17_;
	gint _tmp17__length1;
	GtkRadioButton* _tmp18_;
	GtkGrid* _tmp19_;
	GSettings* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	val = gtk_toggle_button_get_active (button);
	_tmp0_ = self->priv->allmonitors;
	curr_allmons = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	if (!val) {
		gint curr_x = 0;
		GSettings* _tmp1_;
		gint curr_y = 0;
		GSettings* _tmp2_;
		gboolean _tmp3_ = FALSE;
		GSettings* _tmp13_;
		_tmp1_ = budgie_show_time_widget_showtime_settings;
		curr_x = g_settings_get_int (_tmp1_, "xposition");
		_tmp2_ = budgie_show_time_widget_showtime_settings;
		curr_y = g_settings_get_int (_tmp2_, "yposition");
		if (curr_x == 0) {
			_tmp3_ = curr_y == 0;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			XfwMonitor* mon = NULL;
			XfwScreen* _tmp4_;
			XfwMonitor* _tmp5_;
			XfwMonitor* _tmp6_;
			GdkRectangle workarea = {0};
			XfwMonitor* _tmp7_;
			GdkRectangle _tmp8_ = {0};
			GSettings* _tmp9_;
			GdkRectangle _tmp10_;
			GSettings* _tmp11_;
			GdkRectangle _tmp12_;
			_tmp4_ = budgie_show_time_widget_xfw_screen;
			_tmp5_ = xfw_screen_get_primary_monitor (_tmp4_);
			_tmp6_ = _g_object_ref0 (_tmp5_);
			mon = _tmp6_;
			_tmp7_ = mon;
			xfw_monitor_get_workarea (_tmp7_, &_tmp8_);
			workarea = _tmp8_;
			_tmp9_ = budgie_show_time_widget_showtime_settings;
			_tmp10_ = workarea;
			g_settings_set_int (_tmp9_, "xposition", _tmp10_.width - 150);
			_tmp11_ = budgie_show_time_widget_showtime_settings;
			_tmp12_ = workarea;
			g_settings_set_int (_tmp11_, "yposition", _tmp12_.height - 150);
			_g_object_unref0 (mon);
		}
		_tmp13_ = budgie_show_time_widget_showtime_settings;
		g_settings_set_string (_tmp13_, "anchor", "se");
	} else {
		XfwScreen* _tmp14_;
		_tmp14_ = budgie_show_time_widget_xfw_screen;
		budgie_show_time_widget_surpass_primary = TRUE;
		budgie_show_time_widget_create_windows (_tmp14_, &budgie_show_time_widget_surpass_primary);
	}
	if (budgie_show_time_widget_n_monitors != 1) {
		GtkCheckButton* _tmp15_;
		_tmp15_ = self->priv->allmonitors;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, val);
	} else {
		GtkCheckButton* _tmp16_;
		_tmp16_ = self->priv->allmonitors;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp16_, FALSE);
	}
	_tmp17_ = self->priv->anchorbuttons;
	_tmp17__length1 = self->priv->anchorbuttons_length1;
	_tmp18_ = _tmp17_[2];
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp18_, TRUE);
	_tmp19_ = self->priv->anchorgrid;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp19_, !val);
	_tmp20_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_boolean (_tmp20_, "autoposition", val);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_hexcolor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                GtkColorButton* button,
                                                                const gchar* setting)
{
	GdkRGBA c = {0};
	GdkRGBA _tmp0_ = {0};
	gchar* s = NULL;
	GdkRGBA _tmp1_;
	GdkRGBA _tmp2_;
	GdkRGBA _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GSettings* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	gtk_color_chooser_get_rgba ((GtkColorChooser*) button, &_tmp0_);
	c = _tmp0_;
	_tmp1_ = c;
	_tmp2_ = c;
	_tmp3_ = c;
	_tmp4_ = g_strdup_printf ("#%02x%02x%02x", (guint) round (_tmp1_.red * 255), (guint) round (_tmp2_.green * 255), (guint) round (_tmp3_.blue * 255));
	_tmp5_ = _tmp4_;
	_tmp6_ = g_utf8_strup (_tmp5_, (gssize) -1);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	s = _tmp7_;
	_tmp8_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_string (_tmp8_, setting, s);
	_g_free0 (s);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_newfont (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                               GtkFontButton* button,
                                                               const gchar* newfont)
{
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (newfont != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	_tmp1_ = gtk_font_chooser_get_font ((GtkFontChooser*) button);
	_tmp2_ = _tmp1_;
	g_settings_set_string (_tmp0_, newfont, _tmp2_);
	_g_free0 (_tmp2_);
}

static void
budgie_show_time_widget_budgie_show_time_settings_toggle_value (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                GtkCheckButton* button,
                                                                const gchar* setting)
{
	gboolean newval = FALSE;
	GSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	newval = gtk_toggle_button_get_active ((GtkToggleButton*) button);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	g_settings_set_boolean (_tmp0_, setting, newval);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initialcolor (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                    GtkColorButton* button,
                                                                    const gchar* setting)
{
	GdkRGBA currcolor = {0};
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GdkRGBA _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (button != NULL);
	g_return_if_fail (setting != NULL);
	memset (&currcolor, 0, sizeof (GdkRGBA));
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, setting);
	_tmp2_ = _tmp1_;
	gdk_rgba_parse (&currcolor, _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = currcolor;
	gtk_color_chooser_set_rgba ((GtkColorChooser*) button, &_tmp3_);
}

static void
budgie_show_time_widget_budgie_show_time_settings_set_initialdrag (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	gboolean curr_draggable = FALSE;
	GSettings* _tmp0_;
	GtkButton* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = budgie_show_time_widget_showtime_settings;
	curr_draggable = g_settings_get_boolean (_tmp0_, "draggable");
	budgie_show_time_widget_budgie_show_time_settings_toggle_sensitive (self, !curr_draggable);
	_tmp1_ = self->priv->dragbutton;
	_tmp2_ = self->priv->dragposition;
	gtk_button_set_label (_tmp1_, _tmp2_);
	if (curr_draggable) {
		GtkButton* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = self->priv->dragbutton;
		_tmp4_ = self->priv->fixposition;
		gtk_button_set_label (_tmp3_, _tmp4_);
	}
}

static void
budgie_show_time_widget_budgie_show_time_settings_toggle_sensitive (BudgieShowTimeWidgetBudgieShowTimeSettings* self,
                                                                    gboolean active)
{
	GtkCheckButton* _tmp0_;
	GtkRadioButton** _tmp1_;
	gint _tmp1__length1;
	GtkFontButton* _tmp4_;
	GtkColorButton* _tmp5_;
	GtkFontButton* _tmp6_;
	GtkColorButton* _tmp7_;
	GtkCheckButton* _tmp8_;
	GtkCheckButton* _tmp9_;
	GtkSpinButton* _tmp10_;
	GtkLabel* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->autopos;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, active);
	_tmp1_ = self->priv->anchorbuttons;
	_tmp1__length1 = self->priv->anchorbuttons_length1;
	{
		GtkRadioButton** b_collection = NULL;
		gint b_collection_length1 = 0;
		gint _b_collection_size_ = 0;
		gint b_it = 0;
		b_collection = _tmp1_;
		b_collection_length1 = _tmp1__length1;
		for (b_it = 0; b_it < b_collection_length1; b_it = b_it + 1) {
			GtkRadioButton* _tmp2_;
			GtkRadioButton* b = NULL;
			_tmp2_ = _g_object_ref0 (b_collection[b_it]);
			b = _tmp2_;
			{
				GtkRadioButton* _tmp3_;
				_tmp3_ = b;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, active);
				_g_object_unref0 (b);
			}
		}
	}
	_tmp4_ = self->priv->datefontbutton;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, active);
	_tmp5_ = self->priv->datecolor;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, active);
	_tmp6_ = self->priv->timefontbutton;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, active);
	_tmp7_ = self->priv->timecolor;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp7_, active);
	_tmp8_ = self->priv->leftalign;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, active);
	_tmp9_ = self->priv->twelve_hrs;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, active);
	_tmp10_ = self->priv->linespacing;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, active);
	_tmp11_ = self->priv->spinlabel;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, active);
}

static void
budgie_show_time_widget_budgie_show_time_settings_toggle_drag (BudgieShowTimeWidgetBudgieShowTimeSettings* self)
{
	g_return_if_fail (self != NULL);
	budgie_show_time_widget_budgie_show_time_settings_show_position_picker (self);
}

static void
budgie_show_time_widget_budgie_show_time_settings_class_init (BudgieShowTimeWidgetBudgieShowTimeSettingsClass * klass,
                                                              gpointer klass_data)
{
	budgie_show_time_widget_budgie_show_time_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieShowTimeWidgetBudgieShowTimeSettings_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_show_time_widget_budgie_show_time_settings_finalize;
}

static void
budgie_show_time_widget_budgie_show_time_settings_instance_init (BudgieShowTimeWidgetBudgieShowTimeSettings * self,
                                                                 gpointer klass)
{
	self->priv = budgie_show_time_widget_budgie_show_time_settings_get_instance_private (self);
	self->priv->settings = NULL;
}

static void
budgie_show_time_widget_budgie_show_time_settings_finalize (GObject * obj)
{
	BudgieShowTimeWidgetBudgieShowTimeSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_SHOW_TIME_WIDGET_TYPE_BUDGIE_SHOW_TIME_SETTINGS, BudgieShowTimeWidgetBudgieShowTimeSettings);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->dragbutton);
	self->priv->anchorbuttons = (_vala_array_free (self->priv->anchorbuttons, self->priv->anchorbuttons_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->anchors = (_vala_array_free (self->priv->anchors, self->priv->anchors_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->curr_anchor);
	_g_object_unref0 (self->priv->leftalign);
	_g_object_unref0 (self->priv->twelve_hrs);
	_g_object_unref0 (self->priv->timefontbutton);
	_g_object_unref0 (self->priv->datefontbutton);
	_g_object_unref0 (self->priv->timecolor);
	_g_object_unref0 (self->priv->datecolor);
	_g_object_unref0 (self->priv->linespacing);
	_g_object_unref0 (self->priv->draghint);
	_g_free0 (self->priv->dragposition);
	_g_free0 (self->priv->fixposition);
	_g_object_unref0 (self->priv->anchorgrid);
	_g_object_unref0 (self->priv->autopos);
	_g_object_unref0 (self->priv->allmonitors);
	_g_object_unref0 (self->priv->spinlabel);
	_g_object_unref0 (self->priv->gdkscreen);
	G_OBJECT_CLASS (budgie_show_time_widget_budgie_show_time_settings_parent_class)->finalize (obj);
}

GType
budgie_show_time_widget_budgie_show_time_settings_get_type (void)
{
	return budgie_show_time_widget_budgie_show_time_settings_type_id;
}

GType
budgie_show_time_widget_budgie_show_time_settings_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShowTimeWidgetBudgieShowTimeSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_show_time_widget_budgie_show_time_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShowTimeWidgetBudgieShowTimeSettings), 0, (GInstanceInitFunc) budgie_show_time_widget_budgie_show_time_settings_instance_init, NULL };
	budgie_show_time_widget_budgie_show_time_settings_type_id = g_type_module_register_type (module, gtk_grid_get_type (), "BudgieShowTimeWidgetBudgieShowTimeSettings", &g_define_type_info, 0);
	BudgieShowTimeWidgetBudgieShowTimeSettings_private_offset = sizeof (BudgieShowTimeWidgetBudgieShowTimeSettingsPrivate);
	return budgie_show_time_widget_budgie_show_time_settings_type_id;
}

static inline gpointer
budgie_show_time_widget_position_picker_dialog_get_instance_private (BudgieShowTimeWidgetPositionPickerDialog* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieShowTimeWidgetPositionPickerDialog_private_offset);
}

BudgieShowTimeWidgetPositionPickerDialog*
budgie_show_time_widget_position_picker_dialog_construct (GType object_type,
                                                          GSettings* showtime_settings)
{
	BudgieShowTimeWidgetPositionPickerDialog * self = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	GSettings* _tmp3_;
	gchar* _tmp4_;
	g_return_val_if_fail (showtime_settings != NULL, NULL);
	self = (BudgieShowTimeWidgetPositionPickerDialog*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (showtime_settings);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp0_;
	gtk_window_set_title ((GtkWindow*) self, _ ("Choose ShowTime Position"));
	gtk_window_set_default_size ((GtkWindow*) self, 700, 550);
	gtk_window_set_modal ((GtkWindow*) self, TRUE);
	gtk_window_set_position ((GtkWindow*) self, GTK_WIN_POS_CENTER);
	gtk_window_set_destroy_with_parent ((GtkWindow*) self, TRUE);
	_tmp1_ = self->priv->settings;
	self->priv->selected_x = g_settings_get_int (_tmp1_, "xposition");
	_tmp2_ = self->priv->settings;
	self->priv->selected_y = g_settings_get_int (_tmp2_, "yposition");
	_tmp3_ = self->priv->settings;
	_tmp4_ = g_settings_get_string (_tmp3_, "anchor");
	_g_free0 (self->priv->current_anchor);
	self->priv->current_anchor = _tmp4_;
	budgie_show_time_widget_position_picker_dialog_get_screen_dimensions (self);
	self->priv->scale_factor = ((gdouble) self->priv->canvas_width) / ((gdouble) self->priv->screen_width);
	if ((((gdouble) self->priv->canvas_height) / ((gdouble) self->priv->screen_height)) < self->priv->scale_factor) {
		self->priv->scale_factor = ((gdouble) self->priv->canvas_height) / ((gdouble) self->priv->screen_height);
	}
	budgie_show_time_widget_position_picker_dialog_setup_ui (self);
	return self;
}

BudgieShowTimeWidgetPositionPickerDialog*
budgie_show_time_widget_position_picker_dialog_new (GSettings* showtime_settings)
{
	return budgie_show_time_widget_position_picker_dialog_construct (BUDGIE_SHOW_TIME_WIDGET_TYPE_POSITION_PICKER_DIALOG, showtime_settings);
}

static void
budgie_show_time_widget_position_picker_dialog_get_screen_dimensions (BudgieShowTimeWidgetPositionPickerDialog* self)
{
	XfwScreen* xfw_screen = NULL;
	XfwScreen* _tmp0_;
	XfwMonitor* mon = NULL;
	XfwScreen* _tmp1_;
	XfwMonitor* _tmp2_;
	XfwMonitor* _tmp3_;
	XfwMonitor* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = xfw_screen_get_default ();
	xfw_screen = _tmp0_;
	_tmp1_ = xfw_screen;
	_tmp2_ = xfw_screen_get_primary_monitor (_tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	mon = _tmp3_;
	_tmp4_ = mon;
	if (_tmp4_ != NULL) {
		GdkRectangle workarea = {0};
		XfwMonitor* _tmp5_;
		GdkRectangle _tmp6_ = {0};
		GdkRectangle _tmp7_;
		GdkRectangle _tmp8_;
		_tmp5_ = mon;
		xfw_monitor_get_workarea (_tmp5_, &_tmp6_);
		workarea = _tmp6_;
		_tmp7_ = workarea;
		self->priv->screen_width = _tmp7_.width;
		_tmp8_ = workarea;
		self->priv->screen_height = _tmp8_.height;
		_g_object_unref0 (mon);
		_g_object_unref0 (xfw_screen);
		return;
	}
	self->priv->screen_width = 800;
	self->priv->screen_height = 600;
	_g_object_unref0 (mon);
	_g_object_unref0 (xfw_screen);
}

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_)) {
		BudgieShowTimeWidgetPositionPickerDialog* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->y_spin);
		_g_object_unref0 (_data2_->x_spin);
		_g_object_unref0 (_data2_->se_radio);
		_g_object_unref0 (_data2_->sw_radio);
		_g_object_unref0 (_data2_->ne_radio);
		_g_object_unref0 (_data2_->nw_radio);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static gboolean
_budgie_show_time_widget_position_picker_dialog_on_draw_gtk_widget_draw (GtkWidget* _sender,
                                                                         cairo_t* cr,
                                                                         gpointer self)
{
	gboolean result;
	result = budgie_show_time_widget_position_picker_dialog_on_draw ((BudgieShowTimeWidgetPositionPickerDialog*) self, _sender, cr);
	return result;
}

static gboolean
_budgie_show_time_widget_position_picker_dialog_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                               GdkEventButton* event,
                                                                                               gpointer self)
{
	gboolean result;
	result = budgie_show_time_widget_position_picker_dialog_on_button_press ((BudgieShowTimeWidgetPositionPickerDialog*) self, event);
	return result;
}

static gboolean
_budgie_show_time_widget_position_picker_dialog_on_motion_gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                                                          GdkEventMotion* event,
                                                                                          gpointer self)
{
	gboolean result;
	result = budgie_show_time_widget_position_picker_dialog_on_motion ((BudgieShowTimeWidgetPositionPickerDialog*) self, event);
	return result;
}

static gboolean
_budgie_show_time_widget_position_picker_dialog_on_leave_gtk_widget_leave_notify_event (GtkWidget* _sender,
                                                                                        GdkEventCrossing* event,
                                                                                        gpointer self)
{
	gboolean result;
	result = budgie_show_time_widget_position_picker_dialog_on_leave ((BudgieShowTimeWidgetPositionPickerDialog*) self, event);
	return result;
}

static void
__lambda6_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkRadioButton* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->nw_radio;
	if (gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_)) {
		gchar* _tmp1_;
		GtkDrawingArea* _tmp2_;
		_tmp1_ = g_strdup ("nw");
		_g_free0 (self->priv->current_anchor);
		self->priv->current_anchor = _tmp1_;
		_tmp2_ = self->priv->canvas;
		gtk_widget_queue_draw ((GtkWidget*) _tmp2_);
	}
}

static void
___lambda6__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                       gpointer self)
{
	__lambda6_ (self);
}

static void
__lambda7_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkRadioButton* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->ne_radio;
	if (gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_)) {
		gchar* _tmp1_;
		GtkDrawingArea* _tmp2_;
		_tmp1_ = g_strdup ("ne");
		_g_free0 (self->priv->current_anchor);
		self->priv->current_anchor = _tmp1_;
		_tmp2_ = self->priv->canvas;
		gtk_widget_queue_draw ((GtkWidget*) _tmp2_);
	}
}

static void
___lambda7__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                       gpointer self)
{
	__lambda7_ (self);
}

static void
__lambda8_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkRadioButton* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->sw_radio;
	if (gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_)) {
		gchar* _tmp1_;
		GtkDrawingArea* _tmp2_;
		_tmp1_ = g_strdup ("sw");
		_g_free0 (self->priv->current_anchor);
		self->priv->current_anchor = _tmp1_;
		_tmp2_ = self->priv->canvas;
		gtk_widget_queue_draw ((GtkWidget*) _tmp2_);
	}
}

static void
___lambda8__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                       gpointer self)
{
	__lambda8_ (self);
}

static void
__lambda9_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkRadioButton* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->se_radio;
	if (gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_)) {
		gchar* _tmp1_;
		GtkDrawingArea* _tmp2_;
		_tmp1_ = g_strdup ("se");
		_g_free0 (self->priv->current_anchor);
		self->priv->current_anchor = _tmp1_;
		_tmp2_ = self->priv->canvas;
		gtk_widget_queue_draw ((GtkWidget*) _tmp2_);
	}
}

static void
___lambda9__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                       gpointer self)
{
	__lambda9_ (self);
}

static void
__lambda10_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkDrawingArea* _tmp0_;
	self = _data2_->self;
	self->priv->selected_x = (gint) gtk_spin_button_get_value (_data2_->x_spin);
	_tmp0_ = self->priv->canvas;
	gtk_widget_queue_draw ((GtkWidget*) _tmp0_);
}

static void
___lambda10__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda10_ (self);
}

static void
__lambda11_ (Block2Data* _data2_)
{
	BudgieShowTimeWidgetPositionPickerDialog* self;
	GtkDrawingArea* _tmp0_;
	self = _data2_->self;
	self->priv->selected_y = (gint) gtk_spin_button_get_value (_data2_->y_spin);
	_tmp0_ = self->priv->canvas;
	gtk_widget_queue_draw ((GtkWidget*) _tmp0_);
}

static void
___lambda11__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda11_ (self);
}

static void
__lambda12_ (BudgieShowTimeWidgetPositionPickerDialog* self)
{
	gtk_window_close ((GtkWindow*) self);
}

static void
___lambda12__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda12_ ((BudgieShowTimeWidgetPositionPickerDialog*) self);
}

static void
__lambda13_ (BudgieShowTimeWidgetPositionPickerDialog* self)
{
	const gchar* _tmp0_;
	_tmp0_ = self->priv->current_anchor;
	g_signal_emit (self, budgie_show_time_widget_position_picker_dialog_signals[BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_POSITION_SELECTED_SIGNAL], 0, self->priv->selected_x, self->priv->selected_y, _tmp0_);
	gtk_window_close ((GtkWindow*) self);
}

static void
___lambda13__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda13_ ((BudgieShowTimeWidgetPositionPickerDialog*) self);
}

static gboolean
__lambda14_ (BudgieShowTimeWidgetPositionPickerDialog* self,
             GdkEventKey* event)
{
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	if (event->keyval == GDK_KEY_Escape) {
		gtk_window_close ((GtkWindow*) self);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda14__gtk_widget_key_press_event (GtkWidget* _sender,
                                         GdkEventKey* event,
                                         gpointer self)
{
	gboolean result;
	result = __lambda14_ ((BudgieShowTimeWidgetPositionPickerDialog*) self, event);
	return result;
}

static void
budgie_show_time_widget_position_picker_dialog_setup_ui (BudgieShowTimeWidgetPositionPickerDialog* self)
{
	Block2Data* _data2_;
	GtkBox* main_box = NULL;
	GtkBox* _tmp0_;
	GtkBox* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkLabel* instructions = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkBox* _tmp11_;
	GtkLabel* _tmp12_;
	GtkFrame* frame = NULL;
	GtkFrame* _tmp13_;
	GtkFrame* _tmp14_;
	GtkBox* _tmp15_;
	GtkFrame* _tmp16_;
	GtkDrawingArea* _tmp17_;
	GtkDrawingArea* _tmp18_;
	GtkDrawingArea* _tmp19_;
	GtkFrame* _tmp20_;
	GtkDrawingArea* _tmp21_;
	GtkDrawingArea* _tmp22_;
	GtkDrawingArea* _tmp23_;
	GtkDrawingArea* _tmp24_;
	GtkDrawingArea* _tmp25_;
	GtkBox* info_box = NULL;
	GtkBox* _tmp26_;
	GtkBox* _tmp27_;
	GtkBox* _tmp28_;
	GtkLabel* info_label = NULL;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	GtkBox* _tmp37_;
	GtkLabel* _tmp38_;
	GtkBox* anchor_box = NULL;
	GtkBox* _tmp39_;
	GtkBox* _tmp40_;
	GtkBox* _tmp41_;
	GtkLabel* anchor_label = NULL;
	GtkLabel* _tmp42_;
	GtkBox* _tmp43_;
	GtkLabel* _tmp44_;
	GtkRadioButton* _tmp45_;
	GtkRadioButton* _tmp46_;
	GtkRadioButton* _tmp47_;
	GtkRadioButton* _tmp48_;
	GtkRadioButton* _tmp49_;
	GtkRadioButton* _tmp50_;
	GtkRadioButton* _tmp51_;
	GtkRadioButton* _tmp52_;
	GtkRadioButton* _tmp53_;
	GtkRadioButton* _tmp54_;
	GtkRadioButton* _tmp55_;
	GtkBox* _tmp56_;
	GtkRadioButton* _tmp57_;
	GtkBox* _tmp58_;
	GtkRadioButton* _tmp59_;
	GtkBox* _tmp60_;
	GtkRadioButton* _tmp61_;
	GtkBox* _tmp62_;
	GtkRadioButton* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	GQuark _tmp67_ = 0U;
	static GQuark _tmp66_label0 = 0;
	static GQuark _tmp66_label1 = 0;
	static GQuark _tmp66_label2 = 0;
	static GQuark _tmp66_label3 = 0;
	GtkRadioButton* _tmp72_;
	GtkRadioButton* _tmp73_;
	GtkRadioButton* _tmp74_;
	GtkRadioButton* _tmp75_;
	GtkBox* coords_box = NULL;
	GtkBox* _tmp76_;
	GtkBox* _tmp77_;
	GtkLabel* x_label = NULL;
	GtkLabel* _tmp78_;
	GtkSpinButton* _tmp79_;
	GtkLabel* y_label = NULL;
	GtkLabel* _tmp80_;
	GtkSpinButton* _tmp81_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp82_;
	GtkBox* _tmp83_;
	GtkButton* cancel_button = NULL;
	GtkButton* _tmp84_;
	GtkButton* apply_button = NULL;
	GtkButton* _tmp85_;
	GtkStyleContext* _tmp86_;
	g_return_if_fail (self != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	g_object_ref_sink (_tmp0_);
	main_box = _tmp0_;
	_tmp1_ = main_box;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, 10);
	_tmp2_ = main_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 10);
	_tmp3_ = main_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 10);
	_tmp4_ = main_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp4_, 10);
	_tmp5_ = main_box;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp5_);
	_tmp6_ = g_strconcat (_ ("Click on the preview below to position ShowTime.\n"), _ ("The blue rectangle represents your screen."), NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = (GtkLabel*) gtk_label_new (_tmp7_);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	instructions = _tmp9_;
	_tmp10_ = instructions;
	gtk_label_set_justify (_tmp10_, GTK_JUSTIFY_CENTER);
	_tmp11_ = main_box;
	_tmp12_ = instructions;
	gtk_box_pack_start (_tmp11_, (GtkWidget*) _tmp12_, FALSE, FALSE, (guint) 0);
	_tmp13_ = (GtkFrame*) gtk_frame_new (NULL);
	g_object_ref_sink (_tmp13_);
	frame = _tmp13_;
	_tmp14_ = frame;
	gtk_frame_set_shadow_type (_tmp14_, GTK_SHADOW_IN);
	_tmp15_ = main_box;
	_tmp16_ = frame;
	gtk_box_pack_start (_tmp15_, (GtkWidget*) _tmp16_, TRUE, TRUE, (guint) 0);
	_tmp17_ = (GtkDrawingArea*) gtk_drawing_area_new ();
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->canvas);
	self->priv->canvas = _tmp17_;
	_tmp18_ = self->priv->canvas;
	gtk_widget_set_size_request ((GtkWidget*) _tmp18_, self->priv->canvas_width, self->priv->canvas_height);
	_tmp19_ = self->priv->canvas;
	g_signal_connect_object ((GtkWidget*) _tmp19_, "draw", (GCallback) _budgie_show_time_widget_position_picker_dialog_on_draw_gtk_widget_draw, self, 0);
	_tmp20_ = frame;
	_tmp21_ = self->priv->canvas;
	gtk_container_add ((GtkContainer*) _tmp20_, (GtkWidget*) _tmp21_);
	_tmp22_ = self->priv->canvas;
	gtk_widget_add_events ((GtkWidget*) _tmp22_, (gint) ((GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK) | GDK_LEAVE_NOTIFY_MASK));
	_tmp23_ = self->priv->canvas;
	g_signal_connect_object ((GtkWidget*) _tmp23_, "button-press-event", (GCallback) _budgie_show_time_widget_position_picker_dialog_on_button_press_gtk_widget_button_press_event, self, 0);
	_tmp24_ = self->priv->canvas;
	g_signal_connect_object ((GtkWidget*) _tmp24_, "motion-notify-event", (GCallback) _budgie_show_time_widget_position_picker_dialog_on_motion_gtk_widget_motion_notify_event, self, 0);
	_tmp25_ = self->priv->canvas;
	g_signal_connect_object ((GtkWidget*) _tmp25_, "leave-notify-event", (GCallback) _budgie_show_time_widget_position_picker_dialog_on_leave_gtk_widget_leave_notify_event, self, 0);
	_tmp26_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp26_);
	info_box = _tmp26_;
	_tmp27_ = main_box;
	_tmp28_ = info_box;
	gtk_box_pack_start (_tmp27_, (GtkWidget*) _tmp28_, FALSE, FALSE, (guint) 0);
	_tmp29_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp29_);
	info_label = _tmp29_;
	_tmp30_ = info_label;
	_tmp31_ = g_strdup_printf (_ ("Screen: %d × %d | Click to select | ESC to cancel"), self->priv->screen_width, self->priv->screen_height);
	_tmp32_ = _tmp31_;
	_tmp33_ = g_strconcat ("<small>", _tmp32_, NULL);
	_tmp34_ = _tmp33_;
	_tmp35_ = g_strconcat (_tmp34_, "</small>", NULL);
	_tmp36_ = _tmp35_;
	gtk_label_set_markup (_tmp30_, _tmp36_);
	_g_free0 (_tmp36_);
	_g_free0 (_tmp34_);
	_g_free0 (_tmp32_);
	_tmp37_ = info_box;
	_tmp38_ = info_label;
	gtk_box_pack_start (_tmp37_, (GtkWidget*) _tmp38_, TRUE, TRUE, (guint) 0);
	_tmp39_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp39_);
	anchor_box = _tmp39_;
	_tmp40_ = main_box;
	_tmp41_ = anchor_box;
	gtk_box_pack_start (_tmp40_, (GtkWidget*) _tmp41_, FALSE, FALSE, (guint) 0);
	_tmp42_ = (GtkLabel*) gtk_label_new (_ ("Anchor:"));
	g_object_ref_sink (_tmp42_);
	anchor_label = _tmp42_;
	_tmp43_ = anchor_box;
	_tmp44_ = anchor_label;
	gtk_box_pack_start (_tmp43_, (GtkWidget*) _tmp44_, FALSE, FALSE, (guint) 0);
	_tmp45_ = (GtkRadioButton*) gtk_radio_button_new_with_label (NULL, _ ("↖ NW"));
	g_object_ref_sink (_tmp45_);
	_data2_->nw_radio = _tmp45_;
	_tmp46_ = _data2_->nw_radio;
	_tmp47_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (_tmp46_, _ ("↗ NE"));
	g_object_ref_sink (_tmp47_);
	_data2_->ne_radio = _tmp47_;
	_tmp48_ = _data2_->nw_radio;
	_tmp49_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (_tmp48_, _ ("↙ SW"));
	g_object_ref_sink (_tmp49_);
	_data2_->sw_radio = _tmp49_;
	_tmp50_ = _data2_->nw_radio;
	_tmp51_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (_tmp50_, _ ("↘ SE"));
	g_object_ref_sink (_tmp51_);
	_data2_->se_radio = _tmp51_;
	_tmp52_ = _data2_->nw_radio;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp52_, _ ("Anchor top-left, ShowTime expands right/down"));
	_tmp53_ = _data2_->ne_radio;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp53_, _ ("Anchor top-right, ShowTime expands left/down"));
	_tmp54_ = _data2_->sw_radio;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp54_, _ ("Anchor bottom-left, ShowTime expands right/up"));
	_tmp55_ = _data2_->se_radio;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp55_, _ ("Anchor bottom-right, ShowTime expands left/up"));
	_tmp56_ = anchor_box;
	_tmp57_ = _data2_->nw_radio;
	gtk_box_pack_start (_tmp56_, (GtkWidget*) _tmp57_, FALSE, FALSE, (guint) 0);
	_tmp58_ = anchor_box;
	_tmp59_ = _data2_->ne_radio;
	gtk_box_pack_start (_tmp58_, (GtkWidget*) _tmp59_, FALSE, FALSE, (guint) 0);
	_tmp60_ = anchor_box;
	_tmp61_ = _data2_->sw_radio;
	gtk_box_pack_start (_tmp60_, (GtkWidget*) _tmp61_, FALSE, FALSE, (guint) 0);
	_tmp62_ = anchor_box;
	_tmp63_ = _data2_->se_radio;
	gtk_box_pack_start (_tmp62_, (GtkWidget*) _tmp63_, FALSE, FALSE, (guint) 0);
	_tmp64_ = self->priv->current_anchor;
	_tmp65_ = _tmp64_;
	_tmp67_ = (NULL == _tmp65_) ? 0 : g_quark_from_string (_tmp65_);
	if (_tmp67_ == ((0 != _tmp66_label0) ? _tmp66_label0 : (_tmp66_label0 = g_quark_from_static_string ("nw")))) {
		switch (0) {
			default:
			{
				GtkRadioButton* _tmp68_;
				_tmp68_ = _data2_->nw_radio;
				gtk_toggle_button_set_active ((GtkToggleButton*) _tmp68_, TRUE);
				break;
			}
		}
	} else if (_tmp67_ == ((0 != _tmp66_label1) ? _tmp66_label1 : (_tmp66_label1 = g_quark_from_static_string ("ne")))) {
		switch (0) {
			default:
			{
				GtkRadioButton* _tmp69_;
				_tmp69_ = _data2_->ne_radio;
				gtk_toggle_button_set_active ((GtkToggleButton*) _tmp69_, TRUE);
				break;
			}
		}
	} else if (_tmp67_ == ((0 != _tmp66_label2) ? _tmp66_label2 : (_tmp66_label2 = g_quark_from_static_string ("sw")))) {
		switch (0) {
			default:
			{
				GtkRadioButton* _tmp70_;
				_tmp70_ = _data2_->sw_radio;
				gtk_toggle_button_set_active ((GtkToggleButton*) _tmp70_, TRUE);
				break;
			}
		}
	} else if (_tmp67_ == ((0 != _tmp66_label3) ? _tmp66_label3 : (_tmp66_label3 = g_quark_from_static_string ("se")))) {
		switch (0) {
			default:
			{
				GtkRadioButton* _tmp71_;
				_tmp71_ = _data2_->se_radio;
				gtk_toggle_button_set_active ((GtkToggleButton*) _tmp71_, TRUE);
				break;
			}
		}
	}
	_tmp72_ = _data2_->nw_radio;
	g_signal_connect_data ((GtkToggleButton*) _tmp72_, "toggled", (GCallback) ___lambda6__gtk_toggle_button_toggled, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp73_ = _data2_->ne_radio;
	g_signal_connect_data ((GtkToggleButton*) _tmp73_, "toggled", (GCallback) ___lambda7__gtk_toggle_button_toggled, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp74_ = _data2_->sw_radio;
	g_signal_connect_data ((GtkToggleButton*) _tmp74_, "toggled", (GCallback) ___lambda8__gtk_toggle_button_toggled, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp75_ = _data2_->se_radio;
	g_signal_connect_data ((GtkToggleButton*) _tmp75_, "toggled", (GCallback) ___lambda9__gtk_toggle_button_toggled, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp76_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp76_);
	coords_box = _tmp76_;
	_tmp77_ = main_box;
	gtk_box_pack_start (_tmp77_, (GtkWidget*) coords_box, FALSE, FALSE, (guint) 0);
	_tmp78_ = (GtkLabel*) gtk_label_new (_ ("X:"));
	g_object_ref_sink (_tmp78_);
	x_label = _tmp78_;
	gtk_box_pack_start (coords_box, (GtkWidget*) x_label, FALSE, FALSE, (guint) 0);
	_tmp79_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) self->priv->screen_width, (gdouble) 10);
	g_object_ref_sink (_tmp79_);
	_data2_->x_spin = _tmp79_;
	gtk_spin_button_set_value (_data2_->x_spin, (gdouble) self->priv->selected_x);
	g_signal_connect_data (_data2_->x_spin, "value-changed", (GCallback) ___lambda10__gtk_spin_button_value_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	gtk_box_pack_start (coords_box, (GtkWidget*) _data2_->x_spin, FALSE, FALSE, (guint) 0);
	_tmp80_ = (GtkLabel*) gtk_label_new (_ ("Y:"));
	g_object_ref_sink (_tmp80_);
	y_label = _tmp80_;
	gtk_box_pack_start (coords_box, (GtkWidget*) y_label, FALSE, FALSE, (guint) 0);
	_tmp81_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) self->priv->screen_height, (gdouble) 10);
	g_object_ref_sink (_tmp81_);
	_data2_->y_spin = _tmp81_;
	gtk_spin_button_set_value (_data2_->y_spin, (gdouble) self->priv->selected_y);
	g_signal_connect_data (_data2_->y_spin, "value-changed", (GCallback) ___lambda11__gtk_spin_button_value_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	gtk_box_pack_start (coords_box, (GtkWidget*) _data2_->y_spin, FALSE, FALSE, (guint) 0);
	_tmp82_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp82_);
	button_box = _tmp82_;
	gtk_widget_set_halign ((GtkWidget*) button_box, GTK_ALIGN_END);
	_tmp83_ = main_box;
	gtk_box_pack_start (_tmp83_, (GtkWidget*) button_box, FALSE, FALSE, (guint) 0);
	_tmp84_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	g_object_ref_sink (_tmp84_);
	cancel_button = _tmp84_;
	g_signal_connect_object (cancel_button, "clicked", (GCallback) ___lambda12__gtk_button_clicked, self, 0);
	gtk_box_pack_start (button_box, (GtkWidget*) cancel_button, FALSE, FALSE, (guint) 0);
	_tmp85_ = (GtkButton*) gtk_button_new_with_label (_ ("Apply Position"));
	g_object_ref_sink (_tmp85_);
	apply_button = _tmp85_;
	_tmp86_ = gtk_widget_get_style_context ((GtkWidget*) apply_button);
	gtk_style_context_add_class (_tmp86_, "suggested-action");
	g_signal_connect_object (apply_button, "clicked", (GCallback) ___lambda13__gtk_button_clicked, self, 0);
	gtk_box_pack_start (button_box, (GtkWidget*) apply_button, FALSE, FALSE, (guint) 0);
	g_signal_connect_object ((GtkWidget*) self, "key-press-event", (GCallback) ___lambda14__gtk_widget_key_press_event, self, 0);
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (apply_button);
	_g_object_unref0 (cancel_button);
	_g_object_unref0 (button_box);
	_g_object_unref0 (y_label);
	_g_object_unref0 (x_label);
	_g_object_unref0 (coords_box);
	_g_object_unref0 (anchor_label);
	_g_object_unref0 (anchor_box);
	_g_object_unref0 (info_label);
	_g_object_unref0 (info_box);
	_g_object_unref0 (frame);
	_g_object_unref0 (instructions);
	_g_object_unref0 (main_box);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}

static gboolean
budgie_show_time_widget_position_picker_dialog_on_draw (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                        GtkWidget* widget,
                                                        cairo_t* ctx)
{
	gint rect_width = 0;
	gint rect_height = 0;
	gint rect_x = 0;
	GtkDrawingArea* _tmp0_;
	gint rect_y = 0;
	GtkDrawingArea* _tmp1_;
	gint grid_spacing = 0;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (ctx != NULL, FALSE);
	cairo_set_source_rgb (ctx, 0.1, 0.1, 0.1);
	cairo_paint (ctx);
	rect_width = (gint) (self->priv->screen_width * self->priv->scale_factor);
	rect_height = (gint) (self->priv->screen_height * self->priv->scale_factor);
	_tmp0_ = self->priv->canvas;
	rect_x = (gtk_widget_get_allocated_width ((GtkWidget*) _tmp0_) - rect_width) / 2;
	_tmp1_ = self->priv->canvas;
	rect_y = (gtk_widget_get_allocated_height ((GtkWidget*) _tmp1_) - rect_height) / 2;
	cairo_set_source_rgb (ctx, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_R, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_G, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_B);
	cairo_set_line_width (ctx, 2.0);
	cairo_rectangle (ctx, (gdouble) rect_x, (gdouble) rect_y, (gdouble) rect_width, (gdouble) rect_height);
	cairo_stroke (ctx);
	cairo_set_source_rgba (ctx, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_R, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_G, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_GRID_COLOR_B, 0.3);
	cairo_set_line_width (ctx, 1.0);
	grid_spacing = 50;
	{
		gint x = 0;
		x = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint canvas_x = 0;
				if (!_tmp2_) {
					x += grid_spacing;
				}
				_tmp2_ = FALSE;
				if (!(x < self->priv->screen_width)) {
					break;
				}
				canvas_x = rect_x + ((gint) (x * self->priv->scale_factor));
				cairo_move_to (ctx, (gdouble) canvas_x, (gdouble) rect_y);
				cairo_line_to (ctx, (gdouble) canvas_x, (gdouble) (rect_y + rect_height));
			}
		}
	}
	{
		gint y = 0;
		y = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gint canvas_y = 0;
				if (!_tmp3_) {
					y += grid_spacing;
				}
				_tmp3_ = FALSE;
				if (!(y < self->priv->screen_height)) {
					break;
				}
				canvas_y = rect_y + ((gint) (y * self->priv->scale_factor));
				cairo_move_to (ctx, (gdouble) rect_x, (gdouble) canvas_y);
				cairo_line_to (ctx, (gdouble) (rect_x + rect_width), (gdouble) canvas_y);
			}
		}
	}
	cairo_stroke (ctx);
	if (self->priv->mouse_over) {
		budgie_show_time_widget_position_picker_dialog_draw_showtime_preview (self, ctx, rect_x, rect_y, self->priv->hover_x, self->priv->hover_y, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_R, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_G, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_HOVER_COLOR_B, 0.5);
	}
	budgie_show_time_widget_position_picker_dialog_draw_showtime_preview (self, ctx, rect_x, rect_y, self->priv->selected_x, self->priv->selected_y, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_R, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_G, BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_SELECTION_COLOR_B, 0.8);
	result = FALSE;
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static void
budgie_show_time_widget_position_picker_dialog_draw_showtime_preview (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                      cairo_t* ctx,
                                                                      gint rect_x,
                                                                      gint rect_y,
                                                                      gint pos_x,
                                                                      gint pos_y,
                                                                      gdouble r,
                                                                      gdouble g,
                                                                      gdouble b,
                                                                      gdouble alpha)
{
	gint canvas_x = 0;
	gint canvas_y = 0;
	gint canvas_w = 0;
	gint canvas_h = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint anchor_x = 0;
	gint anchor_y = 0;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* label = NULL;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	canvas_x = rect_x + ((gint) (pos_x * self->priv->scale_factor));
	canvas_y = rect_y + ((gint) (pos_y * self->priv->scale_factor));
	canvas_w = (gint) (self->priv->preview_width * self->priv->scale_factor);
	canvas_h = (gint) (self->priv->preview_height * self->priv->scale_factor);
	_tmp0_ = self->priv->current_anchor;
	if (string_contains (_tmp0_, "e")) {
		canvas_x -= canvas_w;
	}
	_tmp1_ = self->priv->current_anchor;
	if (string_contains (_tmp1_, "s")) {
		canvas_y -= canvas_h;
	}
	cairo_set_source_rgba (ctx, r, g, b, alpha);
	cairo_rectangle (ctx, (gdouble) canvas_x, (gdouble) canvas_y, (gdouble) canvas_w, (gdouble) canvas_h);
	cairo_fill (ctx);
	cairo_set_source_rgba (ctx, r, g, b, 1.0);
	cairo_set_line_width (ctx, 2.0);
	cairo_rectangle (ctx, (gdouble) canvas_x, (gdouble) canvas_y, (gdouble) canvas_w, (gdouble) canvas_h);
	cairo_stroke (ctx);
	anchor_x = canvas_x;
	anchor_y = canvas_y;
	_tmp2_ = self->priv->current_anchor;
	if (string_contains (_tmp2_, "e")) {
		anchor_x += canvas_w;
	}
	_tmp3_ = self->priv->current_anchor;
	if (string_contains (_tmp3_, "s")) {
		anchor_y += canvas_h;
	}
	cairo_set_source_rgba (ctx, 1.0, 1.0, 1.0, 0.8);
	cairo_set_line_width (ctx, 1.5);
	cairo_move_to (ctx, (gdouble) (anchor_x - 5), (gdouble) anchor_y);
	cairo_line_to (ctx, (gdouble) (anchor_x + 5), (gdouble) anchor_y);
	cairo_move_to (ctx, (gdouble) anchor_x, (gdouble) (anchor_y - 5));
	cairo_line_to (ctx, (gdouble) anchor_x, (gdouble) (anchor_y + 5));
	cairo_stroke (ctx);
	cairo_set_source_rgba (ctx, 1.0, 1.0, 1.0, alpha);
	cairo_select_font_face (ctx, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
	cairo_set_font_size (ctx, (gdouble) 10);
	_tmp4_ = g_strdup_printf ("%d, %d", pos_x, pos_y);
	label = _tmp4_;
	cairo_move_to (ctx, (gdouble) (canvas_x + 5), (gdouble) (canvas_y + 15));
	cairo_show_text (ctx, label);
	_g_free0 (label);
}

static gboolean
budgie_show_time_widget_position_picker_dialog_on_button_press (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                                GdkEventButton* event)
{
	gint rect_width = 0;
	gint rect_height = 0;
	gint rect_x = 0;
	GtkDrawingArea* _tmp0_;
	gint rect_y = 0;
	GtkDrawingArea* _tmp1_;
	gint click_x = 0;
	gint click_y = 0;
	GtkDrawingArea* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	rect_width = (gint) (self->priv->screen_width * self->priv->scale_factor);
	rect_height = (gint) (self->priv->screen_height * self->priv->scale_factor);
	_tmp0_ = self->priv->canvas;
	rect_x = (gtk_widget_get_allocated_width ((GtkWidget*) _tmp0_) - rect_width) / 2;
	_tmp1_ = self->priv->canvas;
	rect_y = (gtk_widget_get_allocated_height ((GtkWidget*) _tmp1_) - rect_height) / 2;
	click_x = (gint) ((event->x - rect_x) / self->priv->scale_factor);
	click_y = (gint) ((event->y - rect_y) / self->priv->scale_factor);
	if (click_x < 0) {
		click_x = 0;
	}
	if (click_x > self->priv->screen_width) {
		click_x = self->priv->screen_width;
	}
	if (click_y < 0) {
		click_y = 0;
	}
	if (click_y > self->priv->screen_height) {
		click_y = self->priv->screen_height;
	}
	self->priv->selected_x = click_x;
	self->priv->selected_y = click_y;
	_tmp2_ = self->priv->canvas;
	gtk_widget_queue_draw ((GtkWidget*) _tmp2_);
	result = TRUE;
	return result;
}

static gboolean
budgie_show_time_widget_position_picker_dialog_on_motion (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                          GdkEventMotion* event)
{
	gint rect_width = 0;
	gint rect_height = 0;
	gint rect_x = 0;
	GtkDrawingArea* _tmp0_;
	gint rect_y = 0;
	GtkDrawingArea* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	GtkDrawingArea* _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	rect_width = (gint) (self->priv->screen_width * self->priv->scale_factor);
	rect_height = (gint) (self->priv->screen_height * self->priv->scale_factor);
	_tmp0_ = self->priv->canvas;
	rect_x = (gtk_widget_get_allocated_width ((GtkWidget*) _tmp0_) - rect_width) / 2;
	_tmp1_ = self->priv->canvas;
	rect_y = (gtk_widget_get_allocated_height ((GtkWidget*) _tmp1_) - rect_height) / 2;
	if (event->x >= ((gdouble) rect_x)) {
		_tmp4_ = event->x <= ((gdouble) (rect_x + rect_width));
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = event->y >= ((gdouble) rect_y);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = event->y <= ((gdouble) (rect_y + rect_height));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		self->priv->mouse_over = TRUE;
		self->priv->hover_x = (gint) ((event->x - rect_x) / self->priv->scale_factor);
		self->priv->hover_y = (gint) ((event->y - rect_y) / self->priv->scale_factor);
	} else {
		self->priv->mouse_over = FALSE;
	}
	_tmp5_ = self->priv->canvas;
	gtk_widget_queue_draw ((GtkWidget*) _tmp5_);
	result = TRUE;
	return result;
}

static gboolean
budgie_show_time_widget_position_picker_dialog_on_leave (BudgieShowTimeWidgetPositionPickerDialog* self,
                                                         GdkEventCrossing* event)
{
	GtkDrawingArea* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	self->priv->mouse_over = FALSE;
	_tmp0_ = self->priv->canvas;
	gtk_widget_queue_draw ((GtkWidget*) _tmp0_);
	result = FALSE;
	return result;
}

static void
g_cclosure_user_marshal_VOID__INT_INT_STRING (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__INT_INT_STRING) (gpointer data1, gint arg_1, gint arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__INT_INT_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__INT_INT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
budgie_show_time_widget_position_picker_dialog_class_init (BudgieShowTimeWidgetPositionPickerDialogClass * klass,
                                                           gpointer klass_data)
{
	budgie_show_time_widget_position_picker_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieShowTimeWidgetPositionPickerDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_show_time_widget_position_picker_dialog_finalize;
	budgie_show_time_widget_position_picker_dialog_signals[BUDGIE_SHOW_TIME_WIDGET_POSITION_PICKER_DIALOG_POSITION_SELECTED_SIGNAL] = g_signal_new ("position-selected", BUDGIE_SHOW_TIME_WIDGET_TYPE_POSITION_PICKER_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT_STRING, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
}

static void
budgie_show_time_widget_position_picker_dialog_instance_init (BudgieShowTimeWidgetPositionPickerDialog * self,
                                                              gpointer klass)
{
	self->priv = budgie_show_time_widget_position_picker_dialog_get_instance_private (self);
	self->priv->preview_width = 120;
	self->priv->preview_height = 60;
	self->priv->mouse_over = FALSE;
	self->priv->hover_x = 0;
	self->priv->hover_y = 0;
	self->priv->canvas_width = 600;
	self->priv->canvas_height = 400;
}

static void
budgie_show_time_widget_position_picker_dialog_finalize (GObject * obj)
{
	BudgieShowTimeWidgetPositionPickerDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_SHOW_TIME_WIDGET_TYPE_POSITION_PICKER_DIALOG, BudgieShowTimeWidgetPositionPickerDialog);
	_g_object_unref0 (self->priv->canvas);
	_g_object_unref0 (self->priv->settings);
	_g_free0 (self->priv->current_anchor);
	G_OBJECT_CLASS (budgie_show_time_widget_position_picker_dialog_parent_class)->finalize (obj);
}

GType
budgie_show_time_widget_position_picker_dialog_get_type (void)
{
	return budgie_show_time_widget_position_picker_dialog_type_id;
}

GType
budgie_show_time_widget_position_picker_dialog_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShowTimeWidgetPositionPickerDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_show_time_widget_position_picker_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShowTimeWidgetPositionPickerDialog), 0, (GInstanceInitFunc) budgie_show_time_widget_position_picker_dialog_instance_init, NULL };
	budgie_show_time_widget_position_picker_dialog_type_id = g_type_module_register_type (module, gtk_window_get_type (), "BudgieShowTimeWidgetPositionPickerDialog", &g_define_type_info, 0);
	BudgieShowTimeWidgetPositionPickerDialog_private_offset = sizeof (BudgieShowTimeWidgetPositionPickerDialogPrivate);
	return budgie_show_time_widget_position_picker_dialog_type_id;
}

static BudgieRavenWidget*
budgie_show_time_widget_showtime_raven_plugin_real_new_widget_instance (BudgieRavenPlugin* base,
                                                                        const gchar* uuid,
                                                                        GSettings* settings)
{
	BudgieShowTimeWidgetShowtimeRavenPlugin * self;
	PeasPluginInfo* info = NULL;
	PeasPluginInfo* _tmp0_;
	PeasPluginInfo* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	BudgieShowTimeWidgetShowTimeRavenWidget* _tmp4_;
	BudgieRavenWidget* result;
	self = (BudgieShowTimeWidgetShowtimeRavenPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = peas_extension_base_get_plugin_info ((PeasExtensionBase*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	info = _tmp1_;
	_tmp2_ = peas_plugin_info_get_module_dir (info);
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (budgie_show_time_widget_moduledir);
	budgie_show_time_widget_moduledir = _tmp3_;
	_tmp4_ = budgie_show_time_widget_show_time_raven_widget_new (uuid, settings);
	g_object_ref_sink (_tmp4_);
	result = (BudgieRavenWidget*) _tmp4_;
	_g_object_unref0 (info);
	return result;
}

static gboolean
budgie_show_time_widget_showtime_raven_plugin_real_supports_settings (BudgieRavenPlugin* base)
{
	BudgieShowTimeWidgetShowtimeRavenPlugin * self;
	gboolean result;
	self = (BudgieShowTimeWidgetShowtimeRavenPlugin*) base;
	result = TRUE;
	return result;
}

BudgieShowTimeWidgetShowtimeRavenPlugin*
budgie_show_time_widget_showtime_raven_plugin_construct (GType object_type)
{
	BudgieShowTimeWidgetShowtimeRavenPlugin * self = NULL;
	self = (BudgieShowTimeWidgetShowtimeRavenPlugin*) g_object_new (object_type, NULL);
	return self;
}

BudgieShowTimeWidgetShowtimeRavenPlugin*
budgie_show_time_widget_showtime_raven_plugin_new (void)
{
	return budgie_show_time_widget_showtime_raven_plugin_construct (BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOWTIME_RAVEN_PLUGIN);
}

static void
budgie_show_time_widget_showtime_raven_plugin_class_init (BudgieShowTimeWidgetShowtimeRavenPluginClass * klass,
                                                          gpointer klass_data)
{
	budgie_show_time_widget_showtime_raven_plugin_parent_class = g_type_class_peek_parent (klass);
}

static void
budgie_show_time_widget_showtime_raven_plugin_budgie_raven_plugin_interface_init (BudgieRavenPluginIface * iface,
                                                                                  gpointer iface_data)
{
	budgie_show_time_widget_showtime_raven_plugin_budgie_raven_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->new_widget_instance = (BudgieRavenWidget* (*) (BudgieRavenPlugin*, const gchar*, GSettings*)) budgie_show_time_widget_showtime_raven_plugin_real_new_widget_instance;
	iface->supports_settings = (gboolean (*) (BudgieRavenPlugin*)) budgie_show_time_widget_showtime_raven_plugin_real_supports_settings;
}

static void
budgie_show_time_widget_showtime_raven_plugin_instance_init (BudgieShowTimeWidgetShowtimeRavenPlugin * self,
                                                             gpointer klass)
{
}

GType
budgie_show_time_widget_showtime_raven_plugin_get_type (void)
{
	return budgie_show_time_widget_showtime_raven_plugin_type_id;
}

GType
budgie_show_time_widget_showtime_raven_plugin_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShowTimeWidgetShowtimeRavenPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_show_time_widget_showtime_raven_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShowTimeWidgetShowtimeRavenPlugin), 0, (GInstanceInitFunc) budgie_show_time_widget_showtime_raven_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_raven_plugin_info = { (GInterfaceInitFunc) budgie_show_time_widget_showtime_raven_plugin_budgie_raven_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	budgie_show_time_widget_showtime_raven_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "BudgieShowTimeWidgetShowtimeRavenPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, budgie_show_time_widget_showtime_raven_plugin_type_id, budgie_raven_plugin_get_type (), &budgie_raven_plugin_info);
	return budgie_show_time_widget_showtime_raven_plugin_type_id;
}

static inline gpointer
budgie_show_time_widget_show_time_raven_widget_get_instance_private (BudgieShowTimeWidgetShowTimeRavenWidget* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieShowTimeWidgetShowTimeRavenWidget_private_offset);
}

BudgieShowTimeWidgetShowTimeRavenWidget*
budgie_show_time_widget_show_time_raven_widget_construct (GType object_type,
                                                          const gchar* uuid,
                                                          GSettings* settings)
{
	BudgieShowTimeWidgetShowTimeRavenWidget * self = NULL;
	BudgieShowTimeWidgetShowTimeMain* showtime = NULL;
	BudgieShowTimeWidgetShowTimeMain* _tmp0_;
	g_return_val_if_fail (uuid != NULL, NULL);
	self = (BudgieShowTimeWidgetShowTimeRavenWidget*) g_object_new (object_type, NULL);
	_tmp0_ = budgie_show_time_widget_show_time_main_new (uuid, settings);
	showtime = _tmp0_;
	budgie_show_time_widget_show_time_raven_widget_initialiseLocaleLanguageSupport (self);
	_g_object_unref0 (showtime);
	return self;
}

BudgieShowTimeWidgetShowTimeRavenWidget*
budgie_show_time_widget_show_time_raven_widget_new (const gchar* uuid,
                                                    GSettings* settings)
{
	return budgie_show_time_widget_show_time_raven_widget_construct (BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_RAVEN_WIDGET, uuid, settings);
}

void
budgie_show_time_widget_show_time_raven_widget_initialiseLocaleLanguageSupport (BudgieShowTimeWidgetShowTimeRavenWidget* 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 GtkWidget*
budgie_show_time_widget_show_time_raven_widget_real_build_settings_ui (BudgieRavenWidget* base)
{
	BudgieShowTimeWidgetShowTimeRavenWidget * self;
	GSettings* _tmp0_;
	BudgieShowTimeWidgetBudgieShowTimeSettings* _tmp1_;
	GtkWidget* result;
	self = (BudgieShowTimeWidgetShowTimeRavenWidget*) base;
	_tmp0_ = budgie_raven_widget_get_instance_settings ((BudgieRavenWidget*) self);
	_tmp1_ = budgie_show_time_widget_budgie_show_time_settings_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	result = (GtkWidget*) _tmp1_;
	return result;
}

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

void
budgie_show_time_widget_show_time_raven_widget_set_uuid (BudgieShowTimeWidgetShowTimeRavenWidget* self,
                                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = budgie_show_time_widget_show_time_raven_widget_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, budgie_show_time_widget_show_time_raven_widget_properties[BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY]);
	}
}

static void
budgie_show_time_widget_show_time_raven_widget_class_init (BudgieShowTimeWidgetShowTimeRavenWidgetClass * klass,
                                                           gpointer klass_data)
{
	budgie_show_time_widget_show_time_raven_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieShowTimeWidgetShowTimeRavenWidget_private_offset);
	((BudgieRavenWidgetClass *) klass)->build_settings_ui = (GtkWidget* (*) (BudgieRavenWidget*)) budgie_show_time_widget_show_time_raven_widget_real_build_settings_ui;
	G_OBJECT_CLASS (klass)->get_property = _vala_budgie_show_time_widget_show_time_raven_widget_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_budgie_show_time_widget_show_time_raven_widget_set_property;
	G_OBJECT_CLASS (klass)->finalize = budgie_show_time_widget_show_time_raven_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY, budgie_show_time_widget_show_time_raven_widget_properties[BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY] = g_param_spec_string ("uuid", "uuid", "uuid", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
budgie_show_time_widget_show_time_raven_widget_instance_init (BudgieShowTimeWidgetShowTimeRavenWidget * self,
                                                              gpointer klass)
{
	self->priv = budgie_show_time_widget_show_time_raven_widget_get_instance_private (self);
}

static void
budgie_show_time_widget_show_time_raven_widget_finalize (GObject * obj)
{
	BudgieShowTimeWidgetShowTimeRavenWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_RAVEN_WIDGET, BudgieShowTimeWidgetShowTimeRavenWidget);
	_g_free0 (self->priv->_uuid);
	G_OBJECT_CLASS (budgie_show_time_widget_show_time_raven_widget_parent_class)->finalize (obj);
}

GType
budgie_show_time_widget_show_time_raven_widget_get_type (void)
{
	return budgie_show_time_widget_show_time_raven_widget_type_id;
}

GType
budgie_show_time_widget_show_time_raven_widget_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShowTimeWidgetShowTimeRavenWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_show_time_widget_show_time_raven_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShowTimeWidgetShowTimeRavenWidget), 0, (GInstanceInitFunc) budgie_show_time_widget_show_time_raven_widget_instance_init, NULL };
	budgie_show_time_widget_show_time_raven_widget_type_id = g_type_module_register_type (module, budgie_raven_widget_get_type (), "BudgieShowTimeWidgetShowTimeRavenWidget", &g_define_type_info, 0);
	BudgieShowTimeWidgetShowTimeRavenWidget_private_offset = sizeof (BudgieShowTimeWidgetShowTimeRavenWidgetPrivate);
	return budgie_show_time_widget_show_time_raven_widget_type_id;
}

static void
_vala_budgie_show_time_widget_show_time_raven_widget_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec)
{
	BudgieShowTimeWidgetShowTimeRavenWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_RAVEN_WIDGET, BudgieShowTimeWidgetShowTimeRavenWidget);
	switch (property_id) {
		case BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY:
		g_value_set_string (value, budgie_show_time_widget_show_time_raven_widget_get_uuid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_budgie_show_time_widget_show_time_raven_widget_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec)
{
	BudgieShowTimeWidgetShowTimeRavenWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_RAVEN_WIDGET, BudgieShowTimeWidgetShowTimeRavenWidget);
	switch (property_id) {
		case BUDGIE_SHOW_TIME_WIDGET_SHOW_TIME_RAVEN_WIDGET_UUID_PROPERTY:
		budgie_show_time_widget_show_time_raven_widget_set_uuid (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
budgie_show_time_widget_show_time_main_get_instance_private (BudgieShowTimeWidgetShowTimeMain* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieShowTimeWidgetShowTimeMain_private_offset);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static gboolean
__lambda23_ (BudgieShowTimeWidgetShowTimeMain* self)
{
	XfwScreen* _tmp0_;
	gboolean result;
	_tmp0_ = budgie_show_time_widget_xfw_screen;
	budgie_show_time_widget_create_windows (_tmp0_, NULL);
	result = FALSE;
	return result;
}

static gboolean
___lambda23__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda23_ ((BudgieShowTimeWidgetShowTimeMain*) self);
	return result;
}

BudgieShowTimeWidgetShowTimeMain*
budgie_show_time_widget_show_time_main_construct (GType object_type,
                                                  const gchar* uuid,
                                                  GSettings* settings)
{
	BudgieShowTimeWidgetShowTimeMain * self = NULL;
	gchar* _tmp0_;
	GSettings* _tmp1_;
	XfwScreen* _tmp2_;
	GList* monitors = NULL;
	XfwScreen* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_val_if_fail (uuid != NULL, NULL);
	self = (BudgieShowTimeWidgetShowTimeMain*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (uuid);
	_g_free0 (self->priv->uuid);
	self->priv->uuid = _tmp0_;
	_tmp1_ = _g_object_ref0 (settings);
	_g_object_unref0 (budgie_show_time_widget_showtime_settings);
	budgie_show_time_widget_showtime_settings = _tmp1_;
	_tmp2_ = xfw_screen_get_default ();
	_g_object_unref0 (budgie_show_time_widget_xfw_screen);
	budgie_show_time_widget_xfw_screen = _tmp2_;
	_tmp3_ = budgie_show_time_widget_xfw_screen;
	_tmp4_ = xfw_screen_get_monitors (_tmp3_);
	monitors = _tmp4_;
	budgie_show_time_widget_n_monitors = 0;
	_tmp5_ = monitors;
	{
		GList* m_collection = NULL;
		GList* m_it = NULL;
		m_collection = _tmp5_;
		for (m_it = m_collection; m_it != NULL; m_it = m_it->next) {
			XfwMonitor* _tmp6_;
			XfwMonitor* m = NULL;
			_tmp6_ = _g_object_ref0 ((XfwMonitor*) m_it->data);
			m = _tmp6_;
			{
				gint _tmp7_;
				_tmp7_ = budgie_show_time_widget_n_monitors;
				budgie_show_time_widget_n_monitors = _tmp7_ + 1;
				_g_object_unref0 (m);
			}
		}
	}
	_tmp8_ = budgie_show_time_widget_moduledir;
	_tmp9_ = string_to_string (uuid);
	_tmp10_ = g_strconcat ("/showtime-desktop ", _tmp9_, NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strconcat (_tmp8_, _tmp11_, NULL);
	_g_free0 (budgie_show_time_widget_winpath);
	budgie_show_time_widget_winpath = _tmp12_;
	_g_free0 (_tmp11_);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda23__gsource_func, g_object_ref (self), g_object_unref);
	return self;
}

BudgieShowTimeWidgetShowTimeMain*
budgie_show_time_widget_show_time_main_new (const gchar* uuid,
                                            GSettings* settings)
{
	return budgie_show_time_widget_show_time_main_construct (BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_MAIN, uuid, settings);
}

static void
budgie_show_time_widget_show_time_main_class_init (BudgieShowTimeWidgetShowTimeMainClass * klass,
                                                   gpointer klass_data)
{
	budgie_show_time_widget_show_time_main_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieShowTimeWidgetShowTimeMain_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_show_time_widget_show_time_main_finalize;
}

static void
budgie_show_time_widget_show_time_main_instance_init (BudgieShowTimeWidgetShowTimeMain * self,
                                                      gpointer klass)
{
	self->priv = budgie_show_time_widget_show_time_main_get_instance_private (self);
}

static void
budgie_show_time_widget_show_time_main_finalize (GObject * obj)
{
	BudgieShowTimeWidgetShowTimeMain * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOW_TIME_MAIN, BudgieShowTimeWidgetShowTimeMain);
	_g_free0 (self->priv->uuid);
	G_OBJECT_CLASS (budgie_show_time_widget_show_time_main_parent_class)->finalize (obj);
}

GType
budgie_show_time_widget_show_time_main_get_type (void)
{
	return budgie_show_time_widget_show_time_main_type_id;
}

GType
budgie_show_time_widget_show_time_main_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShowTimeWidgetShowTimeMainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_show_time_widget_show_time_main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShowTimeWidgetShowTimeMain), 0, (GInstanceInitFunc) budgie_show_time_widget_show_time_main_instance_init, NULL };
	budgie_show_time_widget_show_time_main_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "BudgieShowTimeWidgetShowTimeMain", &g_define_type_info, 0);
	BudgieShowTimeWidgetShowTimeMain_private_offset = sizeof (BudgieShowTimeWidgetShowTimeMainPrivate);
	return budgie_show_time_widget_show_time_main_type_id;
}

void
peas_register_types (GTypeModule* module)
{
	PeasObjectModule* objmodule = NULL;
	PeasObjectModule* _tmp0_;
	g_return_if_fail (module != NULL);
	budgie_show_time_widget_budgie_show_time_settings_register_type (module);
	budgie_show_time_widget_position_picker_dialog_register_type (module);
	budgie_show_time_widget_showtime_raven_plugin_register_type (module);
	budgie_show_time_widget_show_time_raven_widget_register_type (module);
	budgie_show_time_widget_show_time_main_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_raven_plugin_get_type (), BUDGIE_SHOW_TIME_WIDGET_TYPE_SHOWTIME_RAVEN_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);
}

